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