Skip to content
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
2 changes: 1 addition & 1 deletion regex-assembly/932240.ra
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
##!> assemble
[a-z0-9_-]+
##!=>
\s*['\"][^'\"\s]+['\"]
\s*['\"][^'\"\s:,]+['\"]
##!=>
[a-z0-9_-]+
##!<
Expand Down
2 changes: 1 addition & 1 deletion rules/REQUEST-932-APPLICATION-ATTACK-RCE.conf
Original file line number Diff line number Diff line change
Expand Up @@ -1293,7 +1293,7 @@ SecRule REQUEST_COOKIES|REQUEST_COOKIES_NAMES|ARGS_NAMES|ARGS|XML:/* "@rx (?i).\
# (consult https://coreruleset.org/docs/development/regex_assembly/ for details):
# crs-toolchain regex update 932240
#
SecRule REQUEST_COOKIES|REQUEST_COOKIES_NAMES|ARGS|XML:/* "@rx (?i)[\-0-9_a-z]+(?:[\s\x0b]*[\"'][^\s\x0b\"']+[\"']|(?:[\"'][\"']+|[\[-\]]+|\$+[!#\*\-0-9\?@\x5c_a-\{]+|``|[\$<>]\(\))[\s\x0b]*)[\-0-9_a-z]+" \
SecRule REQUEST_COOKIES|REQUEST_COOKIES_NAMES|ARGS|XML:/* "@rx (?i)[\-0-9_a-z]+(?:[\s\x0b]*[\"'][^\s\x0b\"',:]+[\"']|(?:[\"'][\"']+|[\[-\]]+|\$+[!#\*\-0-9\?@\x5c_a-\{]+|``|[\$<>]\(\))[\s\x0b]*)[\-0-9_a-z]+" \
"id:932240,\
phase:2,\
block,\
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
meta:
author: "Felipe Zipitria, azurit"
author: "Felipe Zipitria, azurit, Esad Cetiner"
description: Remote Command Execution Evasion Techniques
rule_id: 932240
tests:
Expand Down Expand Up @@ -335,3 +335,43 @@ tests:
output:
log:
expect_ids: [932240]
- test_id: 20
desc: |
False Positive URL encoded JSON payloaded
{"name":"John Doe","age":"30","email":"johndoe@example.com"}
stages:
- input:
dest_addr: "127.0.0.1"
method: "POST"
port: 80
headers:
User-Agent: "OWASP CRS test agent"
Host: "localhost"
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
uri: "/post"
data: |
payload=%7B%22name%22:%22John%20Doe%22,%22age%22:%2230%22,%22email%22:%22johndoe@example.com%22%7D
version: "HTTP/1.1"
output:
log:
no_expect_ids: [932240]
- test_id: 21
desc: |
Urlencoded form array
["account","sharing"]
stages:
- input:
dest_addr: "127.0.0.1"
method: "POST"
port: 80
headers:
User-Agent: "OWASP CRS test agent"
Host: "localhost"
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
uri: "/post"
data: |
payload=%5B%22account%22%2C%22sharing%22%5D
version: "HTTP/1.1"
output:
log:
no_expect_ids: [932240]
Loading