fix(932): remove w from Unix no-arguments command list#4592
Conversation
|
📊 Quantitative test results for language: |
|
@theseion What do you think about this one? |
Makes sense, we exclude |
|
ping @zoutjebot |
|
@zoutjebot Can you add negative tests based on the false positives you encountered? |
Add w to unix-shell-noarguments-fps-pl1.ra exclusion list instead of removing it from the main command list. This keeps w detected at PL2+ while preventing false positives at PL1 where ?w= is common in legitimate query parameters (width, weight, search terms). Addresses review feedback from theseion and EsadCetiner on PR coreruleset#4592. Changes: - Add w to regex-assembly/exclude/unix-shell-noarguments-fps-pl1.ra - Regenerate .conf via crs-toolchain - Add negative tests: ?w=value (GET), w=640 (POST form) - Add positive test: ;who still detected at PL1
77ae16e to
788f70e
Compare
|
Addressed both review points: @theseion — moved the change to the correct file. @EsadCetiner — added negative tests based on the false positive patterns:
Rebased on latest main and regenerated .conf via crs-toolchain. |
|
@zoutjebot Looking at the tests, none of the false positive tests your adding are actually currently false positives. The PL-1 requires an evasion prefix before it blocks a command with no arguments Only at PL-3 are commands with no arguments blocked without an evasion prefix: |
|
i see all those FPs are not true relunsec@relunsec:~$ curl -H "x-format-output: txt-matched-rules" https://sandbox.coreruleset.org -d 'w=640&h=480' -H "x-crs-paranoia-level: 2" -i
HTTP/1.1 405 Method Not Allowed
Date: Sun, 19 Apr 2026 20:02:15 GMT
Content-Type: text/plain; charset=iso-8859-1
Transfer-Encoding: chunked
Connection: keep-alive
X-Unique-ID: aeU0xzaTAovO3v6zz34g1gAAAA8
Allow: TRACE
x-backend: apache-v4-lts
^[[Arelunsec@relunsec:~$ curl -H "x-format-output: txt-matched-rules" https://sandbox.coreruleset.org/?w=640 -i
HTTP/1.1 200 OK
Date: Sun, 19 Apr 2026 20:02:28 GMT
Content-Type: text/plain; charset=utf-8
Transfer-Encoding: chunked
Connection: keep-alive
X-Unique-ID: aeU01MwsS20qcJ4UfDwXNQAAAMg
Access-Control-Allow-Credentials: true
Access-Control-Allow-Origin: *
Content-Security-Policy: default-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' camo.githubusercontent.com
x-backend: apache-v4-lts
relunsec@relunsec:~$ curl -H "x-format-output: txt-matched-rules" https://sandbox.coreruleset.org/?query=w -i
HTTP/1.1 200 OK
Date: Sun, 19 Apr 2026 20:02:46 GMT
Content-Type: text/plain; charset=utf-8
Transfer-Encoding: chunked
Connection: keep-alive
X-Unique-ID: aeU05jaTAovO3v6zz34g1wAAABA
Access-Control-Allow-Credentials: true
Access-Control-Allow-Origin: *
Content-Security-Policy: default-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' camo.githubusercontent.com
x-backend: apache-v4-lts
relunsec@relunsec:~$ curl -H "x-format-output: txt-matched-rules" https://sandbox.coreruleset.org/?error=wireless+password+invalid -i
HTTP/1.1 200 OK
Date: Sun, 19 Apr 2026 20:03:13 GMT
Content-Type: text/plain; charset=utf-8
Transfer-Encoding: chunked
Connection: keep-alive
X-Unique-ID: aeU1ATaTAovO3v6zz34g2AAAABc
Access-Control-Allow-Credentials: true
Access-Control-Allow-Origin: *
Content-Security-Policy: default-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' camo.githubusercontent.com
x-backend: apache-v4-lts
relunsec@relunsec:~$
relunsec@relunsec:~$ touch w
relunsec@relunsec:~$ curl -F "file_field=@w" https://sandbox.coreruleset.org/upload -i -H "x-format-output: txt-matched-rules"
HTTP/1.1 404 Not Found
Date: Sun, 19 Apr 2026 20:07:55 GMT
Content-Type: text/plain; charset=iso-8859-1
Transfer-Encoding: chunked
Connection: keep-alive
X-Unique-ID: aeU2GzaTAovO3v6zz34g2gAAAAM
x-backend: apache-v4-lts
relunsec@relunsec:~$
on all FP fuzzing tests, that is allowed, only with |
|
@zoutjebot Do you have some time to fix the tests as asked? |
|
@zoutjebot Can you add a negative test which checks for a referer header containing We just had a report of a similar false positive in the CRS slack. |
|
📊 Quantitative test results for language: |
|
I'm taking this PR over since the Author isn't around to respond to feedback. |
|
Just got another FP from |
What
Single letter 'w' (who-is-logged-on) causes excessive FPs. Related 'who' and 'whoami' remain for better signal.
Context
Part of CVE-derived payload research FP reductions. See tracking issue #4584 for full context.
Refs: #4584