SecRule REQUESTURI ARGS ARGSNAMES REQUEST_HEADERS "@rx (?i)(select\s+.*from\s+dual…
- User
SecRule REQUEST_URI|ARGS|ARGS_NAMES|REQUEST_HEADERS "@rx (?i)(select\s+.*from\s+dual|utl_inaddr.get_host_name|union\s+select)"
"id:123456,
phase:2,
block,
t:none,
msg:'Detect Oracle Time-based SQL Injection Attempt',
severity:'CRITICAL',
logdata:'Matched Data: %{TX.0}',
tag:'application-multi',
tag:'language-sql',
tag:'platform-oracle',
tag:'attack-sqli',
tag:'OWASP_CRS/WEB_ATTACK/SQL_INJECTION',
capture,
ctl:auditLogParts=+E,
tag:'PCI/6.5.2'"SecRule REQUEST_URI|ARGS|ARGS_NAMES|REQUEST_HEADERS "@rx (?i)(utl_inaddr.get_host_name\s*(\s*'?\d{1,3}(.\d{1,3}){3}'?\s*))"
"id:123457,
phase:2,
block,
t:none,
msg:'Detect Oracle UTL_INADDR.get_host_name Exploitation Attempt',
severity:'CRITICAL',
logdata:'Matched Data: %{TX.0}',
tag:'application-multi',
tag:'language-sql',
tag:'platform-oracle',
tag:'attack-sqli',
tag:'OWASP_CRS/WEB_ATTACK/SQL_INJECTION',
capture,
ctl:auditLogParts=+E,
tag:'PCI/6.5.2'"Please minimize tags count and make rules 2-lines ma
- Assistant
Certainly! Here's the minimized version of your rules with fewer tags and formatted into 2 lines each:
apacheSecRule REQUEST_URI|ARGS|ARGS_NAMES|REQUEST_HEADERS "@rx (?i)(select\s+.*from\s+dual|utl_inaddr\.get_host_name|union\s+select)" "id:123456,phase:2,block,t:none,msg:'Detect Oracle Time-based SQL Injection Attempt',severity:'CRITICAL',logdata:'Matched Data: %{TX.0}',tag:'attack-sqli,platform-oracle',capture,ctl:auditLogParts=+E" SecRule REQUEST_URI|ARGS|ARGS_NAMES|REQUEST_HEADERS "@rx (?i)(utl_inaddr\.get_host_name\s*\(\s*'?\d{1,3}(\.\d{1,3}){3}'?\s*\))" "id:123457,phase:2,block,t:none,msg:'Detect Oracle UTL_INADDR.get_host_name Exploitation Attempt',severity:'CRITICAL',logdata:'Matched Data: %{TX.0}',tag:'attack-sqli,platform-oracle',capture,ctl:auditLogParts=+E" - User
Rewrite for deny with 403 code
- Assistant
Certainly! Here's the updated rules using
denyaction with HTTP status code 403, still minimized and in 2 lines each:apacheSecRule REQUEST_URI|ARGS|ARGS_NAMES|REQUEST_HEADERS "@rx (?i)(select\s+.*from\s+dual|utl_inaddr\.get_host_name|union\s+select)" "id:123456,phase:2,deny,status:403,t:none,msg:'Detect Oracle Time-based SQL Injection Attempt',severity:'CRITICAL',logdata:'Matched Data: %{TX.0}',tag:'attack-sqli,platform-oracle',capture,ctl:auditLogParts=+E" SecRule REQUEST_URI|ARGS|ARGS_NAMES|REQUEST_HEADERS "@rx (?i)(utl_inaddr\.get_host_name\s*\(\s*'?\d{1,3}(\.\d{1,3}){3}'?\s*\))" "id:123457,phase:2,deny,status:403,t:none,msg:'Detect Oracle UTL_INADDR.get_host_name Exploitation Attempt',severity:'CRITICAL',logdata:'Matched Data: %{TX.0}',tag:'attack-sqli,platform-oracle',capture,ctl:auditLogParts=+E"