1 # @(#) $Id: ./src/rootcheck/db/system_audit_rcl.txt, 2012/02/13 dcid Exp $
4 # OSSEC Linux Audit - (C) 2007 Daniel B. Cid - dcid@ossec.net
6 # Released under the same license as OSSEC.
7 # More details at the LICENSE file included with OSSEC or online
8 # at: http://www.ossec.net/en/licensing.html
10 # [Application name] [any or all] [reference]
14 # - f (for file or directory)
15 # - p (process running)
16 # - d (any file inside the directory)
19 # For the registry , use "->" to look for a specific entry and another
20 # "->" to look for the value.
21 # For files, use "->" to look for a specific value in the file.
23 # Values can be preceeded by: =: (for equal) - default
24 # r: (for ossec regexes)
25 # >: (for strcmp greater)
26 # <: (for strcmp lower)
27 # Multiple patterns can be specified by using " && " between them.
28 # (All of them must match for it to return true).
30 $php.ini=/etc/php.ini,/var/www/conf/php.ini,/etc/php5/apache2/php.ini;
31 $web_dirs=/var/www,/var/htdocs,/home/httpd,/usr/local/apache,/usr/local/apache2,/usr/local/www;
35 [PHP - Register globals are enabled] [any] [http://www.ossec.net/wiki]
36 f:$php.ini -> r:^register_globals = On;
40 [PHP - Expose PHP is enabled] [any] []
41 f:$php.ini -> r:^expose_php = On;
45 [PHP - Allow URL fopen is enabled] [any] []
46 f:$php.ini -> r:^allow_url_fopen = On;
51 [PHP - Displaying of errors is enabled] [any] []
52 f:$php.ini -> r:^display_errors = On;
55 # PHP checks - consider open_basedir && disable_functions
58 ## Looking for common web exploits (might indicate that you are owned).
59 ## Using http://www.ossec.net/wiki/index.php/WebAttacks_links as a reference.
60 #[Web exploits - Possible compromise] [any] [http://www.ossec.net/wiki/index.php/WebAttacks_links]
61 #d:$web_dirs -> .txt$ -> r:^<?php|^#!;
64 ## Looking for common web exploits files (might indicate that you are owned).
65 ## There are not specific, like the above.
66 ## Using http://www.ossec.net/wiki/index.php/WebAttacks_links as a reference.
67 [Web exploits (uncommon file name inside htdocs) - Possible compromise] [any] [http://www.ossec.net/wiki/index.php/WebAttacks_links]
68 d:$web_dirs -> ^.yop$;
70 [Web exploits (uncommon file name inside htdocs) - Possible compromise] [any] [http://www.ossec.net/wiki/index.php/WebAttacks_links]
73 [Web exploits (uncommon file name inside htdocs) - Possible compromise] [any] [http://www.ossec.net/wiki/index.php/WebAttacks_links]
74 d:$web_dirs -> ^.ssh$;
76 [Web exploits (uncommon file name inside htdocs) - Possible compromise] [any] [http://www.ossec.net/wiki/index.php/WebAttacks_links]
79 [Web exploits (uncommon file name inside htdocs) - Possible compromise] [any] [http://www.ossec.net/wiki/index.php/WebAttacks_links]
80 d:$web_dirs -> ^.shell$;
83 ## Looking for outdated Web applications
84 ## Taken from http://sucuri.net/latest-versions
85 [Web vulnerability - Outdated WordPress installation] [any] [http://sucuri.net/latest-versions]
86 d:$web_dirs -> ^version.php$ -> r:^\.wp_version && >:$wp_version = '3.2.1';
88 [Web vulnerability - Outdated Joomla (v1.0) installation] [any] [http://sucuri.net/latest-versions]
89 d:$web_dirs -> ^version.php$ -> r:var \.RELEASE && r:'1.0';
91 #[Web vulnerability - Outdated Joomla (v1.5) installation] [any] [http://sucuri.net/latest-versions]
92 #d:$web_dirs -> ^version.php$ -> r:var \.RELEASE && r:'1.5' && r:'23'
94 [Web vulnerability - Outdated osCommerce (v2.2) installation] [any] [http://sucuri.net/latest-versions]
95 d:$web_dirs -> ^application_top.php$ -> r:'osCommerce 2.2-;
98 ## Looking for known backdoors
99 [Web vulnerability - Backdoors / Web based malware found - eval(base64_decode] [any] []
100 d:$web_dirs -> .php$ -> r:eval\(base64_decode\(\paWYo;
102 [Web vulnerability - Backdoors / Web based malware found - eval(base64_decode(POST] [any] []
103 d:$web_dirs -> .php$ -> r:eval\(base64_decode\(\S_POST;
105 [Web vulnerability - .htaccess file compromised] [any] [http://blog.sucuri.net/2011/05/understanding-htaccess-attacks-part-1.html]
106 d:$web_dirs -> ^.htaccess$ -> r:RewriteCond \S+HTTP_REFERERS \S+google;
108 [Web vulnerability - .htaccess file compromised - auto append] [any] [http://blog.sucuri.net/2011/05/understanding-htaccess-attacks-part-1.html]
109 d:$web_dirs -> ^.htaccess$ -> r:php_value auto_append_file;