8000 fix: use proper capture for log output of 932300 by theseion · Pull Request #3763 · coreruleset/coreruleset · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix: use proper capture for log output of 932300 #3763

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 1 commit into from
Jul 9, 2024
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
1 change: 1 addition & 0 deletions rules/REQUEST-932-APPLICATION-ATTACK-RCE.conf
Original file line number Diff line number Diff line change
Expand Up @@ -1232,6 +1232,7 @@ SecRule REQUEST_COOKIES|!REQUEST_COOKIES:/__utm/|REQUEST_COOKIES_NAMES|ARGS_NAME
"id:932300,\
phase:2,\
block,\
capture,\
t:none,t:escapeSeqDecode,\
msg:'Remote Command Execution: SMTP Command Execution',\
logdata:'Matched Data: %{TX.0} found within %{MATCHED_VAR_NAME}: %{MATCHED_VAR}',\
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
meta:
author: "fzipi, azurit"
author: "fzipi, azurit, Max Leske"
description: "Remote Command Execution: SMTP Command Injection test cases"
rule_id: 932300
tests:
Expand Down Expand Up @@ -156,3 +156,28 @@ tests:
output:
log:
no_expect_ids: [932300]
- test_id: 10
desc: |
Make sure that log contains matched payload.
Without the `capture` action, the log data would include the last
value of `TX.0`. While writing this test, the previous value of `TX.0`
was always `user-agent` (set by rule 920451).
Note that the previous value of `TX.0` depends on the payload of this test.
stages:
- input:
dest_addr: 127.0.0.1
headers:
Accept: "*/*"
Host: "localhost"
User-Agent: "OWASP CRS test agent"
method: POST
port: 80
uri: "/post"
data: |-
textarea=%0D%0AMAIL%20FROM%3A%3CSmith%40bar.com%3E
version: HTTP/1.1
output:
log:
expect_ids: [932300]
match_regex: |-
Matched Data:.*MAIL FROM:<Smith@bar.com> found within ARGS:textarea:.*MAIL FROM:<Smith@bar.com>
0