You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/content/docs/page-shield/best-practices/handle-an-alert.mdx
+20-2Lines changed: 20 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,20 +7,26 @@ sidebar:
7
7
label: Handle an alert
8
8
---
9
9
10
-
If you receive a client-side resource alert, sometimes you need to perform some manual investigation to confirm the nature of the script. Use the guidance provided in this page as a starting point for your investigation.
10
+
import { Steps } from"~/components";
11
+
12
+
If you receive a [client-side resource alert](/page-shield/alerts/alert-types/), sometimes you need to perform some manual investigation to confirm the nature of the script. Use the guidance provided in this page as a starting point for your investigation.
11
13
12
14
## 1. Understand what triggered the alert
13
15
14
16
Start by identifying the [detection system](/page-shield/how-it-works/malicious-script-detection/) that triggered the alert. A link is provided in the alert that will send you directly to the Cloudflare dashboard to the relevant resource that needs reviewing. Alternatively, do the following:
15
17
18
+
<Steps>
19
+
16
20
1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com/), and select your account and domain.
17
21
2. Navigate to the client-side resource monitoring page:
18
22
- Old dashboard: Go to **Security** > **Page Shield**.
19
23
- New security dashboard: Go to **Security** > **Web assets** > **Client-side resources** tab.
20
24
3. Select **Scripts** or **Connections** and search for the resource mentioned on the alert you received.
21
25
4. Select **Details** next to the resource you identified. The example screenshot below shows a malicious script resource.
22
26
23
-

27
+

28
+
29
+
</Steps>
24
30
25
31
The details page will specify which detection system triggered the alert. Check the values of the following fields:
26
32
@@ -34,16 +40,24 @@ Different detection mechanisms may consider the script malicious at the same tim
34
40
35
41
If you received an alert for a potentially malicious script:
36
42
43
+
<Steps>
44
+
37
45
1. Navigate to the page on your website that is loading the script or performing the connection. Open a browser and navigate to one of the URLs in the **Page URLs** field (shown in the script details dialog box).
38
46
39
47
2. Open the browser's developer tools to confirm that the script is being loaded. You can check this in the developer tools' **Network** tab, searching for the script name, URL, or hostname.
40
48
49
+
</Steps>
50
+
41
51
If you received an alert for a potentially malicious connection:
42
52
53
+
<Steps>
54
+
43
55
1. Go to the page on your website where the connection that triggered the alert is being made. Open a browser and go to one of the URLs specified in the **Page URLs** field (shown in the connection details dialog box).
44
56
45
57
2. Open the browser's developer tools to confirm that the connection is being made. You can check this in the developer tools' **Network** tab, searching for the target hostname of the connection.
46
58
59
+
</Steps>
60
+
47
61
If you find the script or connection, this means the script is being loaded (or the connection is being established) for all website visitors — proceed to [step 3](#3-check-the-script-reputation).
48
62
49
63
If you do not find the script being loaded or the connection being made, this could mean one of the following:
@@ -70,10 +84,14 @@ If you believe that Cloudflare's classification is a false positive, contact you
70
84
71
85
You could use a virtual machine to perform some of the following analysis:
72
86
87
+
<Steps>
88
+
73
89
1. Open the script URL and get the script source code. If the script is obfuscated or encoded, this could be a sign that the script is malicious.
74
90
2. Scan the script source code for any hostnames or IP addresses.
75
91
3. For each hostname or IP address you identified, use Cloudflare's Security Center Investigate platform to look up threat information and/or search online for potential Indicators of Compromise.
Once you [activate Page Shield's client-side resource monitoring](/page-shield/get-started/), the main client-side resources dashboard will show which resources (scripts and connections) are running on your domain, as well as the cookies recently detected in HTTP traffic.
11
11
12
12
If you notice unexpected scripts or connections on the dashboard, check them for signs of malicious activity. Enterprise customers with a paid add-on will have their [connections and scripts classified as potentially malicious](/page-shield/how-it-works/malicious-script-detection/) based on threat feeds. You should also check for any new or unexpected cookies.
13
13
14
-
:::note
14
+
:::note[Notes]
15
15
16
16
- Users in Free and Pro plans only have access to script monitoring.
17
17
- If you recently activated client-side resource monitoring, you may see a delay in reporting.
@@ -22,27 +22,43 @@ If you notice unexpected scripts or connections on the dashboard, check them for
22
22
23
23
To review the resources detected by Cloudflare:
24
24
25
+
{/* prettier-ignore-start */}
26
+
27
+
<Steps>
28
+
25
29
1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com/), and select your account and domain.
26
30
27
31
2. Go to the client-side resources page:
28
32
- Old dashboard: Go to **Security** > **Page Shield**.
29
33
- New security dashboard: Go to **Security** > **Web assets** > **Client-side resources** tab.
30
34
31
-
3. Review the list of scripts, connections, and cookies for your domain. To apply a filter, select **Add filter** and use one or more of the available options:
35
+
3. Review the list of scripts, connections, and cookies for your domain, depending on your plan. To apply a filter, select **Add filter** and use one or more of the available options.
36
+
37
+
<details>
38
+
<summary>Available filters</summary>
39
+
40
+
-**Status**: Filter scripts or connections by [status](/page-shield/reference/script-statuses/).
32
41
-**Script URL**: Filter scripts by their URL.
33
42
-**Connection URL**: Filter connections by their target URL. Depending on your [configuration](/page-shield/reference/settings/#connection-target-details), it may search only by target hostname.
34
43
-**Seen on host**: Look for scripts appearing on specific hostnames, or connections made in a specific hostname.
35
44
-**Seen on page** (requires a Business or Enterprise plan): Look for scripts appearing in a specific page, or for connections made in a specific page. Searches the first page where the script was loaded (or where the connection was made) and the latest occurrences list.
36
-
-**Status**: Filter scripts or connections by [status](/page-shield/reference/script-statuses/).
37
45
-**Type**: Filter cookies according to their type: first-party cookies or unknown.
38
46
- Cookie property: Filter by a cookie property such as **Name**, **Domain**, **Path**, **Same site**, **HTTP only**, and **Secure**.
39
47
48
+
</details>
49
+
40
50
4. Depending on your plan, you may be able to [view the details of each item](#view-details).
41
51
52
+
</Steps>
53
+
54
+
{/* prettier-ignore-end */}
55
+
42
56
## View all reported scripts or connections
43
57
44
58
The All Reported Connections and All Reported Scripts dashboards show all the detected resources including infrequent or inactive ones, reported in the last 30 days. After 30 days without any report, Cloudflare will delete information about a previously reported resource, and it will no longer appear in any of the dashboards.
45
59
60
+
<Steps>
61
+
46
62
1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com/), and select your account and domain.
47
63
2. Go to the client-side resources page:
48
64
- Old dashboard: Go to **Security** > **Page Shield**.
@@ -52,6 +68,8 @@ The All Reported Connections and All Reported Scripts dashboards show all the de
52
68
4. Select **View all scripts** or **View all connections**.
53
69
5. Review the information displayed in the dashboard.
54
70
71
+
</Steps>
72
+
55
73
You can filter the data in these dashboards using different criteria, and print a report with the displayed records.
56
74
57
75
## View details
@@ -60,7 +78,21 @@ You can filter the data in these dashboards using different criteria, and print
60
78
Only available to customers on Business and Enterprise plans.
61
79
:::
62
80
63
-
To view the details of an item, select **Details** next to it.
81
+
To view the details of an item:
82
+
83
+
<Steps>
84
+
85
+
1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com/), and select your account and domain.
86
+
87
+
2. Go to the client-side resources page:
88
+
- Old dashboard: Go to **Security** > **Page Shield**.
89
+
- New security dashboard: Go to **Security** > **Web assets** > **Client-side resources** tab.
90
+
91
+
3. Select **Scripts**, **Connections**, or **Cookies** (the available options depend on your plan).
92
+
93
+
4. Next to a script, connection, or cookie in the list, select **Details**.
94
+
95
+
</Steps>
64
96
65
97
### Script and connection details
66
98
@@ -116,6 +148,8 @@ Use this feature to extract data from Page Shield that you can review and annota
116
148
117
149
To export script, connection, or cookie information in CSV format:
118
150
151
+
<Steps>
152
+
119
153
1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com/), and select your account and domain.
120
154
2. Go to the client-side resources page:
121
155
- Old dashboard: Go to **Security** > **Page Shield**.
@@ -124,3 +158,5 @@ To export script, connection, or cookie information in CSV format:
124
158
3. Select **Scripts**, **Connections**, or **Cookies**.
125
159
4. (Optional) Apply any filters to the displayed data.
Copy file name to clipboardExpand all lines: src/content/docs/page-shield/detection/review-malicious-scripts.mdx
+9-1Lines changed: 9 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ description: Learn how to review scripts and connections that Page Shield
8
8
considered malicious.
9
9
---
10
10
11
-
import { Render } from"~/components";
11
+
import { Render, Steps } from"~/components";
12
12
13
13
:::note
14
14
Only available to Enterprise customers with a paid add-on.
@@ -20,6 +20,8 @@ Cloudflare displays scripts and connections considered malicious at the top of t
20
20
21
21
To review the scripts considered malicious:
22
22
23
+
<Steps>
24
+
23
25
1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com/), and select your account and domain.
24
26
25
27
2. Go to the client-side resources page:
@@ -41,12 +43,16 @@ To review the scripts considered malicious:
41
43
42
44
5. Based on the displayed information, and with the help of the [last seen/first seen fields in the script details](/page-shield/detection/monitor-connections-scripts/#view-details), review and update the pages where the malicious script was detected.
43
45
46
+
</Steps>
47
+
44
48
You can configure alerts for detected malicious scripts. Refer to [Alerts](/page-shield/alerts/) for more information.
45
49
46
50
## Review malicious connections
47
51
48
52
To review the connections considered malicious:
49
53
54
+
<Steps>
55
+
50
56
1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com/), and select your account and domain.
51
57
52
58
2. Go to the client-side resources page:
@@ -63,3 +69,5 @@ To review the connections considered malicious:
63
69
For more information, refer to [Malicious script and connection detection](/page-shield/how-it-works/malicious-script-detection/).
64
70
65
71
5. Based on the displayed information, and with the help of the [last seen/first seen fields in the connection details](/page-shield/detection/monitor-connections-scripts/#view-details), review and update the pages where the malicious connection was detected.
1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com/), and select your account and domain.
21
23
2. Go to **Security** > **Page Shield**.
22
24
3. Select **Enable Page Shield**.
23
25
26
+
</Steps>
27
+
24
28
If you do not have access to Page Shield in the Cloudflare dashboard, check if your user has one of the [necessary roles](/page-shield/reference/roles-and-permissions/).
1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com/), and select your account and domain.
29
35
2. Go to **Security** > **Settings** and filter by **Client-side abuse**.
30
36
3. Turn on **Continuous script monitoring**.
31
37
38
+
</Steps>
39
+
32
40
If you do not have access to resource monitoring in the Cloudflare dashboard, check if your user has one of the [necessary roles](/page-shield/reference/roles-and-permissions/).
33
41
34
42
</TabItem> </Tabs>
35
43
36
-
## Review detected scripts
44
+
## Review detected resources
37
45
38
46
When you enable client-side resource monitoring, it may take a while to get the list of detected scripts in your domain.
39
47
40
-
Review the scripts displayed in the [resource monitoring dashboard](/page-shield/detection/monitor-connections-scripts/), checking them for signs of malicious activity.
48
+
To review the scripts detected by Cloudflare:
49
+
50
+
<Steps>
51
+
52
+
1. Go to the client-side resources page:
53
+
- Old dashboard: Go to **Security** > **Page Shield**.
54
+
- New security dashboard: Go to **Security** > **Web assets** > **Client-side resources** tab.
55
+
56
+
2. Review the list of detected scripts, checking for any unknown or unexpected scripts.<br/>
57
+
[Depending on your plan](/page-shield/#availability), Cloudflare will also:
58
+
- Inform you if a script is [considered malicious](/page-shield/how-it-works/malicious-script-detection/).
59
+
-[Show the details](/page-shield/detection/monitor-connections-scripts/#script-and-connection-details) about each detected script.
60
+
61
+
</Steps>
41
62
42
63
Depending on your plan, you may be able to also review the connections made by scripts in your domain's pages and check them for malicious activity.
43
64
@@ -48,7 +69,7 @@ Depending on your plan, you may be able to also review the connections made by s
48
69
product="page-shield"
49
70
params={{
50
71
availabilityDetails:
51
-
"The available alert types depend on your Cloudflare plan.",
72
+
"The [available alert types](/page-shield/alerts/alert-types/) depend on your Cloudflare plan.",
52
73
}}
53
74
/>
54
75
@@ -60,12 +81,30 @@ Depending on your plan, you may be able to also review the connections made by s
60
81
Only available to Enterprise customers with a paid add-on.
61
82
:::
62
83
63
-
[Policies](/page-shield/policies/), called content security rules in the [new security dashboard](/security/), define allowed resources on your websites. Create policies to implement a positive security model[^1].
84
+
[Policies](/page-shield/policies/) — called content security rules in the [new security dashboard](/security/) — define allowed resources on your websites. Create policies to implement a positive security model[^1].
64
85
65
-
1.[Create a policy](/page-shield/policies/create-dashboard/) with the _Log_ action.
86
+
[^1]: A positive security model is one that defines what is allowed and rejects everything else. In contrast, a negative security model defines what will be rejected and accepts the rest.
66
87
67
-
2. After some time, [review the list of policy violations](/page-shield/policies/violations/) to make sure the policy is correct. Update the policy if needed.
88
+
### 1. Create a policy with the Log action
68
89
69
-
3. Change the policy action to _Allow_ to start blocking resources not covered by the policy.
90
+
When you create a policy with the [_Log_ action](/page-shield/policies/#policy-actions), Cloudflare logs any resources not covered by the policy, without blocking any resources. Use this action to validate a new policy before deploying it.
70
91
71
-
[^1]: A positive security model is one that defines what is allowed and rejects everything else. In contrast, a negative security model defines what will be rejected and accepts the rest.
92
+
<Render
93
+
file="policy-create"
94
+
params={{ policyAction: "Log" }}
95
+
product="page-shield"
96
+
/>
97
+
98
+
### 2. Review policy violations
99
+
100
+
Resources not covered by the policy you created will be reported as [policy violations](/page-shield/policies/violations/). After some time, review the list of policy violations to make sure the policy is correct.
Once you have verified that your policy is correct, change the policy action from _Log_ to _Allow_.
109
+
110
+
When you use the [_Allow_ action](/page-shield/policies/#policy-actions), Cloudflare starts blocking any resources not explicitly allowed by the policy.
0 commit comments