8000 fix(954100): detect forward slash in path by Xhoenix · Pull Request #4094 · coreruleset/coreruleset · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix(954100): detect forward slash in path #4094

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

Merged
merged 6 commits into from
Apr 21, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions rules/RESPONSE-954-DATA-LEAKAGES-IIS.conf
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ SecRule TX:DETECTION_PARANOIA_LEVEL "@lt 1" "id:954012,phase:4,pass,nolog,tag:'O
#

# IIS default location
SecRule RESPONSE_BODY "@rx [a-z]:\x5cinetpub\b" \
SecRule RESPONSE_BODY "@rx (?i)[a-z]:[\x5c/]inetpub\b" \
"id:954100,\
phase:4,\
block,\
capture,\
t:none,t:lowercase,\
t:none,\
msg:'Disclosure of IIS install location',\
logdata:'Matched Data: %{TX.0} found within %{MATCHED_VAR_NAME}',\
tag:'application-multi',\
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
meta:
author: "Andrew Howe"
author: "Andrew Howe, Xhoenix"
rule_id: 954100
tests:
- test_id: 1
Expand All @@ -21,3 +21,39 @@ tests:
output:
log:
expect_ids: [954100]
- test_id: 2
desc: 'Returns C:/inetpub in the response body'
stages:
- input:
dest_addr: "127.0.0.1"
port: 80
headers:
Host: "localhost"
User-Agent: "OWASP CRS test agent"
Accept: "text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5"
Content-Type: "application/json"
method: "POST"
version: "HTTP/1.1"
uri: "/reflect"
data: "{\"body\": \"C:/inetpub \\n\"}"
output:
log:
expect_ids: [954100]
- test_id: 3
desc: 'Returns c:/inetpub(lower case) in the response body'
stages:
- input:
dest_addr: "127.0.0.1"
port: 80
headers:
Host: "localhost"
User-Agent: "OWASP CRS test agent"
Accept: "text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5"
Content-Type: "application/json"
method: "POST"
version: "HTTP/1.1"
uri: "/reflect"
data: "{\"body\": \"c:/inetpub \\n\"}"
output:
log:
expect_ids: [954100]
0