Skip to content

Commit ed21334

Browse files
pedrosousamarciocloudflare
authored andcommitted
[WAF] Detections section (#17027)
--------- Co-authored-by: marciocloudflare <[email protected]>
1 parent 9398ce6 commit ed21334

File tree

38 files changed

+903
-282
lines changed

38 files changed

+903
-282
lines changed

public/_redirects

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1180,8 +1180,14 @@
11801180
/turnstile/concepts/widget-types/ /turnstile/concepts/widget/ 301
11811181

11821182
# waf
1183-
/waf/about/file-scanning/ /waf/about/content-scanning/ 301
1184-
/waf/about/waf-ml/ /waf/about/waf-attack-score/ 301
1183+
/waf/about/ /waf/concepts/ 301
1184+
/waf/about/content-scanning/ /waf/detections/malicious-uploads/ 301
1185+
/waf/about/content-scanning/get-started/ /waf/detections/malicious-uploads/get-started/ 301
1186+
/waf/about/content-scanning/example-rules/ /waf/detections/malicious-uploads/example-rules/ 301
1187+
/waf/about/content-scanning/api-calls/ /waf/detections/malicious-uploads/api-calls/ 301
1188+
/waf/about/file-scanning/ /waf/detections/malicious-uploads/ 301
1189+
/waf/about/waf-attack-score/ /waf/detections/attack-score/ 301
1190+
/waf/about/waf-ml/ /waf/detections/attack-score/ 301
11851191
/waf/alerts/ /waf/reference/alerts/ 301
11861192
/waf/custom-rules/custom-firewall/ /waf/custom-rules/ 301
11871193
/waf/custom-rules/custom-firewall/create-api/ /waf/custom-rules/create-api/ 301

src/content/changelogs/waf-general.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ entries:
1010
- publish_date: "2024-08-29"
1111
title: Fixed occasional attack score mismatches
1212
description: |-
13-
Fixed an issue causing score mismatches between the global [WAF attack score](/waf/about/waf-attack-score/) and subscores. In certain cases, subscores were higher (not an attack) than expected while the global attack score was lower than expected (attack), leading to false positives.
13+
Fixed an issue causing score mismatches between the global [WAF attack score](/waf/detections/attack-score/) and subscores. In certain cases, subscores were higher (not an attack) than expected while the global attack score was lower than expected (attack), leading to false positives.
1414
- publish_date: "2024-05-23"
1515
title: Improved detection capabilities
1616
description: |-
17-
[WAF attack score](/waf/about/waf-attack-score/) now automatically detects and decodes Base64 and JavaScript (Unicode escape sequences) in HTTP requests. This update is available for all customers with access to WAF attack score (Business customers with access to a single field and Enterprise customers).
17+
[WAF attack score](/waf/detections/attack-score/) now automatically detects and decodes Base64 and JavaScript (Unicode escape sequences) in HTTP requests. This update is available for all customers with access to WAF attack score (Business customers with access to a single field and Enterprise customers).

src/content/docs/reference-architecture/architectures/security.mdx

Lines changed: 86 additions & 87 deletions
Large diffs are not rendered by default.

src/content/docs/rules/transform/managed-transforms/configure.mdx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,11 @@ curl https://api.cloudflare.com/client/v4/zones/{zone_id}/managed_headers \
6868
"enabled": false,
6969
"has_conflict": false,
7070
"conflicts_with": ["add_true_client_ip_headers"]
71+
},
72+
{
73+
"id": "add_waf_credential_check_status_header",
74+
"enabled": false,
75+
"has_conflict": false
7176
}
7277
],
7378
"managed_response_headers": [

src/content/docs/rules/transform/managed-transforms/index.mdx

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ title: Managed Transforms
33
pcx_content_type: concept
44
sidebar:
55
order: 4
6-
76
---
87

98
Managed Transforms allow you to perform common adjustments to HTTP request and response headers with the click of a button. The available adjustments include:
109

11-
* Add bot protection request headers.
12-
* Remove or add headers related to the visitor's IP address.
13-
* Add security-related response headers.
14-
* Remove "X-Powered-By" response headers.
10+
- Add bot protection request headers.
11+
- Remove or add headers related to the visitor's IP address.
12+
- Add request header when the WAF detects leaked credentials.
13+
- Add security-related response headers.
14+
- Remove "X-Powered-By" response headers.
1515

1616
For a complete list, refer to [Available Managed Transforms](/rules/transform/managed-transforms/reference/).
1717

@@ -20,8 +20,7 @@ When you enable a Managed Transform, Cloudflare internally deploys one or more T
2020
Enabled Managed Transforms will apply to all inbound requests for the zone.
2121

2222
:::note
23-
24-
The generated internal Transform Rules will not appear in the Transform Rules list in the Cloudflare dashboard.
23+
The generated internal Transform Rules will not appear in the Transform Rules list in the Cloudflare dashboard.
2524
:::
2625

2726
## Next steps

src/content/docs/rules/transform/managed-transforms/reference.mdx

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,25 @@ For example, consider an incoming request proxied by two CDNs (`CDN_1` and `CDN_
106106
With **Remove visitor IP headers** enabled, the `x-forwarded-for` header sent to the origin server will be:<br/>
107107
`x-forwarded-for: <THIRD_PARTY_CDN_2_IP>`
108108

109+
### Add Leaked Credentials Checks Header
110+
111+
Adds an `Exposed-Credential-Check` request header whenever the WAF detects leaked credentials in the incoming request.
112+
113+
The header can have these values:
114+
115+
| Header + Value | Description | Availability |
116+
| ----------------------------- | ----------------------------------------------------------------------- | ------------------ |
117+
| `Exposed-Credential-Check: 1` | Previously leaked username and password detected | Pro plan and above |
118+
| `Exposed-Credential-Check: 2` | Previously leaked username detected | Enterprise plan |
119+
| `Exposed-Credential-Check: 3` | Similar combination of previously leaked username and password detected | Enterprise plan |
120+
| `Exposed-Credential-Check: 4` | Previously leaked password detected | All plans |
121+
122+
You will only receive this managed header at your origin server if:
123+
124+
- The [leaked credentials detection](/waf/detections/leaked-credentials/) in the WAF is turned on.
125+
- The **Add Leaked Credentials Checks Header** managed transform is turned on.
126+
- Your Cloudflare plan supports the type of credentials detection. For example, Free plans can only know if a password was previously leaked. In this situation, Cloudflare will add an `Exposed-Credential-Check: 4` header to the request.
127+
109128
## HTTP response headers
110129

111130
### Remove "X-Powered-By" headers

src/content/docs/ruleset-engine/rules-language/fields/dynamic-fields.mdx

Lines changed: 52 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ Dynamic fields represent computed or derived values, typically related to threat
1616

1717
- Access to `cf.bot_management.*` fields requires a Cloudflare Enterprise plan with [Bot Management](/bots/plans/bm-subscription/) enabled.
1818

19-
- Access to `cf.waf.content_scan.*` fields requires a Cloudflare Enterprise plan with [WAF content scanning](/waf/about/content-scanning/) enabled.
19+
- Access to `cf.waf.content_scan.*` fields requires a Cloudflare Enterprise plan with [malicious uploads detection](/waf/detections/malicious-uploads/) enabled.
20+
21+
- Access to fields `cf.waf.auth_detected` and `cf.waf.credential_check.*` depends on your Cloudflare plan and add-ons. For more information, refer to [Leaked credentials detection](/waf/detections/leaked-credentials/).
2022

2123
- The `cf.tls_client_auth.*` string fields are only filled in if the request includes a client certificate for [mTLS authentication](/ssl/client-certificates/enable-mtls/).
2224

@@ -372,69 +374,69 @@ Example:
372374

373375
When `true`, the request contains at least one [content object](https://www.cloudflare.com/learning/ssl/what-happens-in-a-tls-handshake/).
374376

375-
For more details, refer to [Uploaded content scanning](/waf/about/content-scanning/).
377+
For more details, refer to [Malicious uploads detection](/waf/detections/malicious-uploads/).
376378

377379
## `cf.waf.content_scan.has_malicious_obj`
378380

379381
`cf.waf.content_scan.has_malicious_obj` `Boolean`
380382

381383
When `true`, the request contains at least one malicious content object.
382384

383-
For more details, refer to [Uploaded content scanning](/waf/about/content-scanning/).
385+
For more details, refer to [Malicious uploads detection](/waf/detections/malicious-uploads/).
384386

385387
## `cf.waf.content_scan.num_malicious_obj`
386388

387389
`cf.waf.content_scan.num_malicious_obj` `Integer`
388390

389391
The number of malicious content objects detected in the request (zero or greater).
390392

391-
For more details, refer to [Uploaded content scanning](/waf/about/content-scanning/).
393+
For more details, refer to [Malicious uploads detection](/waf/detections/malicious-uploads/).
392394

393395
## `cf.waf.content_scan.has_failed`
394396

395397
`cf.waf.content_scan.has_failed` `Boolean`
396398

397399
When `true`, the file scanner was unable to scan all the content objects detected in the request.
398400

399-
For more details, refer to [Uploaded content scanning](/waf/about/content-scanning/).
401+
For more details, refer to [Malicious uploads detection](/waf/detections/malicious-uploads/).
400402

401403
## `cf.waf.content_scan.num_obj`
402404

403405
`cf.waf.content_scan.num_obj` `Integer`
404406

405407
The number of content objects detected in the request (zero or greater).
406408

407-
For more details, refer to [Uploaded content scanning](/waf/about/content-scanning/).
409+
For more details, refer to [Malicious uploads detection](/waf/detections/malicious-uploads/).
408410

409411
## `cf.waf.content_scan.obj_sizes`
410412

411413
`cf.waf.content_scan.obj_sizes` `Array<Integer>`
412414

413415
An array of file sizes in bytes, in the order the content objects were detected in the request.
414416

415-
For more details, refer to [Uploaded content scanning](/waf/about/content-scanning/).
417+
For more details, refer to [Malicious uploads detection](/waf/detections/malicious-uploads/).
416418

417419
## `cf.waf.content_scan.obj_types`
418420

419421
`cf.waf.content_scan.obj_types` `Array<String>`
420422

421423
An array of file types in the order the content objects were detected in the request. If Cloudflare cannot determine the file type of a content object, the corresponding value in the `obj_types` array will be `application/octet-stream`.
422424

423-
For more details, refer to [Uploaded content scanning](/waf/about/content-scanning/).
425+
For more details, refer to [Malicious uploads detection](/waf/detections/malicious-uploads/).
424426

425427
## `cf.waf.content_scan.obj_results`
426428

427429
`cf.waf.content_scan.obj_results` `Array<String>`
428430

429431
An array of scan results in the order the content objects were detected in the request. The possible values are: `clean`, `suspicious`, `infected`, and `not scanned`.
430432

431-
For more details, refer to [Uploaded content scanning](/waf/about/content-scanning/).
433+
For more details, refer to [Malicious uploads detection](/waf/detections/malicious-uploads/).
432434

433435
## `cf.waf.score`
434436

435437
`cf.waf.score` `Number`
436438

437-
A global score from 1 to 99 that combines the score of each WAF attack vector into a single score. This is the standard [WAF attack score](/waf/about/waf-attack-score/) to detect variants of attack patterns.
439+
A global score from 1 to 99 that combines the score of each WAF attack vector into a single score. This is the standard [WAF attack score](/waf/detections/attack-score/) to detect variants of attack patterns.
438440

439441
## `cf.waf.score.sqli`
440442

@@ -460,6 +462,46 @@ An attack score from 1 to 99 classifying the command injection or Remote Code Ex
460462

461463
The attack score class of the current request, based on the WAF attack score. Can have one of the following values: `attack`, `likely_attack`, `likely_clean`, `clean`.
462464

465+
## `cf.waf.auth_detected`
466+
467+
`cf.waf.auth_detected` `Boolean`
468+
469+
When `true`, the Cloudflare WAF detected authentication credentials in the request.
470+
471+
Only available when [leaked credentials detection](/waf/detections/leaked-credentials/) is enabled.
472+
473+
## `cf.waf.credential_check.password_leaked`
474+
475+
`cf.waf.credential_check.password_leaked` `Boolean`
476+
477+
When `true`, the password detected in the request was previously leaked.
478+
479+
Only available when [leaked credentials detection](/waf/detections/leaked-credentials/) is enabled.
480+
481+
## `cf.waf.credential_check.username_leaked`
482+
483+
`cf.waf.credential_check.username_leaked` `Boolean`
484+
485+
When `true`, the username detected in the request was previously leaked.
486+
487+
Only available when [leaked credentials detection](/waf/detections/leaked-credentials/) is enabled.
488+
489+
## `cf.waf.credential_check.username_and_password_leaked`
490+
491+
`cf.waf.credential_check.username_and_password_leaked` `Boolean`
492+
493+
When `true`, the authentication credentials detected in the request (username and password pair) were previously leaked.
494+
495+
Only available when [leaked credentials detection](/waf/detections/leaked-credentials/) is enabled.
496+
497+
## `cf.waf.credential_check.username_password_similar`
498+
499+
`cf.waf.credential_check.username_password_similar` `Boolean`
500+
501+
When `true`, a similar version of the username and password credentials detected in the request were previously leaked.
502+
503+
Only available when [leaked credentials detection](/waf/detections/leaked-credentials/) is enabled.
504+
463505
## `cf.worker.upstream_zone`
464506

465507
`cf.worker.upstream_zone` `String`

src/content/docs/style-guide/documentation-content-strategy/content-types/concept.mdx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
---
22
pcx_content_type: concept
33
title: Concept
4-
54
---
65

76
## Purpose
@@ -12,7 +11,7 @@ The purpose of a concept is to provide conceptual or descriptive information so
1211

1312
instructional, descriptive, approachable, supportive
1413

15-
## content\_type
14+
## content_type
1615

1716
`concept`
1817

@@ -51,6 +50,6 @@ Do not recreate information that's already available online. Instead, consider w
5150

5251
[Load Balancing](/load-balancing/)
5352

54-
[WAF](/waf/about/)
53+
[WAF](/waf/)
5554

5655
[Magic Transit](/magic-transit/about/)

src/content/docs/waf/analytics/security-analytics.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Use the Security Analytics dashboard to:
1818
- View the traffic distribution for your domain.
1919
- Understand which traffic is being mitigated by Cloudflare security products, and where non-mitigated traffic is being served from (Cloudflare global network or origin server).
2020
- Analyze suspicious traffic and create tailored WAF custom rules based on applied filters.
21-
- Learn more about Cloudflare’s security scores (<GlossaryTooltip term="attack score" link="/waf/about/waf-attack-score/">attack score</GlossaryTooltip>, [bot score](/bots/concepts/bot-score/), [uploaded content scanning](/waf/about/content-scanning/) results) with real data.
21+
- Learn more about Cloudflare’s security scores (<GlossaryTooltip term="attack score" link="/waf/detections/attack-score/">attack score</GlossaryTooltip>, [bot score](/bots/concepts/bot-score/), [uploaded content scanning](/waf/detections/malicious-uploads/) results) with real data.
2222
- [Find an appropriate rate limit](/waf/rate-limiting-rules/find-rate-limit/) for incoming traffic.
2323

2424
If you need to modify existing security-related rules you already configured, consider also using the [Security Events](/waf/analytics/security-events/) dashboard. This dashboard displays information about requests affected by Cloudflare security products.
@@ -92,7 +92,7 @@ To apply the filters for an insight to the data displayed in the Security Analyt
9292

9393
The **Attack likelihood**, **Bot likelihood**, and **Malicious uploads** sections display statistics related to WAF attack scores, bot scores, and WAF content scanning scores of incoming requests for the selected time frame.
9494

95-
You can examine different traffic segments according to the current metric (attack, bot, or content scanning). To apply score filters for different segments, select the buttons below the traffic chart. For example, select **Likely attack** under **Attack likelihood** to filter requests that are likely an attack (requests with WAF attack score values between 21 and 50).
95+
You can examine different traffic segments according to the current metric (attack score, bot score, or content scanning). To apply score filters for different segments, select the buttons below the traffic chart. For example, select **Likely attack** under **Attack likelihood** to filter requests that are likely an attack (requests with WAF attack score values between 21 and 50).
9696

9797
Additionally, you can use the slider tool below the chart to filter incoming requests according to the current metric. This allows you to filter traffic groups outside the predefined segments.
9898

@@ -106,7 +106,7 @@ The main chart displays the following data for the selected time frame, accordin
106106
- **Served by Cloudflare**: Requests served by the Cloudflare global network such as cached content and redirects.
107107
- **Served by origin**: Requests served by your origin server.
108108

109-
- **Attack likelihood**: [WAF attack score](/waf/about/waf-attack-score/) analysis of incoming requests, classifying them as _Clean_, _Likely clean_, _Likely attack_, or _Attack_.
109+
- **Attack likelihood**: [WAF attack score](/waf/detections/attack-score/) analysis of incoming requests, classifying them as _Clean_, _Likely clean_, _Likely attack_, or _Attack_.
110110

111111
- **Bot likelihood**: [Bot score](/bots/concepts/bot-score/) analysis of incoming requests, classifying them as _Automated_, _Likely automated_, or _Likely human_.
112112

0 commit comments

Comments
 (0)