new upstream release (3.3.0); modify package compatibility for Stretch
[ossec-hids.git] / debian / ossec-hids / var / ossec / etc / shared / system_audit_rcl.txt
1 # OSSEC Linux Audit - (C) 2018 OSSEC Project
2 #
3 # Released under the same license as OSSEC.
4 # More details at the LICENSE file included with OSSEC or online
5 # at: https://github.com/ossec/ossec-hids/blob/master/LICENSE
6 #
7 # [Application name] [any or all] [reference]
8 # type:<entry name>;
9 #
10 # Type can be:
11 #             - f (for file or directory)
12 #             - p (process running)
13 #             - d (any file inside the directory)
14 #
15 # Additional values:
16 # For the registry and for directories, use "->" to look for a specific entry and another
17 # "->" to look for the value.
18 # Also, use " -> r:^\. -> ..." to search all files in a directory
19 # For files, use "->" to look for a specific value in the file.
20 #
21 # Values can be preceded by: =: (for equal) - default
22 #                             r: (for ossec regexes)
23 #                             >: (for strcmp greater)
24 #                             <: (for strcmp  lower)
25 # Multiple patterns can be specified by using " && " between them.
26 # (All of them must match for it to return true).
27
28 $php.ini=/etc/php.ini,/var/www/conf/php.ini,/etc/php5/apache2/php.ini,/usr/local/etc/php.ini;
29 $web_dirs=/var/www,/var/htdocs,/home/httpd,/usr/local/apache,/usr/local/apache2,/usr/local/www;
30
31 # PHP checks
32 [PHP - Register globals are enabled] [any] []
33 f:$php.ini -> r:^register_globals = On;
34
35 # PHP checks
36 [PHP - Expose PHP is enabled] [any] []
37 f:$php.ini -> r:^expose_php = On;
38
39 # PHP checks
40 [PHP - Allow URL fopen is enabled] [any] []
41 f:$php.ini -> r:^allow_url_fopen = On;
42
43 # PHP checks
44 [PHP - Displaying of errors is enabled] [any] []
45 f:$php.ini -> r:^display_errors = On;
46
47 # PHP checks - consider open_basedir && disable_functions
48
49
50 ## Looking for common web exploits (might indicate that you are owned).
51 ## Using http://dcid.me/blog/logsamples/webattacks_links as a reference.
52 #[Web exploits - Possible compromise] [any] []
53 #d:$web_dirs -> .txt$ -> r:^<?php|^#!;
54
55 ## Looking for common web exploits files (might indicate that you are owned).
56 ## There are not specific, like the above.
57 ## Using http://dcid.me/blog/logsamples/webattacks_links as a reference.
58 [Web exploits (uncommon file name inside htdocs) - Possible compromise  {PCI_DSS: 6.5, 6.6, 11.4}] [any] []
59 d:$web_dirs -> ^.yop$;
60
61 [Web exploits (uncommon file name inside htdocs) - Possible compromise {PCI_DSS: 6.5, 6.6, 11.4}] [any] []
62 d:$web_dirs -> ^id$;
63
64 [Web exploits (uncommon file name inside htdocs) - Possible compromise {PCI_DSS: 6.5, 6.6, 11.4}] [any] []
65 d:$web_dirs -> ^.ssh$;
66
67 [Web exploits (uncommon file name inside htdocs) - Possible compromise {PCI_DSS: 6.5, 6.6, 11.4}] [any] []
68 d:$web_dirs -> ^...$;
69
70 [Web exploits (uncommon file name inside htdocs) - Possible compromise {PCI_DSS: 6.5, 6.6, 11.4}] [any] []
71 d:$web_dirs -> ^.shell$;
72
73 ## Looking for outdated Web applications
74 ## Taken from http://sucuri.net/latest-versions
75 [Web vulnerability - Outdated WordPress installation {PCI_DSS: 6.5, 6.6, 11.4}] [any] [http://sucuri.net/latest-versions]
76 d:$web_dirs -> ^version.php$ -> r:^\.wp_version && >:$wp_version = '4.4.2';
77
78 [Web vulnerability - Outdated Joomla installation {PCI_DSS: 6.5, 6.6, 11.4}] [any] [http://sucuri.net/latest-versions]
79 d:$web_dirs -> ^version.php$ -> r:var \.RELEASE && r:'3.4.8';
80
81 [Web vulnerability - Outdated osCommerce (v2.2) installation {PCI_DSS: 6.5, 6.6, 11.4}] [any] [http://sucuri.net/latest-versions]
82 d:$web_dirs -> ^application_top.php$ -> r:'osCommerce 2.2-;
83
84 ## Looking for known backdoors
85 [Web vulnerability - Backdoors / Web based malware found - eval(base64_decode {PCI_DSS: 6.5, 6.6, 11.4}] [any] []
86 d:$web_dirs -> .php$ -> r:eval\(base64_decode\(\paWYo;
87
88 [Web vulnerability - Backdoors / Web based malware found - eval(base64_decode(POST {PCI_DSS: 6.5, 6.6, 11.4}] [any] []
89 d:$web_dirs -> .php$ -> r:eval\(base64_decode\(\S_POST;
90
91 [Web vulnerability - .htaccess file compromised {PCI_DSS: 6.5, 6.6, 11.4}] [any] [http://blog.sucuri.net/2011/05/understanding-htaccess-attacks-part-1.html]
92 d:$web_dirs -> ^.htaccess$ -> r:RewriteCond \S+HTTP_REFERERS \S+google;
93
94 [Web vulnerability - .htaccess file compromised - auto append {PCI_DSS: 6.5, 6.6, 11.4}] [any] [http://blog.sucuri.net/2011/05/understanding-htaccess-attacks-part-1.html]
95 d:$web_dirs -> ^.htaccess$ -> r:php_value auto_append_file;