Comments (3)
Original reporter: arrakami
from owasp-modsecurity-crs.
brectanus: I moved this over to Core Rules as this looks like id:950006.
What version of Core Rules is this?
It looks like it does not like "CD</" as the "<" is detected under the generic "\W*?" (non-word chars). Your modification seems reasonable as it makes the pattern more specific. However, a space is not required under Windows between "CD" and "/some/path", so maybe this is better (make spaces optional)?
d(?:\b\s_[.~\/]|\W_?..)
from owasp-modsecurity-crs.
rcbarnett: In the new CRS v2.0.0 rules, the rules use anomaly scoring/collaborative rules. So, while this particular payload does match, you are able to over-ride it later on and re-adjust the anomaly score. Here is an example where I sent the following request with the same payload that you sent -
--ba166a09-A--
[05/Aug/2009:18:23:13 --0400] SnoGUX8AAQEAABKJPy8AAACA 192.168.0.100 47476 192.168.0.100 80
--ba166a09-B--
GET /cgi-bin/test-cgi?foo=%3Cli%3ECD%20drive%20if%20installing%20from%20CD%3C/li%3E HTTP/1.1
Host: 192.168.0.100
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.2) Gecko/20090729 Firefox/3.5.2
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Here is the individual rule match from the modsec_audit.log file -
Message: Pattern match "\bcd\b\W*?[/]" at TX:pm_data_ARGS:foo. [file "/usr/local/apache/conf/modsecurity-core-rules/base_rules/modsecurity_crs_40_generic_attacks.conf"] [line "244"] [id "958821"] [msg "System Command Injection"] [data "cd</"] [severity "CRITICAL"] [tag "WEB_ATTACK/COMMAND_INJECTION"]
In order to implement an exclusion for this in the new CRS 2.0.0 format, you should add the following entry to the modsecurity_48_local_exceptions.conf file -
SecRule TX:PM_DATA_ARGS:foo "@Streq
This rule will inspect the TX variable data that matched from the audit log file to see if the exact false positive payload data is in the argument called foo. If so, then we will decrement the anomaly score by 20.
from owasp-modsecurity-crs.
Related Issues (20)
- SOAPUI SOAP Tx multipart/related call False Positive id: 920470 HOT 4
- DOS protection is invalid
- Crazy Long Processing time of XML of a certain kinda payload body. HOT 2
- Easy to trigger these rule id blocks just with keywords [932115, 942360]
- DoS rule triggering with static (png) file
- SQLi bypass at PL1(CRS 3.2.0) HOT 1
- JSON Payloads process significantly slower (600%) than XML Payloads of a similar size and format HOT 9
- XSS Attack Detected via libinjection for AWS AWSALBCORS Cookie HOT 4
- Block QQGameHall in UA HOT 4
- Monthly Chat Agenda April (2020-04-06) HOT 1
- NextCloud False Positive HOT 9
- WordPress JetPack False Positive
- Rule 920450 and modsec 3x HOT 4
- Password Scrubbing within the libinjection rule HOT 1
- Monthly Chat Agenda May (2020-05-04) HOT 1
- rule 920300 title / details mismatch HOT 1
- Note config change of tx.allowed_request_content_type in the v3.3 release notes
- false positive on rule 932110
- Incompatible with ModSecurity 3.x? HOT 1
- False positive with WordPress when hosted from http://example.com/update-prefix HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from owasp-modsecurity-crs.