51536e5da640b37db247ef6f51b392177ef72d18
[ossec-hids.git] / etc / rules / nginx_rules.xml
1 <!-- @(#) $Id$
2   -  Official Nginx rules for OSSEC.
3   -
4   -  Copyright (C) 2009 Trend Micro Inc.
5   -  All rights reserved.
6   -
7   -  This program is a free software; you can redistribute it
8   -  and/or modify it under the terms of the GNU General Public
9   -  License (version 2) as published by the FSF - Free Software
10   -  Foundation.
11   -
12   -  License details: http://www.ossec.net/en/licensing.html
13   -->
14                         
15
16 <group name="apache,">
17   <rule id="31300" level="0">
18     <decoded_as>nginx-errorlog</decoded_as>
19     <description>Nginx messages grouped.</description>
20   </rule>    
21
22   <rule id="31301" level="3">
23     <if_sid>31300</if_sid>
24     <regex>^\S+ \S+ [error] </regex>
25     <description>Nginx error message.</description>
26   </rule>
27   
28   <rule id="31302" level="3">
29     <if_sid>31300</if_sid>
30     <regex>^\S+ \S+ [warn] </regex>
31     <description>Nginx warning message.</description>
32   </rule>
33   
34   <rule id="31303" level="5">
35     <if_sid>31300</if_sid>
36     <regex>^\S+ \S+ [crit] </regex>
37     <description>Nginx critical message.</description>
38   </rule>
39
40   <rule id="31310" level="0">
41     <if_sid>31301</if_sid>
42     <match>failed (2: No such file or directory)|is not found (2: No such file or directory)</match>
43     <description>Server returned 404 (reported in the access.log).</description>
44   </rule>
45
46   <rule id="31311" level="0">
47     <if_sid>31301</if_sid>
48     <match>accept() failed (53: Software caused connection abort)</match>
49     <description>Incomplete client request.</description>
50   </rule>
51
52   <rule id="31312" level="0">
53     <if_sid>31301</if_sid>
54     <match>no user/password was provided for basic authentication</match>
55     <description>Initial 401 authentication request.</description>
56   </rule>
57
58   <rule id="31315" level="5">
59     <if_sid>31301</if_sid>
60     <match> password mismatch, client| was not found in </match>
61     <description>Web authentication failed.</description>
62     <group>authentication_failed,</group>
63   </rule>
64
65   <rule id="31316" level="10" frequency="6" timeframe="240">
66     <if_matched_sid>31315</if_matched_sid>
67     <same_source_ip />
68     <description>Multiple web authentication failures.</description>
69     <group>authentication_failures,</group>
70   </rule>
71
72   <rule id="31320" level="10">
73     <if_sid>31303</if_sid>
74     <match>failed (63: File name too long)</match>
75     <description>Invalid URI, file name too long.</description>
76     <group>invalid_request,</group>
77   </rule>
78 </group> <!-- ERROR_LOG,NGINX -->
79
80 <!-- EOF -->
81