--- /dev/null
+<!-- @(#) $Id: ./etc/rules/php_rules.xml, 2012/05/09 dcid Exp $
+
+ - Official PHP rules for OSSEC.
+ -
+ - Copyright (C) 2009 Trend Micro Inc.
+ - All rights reserved.
+ -
+ - This program is a free software; you can redistribute it
+ - and/or modify it under the terms of the GNU General Public
+ - License (version 2) as published by the FSF - Free Software
+ - Foundation.
+ -
+ - License details: http://www.ossec.net/en/licensing.html
+ -->
+
+
+<group name="apache,">
+ <rule id="31401" level="0">
+ <if_sid>31301, 30101</if_sid>
+ <match>PHP Warning: </match>
+ <description>PHP Warning message.</description>
+ </rule>
+
+ <rule id="31402" level="0">
+ <if_sid>31301, 30101</if_sid>
+ <match>PHP Fatal error: </match>
+ <description>PHP Fatal error.</description>
+ </rule>
+
+ <rule id="31403" level="0">
+ <if_sid>31301, 30101</if_sid>
+ <match>PHP Parse error:</match>
+ <description>PHP Parse error.</description>
+ </rule>
+
+ <rule id="31404" level="0">
+ <match>^PHP Warning: </match>
+ <description>PHP Warning message.</description>
+ </rule>
+
+ <rule id="31405" level="0">
+ <match>^PHP Fatal error: </match>
+ <description>PHP Fatal error.</description>
+ </rule>
+
+ <rule id="31406" level="0">
+ <match>^PHP Parse error: </match>
+ <description>PHP Parse error.</description>
+ </rule>
+
+
+ <!-- PHP Warnings
+ - PHP Warning: urlencode() expects parameter 1 to be string, array given in
+ -->
+ <rule id="31410" level="3">
+ <if_sid>31401, 31404</if_sid>
+ <description>PHP Warning message.</description>
+ </rule>
+
+ <rule id="31411" level="6">
+ <if_sid>31410</if_sid>
+ <match> expects parameter 1 to be string, array given in</match>
+ <group>attack,</group>
+ <description>PHP web attack.</description>
+ </rule>
+
+ <rule id="31412" level="5">
+ <if_sid>31410</if_sid>
+ <match>Failed opening|failed to open stream</match>
+ <description>PHP internal error (missing file).</description>
+ <options>alert_by_email</options>
+ </rule>
+
+ <rule id="31413" level="5" ignore="1200">
+ <if_sid>31410</if_sid>
+ <match>bytes written, possibly out of free disk space in</match>
+ <description>PHP internal error (server out of space).</description>
+ <options>alert_by_email</options>
+ <group>low_diskspace,</group>
+ </rule>
+
+
+ <!-- PHP Fatal errors
+ - PHP Fatal error: require_once() [<a href='function.require'>function.require</a>]: Failed opening require
+d 'includes/SkinTemplate.php'
+ -->
+ <rule id="31420" level="5">
+ <if_sid>31402, 31405</if_sid>
+ <description>PHP Fatal error.</description>
+ </rule>
+
+ <rule id="31421" level="5">
+ <if_sid>31420</if_sid>
+ <match>Failed opening required |Call to undefined function </match>
+ <description>PHP internal error (missing file or function).</description>
+ <options>alert_by_email</options>
+ </rule>
+
+
+
+ <!-- PHP Parse error -->
+ <rule id="31430" level="5">
+ <if_sid>31403, 31406</if_sid>
+ <description>PHP Parse error.</description>
+ <options>alert_by_email</options>
+ </rule>
+
+</group> <!-- ERROR_LOG, PHP -->
+
+<!-- EOF -->
+