File: modsecurity.rules

package info (click to toggle)
prelude-lml 0.9.12.2-2
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 3,912 kB
  • ctags: 1,921
  • sloc: ansic: 15,482; sh: 8,926; makefile: 199; python: 21
file content (257 lines) | stat: -rw-r--r-- 11,500 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
#####
#
# 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=3; \
 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=HTTP object; \
 additional_data(0).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=3; \
 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.; \
 assessment.action(0).category = block-installed; \
 assessment.action(0).description = 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=HTTP object; \
 additional_data(1).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=3; \
 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.;\
 assessment.action(0).category = block-installed; \
 assessment.action(0).description = 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=HTTP object; \
 additional_data(1).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=3; \
 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; \
 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+)\]; \
 id=3104; \
 revision=3; \
 classification.ident = $6; \
 classification.text=HTTP $3 "$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; \
 target(0).service.web_service.url = $5; \
 additional_data(0).type=string; \
 additional_data(0).meaning=HTTP object; \
 additional_data(0).data=$3; \
 last


#LOG:Feb 14 13:51:28 metatron httpd[6168]: [error] [client 192.168.1.1] mod_security: Access denied with code 500. Pattern match "cmd.exe" at REQUEST_URI [severity "EMERGENCY"] [hostname "www.connectionreset.it"] [uri "/cmd.exe"] [unique_id "M380ssCoDAIAABgYi0QAAAAA"]
#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+) (\[severity "(\S+)"\] )?\[hostname "(\S+)"\] \[uri "(.+)"\] \[unique_id (\S+)\]; \
 id=3105; \
 revision=3; \
 classification.ident = $9; \
 classification.text=HTTP $4 "$3" Blocked; \
 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.; \
 assessment.action(0).category = block-installed; \
 assessment.action(0).description = 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=$7; \
 target(0).service.iana_protocol_name=tcp; \
 target(0).service.iana_protocol_number=6; \
 target(0).service.name=http; \
 target(0).service.web_service.url = $8; \
 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=HTTP object; \
 additional_data(1).data=$4; \
 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+)\]; \
 id=3106; \
 revision=3; \
 classification.ident = $7; \
 classification.text=HTTP $4 "$3" Redirected; \
 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.; \
 assessment.action(0).category = block-installed; \
 assessment.action(0).description = 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; \
 target(0).service.web_service.url = $6; \
 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=HTTP object; \
 additional_data(1).data=$4; \
 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+)\]; \
 id=3107; \
 revision=2; \
 classification.ident = $6; \
 classification.text=HTTP Blocked; \
 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".; \
 assessment.action(0).category = block-installed; \
 assessment.action(0).description = 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; \
 target(0).service.web_service.url = $5; \
 additional_data(0).type=integer; \
 additional_data(0).meaning=HTTP code returned; \
 additional_data(0).data=$2; \
 last