Imported Upstream version 2.7
[ossec-hids.git] / src / rootcheck / db / system_audit_rcl.txt
1 # @(#) $Id: ./src/rootcheck/db/system_audit_rcl.txt, 2012/02/13 dcid Exp $
2
3 #
4 # OSSEC Linux Audit - (C) 2007 Daniel B. Cid - dcid@ossec.net
5 #
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
9 #
10 # [Application name] [any or all] [reference]
11 # type:<entry name>;
12 #
13 # Type can be:
14 #             - f (for file or directory)
15 #             - p (process running)
16 #             - d (any file inside the directory)
17 #
18 # Additional values:
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.
22 #
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).
29  
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;
32
33
34 # PHP checks
35 [PHP - Register globals are enabled] [any] [http://www.ossec.net/wiki]
36 f:$php.ini -> r:^register_globals = On;
37
38
39 # PHP checks
40 [PHP - Expose PHP is enabled] [any] []
41 f:$php.ini -> r:^expose_php = On;
42
43
44 # PHP checks
45 [PHP - Allow URL fopen is enabled] [any] []
46 f:$php.ini -> r:^allow_url_fopen = On;
47
48
49
50 # PHP checks
51 [PHP - Displaying of errors is enabled] [any] []
52 f:$php.ini -> r:^display_errors = On;
53
54
55 # PHP checks - consider open_basedir && disable_functions
56
57
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|^#!;
62
63
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$;
69
70 [Web exploits (uncommon file name inside htdocs) - Possible compromise] [any] [http://www.ossec.net/wiki/index.php/WebAttacks_links]
71 d:$web_dirs -> ^id$;
72
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$;
75
76 [Web exploits (uncommon file name inside htdocs) - Possible compromise] [any] [http://www.ossec.net/wiki/index.php/WebAttacks_links]
77 d:$web_dirs -> ^...$;
78
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$;
81
82
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';
87
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';
90
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'
93
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-;
96
97
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;
101
102 [Web vulnerability - Backdoors / Web based malware found - eval(base64_decode(POST] [any] []
103 d:$web_dirs -> .php$ -> r:eval\(base64_decode\(\S_POST;
104
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;
107
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;
110
111
112 # EOF #