Skip to content

Commit cda5104

Browse files
Merge pull request #208656 from johndowns/waf-front-door-anomaly
Front Door WAF - Anomaly scoring and rule ID 949110
2 parents 7220449 + 65e662f commit cda5104

File tree

3 files changed

+37
-31
lines changed

3 files changed

+37
-31
lines changed

articles/web-application-firewall/afds/waf-front-door-drs.md

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,16 @@ ms.service: web-application-firewall
55
author: vhorne
66
ms.author: victorh
77
ms.topic: conceptual
8-
ms.date: 06/15/2022
8+
ms.date: 08/28/2022
99
---
1010

1111
# Web Application Firewall DRS rule groups and rules
1212

1313
Azure Front Door web application firewall (WAF) protects web applications from common vulnerabilities and exploits. Azure-managed rule sets provide an easy way to deploy protection against a common set of security threats. Since such rule sets are managed by Azure, the rules are updated as needed to protect against new attack signatures. Default rule set also includes the Microsoft Threat Intelligence Collection rules that are written in partnership with the Microsoft Intelligence team to provide increased coverage, patches for specific vulnerabilities, and better false positive reduction.
1414

15-
1615
## Default rule sets
1716

18-
Azure-managed Default Rule Set includes rules against the following threat categories:
17+
The Azure-managed Default Rule Set (DRS) includes rules against the following threat categories:
1918

2019
- Cross-site scripting
2120
- Java attacks
@@ -27,40 +26,42 @@ Azure-managed Default Rule Set includes rules against the following threat categ
2726
- SQL injection protection
2827
- Protocol attackers
2928

30-
The version number of the Default Rule Set increments when new attack signatures are added to the rule set.
31-
Default Rule Set is enabled by default in Detection mode in your WAF policies. You can disable or enable individual rules within the Default Rule Set to meet your application requirements. You can also set specific actions (ALLOW/BLOCK/REDIRECT/LOG) per rule.
29+
The version number of the DRS increments when new attack signatures are added to the rule set.
30+
31+
DRS is enabled by default in Detection mode in your WAF policies. You can disable or enable individual rules within the Default Rule Set to meet your application requirements. You can also set specific actions per rule. The available actions are: [Allow, Block, Log, and Redirect](afds-overview.md#waf-actions).
3232

33-
Sometimes you may need to omit certain request attributes from a WAF evaluation. A common example is Active Directory-inserted tokens that are used for authentication. You may configure an exclusion list for a managed rule, rule group, or for the entire rule set.
33+
Sometimes you might need to omit certain request attributes from a WAF evaluation. A common example is Active Directory-inserted tokens that are used for authentication. You may configure an exclusion list for a managed rule, rule group, or for the entire rule set. For more information, see [Web Application Firewall (WAF) with Front Door exclusion lists](./waf-front-door-exclusion.md).
3434

35-
The Default action is to BLOCK. Additionally, custom rules can be configured in the same WAF policy if you wish to bypass any of the pre-configured rules in the Default Rule Set.
35+
By default, DRS blocks requests that trigger the rules. Additionally, custom rules can be configured in the same WAF policy if you wish to bypass any of the pre-configured rules in the Default Rule Set.
3636

3737
Custom rules are always applied before rules in the Default Rule Set are evaluated. If a request matches a custom rule, the corresponding rule action is applied. The request is either blocked or passed through to the back-end. No other custom rules or the rules in the Default Rule Set are processed. You can also remove the Default Rule Set from your WAF policies.
3838

3939
### Microsoft Threat Intelligence Collection rules
4040

41-
The Microsoft Threat Intelligence Collection rules are written in partnership with the Microsoft Intelligence team to provide increased coverage, patches for specific vulnerabilities, and better false positive reduction.
41+
The Microsoft Threat Intelligence Collection rules are written in partnership with the Microsoft Threat Intelligence team to provide increased coverage, patches for specific vulnerabilities, and better false positive reduction.
4242

43-
### Anomaly Scoring mode
43+
### <a name="anomaly-scoring-mode"></a>Anomaly scoring
4444

45-
OWASP has two modes for deciding whether to block traffic: Traditional mode and Anomaly Scoring mode.
45+
When you use DRS 2.0 or later, your WAF uses *anomaly scoring*. Traffic that matches any rule isn't immediately blocked, even when your WAF is in prevention mode. Instead, the OWASP rule sets define a severity for each rule: *Critical*, *Error*, *Warning*, or *Notice*. The severity affects a numeric value for the request, which is called the *anomaly score*:
4646

47-
In Traditional mode, traffic that matches any rule is considered independently of any other rule matches. This mode is easy to understand. But the lack of information about how many rules match a specific request is a limitation. So, Anomaly Scoring mode was introduced. It's the default for OWASP 3.*x*.
47+
| Rule severity | Values contributes to anomaly score |
48+
|-|-|
49+
| Critical | 5 |
50+
| Error | 4 |
51+
| Warning | 3 |
52+
| Notice | 2 |
4853

49-
In Anomaly Scoring mode, traffic that matches any rule isn't immediately blocked when the firewall is in Prevention mode. Rules have a certain severity: *Critical*, *Error*, *Warning*, or *Notice*. That severity affects a numeric value for the request, which is called the Anomaly Score. For example, one *Warning* rule match contributes 3 to the score. One *Critical* rule match contributes 5.
54+
If the anomaly score is 5 or greater, WAF blocks the request.
5055

51-
|Severity |Value |
52-
|---------|---------|
53-
|Critical |5|
54-
|Error |4|
55-
|Warning |3|
56-
|Notice |2|
56+
For example, a single *Critical* rule match is enough for the WAF to block a request, because the overall anomaly score is 5. However, one *Warning* rule match only increases the anomaly score by 3, which isn't enough by itself to block the traffic.
5757

58-
There's a threshold of 5 for the Anomaly Score to block traffic. So, a single *Critical* rule match is enough for the WAF to block a request, even in Prevention mode. But one *Warning* rule match only increases the Anomaly Score by 3, which isn't enough by itself to block the traffic. For more information, see [What content types does WAF support?](waf-faq.yml#what-content-types-does-waf-support-) in the FAQ to learn what content types are supported for body inspection with different DRS versions.
58+
When your WAF uses older version of the default rule set (before DRS 2.0), your WAF runs in the traditional mode. Traffic that matches any rule is considered independently of any other rule matches. In traditional mode, you don't have visiblity into the complete set of rules that a specific request matched.
5959

60+
The version of the DRS that you use also determines which content types are supported for request body inspection. For more information, see [What content types does WAF support?](waf-faq.yml#what-content-types-does-waf-support-) in the FAQ.
6061

6162
### DRS 2.0
6263

63-
DRS 2.0 includes 17 rule groups, as shown in the following table. Each group contains multiple rules, which can be disabled.
64+
DRS 2.0 includes 17 rule groups, as shown in the following table. Each group contains multiple rules, and you can disable individual rules as well as entire rule groups.
6465

6566
> [!NOTE]
6667
> DRS 2.0 is only available on Azure Front Door Premium.
@@ -118,9 +119,6 @@ DRS 2.0 includes 17 rule groups, as shown in the following table. Each group con
118119
|**[MS-ThreatIntel-WebShells](#drs9905-10)**|Protect against Web shell attacks|
119120
|**[MS-ThreatIntel-CVEs](#drs99001-10)**|Protect against CVE attacks|
120121

121-
122-
123-
124122
### Bot rules
125123

126124
|Rule group|Description|
@@ -129,10 +127,7 @@ DRS 2.0 includes 17 rule groups, as shown in the following table. Each group con
129127
|**[GoodBots](#bot200)**|Identify good bots|
130128
|**[UnknownBots](#bot300)**|Identify unknown bots|
131129

132-
133-
134-
The following rule groups and rules are available when using Web Application Firewall on Azure
135-
Front Door.
130+
The following rule groups and rules are available when using Web Application Firewall on Azure Front Door.
136131

137132
# [DRS 2.0](#tab/drs20)
138133

@@ -289,7 +284,6 @@ Front Door.
289284
>[!NOTE]
290285
> This article contains references to the term *blacklist*, a term that Microsoft no longer uses. When the term is removed from the software, we’ll remove it from this article.
291286
292-
293287
### <a name="drs942-20"></a> SQLI - SQL Injection
294288
|RuleId|Description|
295289
|---|---|
@@ -335,7 +329,6 @@ Front Door.
335329
|942500|MySQL in-line comment detected.|
336330
|942510|SQLi bypass attempt by ticks or backticks detected.|
337331

338-
339332
### <a name="drs943-20"></a> SESSION-FIXATION
340333
|RuleId|Description|
341334
|---|---|
@@ -383,6 +376,13 @@ Front Door.
383376
|99001015|Attempted Spring Framework unsafe class object exploitation [CVE-2022-22965](https://www.cve.org/CVERecord?id=CVE-2022-22965)|
384377
|99001016|Attempted Spring Cloud Gateway Actuator injection [CVE-2022-22947](https://www.cve.org/CVERecord?id=CVE-2022-22947)
385378

379+
> [!NOTE]
380+
> When reviewing your WAF's logs, you might see rule ID 949110. The description of the rule might include *Inbound Anomaly Score Exceeded*.
381+
>
382+
> This rule indicates that the total anomaly score for the request exceeded the maximum allowable score. For more information, see [Anomaly scoring](#anomaly-scoring-mode).
383+
>
384+
> When you tune your WAF policies, you need to investigate the other rules that were triggered by the request so that you can adjust your WAF's configuration. For more information, see [Tuning Web Application Firewall (WAF) for Azure Front Door](waf-front-door-tuning.md).
385+
386386
# [DRS 1.1](#tab/drs11)
387387

388388
## <a name="drs11"></a> 1.1 rule sets

articles/web-application-firewall/afds/waf-front-door-exclusion.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ ms.author: victorh
99
ms.topic: conceptual
1010
---
1111

12-
# Web Application Firewall (WAF) with Front Door Service exclusion lists
12+
# Web Application Firewall (WAF) with Front Door exclusion lists
1313

1414
Sometimes Web Application Firewall (WAF) might block a request that you want to allow for your application. WAF exclusion lists allow you to omit certain request attributes from a WAF evaluation. The rest of the request is evaluated as normal.
1515

articles/web-application-firewall/afds/waf-front-door-tuning.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ services: web-application-firewall
55
author: mohitkusecurity
66
ms.service: web-application-firewall
77
ms.topic: conceptual
8-
ms.date: 12/11/2020
8+
ms.date: 08/21/2022
99
ms.author: mohitku
1010
ms.reviewer: victorh
1111
ms.custom: devx-track-azurepowershell
@@ -275,6 +275,12 @@ Another way to view request and response headers is to look inside the developer
275275

276276
If the request contains cookies, the Cookies tab can be selected to view them in Fiddler. Cookie information can also be used to create exclusions or custom rules in WAF.
277277

278+
## Anomaly scoring rule
279+
280+
If you see rule ID 949110 during the process of tuning your WAF, this indicates that the request was blocked by the [anomaly scoring](waf-front-door-drs.md#anomaly-scoring-mode) process.
281+
282+
Review the other WAF log entries for the same request, by searching for the log entries with the same tracking reference. Look at each of the rules that were triggered, and tune each rule by following the guidance throughout this article.
283+
278284
## Next steps
279285

280286
- Learn about [Azure web application firewall](../overview.md).

0 commit comments

Comments
 (0)