File: modsecurity.rules

package info (click to toggle)
prelude-lml 0.9.4-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 3,028 kB
  • ctags: 772
  • sloc: sh: 8,898; ansic: 6,432; makefile: 176
file content (285 lines) | stat: -rw-r--r-- 12,181 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
#####
#
# Copyright (C) 2004 G Ramon Gomez <gene at gomezbrothers dot com>
# All Rights Reserved
#
# This file is part of the Prelude-LML program.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; see the file COPYING.  If not, write to
# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
#
#####

#####
#
# The rules included here were developed using mod_security 1.7.6 events 
# captured in syslog through the Apache directive 'ErrorLog syslog'.  
# Please report any inconsistencies on other versions to G Ramon Gomez at the 
# address provided above
#
#####

#LOG:May 10 08:35:36 somehost httpd[24775]: [error] [client 12.34.56.78] mod_security: Warning. Pattern match "/test\.php" at THE_REQUEST.
regex=\[client ([\d\.]+)\] mod_security: Warning. Pattern match "(.+)" at (\S+)\.; \
 classification.text=HTTP $3 "$2"; \
 id=3100; \
 revision=2; \
 analyzer(0).name=mod_security; \
 analyzer(0).manufacturer=www.modsecurity.org; \
 analyzer(0).class=HIDS; \
 assessment.impact.severity=medium; \
 assessment.impact.completion=succeeded; \
 assessment.impact.description=mod_security found pattern match "$2" in HTTP object $3.  No reactive action taken.; \
 source(0).service.iana_protocol_name=tcp; \
 source(0).service.iana_protocol_number=6; \
 source(0).node.address(0).category=ipv4-addr; \
 source(0).node.address(0).address=$1; \
 target(0).service.iana_protocol_name=tcp; \
 target(0).service.iana_protocol_number=6; \
 target(0).service.name=http; \
 additional_data(0).type=string; \
 additional_data(0).meaning=Action reason; \
 additional_data(0).data=$2; \
 additional_data(1).type=string; \
 additional_data(1).meaning=HTTP object; \
 additional_data(1).data=$3; \
 last

#LOG:May 10 08:36:43 somehost httpd[24776]: [error] [client 12.34.56.78] mod_security: Access denied with code 403. Pattern match "/support/common\.php" at THE_REQUEST.
regex=\[client ([\d\.]+)\] mod_security: Access denied with code (\d+)\. Pattern match "(.+)" at (\S+)\.; \
 classification.text=HTTP $4 "$3" Blocked; \
 id=3101; \
 revision=2; \
 analyzer(0).name=mod_security; \
 analyzer(0).manufacturer=www.modsecurity.org; \
 analyzer(0).class=HIDS; \
 assessment.impact.severity=high; \
 assessment.impact.completion=failed; \
 assessment.impact.description=mod_security found pattern match "$3" in HTTP object $4.  Access was blocked with HTTP response code $2; \
 source(0).service.iana_protocol_name=tcp; \
 source(0).service.iana_protocol_number=6; \
 source(0).node.address(0).category=ipv4-addr; \
 source(0).node.address(0).address=$1; \
 target(0).service.iana_protocol_name=tcp; \
 target(0).service.iana_protocol_number=6; \
 target(0).service.name=http; \
 additional_data(0).type=integer; \
 additional_data(0).meaning=HTTP code returned; \
 additional_data(0).data=$2; \
 additional_data(1).type=string; \
 additional_data(1).meaning=Action reason; \
 additional_data(1).data=$3; \
 additional_data(2).type=string; \
 additional_data(2).meaning=HTTP object; \
 additional_data(2).data=$4; \
 last

#No log sample; please submit
regex=\[client ([\d\.]+)\] mod_security: Access denied with redirect to (\S+)\. Pattern match "(\S+)" at (\S+)\.; \
 classification.text=HTTP $4 "$3" Redirected; \
 id=3102; \
 revision=2; \
 analyzer(0).name=mod_security; \
 analyzer(0).manufacturer=www.modsecurity.org; \
 analyzer(0).class=HIDS; \
 assessment.impact.severity=high; \
 assessment.impact.completion=failed; \
 assessment.impact.description=mod_security found pattern match "$3" in HTTP object $4.  Access was redirected to $2.; \
 source(0).service.iana_protocol_name=tcp; \
 source(0).service.iana_protocol_number=6; \
 source(0).node.address(0).category=ipv4-addr; \
 source(0).node.address(0).address=$1; \
 target(0).service.iana_protocol_name=tcp; \
 target(0).service.iana_protocol_number=6; \
 target(0).service.name=http; \
 additional_data(0).type=string; \
 additional_data(0).meaning=Redirected to; \
 additional_data(0).data=$2; \
 additional_data(1).type=string; \
 additional_data(1).meaning=Action reason; \
 additional_data(1).data=$3; \
 additional_data(2).type=string; \
 additional_data(2).meaning=HTTP object; \
 additional_data(2).data=$4; \
 last

#LOG:May 10 08:36:43 somehost httpd[24776]: [client 200.105.93.115] mod_security: Invalid URL encoding #2 detected.
regex=\[client ([\d\.]+)\] mod_security: Invalid (.+)\.; \
 classification.text=HTTP Invalid $2; \
 id=3103; \
 revision=2; \
 analyzer(0).name=mod_security; \
 analyzer(0).manufacturer=www.modsecurity.org; \
 analyzer(0).class=HIDS; \
 assessment.impact.severity=high; \
 assessment.impact.completion=failed; \
 assessment.impact.description=mod_security found "Invalid $2"; \
 source(0).service.iana_protocol_name=tcp; \
 source(0).service.iana_protocol_number=6; \
 source(0).node.address(0).category=ipv4-addr; \
 source(0).node.address(0).address=$1; \
 target(0).service.iana_protocol_name=tcp; \
 target(0).service.iana_protocol_number=6; \
 target(0).service.name=http; \
 additional_data(0).type=string; \
 additional_data(0).meaning=Action reason; \
 additional_data(0).data=$2; \
 last

#####
#
# The rules included here were developed using mod_security 1.8 events
# captured in syslog through the Apache directive 'ErrorLog syslog'.
# Please report any inconsistencies on other versions to G Ramon Gomez at the
# address provided above
#
#####

#LOG:Jun 16 08:42:23 metatron httpd[10837]: [error] [client 127.0.0.1] mod_security: Warning. Pattern match "/cgforum\\.cgi" at THE_REQUEST [hostname "localhost.localdomain"] [uri "/cgi-bin/cgforum.cgi"] [unique_id Kxq9XgoBSmsAACpVN4MAAAAE]
regex=\[client ([\d\.]+)\] mod_security: Warning. Pattern match "(.+)" at (\S+) \[hostname "(\S+)"\] \[uri "(.+)"\] \[unique_id (\S+)\]; \
 classification.text=HTTP $3 "$2"; \
 id=3104; \
 revision=2; \
 analyzer(0).name=mod_security; \
 analyzer(0).manufacturer=www.modsecurity.org; \
 analyzer(0).class=HIDS; \
 assessment.impact.severity=medium; \
 assessment.impact.completion=succeeded; \
 assessment.impact.description=mod_security found pattern match "$2" in HTTP object $3.  No reactive action taken.; \
 source(0).service.iana_protocol_name=tcp; \
 source(0).service.iana_protocol_number=6; \
 source(0).node.address(0).category=ipv4-addr; \
 source(0).node.address(0).address=$1; \
 target(0).node.name=$4; \
 target(0).service.iana_protocol_name=tcp; \
 target(0).service.iana_protocol_number=6; \
 target(0).service.name=http; \
 additional_data(0).type=string; \
 additional_data(0).meaning=Action reason; \
 additional_data(0).data=$2; \
 additional_data(1).type=string; \
 additional_data(1).meaning=HTTP object; \
 additional_data(1).data=$3; \
 additional_data(2).type=string; \
 additional_data(2).meaning=URI; \
 additional_data(2).data=$5; \
 additional_data(3).type=string; \
 additional_data(3).meaning=Event ID; \
 additional_data(3).data=$6; \
 last

#LOG:Jun 16 08:42:23 metatron httpd[10833]: [error] [client 127.0.0.1] mod_security: Access denied with code 403. Pattern match "/bb-replog\\.sh" at THE_REQUEST [hostname "localhost.localdomain"] [uri "/cgi-bin/bb-replog.sh"] [unique_id KxpIRgoBSmsAACpRNmAAAAAD]
regex=\[client ([\d\.]+)\] mod_security: Access denied with code (\d+)\. Pattern match "(.+)" at (\S+) \[hostname "(\S+)"\] \[uri "(.+)"\] \[unique_id (\S+)\]; \
 classification.text=HTTP $4 "$3" Blocked; \
 id=3105; \
 revision=2; \
 analyzer(0).name=mod_security; \
 analyzer(0).manufacturer=www.modsecurity.org; \
 analyzer(0).class=HIDS; \
 assessment.impact.severity=high; \
 assessment.impact.completion=failed; \
 assessment.impact.description=mod_security found pattern match "$3" in HTTP object $4.  Access was blocked with HTTP response code $2; \
 source(0).service.iana_protocol_name=tcp; \
 source(0).service.iana_protocol_number=6; \
 source(0).node.address(0).category=ipv4-addr; \
 source(0).node.address(0).address=$1; \
 target(0).node.name=$5; \
 target(0).service.iana_protocol_name=tcp; \
 target(0).service.iana_protocol_number=6; \
 target(0).service.name=http; \
 additional_data(0).type=integer; \
 additional_data(0).meaning=HTTP code returned; \
 additional_data(0).data=$2; \
 additional_data(1).type=string; \
 additional_data(1).meaning=Action reason; \
 additional_data(1).data=$3; \
 additional_data(2).type=string; \
 additional_data(2).meaning=HTTP object; \
 additional_data(2).data=$4; \
 additional_data(3).type=string; \
 additional_data(3).meaning=URI; \
 additional_data(3).data=$6; \
 additional_data(4).type=string; \
 additional_data(4).meaning=Event ID; \
 additional_data(4).data=$7; \
 last

#No log sample; please submit
regex=\[client ([\d\.]+)\] mod_security: Access denied with redirect to \[(\S+)\]\. Pattern match "(\S+)" at (\S+) \[hostname "(\S+)"\] \[uri "(.+)"\] \[unique_id (\S+)\]; \
 classification.text=HTTP $4 "$3" Redirected; \
 id=3106; \
 revision=2; \
 analyzer(0).name=mod_security; \
 analyzer(0).manufacturer=www.modsecurity.org; \
 analyzer(0).class=HIDS; \
 assessment.impact.severity=high; \
 assessment.impact.completion=failed; \
 assessment.impact.description=mod_security found pattern match "$3" in HTTP object $4.  Access was redirected to $2.; \
 source(0).service.iana_protocol_name=tcp; \
 source(0).service.iana_protocol_number=6; \
 source(0).node.address(0).category=ipv4-addr; \
 source(0).node.address(0).address=$1; \
 target(0).node.name=$5; \
 target(0).service.iana_protocol_name=tcp; \
 target(0).service.iana_protocol_number=6; \
 target(0).service.name=http; \
 additional_data(0).type=string; \
 additional_data(0).meaning=Redirected to; \
 additional_data(0).data=$2; \
 additional_data(1).type=string; \
 additional_data(1).meaning=Action reason; \
 additional_data(1).data=$3; \
 additional_data(2).type=string; \
 additional_data(2).meaning=HTTP object; \
 additional_data(2).data=$4; \
 additional_data(3).type=string; \
 additional_data(3).meaning=URI; \
 additional_data(3).data=$6; \
 additional_data(4).type=string; \
 additional_data(4).meaning=Event ID; \
 additional_data(4).data=$7; \
 last

#LOG:Dec  6 22:06:26 mail httpd[10812]: [error] [client 202.58.85.8] mod_security: Access denied with code 403. Error parsing POST parameters: Error normalizing parameter value: Invalid URL encoding detected: invalid characters used [hostname "www.gomezbros.com"] [uri "/modules.php"] [unique_id 87ZxND-IXCYAACo8LCYAAAAP]
regex=\[client ([\d\.]+)\] mod_security: Access denied with code (\d+)\. (Error .+) \[hostname "(\S+)"\] \[uri "(.+)"\] \[unique_id (\S+)\]; \
 classification.text=HTTP Blocked; \
 id=3107; \
 revision=1; \
 analyzer(0).name=mod_security; \
 analyzer(0).manufacturer=www.modsecurity.org; \
 analyzer(0).class=HIDS; \
 assessment.impact.severity=high; \
 assessment.impact.completion=failed; \
 assessment.impact.description=mod_security encountered an error: "$3".  Access was blocked with HTTP response code $2; \
 source(0).service.iana_protocol_name=tcp; \
 source(0).service.iana_protocol_number=6; \
 source(0).node.address(0).category=ipv4-addr; \
 source(0).node.address(0).address=$1; \
 target(0).node.name=$4; \
 target(0).service.iana_protocol_name=tcp; \
 target(0).service.iana_protocol_number=6; \
 target(0).service.name=http; \
 additional_data(0).type=integer; \
 additional_data(0).meaning=HTTP code returned; \
 additional_data(0).data=$2; \
 additional_data(1).type=string; \
 additional_data(1).meaning=Action reason; \
 additional_data(1).data=$3; \
 additional_data(2).type=string; \
 additional_data(2).meaning=URI; \
 additional_data(2).data=$5; \
 additional_data(3).type=string; \
 additional_data(3).meaning=Event ID; \
 additional_data(3).data=$6; \
 last