Imported Upstream version 2.5.1
[ossec-hids.git] / src / rootcheck / db / cis_rhel5_linux_rcl.txt
1 # @(#) $Id$
2 #
3 # OSSEC Linux Audit - (C) 2008 Daniel B. Cid - dcid@ossec.net
4 #
5 # Released under the same license as OSSEC.
6 # More details at the LICENSE file included with OSSEC or online
7 # at: http://www.ossec.net/en/licensing.html
8 #
9 # [Application name] [any or all] [reference]
10 # type:<entry name>;
11 #
12 # Type can be:
13 #             - f (for file or directory)
14 #             - p (process running)
15 #             - d (any file inside the directory)
16 #
17 # Additional values:
18 # For the registry , use "->" to look for a specific entry and another
19 # "->" to look for the value.
20 # For files, use "->" to look for a specific value in the file.
21 #
22 # Values can be preceeded by: =: (for equal) - default
23 #                             r: (for ossec regexes)
24 #                             >: (for strcmp greater)
25 #                             <: (for strcmp  lower)
26 # Multiple patterns can be specified by using " && " between them.
27 # (All of them must match for it to return true).
28
29
30 # CIS Checks for Red Hat (RHEL 2.1, 3.0, 4.0 and Fedora Core 1,2,3,4 and 5).
31 # Based on CIS Benchmark for Red Hat Enterprise Linux 5 v1.1
32
33
34
35 # RC scripts location
36 $rc_dirs=/etc/rc.d/rc2.d,/etc/rc.d/rc3.d,/etc/rc.d/rc4.d,/etc/rc.d/rc5.d;
37
38
39
40 # Main one. Only valid for Red Hat 5.
41 [CIS - Testing against the CIS Red Hat Enterprise Linux 5 Benchmark v1.1] [any required] [http://www.ossec.net/wiki/index.php/CIS_RHEL5]
42 f:/etc/redhat-release -> r:^Red Hat Enterprise Linux \S+ release 5;
43 f:/etc/redhat-release -> r:^CentOS && r:release 5.2;
44
45
46
47 # Build considerations - Partition scheme.
48 [CIS - RHEL5 - Build considerations - Robust partition scheme - /var is not on its own partition] [any] [http://www.ossec.net/wiki/index.php/CIS_RHEL5]
49 f:/etc/fstab -> !r:/var;
50
51
52
53 # Section 2.3 - SSH configuration
54 [CIS - RHEL5 2.3 - SSH Configuration - Protocol version 1 enabled] [any] [http://www.ossec.net/wiki/index.php/CIS_RHEL5]
55 f:/etc/ssh/sshd_config -> !r:^# && r:Protocol\.+1;
56
57 [CIS - RHEL5 2.3 - SSH Configuration - IgnoreRHosts disabled] [any] [http://www.ossec.net/wiki/index.php/CIS_RHEL5]
58 f:/etc/ssh/sshd_config -> !r:^# && r:IgnoreRhosts\.+no;
59
60 [CIS - RHEL5 2.3 - SSH Configuration - Empty passwords permitted] [any] [http://www.ossec.net/wiki/index.php/CIS_RHEL5]
61 f:/etc/ssh/sshd_config -> !r:^# && r:^PermitEmptyPasswords\.+yes;
62
63 [CIS - RHEL5 2.3 - SSH Configuration - Host based authentication enabled] [any] [http://www.ossec.net/wiki/index.php/CIS_RHEL5]
64 f:/etc/ssh/sshd_config -> !r:^# && r:HostbasedAuthentication\.+yes;
65
66 [CIS - RHEL5 2.3 - SSH Configuration - Root login allowed] [any] [http://www.ossec.net/wiki/index.php/CIS_RHEL5]
67 f:/etc/ssh/sshd_config -> !r:^# && r:PermitRootLogin\.+yes;
68
69
70
71 # Section 2.4 Enable system accounting
72 [CIS - RHEL5 2.4 - System Accounting - Sysstat not installed] [all] [http://www.ossec.net/wiki/index.php/CIS_RHEL5]
73 f:!/var/log/sa;
74
75
76
77 # Section 3 - Minimize xinetd services
78 [CIS - RHEL5 3.3 - Telnet enabled on xinetd] [any] [http://www.ossec.net/wiki/index.php/CIS_RHEL5]
79 f:/etc/xinetd.c/telnet -> !r:^# && r:disable && r:no;
80
81 [CIS - RHEL5 3.4 - VSFTP enabled on xinetd] [any] [http://www.ossec.net/wiki/index.php/CIS_RHEL5]
82 f:/etc/xinetd.c/vsftpd -> !r:^# && r:disable && r:no;
83
84 [CIS - RHEL5 3.5 - rsh/rlogin/rcp enabled on xinetd] [any] [http://www.ossec.net/wiki/index.php/CIS_RHEL5]
85 f:/etc/xinetd.c/rlogin -> !r:^# && r:disable && r:no;
86 f:/etc/xinetd.c/rsh -> !r:^# && r:disable && r:no;
87 f:/etc/xinetd.c/shell -> !r:^# && r:disable && r:no;
88
89 [CIS - RHEL5 3.6 - tftpd enabled on xinetd] [any] [http://www.ossec.net/wiki/index.php/CIS_RHEL5]
90 f:/etc/xinetd.c/tftpd -> !r:^# && r:disable && r:no;
91
92 [CIS - RHEL5 3.7 - imap enabled on xinetd] [any] [http://www.ossec.net/wiki/index.php/CIS_RHEL5]
93 f:/etc/xinetd.c/cyrus-imapd -> !r:^# && r:disable && r:no;
94
95 [CIS - RHEL5 3.8 - pop3 enabled on xinetd] [any] [http://www.ossec.net/wiki/index.php/CIS_RHEL5]
96 f:/etc/xinetd.c/dovecot -> !r:^# && r:disable && r:no;
97
98
99
100 # Section 4 - Minimize boot services
101 [CIS - RHEL5 4.1 - Set daemon umask - Default umask is higher than 027] [all] [http://www.ossec.net/wiki/index.php/CIS_RHEL5]
102 f:/etc/init.d/functions -> !r:^# && r:^umask && <:umask 027;
103
104 [CIS - RHEL5 4.4 - GUI login enabled] [any] [http://www.ossec.net/wiki/index.php/CIS_RHEL5]
105 f:/etc/inittab -> !r:^# && r:id:5;
106
107 [CIS - RHEL5 4.7 - Disable standard boot services - Samba Enabled] [any] [http://www.ossec.net/wiki/index.php/CIS_RHEL5]
108 d:$rc_dirs -> ^S\d\dsamba$;
109 d:$rc_dirs -> ^S\d\dsmb$;
110
111 [CIS - RHEL5 4.8 - Disable standard boot services - NFS Enabled] [any] [http://www.ossec.net/wiki/index.php/CIS_RHEL5]
112 d:$rc_dirs -> ^S\d\dnfs$;
113 d:$rc_dirs -> ^S\d\dnfslock$;
114
115 [CIS - RHEL5 4.10 - Disable standard boot services - NIS Enabled] [any] [http://www.ossec.net/wiki/index.php/CIS_RHEL5]
116 d:$rc_dirs -> ^S\d\dypbind$;
117 d:$rc_dirs -> ^S\d\dypserv$;
118
119 [CIS - RHEL5 4.13 - Disable standard boot services - NetFS Enabled] [any] [http://www.ossec.net/wiki/index.php/CIS_RHEL5]
120 d:$rc_dirs -> ^S\d\dnetfs$;
121
122 [CIS - RHEL5 4.15 - Disable standard boot services - Apache web server Enabled] [any] [http://www.ossec.net/wiki/index.php/CIS_RHEL5]
123 d:$rc_dirs -> ^S\d\dapache$;
124
125 [CIS - RHEL5 4.16 - Disable standard boot services - SNMPD process Enabled] [any] [http://www.ossec.net/wiki/index.php/CIS_RHEL5]
126 d:$rc_dirs -> ^S\d\dsnmpd$;
127
128 [CIS - RHEL5 4.17 - Disable standard boot services - DNS server Enabled] [any] [http://www.ossec.net/wiki/index.php/CIS_RHEL5]
129 d:$rc_dirs -> ^S\d\dnamed$;
130
131 [CIS - RHEL5 4.18 - Disable standard boot services - MySQL server Enabled] [any] [http://www.ossec.net/wiki/index.php/CIS_RHEL5]
132 d:$rc_dirs -> ^S\d\dmysqld$;
133
134 [CIS - RHEL5 4.18 - Disable standard boot services - PostgreSQL server Enabled] [any] [http://www.ossec.net/wiki/index.php/CIS_RHEL5]
135 d:$rc_dirs -> ^S\d\dpostgresql$;
136
137 [CIS - RHEL5 4.19 - Disable standard boot services - Squid Enabled] [any] [http://www.ossec.net/wiki/index.php/CIS_RHEL5]
138 d:$rc_dirs -> ^S\d\dsquid$;
139
140 [CIS - RHEL5 4.20 - Disable standard boot services - Kudzu hardware detection Enabled] [any] [http://www.ossec.net/wiki/index.php/CIS_RHEL5]
141 d:$rc_dirs -> ^S\d\dkudzu$;
142
143
144
145 # Section 5 - Kernel tuning
146 [CIS - RHEL5 5.1 - Network parameters - Source routing accepted] [any] [http://www.ossec.net/wiki/index.php/CIS_RHEL5]
147 f:/proc/sys/net/ipv4/conf/all/accept_source_route -> 1;
148
149 [CIS - RHEL5 5.1 - Network parameters - ICMP redirects accepted] [any] [http://www.ossec.net/wiki/index.php/CIS_RHEL5]
150 f:/proc/sys/net/ipv4/conf/all/accept_redirects -> 1;
151
152 [CIS - RHEL5 5.1 - Network parameters - ICMP secure redirects accepted] [any] [http://www.ossec.net/wiki/index.php/CIS_RHEL5]
153 f:/proc/sys/net/ipv4/conf/all/secure_redirects -> 1;
154
155 [CIS - RHEL5 5.1 - Network parameters - ICMP broadcasts accepted] [any] [http://www.ossec.net/wiki/index.php/CIS_RHEL5]
156 f:/proc/sys/net/ipv4/icmp_echo_ignore_broadcasts -> 0;
157
158 [CIS - RHEL5 5.2 - Network parameters - IP Forwarding enabled] [any] [http://www.ossec.net/wiki/index.php/CIS_RHEL5]
159 f:/proc/sys/net/ipv4/ip_forward -> 1;
160 f:/proc/sys/net/ipv6/ip_forward -> 1;
161
162
163
164 # Section 7 - Permissions
165 [CIS - RHEL5 7.2 - Removable partition /media without 'nodev' set] [any] [http://www.ossec.net/wiki/index.php/CIS_RHEL5]
166 f:/etc/fstab -> !r:^# && r:/media && !r:nodev;
167
168 [CIS - RHEL5 7.2 - Removable partition /media without 'nosuid' set] [any] [http://www.ossec.net/wiki/index.php/CIS_RHEL5]
169 f:/etc/fstab -> !r:^# && r:/media && !r:nosuid;
170
171 [CIS - RHEL5 7.3 - User-mounted removable partition allowed on the console] [any] [http://www.ossec.net/wiki/index.php/CIS_RHEL5]
172 f:/etc/security/console.perms -> r:^<console>  \d+ <cdrom>;
173 f:/etc/security/console.perms -> r:^<console>  \d+ <floppy>;
174
175
176
177 # Section 8 - Access and authentication
178 [CIS - RHEL5 8.7 - GRUB Password not set] [any] [http://www.ossec.net/wiki/index.php/CIS_RHEL5]
179 f:/boot/grub/menu.lst -> !r:^# && !r:password;
180
181 [CIS - RHEL5 9.2 - Account with empty password present] [any] [http://www.ossec.net/wiki/index.php/CIS_RHEL5]
182 f:/etc/shadow -> r:^\w+::;
183
184 [CIS - RHEL5 SN.11 - Non-root account with uid 0] [any] [http://www.ossec.net/wiki/index.php/CIS_RHEL5]
185 f:/etc/passwd -> !r:^# && !r:^root: && r:^\w+:\w+:0:;
186
187
188 # EOF