Open louis07r opened 6 months ago
HI @louis07r Thank for reporting. Can you try it with newest CRS version? This was probably fixed in version 4.
thank you @azurit for your help but I've tried version 4 and it's no better
Which version? In the issue above, you were talking about version 3.3.5: I have coreruleset-3.3.5 rules.
Your payload is definitely catched by multiple rules:
$ curl -H "x-crs-paranoia-level: 1" -H "x-format-output: txt-matched-rules" "https://sandbox.coreruleset.org/?bla=<iframe%20src=\"javascript:alert(\`xss\`)\">"
941100 PL1 XSS Attack Detected via libinjection
941160 PL1 NoScript XSS InjectionChecker: HTML Injection
941170 PL1 NoScript XSS InjectionChecker: Attribute Injection
941210 PL1 IE XSS Filters - Attack Detected
941390 PL1 Javascript method detected
949110 PL1 Inbound Anomaly Score Exceeded (Total Score: 25)
980170 PL1 Anomaly Scores: (Inbound Scores: blocking=25, detection=25, per_pl=25-0-0-0, threshold=5) - (Outbound Scores: blocking=0, detection=0, per_pl=0-0-0-0, threshold=4) - (SQLI=0, XSS=25, RFI=0, LFI=0, RCE=0, PHPI=0, HTTP=0, SESS=0, COMBINED_SCORE=25)
@azurit Yes, it matches the modsecurity configuration, I think.
@louis07r It was matched by CRS rules, as you can see in my comment above.
Yes, I remember when I tested the OWASP CRS with the OWASP Juiceshop, not all attacks were detected. I think this could be because some of the attacks are only executed on the client-side and not sent/transmitted to a server. Of course, the CRS cannot detect anything there. For the CRS developers with access to our share: have a look at the "Juiceshop_Vulns_CRS" file to see what attack was detected and what was not. I tested them all for our BB program.
@louis07r Can we close this?
Hello everyone, I'm working on a final year project for my school. The project is a simple nginx reverse proxy with modsecurity and behind it a juice shop. The problem is that modsecurity blocks sql injections but not xss attacks (example the one in the juice shop search bar with
<iframe src="javascript:alert(`xss`)">
). I have coreruleset-3.3.5 rules.here's my modsecurity configuration: