1 <!-- @(#) $Id: ./etc/rules/apache_rules.xml, 2011/09/08 dcid Exp $
3 - Official Apache rules for OSSEC.
5 - Copyright (C) 2009 Trend Micro Inc.
8 - This program is a free software; you can redistribute it
9 - and/or modify it under the terms of the GNU General Public
10 - License (version 2) as published by the FSF - Free Software
13 - License details: http://www.ossec.net/en/licensing.html
15 - Contributed by: Ahmet Ozturk
19 <group name="apache,">
20 <rule id="30100" level="0">
21 <decoded_as>apache-errorlog</decoded_as>
22 <description>Apache messages grouped.</description>
25 <rule id="30101" level="0">
26 <if_sid>30100</if_sid>
27 <match>^[error] </match>
28 <description>Apache error messages grouped.</description>
31 <rule id="30102" level="0">
32 <if_sid>30100</if_sid>
33 <match>^[warn] </match>
34 <description>Apache warn messages grouped.</description>
37 <rule id="30103" level="0">
38 <if_sid>30100</if_sid>
39 <match>^[notice] </match>
40 <description>Apache notice messages grouped.</description>
43 <rule id="30104" level="12">
44 <if_sid>30103</if_sid>
45 <match>exit signal Segmentation Fault</match>
46 <description>Apache segmentation fault.</description>
47 <info type="link">http://www.securityfocus.com/infocus/1633</info>
48 <group>service_availability,</group>
51 <rule id="30105" level="5">
52 <if_sid>30101</if_sid>
53 <match>denied by server configuration</match>
54 <description>Attempt to access forbidden file or directory.</description>
55 <group>access_denied,</group>
58 <rule id="30106" level="5">
59 <if_sid>30101</if_sid>
60 <match>Directory index forbidden by rule</match>
61 <description>Attempt to access forbidden directory index.</description>
62 <group>access_denied,</group>
65 <rule id="30107" level="6">
66 <if_sid>30101</if_sid>
67 <match>Client sent malformed Host header</match>
68 <description>Code Red attack.</description>
69 <info type="link">http://www.cert.org/advisories/CA-2001-19.html</info>
70 <info type="text">CERT: Advisory CA-2001-19 "Code Red" Worm Exploiting Buffer Overflow In IIS Indexing Service DLL</info>
71 <group>automatic_attack,</group>
74 <rule id="30108" level="5">
75 <if_sid>30102</if_sid>
76 <match>authentication failed</match>
77 <description>User authentication failed.</description>
78 <group>authentication_failed,</group>
81 <rule id="30109" level="9">
82 <if_sid>30101</if_sid>
83 <regex>user \S+ not found|user \S+ in realm \.* not found</regex>
84 <description>Attempt to login using a non-existent user.</description>
85 <group>invalid_login,</group>
88 <rule id="30110" level="5">
89 <if_sid>30101</if_sid>
90 <match>authentication failure</match>
91 <description>User authentication failed.</description>
92 <group>authentication_failed,</group>
95 <rule id="30112" level="0">
96 <if_sid>30101</if_sid>
97 <match>File does not exist: |</match>
98 <match>failed to open stream: No such file or directory|</match>
99 <match>Failed opening </match>
100 <description>Attempt to access an non-existent file (those are reported on the access.log).</description>
101 <group>unknown_resource,</group>
104 <!-- [Tue Mar 07 12:05:15 2006] [error] [client 200.206.165.91] Invalid URI in request %3Bi%3A3%3Bi%3A0%3B%7D; usercookie[password]=d6ed9e1750d0b2aba6b3311cbec087d8; 45befd35f8a0f47b89ed8831f892b8dc=167c4e46a940cd2570b952eea527b27a; PHPSESSID=616hjdg7kj9bln37efsv7vt7g3
105 - [client 65.204.137.200] script '/var/www/html/xmlrpc.php' not found or unable to stat
107 <rule id="30115" level="5">
108 <if_sid>30101</if_sid>
109 <match>Invalid URI in request</match>
110 <description>Invalid URI (bad client request).</description>
111 <group>invalid_request,</group>
114 <rule id="30116" level="10" frequency="8" timeframe="120">
115 <if_matched_sid>30115</if_matched_sid>
117 <description>Multiple Invalid URI requests from </description>
118 <description>same source.</description>
119 <group>invalid_request,</group>
122 <rule id="30117" level="10">
123 <if_sid>30101</if_sid>
124 <match>File name too long|request failed: URI too long</match>
125 <description>Invalid URI, file name too long.</description>
126 <group>invalid_request,</group>
129 <!-- Mod security rules by <ossec ( at ) sioban.net -->
130 <rule id="30118" level="6">
131 <if_sid>30101</if_sid>
132 <match>mod_security: Access denied|ModSecurity: Access denied</match>
133 <description>Access attempt blocked by Mod Security.</description>
134 <group>access_denied,</group>
137 <rule id="30119" level="12" frequency="6" timeframe="120">
138 <if_matched_sid>30118</if_matched_sid>
140 <description>Multiple attempts blocked by Mod Security.</description>
141 <group>access_denied,</group>
144 <rule id="30120" level="12">
145 <if_sid>30101</if_sid>
146 <match>Resource temporarily unavailable:</match>
147 <description>Apache without resources to run.</description>
148 <group>service_availability,</group>
151 <rule id="30200" level="6" noalert="1">
152 <match>^mod_security-message: </match>
153 <description>Modsecurity alert.</description>
156 <rule id="30201" level="6">
157 <if_sid>30200</if_sid>
158 <match>^mod_security-message: Access denied </match>
159 <description>Modsecurity access denied.</description>
160 <group>access_denied,</group>
163 <rule id="30202" level="10" frequency="8" timeframe="120">
164 <if_matched_sid>30201</if_matched_sid>
165 <description>Multiple attempts blocked by Mod Security.</description>
166 <group>access_denied,</group>
168 </group> <!-- ERROR_LOG,APACHE -->