@@ -354,7 +354,7 @@ SecRule REQUEST_HEADERS:Range|REQUEST_HEADERS:Request-Range "@rx (\d+)\-(\d+)\,"
354354# -=[ References ]=-
355355# http://www.bad-behavior.ioerror.us/documentation/how-it-works/
356356#
357- SecRule REQUEST_HEADERS:Connection "@rx \b(keep-alive|close),\s?(keep-alive|close)\b" \
357+ SecRule REQUEST_HEADERS:Connection "@rx \b(?: keep-alive|close),\s?(?: keep-alive|close)\b" \
358358 "id:920210,\
359359 phase:2,\
360360 block,\
@@ -384,7 +384,7 @@ SecRule REQUEST_HEADERS:Connection "@rx \b(keep-alive|close),\s?(keep-alive|clos
384384# -=[ References ]=-
385385# http://www.ietf.org/rfc/rfc1738.txt
386386#
387- SecRule REQUEST_URI "@rx \%((?!$|\W)|[0-9a-fA-F]{2}|u[0-9a-fA-F]{4})" \
387+ SecRule REQUEST_URI "@rx \%(?: (?!$|\W)|[0-9a-fA-F]{2}|u[0-9a-fA-F]{4})" \
388388 "id:920220,\
389389 phase:2,\
390390 block,\
@@ -404,7 +404,7 @@ SecRule REQUEST_URI "@rx \%((?!$|\W)|[0-9a-fA-F]{2}|u[0-9a-fA-F]{4})" \
404404 setvar:tx.anomaly_score=+%{tx.warning_anomaly_score},\
405405 setvar:tx.%{rule.id}-OWASP_CRS/PROTOCOL_VIOLATION/EVASION-%{matched_var_name}=%{matched_var}"
406406
407- SecRule REQUEST_HEADERS:Content-Type "@rx ^(application\/x-www-form-urlencoded|text\/xml)(?:;(?:\s?charset\s?=\s?[\w\d\-]{1,18})?)??$" \
407+ SecRule REQUEST_HEADERS:Content-Type "@rx ^(?: application\/x-www-form-urlencoded|text\/xml)(?:;(?:\s?charset\s?=\s?[\w\d\-]{1,18})?)??$" \
408408 "id:920240,\
409409 phase:2,\
410410 block,\
@@ -955,7 +955,7 @@ SecRule REQUEST_METHOD "!@rx ^(?:GET|HEAD|PROPFIND|OPTIONS)$" \
955955 ver:'OWASP_CRS/3.0.0',\
956956 severity:'CRITICAL',\
957957 chain"
958- SecRule REQUEST_HEADERS:Content-Type "@rx ^( [^;\s]+) " \
958+ SecRule REQUEST_HEADERS:Content-Type "@rx ^[^;\s]+" \
959959 "capture,\
960960 chain"
961961 SecRule TX:0 "!@rx ^%{tx.allowed_request_content_type}$" \
@@ -1045,7 +1045,7 @@ SecRule REQUEST_BASENAME "@rx \.(.*)$" \
10451045# -=[ References ]=-
10461046# https://access.redhat.com/security/vulnerabilities/httpoxy (Header Proxy)
10471047#
1048- SecRule REQUEST_HEADERS_NAMES "@rx ^(.*) $" \
1048+ SecRule REQUEST_HEADERS_NAMES "@rx ^.* $" \
10491049 "id:920450,\
10501050 phase:2,\
10511051 block,\
@@ -1100,7 +1100,8 @@ SecRule TX:PARANOIA_LEVEL "@lt 2" "phase:2,id:920014,nolog,pass,skipAfter:END-RE
11001100# -=[ References ]=-
11011101# https://httpd.apache.org/security/CVE-2011-3192.txt
11021102
1103- SecRule REQUEST_HEADERS:Range|REQUEST_HEADERS:Request-Range "@rx ^bytes=((\d+)?\-(\d+)?\s*,?\s*){6}" \
1103+
1104+ SecRule REQUEST_HEADERS:Range|REQUEST_HEADERS:Request-Range "@rx ^bytes=(?:(?:\d+)?\-(?:\d+)?\s*,?\s*){6}" \
11041105 "id:920200,\
11051106 phase:2,\
11061107 block,\
@@ -1145,7 +1146,7 @@ SecRule REQUEST_BASENAME "@endsWith .pdf" \
11451146 ver:'OWASP_CRS/3.0.0',\
11461147 severity:'WARNING',\
11471148 chain"
1148- SecRule REQUEST_HEADERS:Range|REQUEST_HEADERS:Request-Range "@rx ^bytes=(( \d+)?\-(\d+)?\s*,?\s*){63}" \
1149+ SecRule REQUEST_HEADERS:Range|REQUEST_HEADERS:Request-Range "@rx ^bytes=(?:(?: \d+)?\-(?: \d+)?\s*,?\s*){63}" \
11491150 "setvar:'tx.msg=%{rule.msg}',\
11501151 setvar:tx.anomaly_score=+%{tx.warning_anomaly_score},\
11511152 setvar:tx.%{rule.id}-OWASP_CRS/PROTOCOL_VIOLATION/INVALID_HREQ-%{matched_var_name}=%{matched_var}"
@@ -1262,22 +1263,22 @@ SecRule &REQUEST_HEADERS:User-Agent "@eq 0" \
12621263# PL2: This is a stricter sibling of 920120.
12631264#
12641265SecRule FILES_NAMES|FILES "@rx ['\";=]" \
1265- "msg:'Attempted multipart/form-data bypass',\
1266- severity:'CRITICAL',\
1267- id:920121,\
1268- ver:'OWASP_CRS/3.0.0',\
1269- rev:'1',\
1270- logdata:'%{matched_var}',\
1266+ "id:920121,\
12711267 phase:2,\
12721268 block,\
12731269 t:none,t:urlDecodeUni,\
1270+ msg:'Attempted multipart/form-data bypass',\
1271+ logdata:'%{matched_var}',\
12741272 tag:'application-multi',\
12751273 tag:'language-multi',\
12761274 tag:'platform-multi',\
12771275 tag:'attack-protocol',\
12781276 tag:'OWASP_CRS/PROTOCOL_VIOLATION/INVALID_REQ',\
12791277 tag:'CAPEC-272',\
12801278 tag:'paranoia-level/2',\
1279+ ver:'OWASP_CRS/3.0.0',\
1280+ rev:'1',\
1281+ severity:'CRITICAL',\
12811282 setvar:'tx.msg=%{rule.msg}',\
12821283 setvar:tx.anomaly_score=+%{tx.critical_anomaly_score},\
12831284 setvar:'tx.%{rule.id}-OWASP_CRS/PROTOCOL_VIOLATION/INVALID_REQ-%{matched_var_name}=%{matched_var}'"
@@ -1340,7 +1341,7 @@ SecRule REQUEST_BASENAME "@endsWith .pdf" \
13401341 ver:'OWASP_CRS/3.0.0',\
13411342 severity:'WARNING',\
13421343 chain"
1343- SecRule REQUEST_HEADERS:Range|REQUEST_HEADERS:Request-Range "@rx ^bytes=(( \d+)?\-(\d+)?\s*,?\s*){6}" \
1344+ SecRule REQUEST_HEADERS:Range|REQUEST_HEADERS:Request-Range "@rx ^bytes=(?:(?: \d+)?\-(?: \d+)?\s*,?\s*){6}" \
13441345 "setvar:'tx.msg=%{rule.msg}',\
13451346 setvar:tx.anomaly_score=+%{tx.warning_anomaly_score},\
13461347 setvar:tx.%{rule.id}-OWASP_CRS/PROTOCOL_VIOLATION/INVALID_HREQ-%{matched_var_name}=%{matched_var}"
0 commit comments