0505eacdee604919b983fb398a6abb1577c365b4
[ossec-hids.git] / etc / rules / php_rules.xml
1 <!-- @(#) $Id$
2   -  Official PHP 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="31401" level="0">
18     <if_sid>31301, 30101</if_sid>
19     <match>PHP Warning: </match>
20     <description>PHP Warning message.</description>
21   </rule>    
22
23   <rule id="31402" level="0">
24     <if_sid>31301, 30101</if_sid>
25     <match>PHP Fatal error: </match>
26     <description>PHP Fatal error.</description>
27   </rule>    
28
29   <rule id="31403" level="0">
30     <if_sid>31301, 30101</if_sid>
31     <match>PHP Parse error:</match>
32     <description>PHP Parse error.</description>
33   </rule>    
34
35   <rule id="31404" level="0">
36     <match>^PHP Warning: </match>
37     <description>PHP Warning message.</description>
38   </rule>    
39
40   <rule id="31405" level="0">
41     <match>^PHP Fatal error: </match>
42     <description>PHP Fatal error.</description>
43   </rule>    
44
45   <rule id="31406" level="0">
46     <match>^PHP Parse error: </match>
47     <description>PHP Parse error.</description>
48   </rule>    
49
50
51   <!-- PHP Warnings 
52     - PHP Warning:  urlencode() expects parameter 1 to be string, array given in
53     -->
54   <rule id="31410" level="3">
55     <if_sid>31401, 31404</if_sid>
56     <description>PHP Warning message.</description>
57   </rule>
58
59   <rule id="31411" level="6">
60     <if_sid>31410</if_sid>
61     <match> expects parameter 1 to be string, array given in</match>
62     <group>attack,</group>
63     <description>PHP web attack.</description>
64   </rule>
65
66   <rule id="31412" level="5">
67     <if_sid>31410</if_sid>
68     <match>Failed opening|failed to open stream</match>
69     <description>PHP internal error (missing file).</description>
70     <options>alert_by_email</options>
71   </rule>
72
73
74
75   <!-- PHP Fatal errors
76     - PHP Fatal error:  require_once() [<a href='function.require'>function.require</a>]: Failed opening require
77 d 'includes/SkinTemplate.php'
78     -->
79   <rule id="31420" level="5">
80     <if_sid>31402, 31405</if_sid>
81     <description>PHP Fatal error.</description>
82   </rule>
83
84   <rule id="31421" level="5">
85     <if_sid>31420</if_sid>
86     <match>Failed opening required |Call to undefined function </match>
87     <description>PHP internal error (missing file or function).</description>
88     <options>alert_by_email</options>
89   </rule>
90
91
92
93   <!-- PHP Parse error -->
94   <rule id="31430" level="5">
95     <if_sid>31403, 31406</if_sid>
96     <description>PHP Parse error.</description>
97     <options>alert_by_email</options>
98   </rule>
99
100 </group> <!-- ERROR_LOG, PHP -->
101
102 <!-- EOF -->
103