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
3 changes: 2 additions & 1 deletion rules/REQUEST-931-APPLICATION-ATTACK-RFI.conf
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ SecRule ARGS "@rx (?i)(?:(?:url|jar):)?(?:a(?:cap|f[ps]|ttachment)|b(?:eshare|it
capture,\
t:none,\
msg:'Possible Remote File Inclusion (RFI) Attack: Off-Domain Reference/Link',\
logdata:'Matched Data: %{TX.0} found within %{MATCHED_VAR_NAME}: %{MATCHED_VAR}',\
logdata:'Matched Data: %{TX.0} found within %{tx.original_target}: %{MATCHED_VAR}',\
tag:'application-multi',\
tag:'language-multi',\
tag:'platform-multi',\
Expand All @@ -150,6 +150,7 @@ SecRule ARGS "@rx (?i)(?:(?:url|jar):)?(?:a(?:cap|f[ps]|ttachment)|b(?:eshare|it
ver:'OWASP_CRS/4.25.0-dev',\
severity:'CRITICAL',\
setvar:'tx.rfi_parameter_%{MATCHED_VAR_NAME}=.%{tx.1}',\
setvar:'tx.original_target=%{MATCHED_VAR_NAME}',\
chain"
SecRule TX:/rfi_parameter_.*/ "!@endsWith .%{request_headers.host}" \
"setvar:'tx.rfi_score=+%{tx.critical_anomaly_score}',\
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
meta:
author: "studersi, azurit"
author: "studersi, azurit, Esad Cetiner"
rule_id: 931130
tests:
- test_id: 1
Expand Down Expand Up @@ -371,3 +371,19 @@ tests:
output:
log:
expect_ids: [931130]
- test_id: 24
desc: Make sure correct target is being logged
stages:
- input:
dest_addr: 127.0.0.1
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
method: GET
port: 80
uri: "/get?x=jar:file:/path/to/myApp.jar!/com/example/data.txt"
version: HTTP/1.1
output:
log:
match_regex: found within ARGS:x
Loading