@abtnode/router-provider 1.16.38-beta-20250116-083413-dbd33222 → 1.16.38-beta-20250118-033334-2da05ae8
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.example +200 -0
- package/lib/nginx/includes/security/crs4/rules/REQUEST-901-INITIALIZATION.conf +470 -0
- package/lib/nginx/includes/security/crs4/rules/REQUEST-905-COMMON-EXCEPTIONS.conf +57 -0
- package/lib/nginx/includes/security/crs4/rules/REQUEST-911-METHOD-ENFORCEMENT.conf +76 -0
- package/lib/nginx/includes/security/crs4/rules/REQUEST-913-SCANNER-DETECTION.conf +86 -0
- package/lib/nginx/includes/security/crs4/rules/REQUEST-920-PROTOCOL-ENFORCEMENT.conf +1915 -0
- package/lib/nginx/includes/security/crs4/rules/REQUEST-921-PROTOCOL-ATTACK.conf +558 -0
- package/lib/nginx/includes/security/crs4/rules/REQUEST-922-MULTIPART-ATTACK.conf +120 -0
- package/lib/nginx/includes/security/crs4/rules/REQUEST-930-APPLICATION-ATTACK-LFI.conf +203 -0
- package/lib/nginx/includes/security/crs4/rules/REQUEST-931-APPLICATION-ATTACK-RFI.conf +189 -0
- package/lib/nginx/includes/security/crs4/rules/REQUEST-932-APPLICATION-ATTACK-RCE.conf +1875 -0
- package/lib/nginx/includes/security/crs4/rules/REQUEST-933-APPLICATION-ATTACK-PHP.conf +774 -0
- package/lib/nginx/includes/security/crs4/rules/REQUEST-934-APPLICATION-ATTACK-GENERIC.conf +366 -0
- package/lib/nginx/includes/security/crs4/rules/REQUEST-941-APPLICATION-ATTACK-XSS.conf +1071 -0
- package/lib/nginx/includes/security/crs4/rules/REQUEST-942-APPLICATION-ATTACK-SQLI.conf +1978 -0
- package/lib/nginx/includes/security/crs4/rules/REQUEST-943-APPLICATION-ATTACK-SESSION-FIXATION.conf +132 -0
- package/lib/nginx/includes/security/crs4/rules/REQUEST-944-APPLICATION-ATTACK-JAVA.conf +463 -0
- package/lib/nginx/includes/security/crs4/rules/REQUEST-949-BLOCKING-EVALUATION.conf +270 -0
- package/lib/nginx/includes/security/crs4/rules/RESPONSE-950-DATA-LEAKAGES.conf +156 -0
- package/lib/nginx/includes/security/crs4/rules/RESPONSE-951-DATA-LEAKAGES-SQL.conf +417 -0
- package/lib/nginx/includes/security/crs4/rules/RESPONSE-952-DATA-LEAKAGES-JAVA.conf +108 -0
- package/lib/nginx/includes/security/crs4/rules/RESPONSE-953-DATA-LEAKAGES-PHP.conf +158 -0
- package/lib/nginx/includes/security/crs4/rules/RESPONSE-954-DATA-LEAKAGES-IIS.conf +152 -0
- package/lib/nginx/includes/security/crs4/rules/RESPONSE-955-WEB-SHELLS.conf +558 -0
- package/lib/nginx/includes/security/crs4/rules/RESPONSE-959-BLOCKING-EVALUATION.conf +280 -0
- package/lib/nginx/includes/security/crs4/rules/RESPONSE-980-CORRELATION.conf +138 -0
- package/lib/nginx/includes/security/crs4/rules/RESPONSE-999-EXCLUSION-RULES-AFTER-CRS.conf.example +76 -0
- package/lib/nginx/includes/security/crs4/rules/iis-errors.data +59 -0
- package/lib/nginx/includes/security/crs4/rules/java-classes.data +64 -0
- package/lib/nginx/includes/security/crs4/rules/java-code-leakages.data +17 -0
- package/lib/nginx/includes/security/crs4/rules/java-errors.data +10 -0
- package/lib/nginx/includes/security/crs4/rules/lfi-os-files.data +722 -0
- package/lib/nginx/includes/security/crs4/rules/php-config-directives.data +571 -0
- package/lib/nginx/includes/security/crs4/rules/php-errors-pl2.data +7 -0
- package/lib/nginx/includes/security/crs4/rules/php-errors.data +2147 -0
- package/lib/nginx/includes/security/crs4/rules/php-function-names-933150.data +245 -0
- package/lib/nginx/includes/security/crs4/rules/php-function-names-933151.data +2201 -0
- package/lib/nginx/includes/security/crs4/rules/php-variables.data +30 -0
- package/lib/nginx/includes/security/crs4/rules/restricted-files.data +284 -0
- package/lib/nginx/includes/security/crs4/rules/restricted-upload.data +177 -0
- package/lib/nginx/includes/security/crs4/rules/scanners-user-agents.data +119 -0
- package/lib/nginx/includes/security/crs4/rules/sql-errors.data +172 -0
- package/lib/nginx/includes/security/crs4/rules/ssrf.data +177 -0
- package/lib/nginx/includes/security/crs4/rules/unix-shell.data +670 -0
- package/lib/nginx/includes/security/crs4/rules/web-shells-php.data +167 -0
- package/lib/nginx/includes/security/crs4/rules/windows-powershell-commands.data +425 -0
- package/lib/nginx/includes/security/unicode.mapping +96 -0
- package/lib/nginx/index.js +50 -3
- package/lib/nginx/templates/security/crs4/crs-setup.conf.js +857 -0
- package/lib/nginx/templates/security/modsecurity.conf.js +244 -0
- package/package.json +7 -6
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
# ------------------------------------------------------------------------
|
|
2
|
+
# OWASP CRS ver.4.9.0
|
|
3
|
+
# Copyright (c) 2006-2020 Trustwave and contributors. All rights reserved.
|
|
4
|
+
# Copyright (c) 2021-2024 CRS project. All rights reserved.
|
|
5
|
+
#
|
|
6
|
+
# The OWASP CRS is distributed under
|
|
7
|
+
# Apache Software License (ASL) version 2
|
|
8
|
+
# Please see the enclosed LICENSE file for full details.
|
|
9
|
+
# ------------------------------------------------------------------------
|
|
10
|
+
|
|
11
|
+
#
|
|
12
|
+
# -= Paranoia Level 0 (empty) =- (apply unconditionally)
|
|
13
|
+
#
|
|
14
|
+
|
|
15
|
+
# Summing up the blocking and detection anomaly scores in phase 1
|
|
16
|
+
# even when early blocking is disabled, we need to sum up the scores in phase 1
|
|
17
|
+
# this prevents bugs in phase 5 if Apache skips phases because of error handling
|
|
18
|
+
# See: https://github.com/coreruleset/coreruleset/issues/2319#issuecomment-1047503932
|
|
19
|
+
|
|
20
|
+
SecRule TX:BLOCKING_PARANOIA_LEVEL "@ge 1" \
|
|
21
|
+
"id:949052,\
|
|
22
|
+
phase:1,\
|
|
23
|
+
pass,\
|
|
24
|
+
t:none,\
|
|
25
|
+
nolog,\
|
|
26
|
+
tag:'OWASP_CRS',\
|
|
27
|
+
ver:'OWASP_CRS/4.9.0',\
|
|
28
|
+
setvar:'tx.blocking_inbound_anomaly_score=+%{tx.inbound_anomaly_score_pl1}'"
|
|
29
|
+
|
|
30
|
+
SecRule TX:DETECTION_PARANOIA_LEVEL "@ge 1" \
|
|
31
|
+
"id:949152,\
|
|
32
|
+
phase:1,\
|
|
33
|
+
pass,\
|
|
34
|
+
t:none,\
|
|
35
|
+
nolog,\
|
|
36
|
+
tag:'OWASP_CRS',\
|
|
37
|
+
ver:'OWASP_CRS/4.9.0',\
|
|
38
|
+
setvar:'tx.detection_inbound_anomaly_score=+%{tx.inbound_anomaly_score_pl1}'"
|
|
39
|
+
|
|
40
|
+
SecRule TX:BLOCKING_PARANOIA_LEVEL "@ge 2" \
|
|
41
|
+
"id:949053,\
|
|
42
|
+
phase:1,\
|
|
43
|
+
pass,\
|
|
44
|
+
t:none,\
|
|
45
|
+
nolog,\
|
|
46
|
+
tag:'OWASP_CRS',\
|
|
47
|
+
ver:'OWASP_CRS/4.9.0',\
|
|
48
|
+
setvar:'tx.blocking_inbound_anomaly_score=+%{tx.inbound_anomaly_score_pl2}'"
|
|
49
|
+
|
|
50
|
+
SecRule TX:DETECTION_PARANOIA_LEVEL "@ge 2" \
|
|
51
|
+
"id:949153,\
|
|
52
|
+
phase:1,\
|
|
53
|
+
pass,\
|
|
54
|
+
t:none,\
|
|
55
|
+
nolog,\
|
|
56
|
+
tag:'OWASP_CRS',\
|
|
57
|
+
ver:'OWASP_CRS/4.9.0',\
|
|
58
|
+
setvar:'tx.detection_inbound_anomaly_score=+%{tx.inbound_anomaly_score_pl2}'"
|
|
59
|
+
|
|
60
|
+
SecRule TX:BLOCKING_PARANOIA_LEVEL "@ge 3" \
|
|
61
|
+
"id:949054,\
|
|
62
|
+
phase:1,\
|
|
63
|
+
pass,\
|
|
64
|
+
t:none,\
|
|
65
|
+
nolog,\
|
|
66
|
+
tag:'OWASP_CRS',\
|
|
67
|
+
ver:'OWASP_CRS/4.9.0',\
|
|
68
|
+
setvar:'tx.blocking_inbound_anomaly_score=+%{tx.inbound_anomaly_score_pl3}'"
|
|
69
|
+
|
|
70
|
+
SecRule TX:DETECTION_PARANOIA_LEVEL "@ge 3" \
|
|
71
|
+
"id:949154,\
|
|
72
|
+
phase:1,\
|
|
73
|
+
pass,\
|
|
74
|
+
t:none,\
|
|
75
|
+
nolog,\
|
|
76
|
+
tag:'OWASP_CRS',\
|
|
77
|
+
ver:'OWASP_CRS/4.9.0',\
|
|
78
|
+
setvar:'tx.detection_inbound_anomaly_score=+%{tx.inbound_anomaly_score_pl3}'"
|
|
79
|
+
|
|
80
|
+
SecRule TX:BLOCKING_PARANOIA_LEVEL "@ge 4" \
|
|
81
|
+
"id:949055,\
|
|
82
|
+
phase:1,\
|
|
83
|
+
pass,\
|
|
84
|
+
t:none,\
|
|
85
|
+
nolog,\
|
|
86
|
+
tag:'OWASP_CRS',\
|
|
87
|
+
ver:'OWASP_CRS/4.9.0',\
|
|
88
|
+
setvar:'tx.blocking_inbound_anomaly_score=+%{tx.inbound_anomaly_score_pl4}'"
|
|
89
|
+
|
|
90
|
+
SecRule TX:DETECTION_PARANOIA_LEVEL "@ge 4" \
|
|
91
|
+
"id:949155,\
|
|
92
|
+
phase:1,\
|
|
93
|
+
pass,\
|
|
94
|
+
t:none,\
|
|
95
|
+
nolog,\
|
|
96
|
+
tag:'OWASP_CRS',\
|
|
97
|
+
ver:'OWASP_CRS/4.9.0',\
|
|
98
|
+
setvar:'tx.detection_inbound_anomaly_score=+%{tx.inbound_anomaly_score_pl4}'"
|
|
99
|
+
|
|
100
|
+
# at start of phase 2, we reset the aggregate scores to 0 to prevent duplicate counting of per-PL scores
|
|
101
|
+
# this is necessary because the per-PL scores are counted across phases
|
|
102
|
+
SecAction \
|
|
103
|
+
"id:949059,\
|
|
104
|
+
phase:2,\
|
|
105
|
+
pass,\
|
|
106
|
+
t:none,\
|
|
107
|
+
nolog,\
|
|
108
|
+
tag:'OWASP_CRS',\
|
|
109
|
+
ver:'OWASP_CRS/4.9.0',\
|
|
110
|
+
setvar:'tx.blocking_inbound_anomaly_score=0'"
|
|
111
|
+
|
|
112
|
+
SecAction \
|
|
113
|
+
"id:949159,\
|
|
114
|
+
phase:2,\
|
|
115
|
+
pass,\
|
|
116
|
+
t:none,\
|
|
117
|
+
nolog,\
|
|
118
|
+
tag:'OWASP_CRS',\
|
|
119
|
+
ver:'OWASP_CRS/4.9.0',\
|
|
120
|
+
setvar:'tx.detection_inbound_anomaly_score=0'"
|
|
121
|
+
|
|
122
|
+
# Summing up the blocking and detection anomaly scores in phase 2
|
|
123
|
+
|
|
124
|
+
SecRule TX:BLOCKING_PARANOIA_LEVEL "@ge 1" \
|
|
125
|
+
"id:949060,\
|
|
126
|
+
phase:2,\
|
|
127
|
+
pass,\
|
|
128
|
+
t:none,\
|
|
129
|
+
nolog,\
|
|
130
|
+
tag:'OWASP_CRS',\
|
|
131
|
+
ver:'OWASP_CRS/4.9.0',\
|
|
132
|
+
setvar:'tx.blocking_inbound_anomaly_score=+%{tx.inbound_anomaly_score_pl1}'"
|
|
133
|
+
|
|
134
|
+
SecRule TX:DETECTION_PARANOIA_LEVEL "@ge 1" \
|
|
135
|
+
"id:949160,\
|
|
136
|
+
phase:2,\
|
|
137
|
+
pass,\
|
|
138
|
+
t:none,\
|
|
139
|
+
nolog,\
|
|
140
|
+
tag:'OWASP_CRS',\
|
|
141
|
+
ver:'OWASP_CRS/4.9.0',\
|
|
142
|
+
setvar:'tx.detection_inbound_anomaly_score=+%{tx.inbound_anomaly_score_pl1}'"
|
|
143
|
+
|
|
144
|
+
SecRule TX:BLOCKING_PARANOIA_LEVEL "@ge 2" \
|
|
145
|
+
"id:949061,\
|
|
146
|
+
phase:2,\
|
|
147
|
+
pass,\
|
|
148
|
+
t:none,\
|
|
149
|
+
nolog,\
|
|
150
|
+
tag:'OWASP_CRS',\
|
|
151
|
+
ver:'OWASP_CRS/4.9.0',\
|
|
152
|
+
setvar:'tx.blocking_inbound_anomaly_score=+%{tx.inbound_anomaly_score_pl2}'"
|
|
153
|
+
|
|
154
|
+
SecRule TX:DETECTION_PARANOIA_LEVEL "@ge 2" \
|
|
155
|
+
"id:949161,\
|
|
156
|
+
phase:2,\
|
|
157
|
+
pass,\
|
|
158
|
+
t:none,\
|
|
159
|
+
nolog,\
|
|
160
|
+
tag:'OWASP_CRS',\
|
|
161
|
+
ver:'OWASP_CRS/4.9.0',\
|
|
162
|
+
setvar:'tx.detection_inbound_anomaly_score=+%{tx.inbound_anomaly_score_pl2}'"
|
|
163
|
+
|
|
164
|
+
SecRule TX:BLOCKING_PARANOIA_LEVEL "@ge 3" \
|
|
165
|
+
"id:949062,\
|
|
166
|
+
phase:2,\
|
|
167
|
+
pass,\
|
|
168
|
+
t:none,\
|
|
169
|
+
nolog,\
|
|
170
|
+
tag:'OWASP_CRS',\
|
|
171
|
+
ver:'OWASP_CRS/4.9.0',\
|
|
172
|
+
setvar:'tx.blocking_inbound_anomaly_score=+%{tx.inbound_anomaly_score_pl3}'"
|
|
173
|
+
|
|
174
|
+
SecRule TX:DETECTION_PARANOIA_LEVEL "@ge 3" \
|
|
175
|
+
"id:949162,\
|
|
176
|
+
phase:2,\
|
|
177
|
+
pass,\
|
|
178
|
+
t:none,\
|
|
179
|
+
nolog,\
|
|
180
|
+
tag:'OWASP_CRS',\
|
|
181
|
+
ver:'OWASP_CRS/4.9.0',\
|
|
182
|
+
setvar:'tx.detection_inbound_anomaly_score=+%{tx.inbound_anomaly_score_pl3}'"
|
|
183
|
+
|
|
184
|
+
SecRule TX:BLOCKING_PARANOIA_LEVEL "@ge 4" \
|
|
185
|
+
"id:949063,\
|
|
186
|
+
phase:2,\
|
|
187
|
+
pass,\
|
|
188
|
+
t:none,\
|
|
189
|
+
nolog,\
|
|
190
|
+
tag:'OWASP_CRS',\
|
|
191
|
+
ver:'OWASP_CRS/4.9.0',\
|
|
192
|
+
setvar:'tx.blocking_inbound_anomaly_score=+%{tx.inbound_anomaly_score_pl4}'"
|
|
193
|
+
|
|
194
|
+
SecRule TX:DETECTION_PARANOIA_LEVEL "@ge 4" \
|
|
195
|
+
"id:949163,\
|
|
196
|
+
phase:2,\
|
|
197
|
+
pass,\
|
|
198
|
+
t:none,\
|
|
199
|
+
nolog,\
|
|
200
|
+
tag:'OWASP_CRS',\
|
|
201
|
+
ver:'OWASP_CRS/4.9.0',\
|
|
202
|
+
setvar:'tx.detection_inbound_anomaly_score=+%{tx.inbound_anomaly_score_pl4}'"
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
SecMarker "BEGIN-REQUEST-BLOCKING-EVAL"
|
|
206
|
+
|
|
207
|
+
#
|
|
208
|
+
# -=[ Anomaly Mode: Overall Transaction Anomaly Score ]=-
|
|
209
|
+
#
|
|
210
|
+
|
|
211
|
+
# if early blocking is active, check threshold in phase 1
|
|
212
|
+
SecRule TX:BLOCKING_INBOUND_ANOMALY_SCORE "@ge %{tx.inbound_anomaly_score_threshold}" \
|
|
213
|
+
"id:949111,\
|
|
214
|
+
phase:1,\
|
|
215
|
+
deny,\
|
|
216
|
+
t:none,\
|
|
217
|
+
msg:'Inbound Anomaly Score Exceeded in phase 1 (Total Score: %{TX.BLOCKING_INBOUND_ANOMALY_SCORE})',\
|
|
218
|
+
tag:'anomaly-evaluation',\
|
|
219
|
+
tag:'OWASP_CRS',\
|
|
220
|
+
ver:'OWASP_CRS/4.9.0',\
|
|
221
|
+
chain"
|
|
222
|
+
SecRule TX:EARLY_BLOCKING "@eq 1"
|
|
223
|
+
|
|
224
|
+
# always check threshold in phase 2
|
|
225
|
+
SecRule TX:BLOCKING_INBOUND_ANOMALY_SCORE "@ge %{tx.inbound_anomaly_score_threshold}" \
|
|
226
|
+
"id:949110,\
|
|
227
|
+
phase:2,\
|
|
228
|
+
deny,\
|
|
229
|
+
t:none,\
|
|
230
|
+
msg:'Inbound Anomaly Score Exceeded (Total Score: %{TX.BLOCKING_INBOUND_ANOMALY_SCORE})',\
|
|
231
|
+
tag:'anomaly-evaluation',\
|
|
232
|
+
tag:'OWASP_CRS',\
|
|
233
|
+
ver:'OWASP_CRS/4.9.0'"
|
|
234
|
+
|
|
235
|
+
SecRule TX:DETECTION_PARANOIA_LEVEL "@lt 1" "id:949011,phase:1,pass,nolog,tag:'OWASP_CRS',ver:'OWASP_CRS/4.9.0',skipAfter:END-REQUEST-949-BLOCKING-EVALUATION"
|
|
236
|
+
SecRule TX:DETECTION_PARANOIA_LEVEL "@lt 1" "id:949012,phase:2,pass,nolog,tag:'OWASP_CRS',ver:'OWASP_CRS/4.9.0',skipAfter:END-REQUEST-949-BLOCKING-EVALUATION"
|
|
237
|
+
#
|
|
238
|
+
# -= Paranoia Level 1 (default) =- (apply only when tx.detection_paranoia_level is sufficiently high: 1 or higher)
|
|
239
|
+
#
|
|
240
|
+
|
|
241
|
+
|
|
242
|
+
|
|
243
|
+
SecRule TX:DETECTION_PARANOIA_LEVEL "@lt 2" "id:949013,phase:1,pass,nolog,tag:'OWASP_CRS',ver:'OWASP_CRS/4.9.0',skipAfter:END-REQUEST-949-BLOCKING-EVALUATION"
|
|
244
|
+
SecRule TX:DETECTION_PARANOIA_LEVEL "@lt 2" "id:949014,phase:2,pass,nolog,tag:'OWASP_CRS',ver:'OWASP_CRS/4.9.0',skipAfter:END-REQUEST-949-BLOCKING-EVALUATION"
|
|
245
|
+
#
|
|
246
|
+
# -= Paranoia Level 2 =- (apply only when tx.detection_paranoia_level is sufficiently high: 2 or higher)
|
|
247
|
+
#
|
|
248
|
+
|
|
249
|
+
|
|
250
|
+
|
|
251
|
+
SecRule TX:DETECTION_PARANOIA_LEVEL "@lt 3" "id:949015,phase:1,pass,nolog,tag:'OWASP_CRS',ver:'OWASP_CRS/4.9.0',skipAfter:END-REQUEST-949-BLOCKING-EVALUATION"
|
|
252
|
+
SecRule TX:DETECTION_PARANOIA_LEVEL "@lt 3" "id:949016,phase:2,pass,nolog,tag:'OWASP_CRS',ver:'OWASP_CRS/4.9.0',skipAfter:END-REQUEST-949-BLOCKING-EVALUATION"
|
|
253
|
+
#
|
|
254
|
+
# -= Paranoia Level 3 =- (apply only when tx.detection_paranoia_level is sufficiently high: 3 or higher)
|
|
255
|
+
#
|
|
256
|
+
|
|
257
|
+
|
|
258
|
+
|
|
259
|
+
SecRule TX:DETECTION_PARANOIA_LEVEL "@lt 4" "id:949017,phase:1,pass,nolog,tag:'OWASP_CRS',ver:'OWASP_CRS/4.9.0',skipAfter:END-REQUEST-949-BLOCKING-EVALUATION"
|
|
260
|
+
SecRule TX:DETECTION_PARANOIA_LEVEL "@lt 4" "id:949018,phase:2,pass,nolog,tag:'OWASP_CRS',ver:'OWASP_CRS/4.9.0',skipAfter:END-REQUEST-949-BLOCKING-EVALUATION"
|
|
261
|
+
#
|
|
262
|
+
# -= Paranoia Level 4 =- (apply only when tx.detection_paranoia_level is sufficiently high: 4 or higher)
|
|
263
|
+
#
|
|
264
|
+
|
|
265
|
+
|
|
266
|
+
|
|
267
|
+
#
|
|
268
|
+
# -= Paranoia Levels Finished =-
|
|
269
|
+
#
|
|
270
|
+
SecMarker "END-REQUEST-949-BLOCKING-EVALUATION"
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
# ------------------------------------------------------------------------
|
|
2
|
+
# OWASP CRS ver.4.9.0
|
|
3
|
+
# Copyright (c) 2006-2020 Trustwave and contributors. All rights reserved.
|
|
4
|
+
# Copyright (c) 2021-2024 CRS project. All rights reserved.
|
|
5
|
+
#
|
|
6
|
+
# The OWASP CRS is distributed under
|
|
7
|
+
# Apache Software License (ASL) version 2
|
|
8
|
+
# Please see the enclosed LICENSE file for full details.
|
|
9
|
+
# ------------------------------------------------------------------------
|
|
10
|
+
|
|
11
|
+
# We reused paranoia level skip rules 950010, 950011, and 950018.
|
|
12
|
+
# These rule identifiers were in use in CRSv2, so we used different
|
|
13
|
+
# identifiers in CRSv3 to avoid conflicts (950020, 950021 and 950022).
|
|
14
|
+
# In CRSv4, for the sake of a consistent structure, we use these
|
|
15
|
+
# identifiers again, so that the skip rules of PL can be defined in the
|
|
16
|
+
# same way for all files.
|
|
17
|
+
# Rule id 950130 has been kept - this ID also was introduced at first
|
|
18
|
+
# rule to avoid the collision.
|
|
19
|
+
|
|
20
|
+
#
|
|
21
|
+
# -= Paranoia Level 0 (empty) =- (apply unconditionally)
|
|
22
|
+
#
|
|
23
|
+
|
|
24
|
+
# Skip all rules if TX:crs_skip_response_analysis is set.
|
|
25
|
+
SecRule TX:crs_skip_response_analysis "@eq 1" \
|
|
26
|
+
"id:950021,\
|
|
27
|
+
phase:3,\
|
|
28
|
+
pass,\
|
|
29
|
+
nolog,\
|
|
30
|
+
tag:'OWASP_CRS',\
|
|
31
|
+
ver:'OWASP_CRS/4.9.0',\
|
|
32
|
+
skipAfter:END-RESPONSE-959-BLOCKING-EVALUATION"
|
|
33
|
+
|
|
34
|
+
# Skip all rules if RESPONSE_BODY is compressed.
|
|
35
|
+
SecRule RESPONSE_HEADERS:Content-Encoding "@pm gzip compress deflate br zstd" \
|
|
36
|
+
"id:950010,\
|
|
37
|
+
phase:4,\
|
|
38
|
+
pass,\
|
|
39
|
+
nolog,\
|
|
40
|
+
tag:'OWASP_CRS',\
|
|
41
|
+
ver:'OWASP_CRS/4.9.0',\
|
|
42
|
+
skipAfter:END-RESPONSE-950-DATA-LEAKAGES"
|
|
43
|
+
|
|
44
|
+
SecRule TX:DETECTION_PARANOIA_LEVEL "@lt 1" "id:950011,phase:3,pass,nolog,tag:'OWASP_CRS',ver:'OWASP_CRS/4.9.0',skipAfter:END-RESPONSE-950-DATA-LEAKAGES"
|
|
45
|
+
SecRule TX:DETECTION_PARANOIA_LEVEL "@lt 1" "id:950012,phase:4,pass,nolog,tag:'OWASP_CRS',ver:'OWASP_CRS/4.9.0',skipAfter:END-RESPONSE-950-DATA-LEAKAGES"
|
|
46
|
+
#
|
|
47
|
+
# -= Paranoia Level 1 (default) =- (apply only when tx.detection_paranoia_level is sufficiently high: 1 or higher)
|
|
48
|
+
#
|
|
49
|
+
|
|
50
|
+
#
|
|
51
|
+
# -=[ Directory Listing ]=-
|
|
52
|
+
#
|
|
53
|
+
SecRule RESPONSE_BODY "@rx (?:<(?:TITLE>Index of.*?<H|title>Index of.*?<h)1>Index of|>\[To Parent Directory\]</[Aa]><br>)" \
|
|
54
|
+
"id:950130,\
|
|
55
|
+
phase:4,\
|
|
56
|
+
block,\
|
|
57
|
+
capture,\
|
|
58
|
+
t:none,\
|
|
59
|
+
msg:'Directory Listing',\
|
|
60
|
+
logdata:'Matched Data: %{TX.0} found within %{MATCHED_VAR_NAME}',\
|
|
61
|
+
tag:'application-multi',\
|
|
62
|
+
tag:'language-multi',\
|
|
63
|
+
tag:'platform-multi',\
|
|
64
|
+
tag:'attack-disclosure',\
|
|
65
|
+
tag:'paranoia-level/1',\
|
|
66
|
+
tag:'OWASP_CRS',\
|
|
67
|
+
tag:'capec/1000/118/116/54/127',\
|
|
68
|
+
tag:'PCI/6.5.6',\
|
|
69
|
+
ver:'OWASP_CRS/4.9.0',\
|
|
70
|
+
severity:'ERROR',\
|
|
71
|
+
setvar:'tx.outbound_anomaly_score_pl1=+%{tx.error_anomaly_score}'"
|
|
72
|
+
|
|
73
|
+
#
|
|
74
|
+
# -=[ CGI Source Code Leakage ]=-
|
|
75
|
+
#
|
|
76
|
+
# A CGI script begins normally with #! and the interpreter,
|
|
77
|
+
# for example:
|
|
78
|
+
#
|
|
79
|
+
# #!/usr/bin/perl
|
|
80
|
+
# #!/usr/bin/python
|
|
81
|
+
# #!/usr/bin/ruby
|
|
82
|
+
#
|
|
83
|
+
# If the CGI script processors or MIME type handlers are misconfigured,
|
|
84
|
+
# the script's source code could be erroneously returned to the client.
|
|
85
|
+
SecRule RESPONSE_BODY "@rx ^#\!\s?/" \
|
|
86
|
+
"id:950140,\
|
|
87
|
+
phase:4,\
|
|
88
|
+
block,\
|
|
89
|
+
capture,\
|
|
90
|
+
t:none,\
|
|
91
|
+
msg:'CGI source code leakage',\
|
|
92
|
+
logdata:'Matched Data: %{TX.0} found within %{MATCHED_VAR_NAME}',\
|
|
93
|
+
tag:'application-multi',\
|
|
94
|
+
tag:'language-multi',\
|
|
95
|
+
tag:'platform-multi',\
|
|
96
|
+
tag:'attack-disclosure',\
|
|
97
|
+
tag:'paranoia-level/1',\
|
|
98
|
+
tag:'OWASP_CRS',\
|
|
99
|
+
tag:'capec/1000/118/116',\
|
|
100
|
+
tag:'PCI/6.5.6',\
|
|
101
|
+
ver:'OWASP_CRS/4.9.0',\
|
|
102
|
+
severity:'ERROR',\
|
|
103
|
+
setvar:'tx.outbound_anomaly_score_pl1=+%{tx.error_anomaly_score}'"
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
SecRule TX:DETECTION_PARANOIA_LEVEL "@lt 2" "id:950013,phase:3,pass,nolog,tag:'OWASP_CRS',ver:'OWASP_CRS/4.9.0',skipAfter:END-RESPONSE-950-DATA-LEAKAGES"
|
|
107
|
+
SecRule TX:DETECTION_PARANOIA_LEVEL "@lt 2" "id:950014,phase:4,pass,nolog,tag:'OWASP_CRS',ver:'OWASP_CRS/4.9.0',skipAfter:END-RESPONSE-950-DATA-LEAKAGES"
|
|
108
|
+
#
|
|
109
|
+
# -= Paranoia Level 2 =- (apply only when tx.detection_paranoia_level is sufficiently high: 2 or higher)
|
|
110
|
+
#
|
|
111
|
+
|
|
112
|
+
#
|
|
113
|
+
# -=[ The application is not available - 5xx level status code ]=-
|
|
114
|
+
#
|
|
115
|
+
SecRule RESPONSE_STATUS "@rx ^5\d{2}$" \
|
|
116
|
+
"id:950100,\
|
|
117
|
+
phase:3,\
|
|
118
|
+
block,\
|
|
119
|
+
capture,\
|
|
120
|
+
t:none,\
|
|
121
|
+
msg:'The Application Returned a 500-Level Status Code',\
|
|
122
|
+
logdata:'Matched Data: %{TX.0} found within %{MATCHED_VAR_NAME}',\
|
|
123
|
+
tag:'application-multi',\
|
|
124
|
+
tag:'language-multi',\
|
|
125
|
+
tag:'platform-multi',\
|
|
126
|
+
tag:'attack-disclosure',\
|
|
127
|
+
tag:'paranoia-level/2',\
|
|
128
|
+
tag:'OWASP_CRS',\
|
|
129
|
+
tag:'capec/1000/152',\
|
|
130
|
+
tag:'PCI/6.5.6',\
|
|
131
|
+
ver:'OWASP_CRS/4.9.0',\
|
|
132
|
+
severity:'ERROR',\
|
|
133
|
+
setvar:'tx.outbound_anomaly_score_pl2=+%{tx.error_anomaly_score}'"
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
SecRule TX:DETECTION_PARANOIA_LEVEL "@lt 3" "id:950015,phase:3,pass,nolog,tag:'OWASP_CRS',ver:'OWASP_CRS/4.9.0',skipAfter:END-RESPONSE-950-DATA-LEAKAGES"
|
|
138
|
+
SecRule TX:DETECTION_PARANOIA_LEVEL "@lt 3" "id:950016,phase:4,pass,nolog,tag:'OWASP_CRS',ver:'OWASP_CRS/4.9.0',skipAfter:END-RESPONSE-950-DATA-LEAKAGES"
|
|
139
|
+
#
|
|
140
|
+
# -= Paranoia Level 3 =- (apply only when tx.detection_paranoia_level is sufficiently high: 3 or higher)
|
|
141
|
+
#
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
SecRule TX:DETECTION_PARANOIA_LEVEL "@lt 4" "id:950017,phase:3,pass,nolog,tag:'OWASP_CRS',ver:'OWASP_CRS/4.9.0',skipAfter:END-RESPONSE-950-DATA-LEAKAGES"
|
|
146
|
+
SecRule TX:DETECTION_PARANOIA_LEVEL "@lt 4" "id:950018,phase:4,pass,nolog,tag:'OWASP_CRS',ver:'OWASP_CRS/4.9.0',skipAfter:END-RESPONSE-950-DATA-LEAKAGES"
|
|
147
|
+
#
|
|
148
|
+
# -= Paranoia Level 4 =- (apply only when tx.detection_paranoia_level is sufficiently high: 4 or higher)
|
|
149
|
+
#
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
#
|
|
154
|
+
# -= Paranoia Levels Finished =-
|
|
155
|
+
#
|
|
156
|
+
SecMarker "END-RESPONSE-950-DATA-LEAKAGES"
|