@abtnode/router-provider 1.16.46-beta-20250703-024219-4029ee97 → 1.16.46-beta-20250704-234926-09d872ad
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/nginx/includes/security/crs4/rules/REQUEST-900-EXCLUSION-RULES-BEFORE-CRS.conf +1 -1
- package/lib/nginx/includes/security/crs4/rules/REQUEST-901-INITIALIZATION.conf +42 -40
- package/lib/nginx/includes/security/crs4/rules/REQUEST-905-COMMON-EXCEPTIONS.conf +4 -4
- package/lib/nginx/includes/security/crs4/rules/REQUEST-911-METHOD-ENFORCEMENT.conf +12 -11
- package/lib/nginx/includes/security/crs4/rules/REQUEST-913-SCANNER-DETECTION.conf +12 -11
- package/lib/nginx/includes/security/crs4/rules/REQUEST-920-PROTOCOL-ENFORCEMENT.conf +127 -148
- package/lib/nginx/includes/security/crs4/rules/REQUEST-921-PROTOCOL-ATTACK.conf +80 -35
- package/lib/nginx/includes/security/crs4/rules/REQUEST-922-MULTIPART-ATTACK.conf +12 -6
- package/lib/nginx/includes/security/crs4/rules/REQUEST-930-APPLICATION-ATTACK-LFI.conf +22 -17
- package/lib/nginx/includes/security/crs4/rules/REQUEST-931-APPLICATION-ATTACK-RFI.conf +20 -15
- package/lib/nginx/includes/security/crs4/rules/REQUEST-932-APPLICATION-ATTACK-RCE.conf +254 -86
- package/lib/nginx/includes/security/crs4/rules/REQUEST-933-APPLICATION-ATTACK-PHP.conf +172 -65
- package/lib/nginx/includes/security/crs4/rules/REQUEST-934-APPLICATION-ATTACK-GENERIC.conf +65 -29
- package/lib/nginx/includes/security/crs4/rules/REQUEST-941-APPLICATION-ATTACK-XSS.conf +114 -78
- package/lib/nginx/includes/security/crs4/rules/REQUEST-942-APPLICATION-ATTACK-SQLI.conf +182 -120
- package/lib/nginx/includes/security/crs4/rules/REQUEST-943-APPLICATION-ATTACK-SESSION-FIXATION.conf +19 -16
- package/lib/nginx/includes/security/crs4/rules/REQUEST-944-APPLICATION-ATTACK-JAVA.conf +48 -34
- package/lib/nginx/includes/security/crs4/rules/REQUEST-949-BLOCKING-EVALUATION.conf +30 -30
- package/lib/nginx/includes/security/crs4/rules/RESPONSE-950-DATA-LEAKAGES.conf +20 -15
- package/lib/nginx/includes/security/crs4/rules/RESPONSE-951-DATA-LEAKAGES-SQL.conf +47 -29
- package/lib/nginx/includes/security/crs4/rules/RESPONSE-952-DATA-LEAKAGES-JAVA.conf +15 -36
- package/lib/nginx/includes/security/crs4/rules/RESPONSE-953-DATA-LEAKAGES-PHP.conf +20 -15
- package/lib/nginx/includes/security/crs4/rules/RESPONSE-954-DATA-LEAKAGES-IIS.conf +22 -17
- package/lib/nginx/includes/security/crs4/rules/RESPONSE-955-WEB-SHELLS.conf +92 -43
- package/lib/nginx/includes/security/crs4/rules/RESPONSE-959-BLOCKING-EVALUATION.conf +30 -30
- package/lib/nginx/includes/security/crs4/rules/RESPONSE-980-CORRELATION.conf +23 -23
- package/lib/nginx/includes/security/crs4/rules/java-classes.data +11 -0
- package/lib/nginx/includes/security/crs4/rules/lfi-os-files.data +227 -15
- package/lib/nginx/includes/security/crs4/rules/php-function-names-933150.data +0 -7
- package/lib/nginx/includes/security/crs4/rules/restricted-files.data +250 -29
- package/lib/nginx/includes/security/crs4/rules/restricted-upload.data +200 -26
- package/lib/nginx/includes/security/crs4/rules/unix-shell-builtins.data +20 -0
- package/lib/nginx/includes/security/crs4/rules/unix-shell.data +39 -18
- package/lib/nginx/includes/security/crs4/rules/web-shells-asp.data +23 -0
- package/package.json +9 -9
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# ------------------------------------------------------------------------
|
|
2
|
-
# OWASP CRS ver.4.
|
|
2
|
+
# OWASP CRS ver.4.16.0
|
|
3
3
|
# Copyright (c) 2006-2020 Trustwave and contributors. All rights reserved.
|
|
4
|
-
# Copyright (c) 2021-
|
|
4
|
+
# Copyright (c) 2021-2025 CRS project. All rights reserved.
|
|
5
5
|
#
|
|
6
6
|
# The OWASP CRS is distributed under
|
|
7
7
|
# Apache Software License (ASL) version 2
|
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
SecRule TX:DETECTION_PARANOIA_LEVEL "@lt 1" "id:934011,phase:1,pass,nolog,tag:'OWASP_CRS',ver:'OWASP_CRS/4.
|
|
18
|
-
SecRule TX:DETECTION_PARANOIA_LEVEL "@lt 1" "id:934012,phase:2,pass,nolog,tag:'OWASP_CRS',ver:'OWASP_CRS/4.
|
|
17
|
+
SecRule TX:DETECTION_PARANOIA_LEVEL "@lt 1" "id:934011,phase:1,pass,nolog,tag:'OWASP_CRS',ver:'OWASP_CRS/4.16.0',skipAfter:END-REQUEST-934-APPLICATION-ATTACK-GENERIC"
|
|
18
|
+
SecRule TX:DETECTION_PARANOIA_LEVEL "@lt 1" "id:934012,phase:2,pass,nolog,tag:'OWASP_CRS',ver:'OWASP_CRS/4.16.0',skipAfter:END-REQUEST-934-APPLICATION-ATTACK-GENERIC"
|
|
19
19
|
#
|
|
20
20
|
# -= Paranoia Level 1 (default) =- (apply only when tx.detection_paranoia_level is sufficiently high: 1 or higher)
|
|
21
21
|
#
|
|
@@ -49,7 +49,7 @@ SecRule TX:DETECTION_PARANOIA_LEVEL "@lt 1" "id:934012,phase:2,pass,nolog,tag:'O
|
|
|
49
49
|
# crs-toolchain regex update 934100
|
|
50
50
|
#
|
|
51
51
|
# Stricter sibling: 934101
|
|
52
|
-
SecRule REQUEST_FILENAME|REQUEST_COOKIES
|
|
52
|
+
SecRule REQUEST_FILENAME|REQUEST_COOKIES|REQUEST_COOKIES_NAMES|ARGS_NAMES|ARGS|XML:/* "@rx _(?:\$\$ND_FUNC\$\$_|_js_function)|(?:\beval|new[\s\x0b]+Function[\s\x0b]*)\(|String\.fromCharCode|function\(\)\{|this\.constructor|module\.exports=|\([\s\x0b]*[^0-9A-Z_a-z]child_process[^0-9A-Z_a-z][\s\x0b]*\)|process(?:\.(?:(?:a(?:ccess|ppendfile|rgv|vailability)|c(?:aveats|h(?:mod|own)|(?:los|opyfil)e|p|reate(?:read|write)stream)|ex(?:ec(?:file)?|ists)|f(?:ch(?:mod|own)|data(?:sync)?|s(?:tat|ync)|utimes)|inodes|l(?:chmod|ink|stat|utimes)|mkd(?:ir|temp)|open(?:dir)?|r(?:e(?:ad(?:dir|file|link|v)?|name)|m)|s(?:pawn(?:file)?|tat|ymlink)|truncate|u(?:n(?:link|watchfile)|times)|w(?:atchfile|rite(?:file|v)?))(?:sync)?(?:\.call)?\(|binding|constructor|env|global|main(?:Module)?|process|require)|\[[\"'`](?:(?:a(?:ccess|ppendfile|rgv|vailability)|c(?:aveats|h(?:mod|own)|(?:los|opyfil)e|p|reate(?:read|write)stream)|ex(?:ec(?:file)?|ists)|f(?:ch(?:mod|own)|data(?:sync)?|s(?:tat|ync)|utimes)|inodes|l(?:chmod|ink|stat|utimes)|mkd(?:ir|temp)|open(?:dir)?|r(?:e(?:ad(?:dir|file|link|v)?|name)|m)|s(?:pawn(?:file)?|tat|ymlink)|truncate|u(?:n(?:link|watchfile)|times)|w(?:atchfile|rite(?:file|v)?))(?:sync)?|binding|constructor|env|global|main(?:Module)?|process|require)[\"'`]\])|(?:binding|constructor|env|global|main(?:Module)?|process|require)\[|console(?:\.(?:debug|error|info|trace|warn)(?:\.call)?\(|\[[\"'`](?:debug|error|info|trace|warn)[\"'`]\])|require(?:\.(?:resolve(?:\.call)?\(|main|extensions|cache)|\[[\"'`](?:(?:resolv|cach)e|main|extensions)[\"'`]\])" \
|
|
53
53
|
"id:934100,\
|
|
54
54
|
phase:2,\
|
|
55
55
|
block,\
|
|
@@ -64,8 +64,9 @@ SecRule REQUEST_FILENAME|REQUEST_COOKIES|!REQUEST_COOKIES:/__utm/|REQUEST_COOKIE
|
|
|
64
64
|
tag:'attack-injection-generic',\
|
|
65
65
|
tag:'paranoia-level/1',\
|
|
66
66
|
tag:'OWASP_CRS',\
|
|
67
|
+
tag:'OWASP_CRS/ATTACK-GENERIC',\
|
|
67
68
|
tag:'capec/1000/152/242',\
|
|
68
|
-
ver:'OWASP_CRS/4.
|
|
69
|
+
ver:'OWASP_CRS/4.16.0',\
|
|
69
70
|
severity:'CRITICAL',\
|
|
70
71
|
multiMatch,\
|
|
71
72
|
setvar:'tx.rce_score=+%{tx.critical_anomaly_score}',\
|
|
@@ -85,7 +86,7 @@ SecRule REQUEST_FILENAME|REQUEST_COOKIES|!REQUEST_COOKIES:/__utm/|REQUEST_COOKIE
|
|
|
85
86
|
#
|
|
86
87
|
# Preventing: https://cheatsheetseries.owasp.org/cheatsheets/Server_Side_Request_Forgery_Prevention_Cheat_Sheet.html
|
|
87
88
|
|
|
88
|
-
SecRule REQUEST_COOKIES
|
|
89
|
+
SecRule REQUEST_COOKIES|REQUEST_COOKIES_NAMES|REQUEST_FILENAME|ARGS_NAMES|ARGS|XML:/* "@pmFromFile ssrf.data" \
|
|
89
90
|
"id:934110,\
|
|
90
91
|
phase:2,\
|
|
91
92
|
block,\
|
|
@@ -99,8 +100,9 @@ SecRule REQUEST_COOKIES|!REQUEST_COOKIES:/__utm/|REQUEST_COOKIES_NAMES|REQUEST_F
|
|
|
99
100
|
tag:'attack-ssrf',\
|
|
100
101
|
tag:'paranoia-level/1',\
|
|
101
102
|
tag:'OWASP_CRS',\
|
|
103
|
+
tag:'OWASP_CRS/ATTACK-GENERIC',\
|
|
102
104
|
tag:'capec/1000/225/664',\
|
|
103
|
-
ver:'OWASP_CRS/4.
|
|
105
|
+
ver:'OWASP_CRS/4.16.0',\
|
|
104
106
|
severity:'CRITICAL',\
|
|
105
107
|
setvar:'tx.rce_score=+%{tx.critical_anomaly_score}',\
|
|
106
108
|
setvar:'tx.inbound_anomaly_score_pl1=+%{tx.critical_anomaly_score}'"
|
|
@@ -117,9 +119,8 @@ SecRule REQUEST_COOKIES|!REQUEST_COOKIES:/__utm/|REQUEST_COOKIES_NAMES|REQUEST_F
|
|
|
117
119
|
# See also: https://cwe.mitre.org/data/definitions/1321.html
|
|
118
120
|
#
|
|
119
121
|
# Note: only server-based (not DOM-based) attacks are covered here.
|
|
120
|
-
# Stricter sibling: 934131
|
|
121
122
|
|
|
122
|
-
SecRule REQUEST_COOKIES
|
|
123
|
+
SecRule REQUEST_COOKIES|REQUEST_COOKIES_NAMES|ARGS_NAMES|ARGS|XML:/* "@rx (?:__proto__|constructor\s*(?:\.|\]?\[)\s*prototype)" \
|
|
123
124
|
"id:934130,\
|
|
124
125
|
phase:2,\
|
|
125
126
|
block,\
|
|
@@ -134,8 +135,9 @@ SecRule REQUEST_COOKIES|!REQUEST_COOKIES:/__utm/|REQUEST_COOKIES_NAMES|ARGS_NAME
|
|
|
134
135
|
tag:'attack-injection-generic',\
|
|
135
136
|
tag:'paranoia-level/1',\
|
|
136
137
|
tag:'OWASP_CRS',\
|
|
138
|
+
tag:'OWASP_CRS/ATTACK-GENERIC',\
|
|
137
139
|
tag:'capec/1/180/77',\
|
|
138
|
-
ver:'OWASP_CRS/4.
|
|
140
|
+
ver:'OWASP_CRS/4.16.0',\
|
|
139
141
|
severity:'CRITICAL',\
|
|
140
142
|
multiMatch,\
|
|
141
143
|
setvar:'tx.rce_score=+%{tx.critical_anomaly_score}',\
|
|
@@ -151,7 +153,7 @@ SecRule REQUEST_COOKIES|!REQUEST_COOKIES:/__utm/|REQUEST_COOKIES_NAMES|ARGS_NAME
|
|
|
151
153
|
# (consult https://coreruleset.org/docs/development/regex_assembly/ for details):
|
|
152
154
|
# crs-toolchain regex update 934150
|
|
153
155
|
#
|
|
154
|
-
SecRule REQUEST_COOKIES
|
|
156
|
+
SecRule REQUEST_COOKIES|REQUEST_COOKIES_NAMES|ARGS_NAMES|ARGS|XML:/* "@rx Process[\s\x0b]*\.[\s\x0b]*spawn[\s\x0b]*\(" \
|
|
155
157
|
"id:934150,\
|
|
156
158
|
phase:2,\
|
|
157
159
|
block,\
|
|
@@ -166,8 +168,9 @@ SecRule REQUEST_COOKIES|!REQUEST_COOKIES:/__utm/|REQUEST_COOKIES_NAMES|ARGS_NAME
|
|
|
166
168
|
tag:'attack-injection-generic',\
|
|
167
169
|
tag:'paranoia-level/1',\
|
|
168
170
|
tag:'OWASP_CRS',\
|
|
171
|
+
tag:'OWASP_CRS/ATTACK-GENERIC',\
|
|
169
172
|
tag:'capec/1000/152/242',\
|
|
170
|
-
ver:'OWASP_CRS/4.
|
|
173
|
+
ver:'OWASP_CRS/4.16.0',\
|
|
171
174
|
severity:'CRITICAL',\
|
|
172
175
|
setvar:'tx.rce_score=+%{tx.critical_anomaly_score}',\
|
|
173
176
|
setvar:'tx.inbound_anomaly_score_pl1=+%{tx.critical_anomaly_score}'"
|
|
@@ -182,7 +185,7 @@ SecRule REQUEST_COOKIES|!REQUEST_COOKIES:/__utm/|REQUEST_COOKIES_NAMES|ARGS_NAME
|
|
|
182
185
|
# (consult https://coreruleset.org/docs/development/regex_assembly/ for details):
|
|
183
186
|
# crs-toolchain regex update 934160
|
|
184
187
|
#
|
|
185
|
-
SecRule REQUEST_FILENAME|REQUEST_COOKIES
|
|
188
|
+
SecRule REQUEST_FILENAME|REQUEST_COOKIES|REQUEST_COOKIES_NAMES|ARGS_NAMES|ARGS|XML:/* "@rx while[\s\x0b]*\([\s\x0b\(]*(?:!+(?:false|null|undefined|NaN|[\+\-]?0|\"{2}|'{2}|`{2})|(?:!!)*(?:(?:t(?:rue|his)|[\+\-]?(?:Infinity|[1-9][0-9]*)|new [A-Za-z][0-9A-Z_a-z]*|window|String|(?:Boolea|Functio)n|Object|Array)\b|\{.*\}|\[.*\]|\"[^\"]+\"|'[^']+'|`[^`]+`)).*\)" \
|
|
186
189
|
"id:934160,\
|
|
187
190
|
phase:2,\
|
|
188
191
|
block,\
|
|
@@ -197,8 +200,9 @@ SecRule REQUEST_FILENAME|REQUEST_COOKIES|!REQUEST_COOKIES:/__utm/|REQUEST_COOKIE
|
|
|
197
200
|
tag:'attack-injection-generic',\
|
|
198
201
|
tag:'paranoia-level/1',\
|
|
199
202
|
tag:'OWASP_CRS',\
|
|
203
|
+
tag:'OWASP_CRS/ATTACK-GENERIC',\
|
|
200
204
|
tag:'capec/1000/152/242',\
|
|
201
|
-
ver:'OWASP_CRS/4.
|
|
205
|
+
ver:'OWASP_CRS/4.16.0',\
|
|
202
206
|
severity:'CRITICAL',\
|
|
203
207
|
multiMatch,\
|
|
204
208
|
setvar:'tx.rce_score=+%{tx.critical_anomaly_score}',\
|
|
@@ -213,7 +217,7 @@ SecRule REQUEST_FILENAME|REQUEST_COOKIES|!REQUEST_COOKIES:/__utm/|REQUEST_COOKIE
|
|
|
213
217
|
# (consult https://coreruleset.org/docs/development/regex_assembly/ for details):
|
|
214
218
|
# crs-toolchain regex update 934170
|
|
215
219
|
#
|
|
216
|
-
SecRule REQUEST_FILENAME|REQUEST_COOKIES
|
|
220
|
+
SecRule REQUEST_FILENAME|REQUEST_COOKIES|REQUEST_COOKIES_NAMES|ARGS_NAMES|ARGS|XML:/* "@rx ^data:(?:(?:\*|[^!\"\(\),/:-\?\[-\]\{\}]+)/(?:\*|[^!\"\(\),/:-\?\[-\]\{\}]+)|\*)(?:[\s\x0b]*;[\s\x0b]*(?:charset[\s\x0b]*=[\s\x0b]*\"?(?:iso-8859-15?|utf-8|windows-1252)\b\"?|(?:[^\s\x0b-\"\(\),/:-\?\[-\]c\{\}]|c(?:[^!\"\(\),/:-\?\[-\]h\{\}]|h(?:[^!\"\(\),/:-\?\[-\]a\{\}]|a(?:[^!\"\(\),/:-\?\[-\]r\{\}]|r(?:[^!\"\(\),/:-\?\[-\]s\{\}]|s(?:[^!\"\(\),/:-\?\[-\]e\{\}]|e[^!\"\(\),/:-\?\[-\]t\{\}]))))))[^!\"\(\),/:-\?\[-\]\{\}]*[\s\x0b]*=[\s\x0b]*[^!\(\),/:-\?\[-\]\{\}]+);?)*(?:[\s\x0b]*,[\s\x0b]*(?:(?:\*|[^!\"\(\),/:-\?\[-\]\{\}]+)/(?:\*|[^!\"\(\),/:-\?\[-\]\{\}]+)|\*)(?:[\s\x0b]*;[\s\x0b]*(?:charset[\s\x0b]*=[\s\x0b]*\"?(?:iso-8859-15?|utf-8|windows-1252)\b\"?|(?:[^\s\x0b-\"\(\),/:-\?\[-\]c\{\}]|c(?:[^!\"\(\),/:-\?\[-\]h\{\}]|h(?:[^!\"\(\),/:-\?\[-\]a\{\}]|a(?:[^!\"\(\),/:-\?\[-\]r\{\}]|r(?:[^!\"\(\),/:-\?\[-\]s\{\}]|s(?:[^!\"\(\),/:-\?\[-\]e\{\}]|e[^!\"\(\),/:-\?\[-\]t\{\}]))))))[^!\"\(\),/:-\?\[-\]\{\}]*[\s\x0b]*=[\s\x0b]*[^!\(\),/:-\?\[-\]\{\}]+);?)*)*" \
|
|
217
221
|
"id:934170,\
|
|
218
222
|
phase:2,\
|
|
219
223
|
block,\
|
|
@@ -227,20 +231,21 @@ SecRule REQUEST_FILENAME|REQUEST_COOKIES|!REQUEST_COOKIES:/__utm/|REQUEST_COOKIE
|
|
|
227
231
|
tag:'attack-ssrf',\
|
|
228
232
|
tag:'paranoia-level/1',\
|
|
229
233
|
tag:'OWASP_CRS',\
|
|
234
|
+
tag:'OWASP_CRS/ATTACK-GENERIC',\
|
|
230
235
|
tag:'capec/1000/152/242',\
|
|
231
|
-
ver:'OWASP_CRS/4.
|
|
236
|
+
ver:'OWASP_CRS/4.16.0',\
|
|
232
237
|
severity:'CRITICAL',\
|
|
233
238
|
setvar:'tx.rce_score=+%{tx.critical_anomaly_score}',\
|
|
234
239
|
setvar:'tx.inbound_anomaly_score_pl1=+%{tx.critical_anomaly_score}'"
|
|
235
240
|
|
|
236
|
-
SecRule TX:DETECTION_PARANOIA_LEVEL "@lt 2" "id:934013,phase:1,pass,nolog,tag:'OWASP_CRS',ver:'OWASP_CRS/4.
|
|
237
|
-
SecRule TX:DETECTION_PARANOIA_LEVEL "@lt 2" "id:934014,phase:2,pass,nolog,tag:'OWASP_CRS',ver:'OWASP_CRS/4.
|
|
241
|
+
SecRule TX:DETECTION_PARANOIA_LEVEL "@lt 2" "id:934013,phase:1,pass,nolog,tag:'OWASP_CRS',ver:'OWASP_CRS/4.16.0',skipAfter:END-REQUEST-934-APPLICATION-ATTACK-GENERIC"
|
|
242
|
+
SecRule TX:DETECTION_PARANOIA_LEVEL "@lt 2" "id:934014,phase:2,pass,nolog,tag:'OWASP_CRS',ver:'OWASP_CRS/4.16.0',skipAfter:END-REQUEST-934-APPLICATION-ATTACK-GENERIC"
|
|
238
243
|
#
|
|
239
244
|
# -= Paranoia Level 2 =- (apply only when tx.detection_paranoia_level is sufficiently high: 2 or higher)
|
|
240
245
|
#
|
|
241
246
|
|
|
242
247
|
# This rule is a stricter sibling of 934100.
|
|
243
|
-
SecRule REQUEST_FILENAME|REQUEST_COOKIES
|
|
248
|
+
SecRule REQUEST_FILENAME|REQUEST_COOKIES|REQUEST_COOKIES_NAMES|ARGS_NAMES|ARGS|XML:/* "@rx (?:close|exists|fork|(?:ope|spaw)n|re(?:ad|quire)|w(?:atch|rite))[\s\x0b]*\(" \
|
|
244
249
|
"id:934101,\
|
|
245
250
|
phase:2,\
|
|
246
251
|
block,\
|
|
@@ -255,8 +260,9 @@ SecRule REQUEST_FILENAME|REQUEST_COOKIES|!REQUEST_COOKIES:/__utm/|REQUEST_COOKIE
|
|
|
255
260
|
tag:'attack-injection-generic',\
|
|
256
261
|
tag:'paranoia-level/2',\
|
|
257
262
|
tag:'OWASP_CRS',\
|
|
263
|
+
tag:'OWASP_CRS/ATTACK-GENERIC',\
|
|
258
264
|
tag:'capec/1000/152/242',\
|
|
259
|
-
ver:'OWASP_CRS/4.
|
|
265
|
+
ver:'OWASP_CRS/4.16.0',\
|
|
260
266
|
severity:'CRITICAL',\
|
|
261
267
|
multiMatch,\
|
|
262
268
|
setvar:'tx.rce_score=+%{tx.critical_anomaly_score}',\
|
|
@@ -293,7 +299,7 @@ SecRule REQUEST_FILENAME|REQUEST_COOKIES|!REQUEST_COOKIES:/__utm/|REQUEST_COOKIE
|
|
|
293
299
|
# (consult https://coreruleset.org/docs/development/regex_assembly/ for details):
|
|
294
300
|
# crs-toolchain regex update 934120
|
|
295
301
|
#
|
|
296
|
-
SecRule REQUEST_COOKIES
|
|
302
|
+
SecRule REQUEST_COOKIES|REQUEST_COOKIES_NAMES|REQUEST_FILENAME|ARGS_NAMES|ARGS|XML:/* "@rx (?i)(?:a(?:cap|f[ps]|ttachment)|b(?:eshare|itcoin|lob)|c(?:a(?:llto|p)|id|vs|ompress.(?:zlib|bzip2))|d(?:a(?:v|ta)|ict|n(?:s|tp))|e(?:d2k|xpect)|f(?:(?:ee)?d|i(?:le|nger|sh)|tps?)|g(?:it|o(?:pher)?|lob)|h(?:323|ttps?)|i(?:ax|cap|(?:ma|p)ps?|rc[6s]?)|ja(?:bbe)?r|l(?:dap[is]?|ocal_file)|m(?:a(?:ilto|ven)|ms|umble)|n(?:e(?:tdoc|ws)|fs|ntps?)|ogg|p(?:aparazzi|h(?:ar|p)|op(?:2|3s?)|r(?:es|oxy)|syc)|r(?:mi|sync|tm(?:f?p)?|ar)|s(?:3|ftp|ips?|m(?:[bs]|tps?)|n(?:ews|mp)|sh(?:2(?:.(?:s(?:hell|(?:ft|c)p)|exec|tunnel))?)?|vn(?:\+ssh)?)|t(?:e(?:amspeak|lnet)|ftp|urns?)|u(?:dp|nreal|t2004)|v(?:entrilo|iew-source|nc)|w(?:ebcal|ss?)|x(?:mpp|ri)|zip)://(?:[0-9]{10}|(?:0x[0-9a-f]{2}\.){3}0x[0-9a-f]{2}|0x(?:[0-9a-f]{8}|[0-9a-f]{16})|(?:0{1,4}[0-9]{1,3}\.){3}0{1,4}[0-9]{1,3}|[0-9]{1,3}\.(?:[0-9]{1,3}\.[0-9]{5}|[0-9]{8})|(?:\x5c\x5c[\-0-9a-z]\.?_?)+|\[[0-:a-f]+(?:[\.0-9]+|%[0-9A-Z_a-z]+)?\]|[a-z][\-\.0-9A-Z_a-z]{1,255}:[0-9]{1,5}(?:#?[\s\x0b]*&?@(?:(?:[0-9]{1,3}\.){3}[0-9]{1,3}|[a-z][\-\.0-9A-Z_a-z]{1,255}):[0-9]{1,5}/?)+|[\.0-9]{0,11}(?:\x{e2}(?:\x91[\xa0-\x{bf}]|\x92[\x80-\x{bf}]|\x93[\x80-\x{a9}\x{ab}-\x{bf}])|\x{e3}\x80\x82)+)" \
|
|
297
303
|
"id:934120,\
|
|
298
304
|
phase:2,\
|
|
299
305
|
block,\
|
|
@@ -307,8 +313,9 @@ SecRule REQUEST_COOKIES|!REQUEST_COOKIES:/__utm/|REQUEST_COOKIES_NAMES|REQUEST_F
|
|
|
307
313
|
tag:'attack-ssrf',\
|
|
308
314
|
tag:'paranoia-level/2',\
|
|
309
315
|
tag:'OWASP_CRS',\
|
|
316
|
+
tag:'OWASP_CRS/ATTACK-GENERIC',\
|
|
310
317
|
tag:'capec/1000/225/664',\
|
|
311
|
-
ver:'OWASP_CRS/4.
|
|
318
|
+
ver:'OWASP_CRS/4.16.0',\
|
|
312
319
|
severity:'CRITICAL',\
|
|
313
320
|
setvar:'tx.rce_score=+%{tx.critical_anomaly_score}',\
|
|
314
321
|
setvar:'tx.inbound_anomaly_score_pl2=+%{tx.critical_anomaly_score}'"
|
|
@@ -324,7 +331,7 @@ SecRule REQUEST_COOKIES|!REQUEST_COOKIES:/__utm/|REQUEST_COOKIES_NAMES|REQUEST_F
|
|
|
324
331
|
# (consult https://coreruleset.org/docs/development/regex_assembly/ for details):
|
|
325
332
|
# crs-toolchain regex update 934140
|
|
326
333
|
#
|
|
327
|
-
SecRule REQUEST_COOKIES
|
|
334
|
+
SecRule REQUEST_COOKIES|REQUEST_COOKIES_NAMES|ARGS_NAMES|ARGS|XML:/* "@rx ^(?:[^@]|@[^\{])*@+\{[^\}]*\}" \
|
|
328
335
|
"id:934140,\
|
|
329
336
|
phase:2,\
|
|
330
337
|
block,\
|
|
@@ -339,21 +346,50 @@ SecRule REQUEST_COOKIES|!REQUEST_COOKIES:/__utm/|REQUEST_COOKIES_NAMES|ARGS_NAME
|
|
|
339
346
|
tag:'attack-injection-generic',\
|
|
340
347
|
tag:'paranoia-level/2',\
|
|
341
348
|
tag:'OWASP_CRS',\
|
|
349
|
+
tag:'OWASP_CRS/ATTACK-GENERIC',\
|
|
342
350
|
tag:'capec/1000/152/242',\
|
|
343
|
-
ver:'OWASP_CRS/4.
|
|
351
|
+
ver:'OWASP_CRS/4.16.0',\
|
|
344
352
|
severity:'CRITICAL',\
|
|
345
353
|
setvar:'tx.rce_score=+%{tx.critical_anomaly_score}',\
|
|
346
354
|
setvar:'tx.inbound_anomaly_score_pl2=+%{tx.critical_anomaly_score}'"
|
|
347
355
|
|
|
348
356
|
|
|
349
|
-
|
|
350
|
-
|
|
357
|
+
# [ Generic RCE signatures ]
|
|
358
|
+
#
|
|
359
|
+
# Detects General SSTI attacks.
|
|
360
|
+
# Example: <%= File.open('/etc/passwd').read %>
|
|
361
|
+
# Note: there is another rule 941380 that checks for {{.*}} regex.
|
|
362
|
+
#
|
|
363
|
+
SecRule REQUEST_COOKIES|REQUEST_COOKIES_NAMES|ARGS_NAMES|ARGS|XML:/* "@rx (?:{%[^%}]*%}|<%=?[^%>]*%>)" \
|
|
364
|
+
"id:934180,\
|
|
365
|
+
phase:2,\
|
|
366
|
+
block,\
|
|
367
|
+
capture,\
|
|
368
|
+
t:none,\
|
|
369
|
+
msg:'SSTI Attack',\
|
|
370
|
+
logdata:'Matched Data: %{TX.0} found within %{MATCHED_VAR_NAME}: %{MATCHED_VAR}',\
|
|
371
|
+
tag:'application-multi',\
|
|
372
|
+
tag:'platform-multi',\
|
|
373
|
+
tag:'attack-ssti',\
|
|
374
|
+
tag:'attack-injection-generic',\
|
|
375
|
+
tag:'paranoia-level/2',\
|
|
376
|
+
tag:'OWASP_CRS',\
|
|
377
|
+
tag:'OWASP_CRS/ATTACK-GENERIC',\
|
|
378
|
+
tag:'capec/1000/152/242',\
|
|
379
|
+
ver:'OWASP_CRS/4.16.0',\
|
|
380
|
+
severity:'CRITICAL',\
|
|
381
|
+
setvar:'tx.rce_score=+%{tx.critical_anomaly_score}',\
|
|
382
|
+
setvar:'tx.inbound_anomaly_score_pl2=+%{tx.critical_anomaly_score}'"
|
|
383
|
+
|
|
384
|
+
|
|
385
|
+
SecRule TX:DETECTION_PARANOIA_LEVEL "@lt 3" "id:934015,phase:1,pass,nolog,tag:'OWASP_CRS',ver:'OWASP_CRS/4.16.0',skipAfter:END-REQUEST-934-APPLICATION-ATTACK-GENERIC"
|
|
386
|
+
SecRule TX:DETECTION_PARANOIA_LEVEL "@lt 3" "id:934016,phase:2,pass,nolog,tag:'OWASP_CRS',ver:'OWASP_CRS/4.16.0',skipAfter:END-REQUEST-934-APPLICATION-ATTACK-GENERIC"
|
|
351
387
|
#
|
|
352
388
|
# -= Paranoia Level 3 =- (apply only when tx.detection_paranoia_level is sufficiently high: 3 or higher)
|
|
353
389
|
#
|
|
354
390
|
|
|
355
|
-
SecRule TX:DETECTION_PARANOIA_LEVEL "@lt 4" "id:934017,phase:1,pass,nolog,tag:'OWASP_CRS',ver:'OWASP_CRS/4.
|
|
356
|
-
SecRule TX:DETECTION_PARANOIA_LEVEL "@lt 4" "id:934018,phase:2,pass,nolog,tag:'OWASP_CRS',ver:'OWASP_CRS/4.
|
|
391
|
+
SecRule TX:DETECTION_PARANOIA_LEVEL "@lt 4" "id:934017,phase:1,pass,nolog,tag:'OWASP_CRS',ver:'OWASP_CRS/4.16.0',skipAfter:END-REQUEST-934-APPLICATION-ATTACK-GENERIC"
|
|
392
|
+
SecRule TX:DETECTION_PARANOIA_LEVEL "@lt 4" "id:934018,phase:2,pass,nolog,tag:'OWASP_CRS',ver:'OWASP_CRS/4.16.0',skipAfter:END-REQUEST-934-APPLICATION-ATTACK-GENERIC"
|
|
357
393
|
#
|
|
358
394
|
# -= Paranoia Level 4 =- (apply only when tx.detection_paranoia_level is sufficiently high: 4 or higher)
|
|
359
395
|
#
|