8000 How to reduce FPs from Request Missing an Accept Header (920300) rule in the Azure Web Application Gateway (WAF)? · Issue #3453 · coreruleset/coreruleset · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
< 8000 div id="start-of-content" class="show-on-focus">

How to reduce FPs from Request Missing an Accept Header (920300) rule in the Azure Web Application Gateway (WAF)? #3453

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
JacobChua12345 opened this issue Jan 2, 2024 · 7 comments
Assignees

Comments

@JacobChua12345
Copy link
JacobChua12345 commented Jan 2, 2024

Description

I oversee the monitoring of Azure WAF logs through Splunk. Currently, there's a significant volume of false positive traffic generated by Azure WAF, leading to frequent triggers of anomaly detection and creating a considerable amount of noise. The browser do show that there are Accept header when I Inspect the web page however the rule is still being trigger. Therefore, I'm seeking ways to address this issue.

My initial solution was to use Exclusion List in Azure Portal to exclude this specific type of traffic but no avail. In addition, I submitted a support ticket to Microsoft Azure to address this concern. However, the suggested solution was to disable the rule, which isn't ideal for my requirements. Disabling the rule would mean that any potentially malicious traffic might go unnoticed, as the rule wouldn't be able to flag it.

Logs

image

image

image

Your Environment

  • CRS version (e.g., v3.3.4): OWASP_CRS/4.0.0-rc2
  • Paranoia level setting (e.g. PL1) : PL3
  • ModSecurity version (e.g., 2.9.6): No Idea
  • Web Server and version or cloud provider / CDN (e.g., Apache httpd 2.4.54): Microsoft Azure Portal
  • Operating System and version: NIL

Confirmation

[ ] I have removed any personal data (email addresses, IP addresses,
passwords, domain names) from any logs posted.

@JacobChua12345 JacobChua12345 changed the title How to reduce the false positive from the Request Missing an Accept Header (9200300) rule in the Azure Web Application Gateway (WAF)? How to reduce FPs from Request Missing an Accept Header (9200300) rule in the Azure Web Application Gateway (WAF)? Jan 2, 2024
@M4tteoP M4tteoP changed the title How to reduce FPs from Request Missing an Accept Header (9200300) rule in the Azure Web Application Gateway (WAF)? How to reduce FPs from Request Missing an Accept Header (920300) rule in the Azure Web Application Gateway (WAF)? Jan 2, 2024
@M4tteoP
Copy link
Member
M4tteoP commented Jan 2, 2024

Hi @JacobChua12345, thanks for the report. Considering that you have been able to identify the specific type of traffic that is triggering the rule, the general suggestion would be to not remove the whole rule but rather to write a specific exclusion rule such as Example 5 (ctl:ruleRemoveById): here the rule is disabled only after a specific match that can be tailored to match the specific kind of traffic.

I'm not familiar with the tuning options you have with Azure, but if including a manually crafted additional rule is something not viable, and if it is not possible to convert this exclusion via the Azure exclusion system, I think that the last resort is the suggested solution that you got: disable the whole rule.

CRS version (e.g., v3.3.4): OWASP_CRS/4.0.0-rc2
Paranoia level setting (e.g. PL1): PL3

Addressing other reports about 920300 false positives, this rule has been indeed moved to PL3, a pretty strict paranoia level where false positives are expected, and considerable tuning is required. Is in Azure WAF the latest CRS release candidate 4.0.0-rc2 really an option? Aren't you facing any other false positives running this CRS version with paranoia level 3?

Also, the rule comes with a severity equal to 'NOTICE', it is meant not to rise that much the anomaly score.

@JacobChua12345
Copy link
Author
JacobChua12345 commented Jan 4, 2024

I am not facing any other false positives at the moment because it can be excluded with the Exclusion List that I did in Azure Portal WAF. However, from the Splunk screenshots you can see that the rule didn't managed to find anything making it empty and unable to exclude. Which I believe is the downside of the OWASP ModSecurity CRS rules in Azure WAF.

image

What do you mean by "Is in Azure WAF the latest CRS release candidate 4.0.0-rc2 really an option?"

Therefore, is this the sole solution which is to use "ctl:ruleRemoveById"? Because I remember this line was used to disable the rule entirely.

@M4tteoP
Copy link
Member
M4tteoP commented Jan 4, 2024

However, from the Splunk screenshots you can see that the rule didn't managed to find anything making it empty and unable to exclude. Which I believe is the downside of the OWASP ModSecurity CRS rules in Azure WAF.

I see two problems:

  1. As you mentioned, you expect to see an Accept header, but the WAF engine is not finding it.
  2. It is expected that the rule is triggered when it doesn't manage to find the header, it is indeed its purpose. The problem is that seems that the Exclusion mechanism provided by Azure can not deal with this type of exclusion (such as disabling a rule conditionally)

As far as one can tell, they both are limitations originated by the Azure WAF itself rather than by the rule set.

Therefore, is this the sole solution which is to use "ctl:ruleRemoveById"? Because I remember this line was used to disable the rule entirely.

This action disables the rule entirely only after a certain condition is matched. So it would not disable the rule indiscriminately, but do it only for specific paths, clients, user agents, or any condition that might best suit the use case.

Let's see if others will chime in with some possible alternatives or Azure WAF deeper knowledge :).

What do you mean by "Is in Azure WAF the latest CRS release candidate 4.0.0-rc2 really an option?"

As per Azure WAF doc the supported CRS versions are 3.2, 3.1, 3.0, or 2.2.9. I wanted to double-check that you were using the latest rc 4.0.0-rc2. Also, speaking about the Paranoia Level, it seems like that it is not configurable, but you mentioned that you are running it with PL3. 🤔

I am not facing any other false positives at the moment because it can be excluded with the Exclusion List that I did in Azure Portal WAF.

Glad you can deal with them via the Exclusion list. Any feedback about false positives that you are facing with 4.0.0-rc2 is very welcomed. Every false positive that is addressed upstream will avoid writing exclusions and will improve the overall usability and quality of the upcoming release.

@dune73
Copy link
Member
dune73 commented Jan 5, 2024

@franbuehler What is your take on the seeming lack of ctl:ruleRemoveById on the Azure platform?

@azurit
Copy link
Member
azurit commented May 1, 2024

@franbuehler Ping.

@franbuehler
Copy link
Contributor

Oh, thanks for the ping. I overlooked this issue and the former mention... let me check...

@franbuehler franbuehler self-assigned this May 14, 2024
@franbuehler
Copy link
Contributor
franbuehler commented May 14, 2024

I can confirm that the ctl:ruleRemoveById possibility, or more generally the function to conditionally disable a CRS rule, is currently missing in Azure WAF and that the latest version is CRS 3.2.
It is possible, for example to exclude individual arguments or headers from a rule by specifying their name.
But of course that doesn't make sense in this Missing an Accept Header rule. This rule has to be removed entirely as already mentioned before.
I'll close this ticket as we (CRS) can't provide a better solution here.

@franbuehler franbuehler closed this as not planned Won't fix, can't repro, duplicate, stale May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants
0