patterns/waf_patterns/apache/enforcement.conf
2025-01-10 00:27:14 +00:00

83 lines
9.3 KiB
Plaintext

# Apache ModSecurity rules for ENFORCEMENT
SecRuleEngine On
SecRule REQUEST_URI "x25" "id:1088,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "\^\$" "id:1101,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "@eq\ 1" "id:1108,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "@validateUrlEncoding" "id:1091,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "\^\.\*\$" "id:1144,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "@eq\ 1" "id:1092,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "x25" "id:1090,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "@eq\ 1" "id:1110,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "@contains\ \#" "id:1132,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "charsets\*=s\*\["'\]\?\(\[\^;"'s\]\+\)" "id:1122,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "@gt\ %\{tx\.max_num_args\}" "id:1109,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "@gt\ 1" "id:1133,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "!@rx\ \^\(\?:OPTIONS\|CONNECT\)\$" "id:1148,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "@validateByteRange\ 32,34,38,42\-59,61,65\-90,95,97\-122" "id:1156,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "@eq\ 1" "id:1112,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "@endsWith\ \.pdf" "id:1153,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "\.\(\[\^\.\]\+\)\$" "id:1124,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "@gt\ 0" "id:1151,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "@eq\ 0" "id:1084,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "@validateByteRange\ 1\-255" "id:1095,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "\^\$" "id:1098,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "@gt\ %\{tx\.arg_name_length\}" "id:1111,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "\^bytes=\(\?:\(\?:d\+\)\?\-\(\?:d\+\)\?s\*,\?s\*\)\{63\}" "id:1137,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "\(\?i\)x5cu\[0\-9a\-f\]\{4\}" "id:1131,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "!@rx\ \^d\+\$" "id:1079,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "@within\ %\{tx\.restricted_headers_extended\}" "id:1145,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "%\[0\-9a\-fA\-F\]\{2\}" "id:1138,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "@eq\ 0" "id:1143,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "b\(\?:keep\-alive\|close\),s\?\(\?:keep\-alive\|close\)b" "id:1087,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "@validateByteRange\ 38,44\-46,48\-58,61,65\-90,95,97\-122" "id:1155,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "%u\[fF\]\{2\}\[0\-9a\-fA\-F\]\{2\}" "id:1094,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "\^bytes=\(\?:\(\?:d\+\)\?\-\(\?:d\+\)\?s\*,\?s\*\)\{6\}" "id:1134,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "\^\(\?:GET\|HEAD\)\$" "id:1080,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "\^\.\*\$" "id:1127,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "!@rx\ \^0\?\$" "id:1081,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "!@rx\ \^OPTIONS\$" "id:1102,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "@validateUtf8Encoding" "id:1093,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "\^\$" "id:1104,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "!@rx\ \^0\$" "id:1142,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "@gt\ 50" "id:1129,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "@eq\ 1" "id:1114,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "\(\?:\^\(\[d\.\]\+\|\[\[da\-f:\]\+\]\|\[da\-f:\]\+\)\(:\[d\]\+\)\?\$\)" "id:1107,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "@gt\ %\{tx\.arg_length\}" "id:1113,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "@eq\ 0" "id:1147,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "\^\$" "id:1097,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "@endsWith\ \.pdf" "id:1136,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "@within\ %\{tx\.restricted_headers_basic\}" "id:1128,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "!@pm\ AppleWebKit\ Android" "id:1149,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "@eq\ 1" "id:1116,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "@eq\ 0" "id:1140,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "@eq\ 0" "id:1085,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "charset\.\*\?charset" "id:1123,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "!@pm\ AppleWebKit\ Android\ Business\ Enterprise\ Entreprise" "id:1100,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "@streq\ POST" "id:1083,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "@eq\ 0" "id:1106,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "\(\?:\^\|\[\^x5c\]\)x5c\[cdeghijklmpqwxyz123456789\]" "id:1157,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "@eq\ 1" "id:1118,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "!@rx\ \^OPTIONS\$" "id:1099,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "\['";=\]" "id:1141,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "!@rx\ \^\(\?:\(\?:max\-age=\[0\-9\]\+\|min\-fresh=\[0\-9\]\+\|no\-cache\|no\-store\|no\-transform\|only\-if\-cached\|max\-stale\(\?:=\[0\-9\]\+\)\?\)\(\?:s\*,s\*\|\$\)\)\{1,7\}\$" "id:1152,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "@validateByteRange\ 9,10,13,32\-126,128\-255" "id:1139,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "\(d\+\)\-\(d\+\)" "id:1086,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "\^\[\^;s\]\+" "id:1121,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "\^\(\?:GET\|HEAD\)\$" "id:1082,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "\^bytes=\(\?:\(\?:d\+\)\?\-\(\?:d\+\)\?s\*,\?s\*\)\{6\}" "id:1154,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "!@rx\ \^0\$" "id:1105,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "!@endsWith\ \.pdf" "id:1135,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "@gt\ %\{tx\.total_arg_length\}" "id:1115,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "@gt\ %\{tx\.max_file_size\}" "id:1117,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "@gt\ %\{tx\.combined_file_sizes\}" "id:1119,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "@validateByteRange\ 32\-36,38\-126" "id:1146,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "@ge\ 1" "id:1150,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "@eq\ 0" "id:1103,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "@validateUrlEncoding" "id:1089,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "@within\ %\{tx\.restricted_extensions\}" "id:1125,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "!@rx\ \^\[w/\.\+\*\-\]\+\(\?:s\?;s\?\(\?:action\|boundary\|charset\|component\|start\(\?:\-info\)\?\|type\|version\)s\?=s\?\['"w\.\(\)\+,/:=\?<>@\#\*\-\]\+\)\*\$" "id:1120,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "!@streq\ JSON" "id:1130,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "@eq\ 0" "id:1096,phase:1,deny,status:403,log,msg:'enforcement attack detected'"
SecRule REQUEST_URI "\.\[\^\.\~\]\+\~\(\?:/\.\*\|\)\$" "id:1126,phase:1,deny,status:403,log,msg:'enforcement attack detected'"