Imported Upstream version 2.7
[ossec-hids.git] / src / rootcheck / db / cis_debian_linux_rcl.txt
1 # @(#) $Id: ./src/rootcheck/db/cis_debian_linux_rcl.txt, 2011/09/08 dcid Exp $
2
3 #
4 # OSSEC Linux Audit - (C) 2008 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
31 # CIS Checks for Debian/Ubuntu
32 # Based on Center for Internet Security Benchmark for Debian Linux v1.0
33
34
35 # Main one. Only valid for Debian/Ubuntu.
36 [CIS - Testing against the CIS Debian Linux Benchmark v1.0] [all required] [http://www.ossec.net/wiki/index.php/CIS_DebianLinux]
37 f:/etc/debian_version;
38 f:/proc/sys/kernel/ostype -> Linux;
39
40
41
42 # Section 1.4 - Partition scheme.
43 [CIS - Debian Linux 1.4 - Robust partition scheme - /tmp is not on its own partition] [any] [http://www.ossec.net/wiki/index.php/CIS_DebianLinux]
44 f:/etc/fstab -> !r:/tmp;
45
46 [CIS - Debian Linux 1.4 - Robust partition scheme - /opt is not on its own partition] [all] [http://www.ossec.net/wiki/index.php/CIS_DebianLinux]
47 f:/opt;
48 f:/etc/fstab -> !r:/opt;
49
50 [CIS - Debian Linux 1.4 - Robust partition scheme - /var is not on its own partition] [any] [http://www.ossec.net/wiki/index.php/CIS_DebianLinux]
51 f:/etc/fstab -> !r:/var;
52
53
54
55 # Section 2.3 - SSH configuration
56 [CIS - Debian Linux 2.3 - SSH Configuration - Protocol version 1 enabled] [any] [http://www.ossec.net/wiki/index.php/CIS_DebianLinux]
57 f:/etc/ssh/sshd_config -> !r:^# && r:Protocol\.+1;
58
59 [CIS - Debian Linux 2.3 - SSH Configuration - IgnoreRHosts disabled] [any] [http://www.ossec.net/wiki/index.php/CIS_DebianLinux]
60 f:/etc/ssh/sshd_config -> !r:^# && r:IgnoreRhosts\.+no;
61
62 [CIS - Debian Linux 2.3 - SSH Configuration - Empty passwords permitted] [any] [http://www.ossec.net/wiki/index.php/CIS_DebianLinux]
63 f:/etc/ssh/sshd_config -> !r:^# && r:^PermitEmptyPasswords\.+yes;
64
65 [CIS - Debian Linux 2.3 - SSH Configuration - Host based authentication enabled] [any] [http://www.ossec.net/wiki/index.php/CIS_DebianLinux]
66 f:/etc/ssh/sshd_config -> !r:^# && r:HostbasedAuthentication\.+yes;
67
68 [CIS - Debian Linux 2.3 - SSH Configuration - Root login allowed] [any] [http://www.ossec.net/wiki/index.php/CIS_DebianLinux]
69 f:/etc/ssh/sshd_config -> !r:^# && r:PermitRootLogin\.+yes;
70
71
72
73 # Section 2.4 Enable system accounting
74 #[CIS - Debian Linux 2.4 - System Accounting - Sysstat not installed] [all] [http://www.ossec.net/wiki/index.php/CIS_DebianLinux]
75 #f:!/etc/default/sysstat;
76 #f:!/var/log/sysstat;
77
78 #[CIS - Debian Linux 2.4 - System Accounting - Sysstat not enabled] [any] [http://www.ossec.net/wiki/index.php/CIS_DebianLinux]
79 #f:!/etc/default/sysstat;
80 #f:/etc/default/sysstat -> !r:^# && r:ENABLED="false";
81
82
83
84 # Section 2.5 Install and run Bastille
85 #[CIS - Debian Linux 2.5 - System harderning - Bastille is not installed] [any] [http://www.ossec.net/wiki/index.php/CIS_DebianLinux]
86 #f:!/etc/Bastille;
87
88
89
90 # Section 2.6 Ensure sources.list Sanity
91 [CIS - Debian Linux 2.6 - Sources list sanity - Security updates not enabled] [any] [http://www.ossec.net/wiki/index.php/CIS_DebianLinux]
92 f:!/etc/apt/sources.list;
93 f:!/etc/apt/sources.list -> !r:^# && r:http://security.debian|http://security.ubuntu;
94
95
96
97 # Section 3 - Minimize inetd services
98 [CIS - Debian Linux 3.3 - Telnet enabled on inetd] [any] [http://www.ossec.net/wiki/index.php/CIS_DebianLinux]
99 f:/etc/inetd.conf -> !r:^# && r:telnet;
100
101 [CIS - Debian Linux 3.4 - FTP enabled on inetd] [any] [http://www.ossec.net/wiki/index.php/CIS_DebianLinux]
102 f:/etc/inetd.conf -> !r:^# && r:/ftp;
103
104 [CIS - Debian Linux 3.5 - rsh/rlogin/rcp enabled on inetd] [any] [http://www.ossec.net/wiki/index.php/CIS_DebianLinux]
105 f:/etc/inetd.conf -> !r:^# && r:shell|login;
106
107 [CIS - Debian Linux 3.6 - tftpd enabled on inetd] [any] [http://www.ossec.net/wiki/index.php/CIS_DebianLinux]
108 f:/etc/inetd.conf -> !r:^# && r:tftp;
109
110 [CIS - Debian Linux 3.7 - imap enabled on inetd] [any] [http://www.ossec.net/wiki/index.php/CIS_DebianLinux]
111 f:/etc/inetd.conf -> !r:^# && r:imap;
112
113 [CIS - Debian Linux 3.8 - pop3 enabled on inetd] [any] [http://www.ossec.net/wiki/index.php/CIS_DebianLinux]
114 f:/etc/inetd.conf -> !r:^# && r:pop;
115
116 [CIS - Debian Linux 3.9 - Ident enabled on inetd] [any] [http://www.ossec.net/wiki/index.php/CIS_DebianLinux]
117 f:/etc/inetd.conf -> !r:^# && r:ident;
118
119
120
121 # Section 4 - Minimize boot services
122 [CIS - Debian Linux 4.1 - Disable inetd - Inetd enabled but no services running] [all] [http://www.ossec.net/wiki/index.php/CIS_DebianLinux]
123 p:inetd;
124 f:!/etc/inetd.conf -> !r:^# && r:wait;
125
126 [CIS - Debian Linux 4.3 - GUI login enabled] [any] [http://www.ossec.net/wiki/index.php/CIS_DebianLinux]
127 f:/etc/inittab -> !r:^# && r:id:5;
128
129 [CIS - Debian Linux 4.6 - Disable standard boot services - Samba Enabled] [any] [http://www.ossec.net/wiki/index.php/CIS_DebianLinux]
130 f:/etc/init.d/samba;
131
132 [CIS - Debian Linux 4.7 - Disable standard boot services - NFS Enabled] [any] [http://www.ossec.net/wiki/index.php/CIS_DebianLinux]
133 f:/etc/init.d/nfs-common;
134 f:/etc/init.d/nfs-user-server;
135 f:/etc/init.d/nfs-kernel-server;
136
137 [CIS - Debian Linux 4.9 - Disable standard boot services - NIS Enabled] [any] [http://www.ossec.net/wiki/index.php/CIS_DebianLinux]
138 f:/etc/init.d/nis;
139
140 [CIS - Debian Linux 4.13 - Disable standard boot services - Web server Enabled] [any] [http://www.ossec.net/wiki/index.php/CIS_DebianLinux]
141 f:/etc/init.d/apache;
142 f:/etc/init.d/apache2;
143
144 [CIS - Debian Linux 4.15 - Disable standard boot services - DNS server Enabled] [any] [http://www.ossec.net/wiki/index.php/CIS_DebianLinux]
145 f:/etc/init.d/bind;
146
147 [CIS - Debian Linux 4.16 - Disable standard boot services - MySQL server Enabled] [any] [http://www.ossec.net/wiki/index.php/CIS_DebianLinux]
148 f:/etc/init.d/mysql;
149
150 [CIS - Debian Linux 4.16 - Disable standard boot services - PostgreSQL server Enabled] [any] [http://www.ossec.net/wiki/index.php/CIS_DebianLinux]
151 f:/etc/init.d/postgresql;
152
153 [CIS - Debian Linux 4.17 - Disable standard boot services - Webmin Enabled] [any] [http://www.ossec.net/wiki/index.php/CIS_DebianLinux]
154 f:/etc/init.d/webmin;
155
156 [CIS - Debian Linux 4.18 - Disable standard boot services - Squid Enabled] [any] [http://www.ossec.net/wiki/index.php/CIS_DebianLinux]
157 f:/etc/init.d/squid;
158
159
160
161 # Section 5 - Kernel tuning
162 [CIS - Debian Linux 5.1 - Network parameters - Source routing accepted] [any] [http://www.ossec.net/wiki/index.php/CIS_DebianLinux]
163 f:/proc/sys/net/ipv4/conf/all/accept_source_route -> 1;
164
165 [CIS - Debian Linux 5.1 - Network parameters - ICMP broadcasts accepted] [any] [http://www.ossec.net/wiki/index.php/CIS_DebianLinux]
166 f:/proc/sys/net/ipv4/icmp_echo_ignore_broadcasts -> 0;
167
168 [CIS - Debian Linux 5.2 - Network parameters - IP Forwarding enabled] [any] [http://www.ossec.net/wiki/index.php/CIS_DebianLinux]
169 f:/proc/sys/net/ipv4/ip_forward -> 1;
170 f:/proc/sys/net/ipv6/ip_forward -> 1;
171
172
173
174 # Section 7 - Permissions
175 [CIS - Debian Linux 7.1 - Partition /var without 'nodev' set] [any] [http://www.ossec.net/wiki/index.php/CIS_DebianLinux]
176 f:/etc/fstab -> !r:^# && r:ext2|ext3 && r:/var && !r:nodev;
177
178 [CIS - Debian Linux 7.1 - Partition /tmp without 'nodev' set] [any] [http://www.ossec.net/wiki/index.php/CIS_DebianLinux]
179 f:/etc/fstab -> !r:^# && r:ext2|ext3 && r:/tmp && !r:nodev;
180
181 [CIS - Debian Linux 7.1 - Partition /opt without 'nodev' set] [any] [http://www.ossec.net/wiki/index.php/CIS_DebianLinux]
182 f:/etc/fstab -> !r:^# && r:ext2|ext3 && r:/opt && !r:nodev;
183
184 [CIS - Debian Linux 7.1 - Partition /home without 'nodev' set] [any] [http://www.ossec.net/wiki/index.php/CIS_DebianLinux]
185 f:/etc/fstab -> !r:^# && r:ext2|ext3 && r:/home && !r:nodev ;
186
187 [CIS - Debian Linux 7.2 - Removable partition /media without 'nodev' set] [any] [http://www.ossec.net/wiki/index.php/CIS_DebianLinux]
188 f:/etc/fstab -> !r:^# && r:/media && !r:nodev;
189
190 [CIS - Debian Linux 7.2 - Removable partition /media without 'nosuid' set] [any] [http://www.ossec.net/wiki/index.php/CIS_DebianLinux]
191 f:/etc/fstab -> !r:^# && r:/media && !r:nosuid;
192
193 [CIS - Debian Linux 7.3 - User-mounted removable partition /media] [any] [http://www.ossec.net/wiki/index.php/CIS_DebianLinux]
194 f:/etc/fstab -> !r:^# && r:/media && r:user;
195
196
197
198 # Section 8 - Access and authentication
199 [CIS - Debian Linux 8.8 - LILO Password not set] [any] [http://www.ossec.net/wiki/index.php/CIS_DebianLinux]
200 f:/etc/lilo.conf -> !r:^# && !r:restricted;
201 f:/etc/lilo.conf -> !r:^# && !r:password=;
202
203 [CIS - Debian Linux 8.8 - GRUB Password not set] [any] [http://www.ossec.net/wiki/index.php/CIS_DebianLinux]
204 f:/boot/grub/menu.lst -> !r:^# && !r:password;
205
206 [CIS - Debian Linux 9.2 - Account with empty password present] [any] [http://www.ossec.net/wiki/index.php/CIS_DebianLinux]
207 f:/etc/shadow -> r:^\w+::;
208
209 [CIS - Debian Linux 13.11 - Non-root account with uid 0] [any] [http://www.ossec.net/wiki/index.php/CIS_DebianLinux]
210 f:/etc/passwd -> !r:^# && !r:^root: && r:^\w+:\w+:0:;
211
212
213 # EOF