Professional Documents
Culture Documents
CIS Red Hat Enterprise Linux 6 Benchmark v3.0.0
CIS Red Hat Enterprise Linux 6 Benchmark v3.0.0
v3.0.0 - 02-16-2021
Terms of Use
Please see the below link for our current terms of use:
https://www.cisecurity.org/cis-securesuite/cis-securesuite-membership-terms-of-use/
1|Page
Table of Contents
2|Page
1.1.12 Ensure separate partition exists for /var/log/audit (Automated) ................ 49
1.1.13 Ensure separate partition exists for /home (Automated)................................. 51
1.1.14 Ensure nodev option set on /home partition (Automated) .............................. 53
1.1.15 Ensure nodev option set on /dev/shm partition (Automated) ....................... 54
1.1.16 Ensure nosuid option set on /dev/shm partition (Automated) ..................... 55
1.1.17 Ensure noexec option set on /dev/shm partition (Automated) ..................... 56
1.1.18 Ensure nodev option set on removable media partitions (Manual) ............. 57
1.1.19 Ensure nosuid option set on removable media partitions (Manual) ............ 58
1.1.20 Ensure noexec option set on removable media partitions (Manual) ............ 59
1.1.21 Ensure sticky bit is set on all world-writable directories (Automated) ...... 60
1.1.22 Disable Automounting (Automated) ......................................................................... 62
1.1.23 Disable USB Storage (Automated) .............................................................................. 64
1.2 Configure Software Updates ......................................................................................................... 66
1.2.1 Ensure package manager repositories are configured (Manual) ...................... 67
1.2.2 Ensure gpgcheck is globally activated (Automated) .............................................. 68
1.2.3 Ensure GPG keys are configured (Manual) ................................................................ 70
1.2.4 Ensure Red Hat Network or Subscription Manager connection is configured
(Manual) ............................................................................................................................................. 71
1.2.5 Disable the rhnsd Daemon (Automated) .................................................................... 73
1.3 Filesystem Integrity Checking ...................................................................................................... 74
1.3.1 Ensure AIDE is installed (Automated) ......................................................................... 75
1.3.2 Ensure filesystem integrity is regularly checked (Automated) ......................... 77
1.4 Secure Boot Settings ........................................................................................................................ 79
1.4.1 Ensure permissions on bootloader config are configured (Automated) ........ 80
1.4.2 Ensure bootloader password is set (Automated).................................................... 82
1.4.3 Ensure authentication required for single user mode (Automated) ............... 84
1.4.4 Ensure interactive boot is not enabled (Automated)............................................. 85
1.5 Additional Process Hardening ..................................................................................................... 86
1.5.1 Ensure core dumps are restricted (Automated) ...................................................... 87
1.5.2 Ensure XD/NX support is enabled (Manual) ............................................................. 89
3|Page
1.5.3 Ensure address space layout randomization (ASLR) is enabled (Automated)
................................................................................................................................................................ 91
1.5.4 Ensure prelink is disabled (Automated) ..................................................................... 93
1.6 Mandatory Access Control ............................................................................................................. 94
1.6.1 Configure SELinux .................................................................................................................... 95
1.6.1.1 Ensure SELinux is installed (Automated) ............................................................... 96
1.6.1.2 Ensure SELinux is not disabled in bootloader configuration (Automated)97
1.6.1.3 Ensure SELinux policy is configured (Automated) ............................................. 99
1.6.1.4 Ensure the SELinux mode is enforcing or permissive (Automated) .......... 101
1.6.1.5 Ensure the SELinux mode is enforcing (Automated) ....................................... 103
1.6.1.6 Ensure no unconfined daemons exist (Automated) ......................................... 105
1.6.1.7 Ensure SETroubleshoot is not installed (Automated) ..................................... 106
1.6.1.8 Ensure the MCS Translation Service (mcstrans) is not installed
(Automated) .................................................................................................................................... 107
1.7 Command Line Warning Banners ............................................................................................. 108
1.7.1 Ensure message of the day is configured properly (Automated) .................... 109
1.7.2 Ensure local login warning banner is configured properly (Automated) .... 111
1.7.3 Ensure remote login warning banner is configured properly (Automated)
.............................................................................................................................................................. 113
1.7.4 Ensure permissions on /etc/motd are configured (Automated) .................... 115
1.7.5 Ensure permissions on /etc/issue are configured (Automated) .................... 116
1.7.6 Ensure permissions on /etc/issue.net are configured (Automated) ............. 117
1.8 GNOME Display Manager ............................................................................................................. 118
1.8.1 Ensure GNOME Display Manager is removed (Manual) ..................................... 119
1.8.2 Ensure GDM login banner is configured (Automated) ........................................ 120
1.8.3 Ensure last logged in user display is disabled (Automated) ............................. 122
1.8.4 Ensure XDCMP is not enabled (Automated) ............................................................ 124
1.9 Ensure updates, patches, and additional security software are installed
(Automated) .................................................................................................................................... 126
2 Services ........................................................................................................................................................ 128
2.1 inetd Services .................................................................................................................................... 129
4|Page
2.1.1 Ensure chargen services are not enabled (Automated) ...................................... 130
2.1.2 Ensure daytime services are not enabled (Automated) ..................................... 131
2.1.3 Ensure discard services are not enabled (Automated) ....................................... 132
2.1.4 Ensure echo services are not enabled (Automated) ............................................ 133
2.1.5 Ensure time services are not enabled (Automated) ............................................. 134
2.1.6 Ensure rsh server is not enabled (Automated) ...................................................... 135
2.1.7 Ensure talk server is not enabled (Automated) ..................................................... 137
2.1.8 Ensure tftp server is not enabled (Automated) ..................................................... 138
2.1.9 Ensure rsync service is not enabled (Automated) ................................................ 139
2.1.10 Ensure xinetd is not enabled (Automated) ........................................................... 140
2.2 Special Purpose Services .............................................................................................................. 141
2.2.1 Time Synchronization ........................................................................................................... 142
2.2.1.1 Ensure time synchronization is in use (Manual) ............................................... 143
2.2.1.2 Ensure chrony is configured (Automated) ........................................................... 145
2.2.1.3 Ensure ntp is configured (Automated) .................................................................. 147
2.2.2 Ensure X11 Server components are not installed (Automated) ...................... 149
2.2.3 Ensure Avahi Server is not installed (Automated) ............................................... 150
2.2.4 Ensure CUPS is not installed (Automated) ............................................................... 151
2.2.5 Ensure DHCP Server is not installed (Automated) ............................................... 153
2.2.6 Ensure LDAP server is not installed (Automated) ................................................ 154
2.2.7 Ensure DNS Server is not installed (Automated) .................................................. 155
2.2.8 Ensure FTP Server is not installed (Automated) ................................................... 156
2.2.9 Ensure HTTP server is not installed (Automated) ................................................ 157
2.2.10 Ensure IMAP and POP3 server is not installed (Automated) ......................... 158
2.2.11 Ensure Samba is not installed (Automated) ......................................................... 159
2.2.12 Ensure HTTP Proxy Server is not installed (Automated) ................................ 160
2.2.13 Ensure net-snmp is not installed (Automated) ................................................... 161
2.2.14 Ensure NIS server is not installed (Automated) .................................................. 163
2.2.15 Ensure telnet-server is not installed (Automated) ............................................ 165
2.2.16 Ensure nfs-utils is not installed or the nfs-server service is disabled
(Automated) .................................................................................................................................... 166
5|Page
2.2.17 Ensure rpcbind is not installed or the rpcbind service is disabled
(Automated) .................................................................................................................................... 168
2.2.18 Ensure mail transfer agent is configured for local-only mode (Automated)
.............................................................................................................................................................. 170
2.3 Service Clients .................................................................................................................................. 172
2.3.1 Ensure NIS Client is not installed (Automated) ..................................................... 173
2.3.2 Ensure rsh client is not installed (Automated) ...................................................... 175
2.3.3 Ensure talk client is not installed (Automated) ..................................................... 177
2.3.4 Ensure telnet client is not installed (Automated) ................................................. 178
2.3.5 Ensure LDAP client is not installed (Automated) .................................................. 180
3 Network Configuration.......................................................................................................................... 181
3.1 Disable unused network protocols and devices.................................................................. 182
3.1.1 Disable IPv6 (Manual) ...................................................................................................... 183
3.1.2 Ensure wireless interfaces are disabled (Manual) ................................................ 186
3.2 Network Parameters (Host Only) ............................................................................................. 188
3.2.1 Ensure IP forwarding is disabled (Automated) ..................................................... 189
3.2.2 Ensure packet redirect sending is disabled (Automated) .................................. 191
3.3 Network Parameters (Host and Router) ................................................................................ 193
3.3.1 Ensure source routed packets are not accepted (Automated) ......................... 194
3.3.2 Ensure ICMP redirects are not accepted (Automated) ....................................... 198
3.3.3 Ensure secure ICMP redirects are not accepted (Automated) ......................... 201
3.3.4 Ensure suspicious packets are logged (Automated) ............................................ 203
3.3.5 Ensure broadcast ICMP requests are ignored (Automated) ............................. 205
3.3.6 Ensure bogus ICMP responses are ignored (Automated) .................................. 207
3.3.7 Ensure Reverse Path Filtering is enabled (Automated)...................................... 209
3.3.8 Ensure TCP SYN Cookies is enabled (Automated) ................................................ 211
3.3.9 Ensure IPv6 router advertisements are not accepted (Automated) .............. 213
3.4 TCP Wrappers................................................................................................................................... 215
3.4.1 Ensure TCP Wrappers is installed (Automated) .................................................... 216
3.4.2 Ensure /etc/hosts.allow is configured (Automated) ........................................... 218
3.4.3 Ensure /etc/hosts.deny is configured (Automated) ............................................ 219
6|Page
3.4.4 Ensure permissions on /etc/hosts.allow are configured (Automated) ........ 220
3.4.5 Ensure permissions on /etc/hosts.deny are configured (Automated) ......... 221
3.5 Uncommon Network Protocols ................................................................................................. 222
3.5.1 Ensure DCCP is disabled (Manual) .............................................................................. 223
3.5.2 Ensure SCTP is disabled (Automated) ....................................................................... 225
3.5.3 Ensure RDS is disabled (Automated) ......................................................................... 227
3.5.4 Ensure TIPC is disabled (Automated) ........................................................................ 228
3.6 Firewall Configuration .................................................................................................................. 229
3.6.1 Install iptables package ........................................................................................................ 230
3.6.1.1 Ensure iptables is installed (Automated).............................................................. 231
3.6.2 Configure IPv4 iptables ........................................................................................................ 232
3.6.2.1 Ensure IPv4 default deny firewall policy (Automated) ................................... 233
3.6.2.2 Ensure IPv4 loopback traffic is configured (Automated) ............................... 234
3.6.2.3 Ensure IPv4 outbound and established connections are configured
(Manual) ........................................................................................................................................... 236
3.6.2.4 Ensure IPv4 firewall rules exist for all open ports (Manual) ........................ 238
3.6.3 Configure IPv6 ip6tables...................................................................................................... 240
3.6.3.1 Ensure IPv6 default deny firewall policy (Automated) ................................... 241
3.6.3.2 Ensure IPv6 loopback traffic is configured (Automated) ............................... 243
3.6.3.3 Ensure IPv6 outbound and established connections are configured
(Manual) ........................................................................................................................................... 245
3.6.3.4 Ensure IPv6 firewall rules exist for all open ports (Manual) ........................ 247
4 Logging and Auditing ............................................................................................................................. 250
4.1 Configure System Accounting (auditd) ................................................................................... 251
4.1.1 Ensure auditing is enabled .................................................................................................. 252
4.1.1.1 Ensure auditd is installed (Automated)................................................................. 253
4.1.1.2 Ensure augenrules is enabled (Automated) ........................................................ 254
4.1.1.3 Ensure auditd service is enabled (Automated) .................................................. 256
4.1.1.4 Ensure auditing for processes that start prior to auditd is enabled
(Automated) .................................................................................................................................... 257
4.1.2 Configure Data Retention .................................................................................................... 259
7|Page
4.1.2.1 Ensure audit log storage size is configured (Automated) .............................. 260
4.1.2.2 Ensure audit logs are not automatically deleted (Automated) .................... 262
4.1.2.3 Ensure system is disabled when audit logs are full (Automated) ............... 263
4.1.2.4 Ensure audit_backlog_limit is sufficient (Automated) ..................................... 265
4.1.3 Ensure events that modify date and time information are collected
(Automated) .................................................................................................................................... 267
4.1.4 Ensure events that modify user/group information are collected
(Automated) .................................................................................................................................... 269
4.1.5 Ensure events that modify the system's network environment are collected
(Automated) .................................................................................................................................... 271
4.1.6 Ensure events that modify the system's Mandatory Access Controls are
collected (Automated) ................................................................................................................ 274
4.1.7 Ensure login and logout events are collected (Automated) .............................. 276
4.1.8 Ensure session initiation information is collected (Automated)..................... 278
4.1.9 Ensure discretionary access control permission modification events are
collected (Automated) ................................................................................................................ 280
4.1.10 Ensure unsuccessful unauthorized file access attempts are collected
(Automated) .................................................................................................................................... 284
4.1.11 Ensure use of privileged commands is collected (Automated) ..................... 287
4.1.12 Ensure successful file system mounts are collected (Automated) ............... 289
4.1.13 Ensure file deletion events by users are collected (Automated) .................. 292
4.1.14 Ensure changes to system administration scope (sudoers) is collected
(Automated) .................................................................................................................................... 296
4.1.15 Ensure system administrator command executions (sudo) are collected
(Automated) .................................................................................................................................... 298
4.1.16 Ensure kernel module loading and unloading is collected (Automated) .. 301
4.1.17 Ensure the audit configuration is immutable (Automated)............................ 304
4.2 Configure Logging ........................................................................................................................... 306
4.2.1 Configure rsyslog .................................................................................................................... 307
4.2.1.1 Ensure rsyslog is installed (Automated) ............................................................... 308
4.2.1.2 Ensure rsyslog Service is enabled (Automated)................................................. 309
4.2.1.3 Ensure logging is configured (Manual) .................................................................. 310
8|Page
4.2.1.4 Ensure rsyslog default file permissions configured (Automated) .............. 312
4.2.1.5 Ensure rsyslog is configured to send logs to a remote log host (Automated)
.............................................................................................................................................................. 314
4.2.1.6 Ensure remote rsyslog messages are only accepted on designated log
hosts. (Manual) .............................................................................................................................. 316
4.2.2 Ensure permissions on all logfiles are configured (Automated) ..................... 318
4.2.3 Ensure logrotate is configured (Manual) .................................................................. 319
5 Access, Authentication and Authorization ..................................................................................... 321
5.1 Configure cron .................................................................................................................................. 322
5.1.1 Ensure cron daemon is enabled (Automated) ........................................................ 323
5.1.2 Ensure permissions on /etc/crontab are configured (Automated) ............... 324
5.1.3 Ensure permissions on /etc/cron.hourly are configured (Automated) ....... 326
5.1.4 Ensure permissions on /etc/cron.daily are configured (Automated) ........... 328
5.1.5 Ensure permissions on /etc/cron.weekly are configured (Automated) ...... 330
5.1.6 Ensure permissions on /etc/cron.monthly are configured (Automated) ... 332
5.1.7 Ensure permissions on /etc/cron.d are configured (Automated) .................. 334
5.1.8 Ensure cron is restricted to authorized users (Automated) ............................. 336
5.1.9 Ensure at is restricted to authorized users (Automated)................................... 338
5.2 Configure sudo ................................................................................................................................. 340
5.2.1 Ensure sudo is installed (Automated) ....................................................................... 341
5.2.2 Ensure sudo commands use pty (Automated) ....................................................... 343
5.2.3 Ensure sudo log file exists (Automated) ................................................................... 345
5.3 Configure SSH Server ..................................................................................................................... 347
5.3.1 Ensure permissions on /etc/ssh/sshd_config are configured (Automated)
.............................................................................................................................................................. 348
5.3.2 Ensure permissions on SSH private host key files are configured
(Automated) .................................................................................................................................... 350
5.3.3 Ensure permissions on SSH public host key files are configured (Automated)
.............................................................................................................................................................. 352
5.3.4 Ensure SSH Protocol is set to 2 (Automated) .......................................................... 354
5.3.5 Ensure SSH access is limited (Automated) .............................................................. 356
5.3.6 Ensure SSH LogLevel is appropriate (Automated) ............................................... 358
9|Page
5.3.7 Ensure SSH X11 forwarding is disabled (Automated) ......................................... 360
5.3.8 Ensure SSH MaxAuthTries is set to 4 or less (Automated) ................................ 362
5.3.9 Ensure SSH IgnoreRhosts is enabled (Automated) .............................................. 364
5.3.10 Ensure SSH HostbasedAuthentication is disabled (Automated) .................. 366
5.3.11 Ensure SSH root login is disabled (Automated) .................................................. 368
5.3.12 Ensure SSH PermitEmptyPasswords is disabled (Automated) ..................... 370
5.3.13 Ensure SSH PermitUserEnvironment is disabled (Automated) .................... 372
5.3.14 Ensure only strong Ciphers are used (Automated)............................................ 374
5.3.15 Ensure only strong MAC algorithms are used (Automated)........................... 377
5.3.16 Ensure only strong Key Exchange algorithms are used (Automated) ........ 380
5.3.17 Ensure SSH Idle Timeout Interval is configured (Automated) ...................... 382
5.3.18 Ensure SSH LoginGraceTime is set to one minute or less (Automated) .... 385
5.3.19 Ensure SSH warning banner is configured (Automated) ................................. 387
5.3.20 Ensure SSH PAM is enabled (Automated) ............................................................. 388
5.3.21 Ensure SSH AllowTcpForwarding is disabled (Automated) ........................... 390
5.3.22 Ensure SSH MaxStartups is configured (Automated) ....................................... 392
5.3.23 Ensure SSH MaxSessions is limited (Automated) ............................................... 394
5.4 Configure PAM.................................................................................................................................. 396
5.4.1 Ensure password creation requirements are configured (Automated) ....... 397
5.4.2 Ensure lockout for failed password attempts is configured (Automated) .. 399
5.4.3 Ensure password reuse is limited (Automated) .................................................... 401
5.4.4 Ensure password hashing algorithm is SHA-512 (Automated) ....................... 403
5.5 User Accounts and Environment .............................................................................................. 405
5.5.1 Set Shadow Password Suite Parameters ....................................................................... 406
5.5.1.1 Ensure password expiration is 365 days or less (Automated) ..................... 407
5.5.1.2 Ensure minimum days between password changes is configured
(Automated) .................................................................................................................................... 409
5.5.1.3 Ensure password expiration warning days is 7 or more (Automated) ..... 411
5.5.1.4 Ensure inactive password lock is 30 days or less (Automated) ................... 413
5.5.1.5 Ensure all users last password change date is in the past (Automated) .. 415
5.5.2 Ensure system accounts are secured (Automated) .............................................. 416
10 | P a g e
5.5.3 Ensure default group for the root account is GID 0 (Automated) ................... 418
5.5.4 Ensure default user shell timeout is configured (Automated) ......................... 419
5.5.5 Ensure default user umask is configured (Automated) ...................................... 422
5.6 Ensure root login is restricted to system console (Manual) ................................. 425
5.7 Ensure access to the su command is restricted (Automated) .............................. 426
6 System Maintenance............................................................................................................................... 428
6.1 System File Permissions ............................................................................................................... 429
6.1.1 Audit system file permissions (Manual) ................................................................... 429
6.1.2 Ensure permissions on /etc/passwd are configured (Automated) ............... 432
6.1.3 Ensure permissions on /etc/passwd- are configured (Automated) .............. 433
6.1.4 Ensure permissions on /etc/group are configured (Automated) ................... 434
6.1.5 Ensure permissions on /etc/group- are configured (Automated) ................. 435
6.1.6 Ensure permissions on /etc/shadow are configured (Automated) ............... 436
6.1.7 Ensure permissions on /etc/shadow- are configured (Automated) ............. 437
6.1.8 Ensure permissions on /etc/gshadow are configured (Automated)............. 438
6.1.9 Ensure permissions on /etc/gshadow- are configured (Automated) ........... 439
6.1.10 Ensure no world writable files exist (Automated) ............................................. 440
6.1.11 Ensure no unowned files or directories exist (Automated) ........................... 442
6.1.12 Ensure no ungrouped files or directories exist (Automated) ........................ 443
6.1.13 Audit SUID executables (Manual) ............................................................................. 444
6.1.14 Audit SGID executables (Manual) ............................................................................. 446
6.2 User and Group Settings ............................................................................................................... 448
6.2.1 Ensure accounts in /etc/passwd use shadowed passwords (Automated) . 449
6.2.2 Ensure /etc/shadow password fields are not empty (Automated) ............... 451
6.2.3 Ensure no legacy "+" entries exist in /etc/passwd (Automated) .................... 452
6.2.4 Ensure no legacy "+" entries exist in /etc/shadow (Automated) ................... 453
6.2.5 Ensure no legacy "+" entries exist in /etc/group (Automated) ....................... 454
6.2.6 Ensure root is the only UID 0 account (Automated) ............................................ 455
6.2.7 Ensure root PATH Integrity (Automated) ................................................................ 456
6.2.8 Ensure all users' home directories exist (Automated) ........................................ 458
11 | P a g e
6.2.9 Ensure users own their home directories (Automated) ..................................... 460
6.2.10 Ensure users' home directories permissions are 750 or more restrictive
(Automated) .................................................................................................................................... 462
6.2.11 Ensure users' dot files are not group or world writable (Automated) ....... 464
6.2.12 Ensure no users have .forward files (Automated) .............................................. 466
6.2.13 Ensure no users have .netrc files (Automated).................................................... 468
6.2.14 Ensure no users have .rhosts files (Automated) ................................................. 471
6.2.15 Ensure all groups in /etc/passwd exist in /etc/group (Automated) .......... 473
6.2.16 Ensure no duplicate UIDs exist (Automated) ....................................................... 474
6.2.17 Ensure no duplicate GIDs exist (Automated) ....................................................... 475
6.2.18 Ensure no duplicate user names exist (Automated) ......................................... 476
6.2.19 Ensure no duplicate group names exist (Automated) ...................................... 477
6.2.20 Ensure shadow group is empty (Automated) ...................................................... 478
Appendix: Summary Table ........................................................................................................................... 479
Appendix: Change History ............................................................................................................................ 489
12 | P a g e
Overview
This document provides prescriptive guidance for establishing a secure configuration
posture for Red Hat Enterprise Linux 6 running on x86 and x64 platforms.
Many lists are included including filesystem types, services, clients, and network protocols.
Not all items in these lists are guaranteed to exist on all distributions and additional similar
items may exist which should be considered in addition to those explicitly mentioned.
The guidance within broadly assumes that operations are being performed as the root user.
Operations performed using sudo instead of the root user may produce unexpected results,
or fail to make the intended changes to the system. Non-root users may not be able to
access certain areas of the system, especially after remediation has been performed. It is
advisable to verify root users path integrity and the integrity of any programs being run
prior to execution of commands and scripts included in this benchmark.
To obtain the latest version of this guide, please visit http://workbench.cisecurity.org. If
you have questions, comments, or have identified ways to improve this guide, please write
us at feedback@cisecurity.org.
Intended Audience
This benchmark is intended for system and application administrators, security specialists,
auditors, help desk, and platform deployment personnel who plan to develop, deploy,
assess, or secure solutions that incorporate Red Hat Enterprise Linux 6 on x86 or x64
platforms.
Consensus Guidance
This benchmark was created using a consensus review process comprised of subject
matter experts. Consensus participants provide perspective from a diverse set of
backgrounds including consulting, software development, audit and compliance, security
research, operations, government, and legal.
Each CIS benchmark undergoes two phases of consensus review. The first phase occurs
during initial benchmark development. During this phase, subject matter experts convene
to discuss, create, and test working drafts of the benchmark. This discussion occurs until
consensus has been reached on benchmark recommendations. The second phase begins
after the benchmark has been published. During this phase, all feedback provided by the
Internet community is reviewed by the consensus team for incorporation in the
13 | P a g e
benchmark. If you are interested in participating in the consensus process, please visit
https://workbench.cisecurity.org/.
14 | P a g e
Typographical Conventions
The following typographical conventions are used throughout this guide:
Convention Meaning
Stylized Monospace font Used for blocks of code, command, and script examples.
Text should be interpreted exactly as presented.
Monospace font Used for inline code, commands, or examples. Text should
be interpreted exactly as presented.
<italic font in brackets> Italic texts set in angle brackets denote a variable
requiring substitution for a real value.
Assessment Status
An assessment status is included for every recommendation. The assessment status
indicates whether the given recommendation can be automated or requires manual steps
to implement. Both statuses are equally important and are determined and supported as
defined below:
Automated
Manual
15 | P a g e
Profile Definitions
The following configuration profiles are defined by this Benchmark:
Level 1 - Server
Level 2 - Server
This profile extends the "Level 1 - Server" profile. Items in this profile exhibit one or
more of the following characteristics:
Level 1 - Workstation
Level 2 - Workstation
This profile extends the "Level 1 - Workstation" profile. Items in this profile exhibit
one or more of the following characteristics:
16 | P a g e
Acknowledgements
This benchmark exemplifies the great things a community of users, vendors, and subject matter
experts can accomplish through consensus collaboration. The CIS community thanks the entire
consensus team with special recognition to the following individuals who contributed greatly to
the creation of this guide:
This benchmark is based upon previous Linux benchmarks published and would not be
possible without the contributions provided over the history of all of these benchmarks
including the previous version of the CentOS and Red Hat benchmarks. The CIS community
thanks everyone who has contributed to the Linux benchmarks.
Contributor
Bill Erickson
Dave Billing
Dominic Pace
Elliot Anderson
Ely Pinto
Fredrik Silverskär
Joy Latten
Koen Laevens
Mark Birch
Martynas Brijunas
Rakesh Jain
Tom Pietschmann
Vineetha Hari Pai
Rael Daruszka
Jim Trigg
Thomas Sjögren
Editor
Jonathan Lewis Christopherson
Eric Pinnell
17 | P a g e
Recommendations
1 Initial Setup
Items in this section are advised for all systems, but may be difficult or require extensive
preparation after the initial setup of the system.
18 | P a g e
1.1 Filesystem Configuration
Directories that are used for system-wide functions can be further protected by placing
them on separate partitions. This provides protection for resource exhaustion and enables
the use of mounting options that are applicable to the directory's intended use. Users' data
can be stored on separate partitions and have stricter mount options. A user partition is a
filesystem that has been established for use by the users and does not contain software for
system operations.
The recommendations in this section are easier to perform during initial system
installation. If the system is already installed, it is recommended that a full backup be
performed before repartitioning the system.
Note: If you are repartitioning a system that has already been installed, make sure the data
has been copied over to the new partition, unmount it and then remove the data from the
directory that was in the old partition. Otherwise it will still consume space in the old
partition that will be masked when the new filesystem is mounted. For example, if a system
is in single-user mode with no filesystems mounted and the administrator adds a lot of data
to the /tmp directory, this data will still consume space in / once the /tmp filesystem is
mounted unless it is removed first.
19 | P a g e
1.1.1 Disable unused filesystems
A number of uncommon filesystem types are supported under Linux. Removing support for
unneeded filesystem types reduces the local attack surface of the system. If a filesystem
type is not needed it should be disabled. Native Linux file systems are designed to ensure
that built-in security controls function as expected. Non-native filesystems can lead to
unexpected consequences to both the security and functionality of the system and should
be used with caution. Many filesystems are created for niche use cases and are not
maintained and supported as the operating systems are updated and patched. Users of
non-native filesystems should ensure that there is attention and ongoing support for them,
especially in light of frequent operating system changes.
Standard network connectivity and Internet access to cloud storage may make the use of
non-standard filesystem formats to directly attach heterogeneous devices much less
attractive.
Note: This should not be considered a comprehensive list of filesystems. You may wish to
consider additions to those listed here for your environment.
20 | P a g e
1.1.1.1 Ensure mounting of cramfs filesystems is disabled (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
The cramfs filesystem type is a compressed read-only Linux filesystem embedded in small
footprint systems. A cramfs image can be used without having to first decompress the
image.
Rationale:
Removing support for unneeded filesystem types reduces the local attack surface of the
server. If this filesystem type is not needed, disable it.
Audit:
# modprobe -n -v cramfs
install /bin/true
<No output>
Remediation:
# rmmod cramfs
21 | P a g e
CIS Controls:
Version 7
22 | P a g e
1.1.1.2 Ensure mounting of freevxfs filesystems is disabled (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
The freevxfs filesystem type is a free version of the Veritas type filesystem. This is the
primary filesystem type for HP-UX operating systems.
Rationale:
Removing support for unneeded filesystem types reduces the local attack surface of the
system. If this filesystem type is not needed, disable it.
Audit:
# modprobe -n -v freevxfs
install /bin/true
<No output>
Remediation:
# rmmod freevxfs
23 | P a g e
CIS Controls:
Version 7
24 | P a g e
1.1.1.3 Ensure mounting of jffs2 filesystems is disabled (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
The jffs2 (journaling flash filesystem 2) filesystem type is a log-structured filesystem used
in flash memory devices.
Rationale:
Removing support for unneeded filesystem types reduces the local attack surface of the
system. If this filesystem type is not needed, disable it.
Audit:
# modprobe -n -v jffs2
install /bin/true
<No output>
Remediation:
# rmmod jffs2
25 | P a g e
CIS Controls:
Version 7
26 | P a g e
1.1.1.4 Ensure mounting of hfs filesystems is disabled (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
The hfs filesystem type is a hierarchical filesystem that allows you to mount Mac OS
filesystems.
Rationale:
Removing support for unneeded filesystem types reduces the local attack surface of the
system. If this filesystem type is not needed, disable it.
Audit:
# modprobe -n -v hfs
install /bin/true
<No output>
Remediation:
# rmmod hfs
27 | P a g e
CIS Controls:
Version 7
28 | P a g e
1.1.1.5 Ensure mounting of hfsplus filesystems is disabled (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
The hfsplus filesystem type is a hierarchical filesystem designed to replace hfs that allows
you to mount Mac OS filesystems.
Rationale:
Removing support for unneeded filesystem types reduces the local attack surface of the
system. If this filesystem type is not needed, disable it.
Audit:
# modprobe -n -v hfsplus
install /bin/true
<No output>
Remediation:
# rmmod hfsplus
29 | P a g e
CIS Controls:
Version 7
30 | P a g e
1.1.1.6 Ensure mounting of squashfs filesystems is disabled (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
Rationale:
Removing support for unneeded filesystem types reduces the local attack surface of the
system. If this filesystem type is not needed, disable it.
Audit:
# modprobe -n -v squashfs
install /bin/true
<No output>
Remediation:
# rmmod squashfs
31 | P a g e
CIS Controls:
Version 7
32 | P a g e
1.1.1.7 Ensure mounting of udf filesystems is disabled (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
The udf filesystem type is the universal disk format used to implement ISO/IEC 13346 and
ECMA-167 specifications. This is an open vendor filesystem type for data storage on a
broad range of media. This filesystem type is necessary to support writing DVDs and newer
optical disc formats.
Rationale:
Removing support for unneeded filesystem types reduces the local attack surface of the
system. If this filesystem type is not needed, disable it.
Audit:
# modprobe -n -v udf
install /bin/true
<No output>
Remediation:
# rmmod udf
33 | P a g e
CIS Controls:
Version 7
34 | P a g e
1.1.2 Ensure /tmp is configured (Automated)
Profile Applicability:
Level 2 - Server
Level 2 - Workstation
Description:
The /tmp directory is a world-writable directory used for temporary storage by all users
and some applications.
Rationale:
Making /tmp its own file system allows an administrator to set the noexec option on the
mount, making /tmp useless for an attacker to install executable code. It would also
prevent an attacker from establishing a hardlink to a system setuid program and wait for it
to be updated. Once the program was updated, the hardlink would be broken and the
attacker would have his own copy of the program. If the program happened to have a
security vulnerability, the attacker could continue to exploit the known flaw.
Impact:
If /tmp does not already exist on the system as a separate partition or tmpfs mount, the
directory /tmp needs to be reviewed for contents that may not be removed by a reboot.
Audit:
Run the following command and verify output shows /tmp is mounted:
35 | P a g e
Remediation:
For new installations, during installation create a custom partition setup and specify a
separate partition for /tmp.
For systems that were previously installed, configure /etc/fstab as appropriate.
Example:
Note: This change will no be effected until the system has been re-booted or a re-mount /tmp
command is executed. If re-mount is performed, the contents of /tmp at the time of the re-
mount will become inaccessible.
References:
Additional Information:
tmpfs can be resized using the size={size} parameter in /etc/fstab. If the size isn't specified,
it will be half the RAM.
CIS Controls:
Version 7
36 | P a g e
1.1.3 Ensure nodev option set on /tmp partition (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
The nodev mount option specifies that the filesystem cannot contain special devices.
Rationale:
Since the /tmp filesystem is not intended to support devices, set this option to ensure that
users cannot attempt to create block or character special devices in /tmp .
Audit:
Remediation:
Edit the /etc/fstab file and add nodev to the fourth field (mounting options) for the /tmp
partition. See the fstab(5) manual page for more information.
Run the following command to remount /tmp :
CIS Controls:
Version 7
37 | P a g e
1.1.4 Ensure nosuid option set on /tmp partition (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
The nosuid mount option specifies that the filesystem cannot contain setuid files.
Rationale:
Since the /tmp filesystem is only intended for temporary file storage, set this option to
ensure that users cannot create setuid files in /tmp .
Audit:
Remediation:
Edit the /etc/fstab file and add nosuid to the fourth field (mounting options) for the /tmp
partition. See the fstab(5) manual page for more information.
Run the following command to remount /tmp :
CIS Controls:
Version 7
38 | P a g e
1.1.5 Ensure noexec option set on /tmp partition (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
The noexec mount option specifies that the filesystem cannot contain executable binaries.
Rationale:
Since the /tmp filesystem is only intended for temporary file storage, set this option to
ensure that users cannot run executable binaries from /tmp .
Audit:
Remediation:
Edit the /etc/fstab file and add noexec to the fourth field (mounting options) for the /tmp
partition. See the fstab(5) manual page for more information.
Run the following command to remount /tmp :
CIS Controls:
Version 7
39 | P a g e
1.1.6 Ensure separate partition exists for /var (Automated)
Profile Applicability:
Level 2 - Server
Level 2 - Workstation
Description:
The /var directory is used by daemons and other system services to temporarily store
dynamic data. Some directories created by these processes may be world-writable.
Rationale:
Since the /var directory may contain world-writable files and directories, there is a risk of
resource exhaustion if it is not bound to a separate partition.
Impact:
Audit:
Run the following command and verify output shows /var is mounted:
Remediation:
For new installations, during installation create a custom partition setup and specify a
separate partition for /var .
For systems that were previously installed, create a new partition and configure
/etc/fstab as appropriate.
References:
40 | P a g e
CIS Controls:
Version 7
41 | P a g e
1.1.7 Ensure separate partition exists for /var/tmp (Automated)
Profile Applicability:
Level 2 - Server
Level 2 - Workstation
Description:
The /var/tmp directory is a world-writable directory used for temporary storage by all
users and some applications.
Rationale:
Impact:
Audit:
Run the following command and verify output shows /var/tmp is mounted:
42 | P a g e
Remediation:
For new installations, during installation create a custom partition setup and specify a
separate partition for /var/tmp .
For systems that were previously installed, create a new partition and configure
/etc/fstab as appropriate.
CIS Controls:
Version 7
43 | P a g e
1.1.8 Ensure nodev option set on /var/tmp partition (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
The nodev mount option specifies that the filesystem cannot contain special devices.
Rationale:
Since the /var/tmp filesystem is not intended to support devices, set this option to ensure
that users cannot attempt to create block or character special devices in /var/tmp .
Audit:
Remediation:
Edit the /etc/fstab file and add nodev to the fourth field (mounting options) for the
/var/tmp partition. See the fstab(5) manual page for more information.
Run the following command to remount /var/tmp:
CIS Controls:
Version 7
44 | P a g e
1.1.9 Ensure nosuid option set on /var/tmp partition (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
The nosuid mount option specifies that the filesystem cannot contain setuid files.
Rationale:
Since the /var/tmp filesystem is only intended for temporary file storage, set this option to
ensure that users cannot create setuid files in /var/tmp .
Audit:
Remediation:
Edit the /etc/fstab file and add nosuid to the fourth field (mounting options) for the
/var/tmp partition. See the fstab(5) manual page for more information.
Run the following command to remount /var/tmp:
CIS Controls:
Version 7
45 | P a g e
1.1.10 Ensure noexec option set on /var/tmp partition (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
The noexec mount option specifies that the filesystem cannot contain executable binaries.
Rationale:
Since the /var/tmp filesystem is only intended for temporary file storage, set this option to
ensure that users cannot run executable binaries from /var/tmp .
Audit:
Remediation:
Edit the /etc/fstab file and add noexec to the fourth field (mounting options) for the
/var/tmp partition. See the fstab(5) manual page for more information.
Run the following command to remount /var/tmp:
CIS Controls:
Version 7
46 | P a g e
1.1.11 Ensure separate partition exists for /var/log (Automated)
Profile Applicability:
Level 2 - Server
Level 2 - Workstation
Description:
Rationale:
There are two important reasons to ensure that system logs are stored on a separate
partition: protection against resource exhaustion (since logs can grow quite large) and
protection of audit data.
Impact:
Audit:
Run the following command and verify output shows /var/log is mounted:
Remediation:
For new installations, during installation create a custom partition setup and specify a
separate partition for /var/log .
For systems that were previously installed, create a new partition and configure
/etc/fstab as appropriate.
References:
47 | P a g e
CIS Controls:
Version 7
48 | P a g e
1.1.12 Ensure separate partition exists for /var/log/audit (Automated)
Profile Applicability:
Level 2 - Server
Level 2 - Workstation
Description:
The auditing daemon, auditd , stores log data in the /var/log/audit directory.
Rationale:
There are two important reasons to ensure that data gathered by auditd is stored on a
separate partition: protection against resource exhaustion (since the audit.log file can
grow quite large) and protection of audit data. The audit daemon calculates how much free
space is left and performs actions based on the results. If other processes (such as syslog )
consume space in the same partition as auditd , it may not perform as desired.
Impact:
Audit:
Run the following command and verify output shows /var/log/audit is mounted:
Remediation:
For new installations, during installation create a custom partition setup and specify a
separate partition for /var/log/audit.
For systems that were previously installed, create a new partition and configure
/etc/fstab as appropriate.
References:
49 | P a g e
CIS Controls:
Version 7
50 | P a g e
1.1.13 Ensure separate partition exists for /home (Automated)
Profile Applicability:
Level 2 - Server
Level 2 - Workstation
Description:
The /home directory is used to support disk storage needs of local users.
Rationale:
If the system is intended to support local users, create a separate partition for the /home
directory to protect against resource exhaustion and restrict the type of files that can be
stored under /home .
Impact:
Audit:
Run the following command and verify output shows /home is mounted:
Remediation:
For new installations, during installation create a custom partition setup and specify a
separate partition for /home .
For systems that were previously installed, create a new partition and configure
/etc/fstab as appropriate.
References:
51 | P a g e
CIS Controls:
Version 7
52 | P a g e
1.1.14 Ensure nodev option set on /home partition (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
The nodev mount option specifies that the filesystem cannot contain special devices.
Rationale:
Since the user partitions are not intended to support devices, set this option to ensure that
users cannot attempt to create block or character special devices.
Audit:
Remediation:
Edit the /etc/fstab file and add nodev to the fourth field (mounting options) for the /home
partition. See the fstab(5) manual page for more information.
Additional Information:
The actions in this recommendation refer to the /home partition, which is the default user
partition that is defined. If you have created other user partitions, it is recommended that
the Remediation and Audit steps be applied to these partitions as well.
CIS Controls:
Version 7
53 | P a g e
1.1.15 Ensure nodev option set on /dev/shm partition (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
The nodev mount option specifies that the filesystem cannot contain special devices.
Rationale:
Since the /dev/shm filesystem is not intended to support devices, set this option to ensure
that users cannot attempt to create special devices in /dev/shm partitions.
Audit:
Remediation:
Edit the /etc/fstab file and add nodev to the fourth field (mounting options) for the
/dev/shm partition. See the fstab(5) manual page for more information.
Run the following command to remount /dev/shm :
CIS Controls:
Version 7
54 | P a g e
1.1.16 Ensure nosuid option set on /dev/shm partition (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
The nosuid mount option specifies that the filesystem cannot contain setuid files.
Rationale:
Setting this option on a file system prevents users from introducing privileged programs
onto the system and allowing non-root users to execute them.
Audit:
Remediation:
Edit the /etc/fstab file and add nosuid to the fourth field (mounting options) for the
/dev/shm partition. See the fstab(5) manual page for more information.
Run the following command to remount /dev/shm :
CIS Controls:
Version 7
55 | P a g e
1.1.17 Ensure noexec option set on /dev/shm partition (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
The noexec mount option specifies that the filesystem cannot contain executable binaries.
Rationale:
Setting this option on a file system prevents users from executing programs from shared
memory. This deters users from introducing potentially malicious software on the system.
Audit:
Remediation:
Edit the /etc/fstab file and add noexec to the fourth field (mounting options) for the
/dev/shm partition. See the fstab(5) manual page for more information.
Run the following command to remount /dev/shm:
CIS Controls:
Version 7
56 | P a g e
1.1.18 Ensure nodev option set on removable media partitions (Manual)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
The nodev mount option specifies that the filesystem cannot contain special devices.
Rationale:
Removable media containing character and block special devices could be used to
circumvent security controls by allowing non-root users to access sensitive device files
such as /dev/kmem or the raw disk partitions.
Audit:
Run the following command and verify that the nodev option is set on all removable media
partitions.
# mount
Remediation:
Edit the /etc/fstab file and add nodev to the fourth field (mounting options) of all
removable media partitions. Look for entries that have mount points that contain words
such as floppy or cdrom. See the fstab(5) manual page for more information.
CIS Controls:
Version 7
57 | P a g e
1.1.19 Ensure nosuid option set on removable media partitions
(Manual)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
The nosuid mount option specifies that the filesystem cannot contain setuid files.
Rationale:
Setting this option on a file system prevents users from introducing privileged programs
onto the system and allowing non-root users to execute them.
Audit:
Run the following command and verify that the nosuid option is set on all removable media
partitions.
# mount
Remediation:
Edit the /etc/fstab file and add nosuid to the fourth field (mounting options) of all
removable media partitions. Look for entries that have mount points that contain words
such as floppy or cdrom. See the fstab(5) manual page for more information.
CIS Controls:
Version 7
58 | P a g e
1.1.20 Ensure noexec option set on removable media partitions
(Manual)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
The noexec mount option specifies that the filesystem cannot contain executable binaries.
Rationale:
Setting this option on a file system prevents users from executing programs from the
removable media. This deters users from being able to introduce potentially malicious
software on the system.
Audit:
Run the following command and verify that the noexec option is set on all removable media
partitions.
# mount
Remediation:
Edit the /etc/fstab file and add noexec to the fourth field (mounting options) of all
removable media partitions. Look for entries that have mount points that contain words
such as floppy or cdrom. See the fstab(5) manual page for more information.
CIS Controls:
Version 7
59 | P a g e
1.1.21 Ensure sticky bit is set on all world-writable directories
(Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
Setting the sticky bit on world writable directories prevents users from deleting or
renaming files in that directory that are not owned by them.
Rationale:
This feature prevents the ability to delete or rename files in world writable directories
(such as /tmp ) that are owned by another user.
Audit:
Run the following command to verify no world writable directories exist without the sticky
bit set:
# df --local -P | awk {'if (NR!=1) print $6'} | xargs -I '{}' find '{}' -xdev
-type d \( -perm -0002 -a ! -perm -1000 \) 2>/dev/null
Remediation:
Run the following command to set the sticky bit on all world writable directories:
# df --local -P | awk {'if (NR!=1) print $6'} | xargs -I '{}' find '{}' -xdev
-type d -perm -0002 2>/dev/null | xargs chmod a+t
Additional Information:
60 | P a g e
CIS Controls:
Version 7
61 | P a g e
1.1.22 Disable Automounting (Automated)
Profile Applicability:
Level 1 - Server
Level 2 - Workstation
Description:
autofs allows automatic mounting of devices, typically including CD/DVDs and USB drives.
Rationale:
With automounting enabled anyone with physical access could attach a USB drive or disc
and have its contents available in system even if they lacked permissions to mount it
themselves.
Impact:
The use portable hard drives is very common for workstation users. If your organization
allows the use of portable storage or media on workstations and physical access controls to
workstations is considered adequate there is little value add in turning off automounting.
Audit:
Remediation:
62 | P a g e
Additional Information:
This control should align with the tolerance of the use of portable drives and optical media
in the organization. On a server requiring an admin to manually mount media can be part
of defense-in-depth to reduce the risk of unapproved software or information being
introduced or proprietary software or information being exfiltrated. If admins commonly
use flash drives and Server access has sufficient physical controls, requiring manual
mounting may not increase security.
CIS Controls:
Version 7
63 | P a g e
1.1.23 Disable USB Storage (Automated)
Profile Applicability:
Level 1 - Server
Level 2 - Workstation
Description:
USB storage provides a means to transfer and store files insuring persistence and
availability of the files independent of network connection status. Its popularity and utility
has led to USB-based malware being a simple and common means for network infiltration
and a first step to establishing a persistent threat within a networked environment.
Rationale:
Restricting USB access on the system will decrease the physical attack surface for a device
and diminish the possible vectors to introduce malware.
Audit:
# modprobe -n -v usb-storage
install /bin/true
<No output>
Remediation:
rmmod usb-storage
64 | P a g e
Additional Information:
Use of USBGuard and construction of USB device policies should be done in alignment with
site policy.
CIS Controls:
Version 7
65 | P a g e
1.2 Configure Software Updates
Red Hat Enterprise Linux 6 uses the yum package manager to install and update software
packages. Patch management procedures may vary widely between enterprises. Large
enterprises may choose to install a local updates server that can be used in place of Red
Hats servers, whereas a single deployment of a system may prefer to get updates directly.
Updates can be performed automatically or manually, depending on the site's policy for
patch management. Many large enterprises prefer to test patches on a non-production
system before rolling out to production.
For the purpose of this benchmark, the requirement is to ensure that a patch management
system is configured and maintained. The specifics on patch update procedures are left to
the organization.
66 | P a g e
1.2.1 Ensure package manager repositories are configured (Manual)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
Systems need to have package manager repositories configured to ensure they receive the
latest patches and updates.
Rationale:
Audit:
Run the following command and verify repositories are configured correctly:
# yum repolist
Remediation:
CIS Controls:
Version 7
67 | P a g e
1.2.2 Ensure gpgcheck is globally activated (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
The gpgcheck option, found in the main section of the /etc/yum.conf and individual
/etc/yum/repos.d/* files determines if an RPM package's signature is checked prior to its
installation.
Rationale:
Audit:
gpgcheck=1
Run the following command and verify that all instances of gpgcheck returned are set to 1:
Remediation:
68 | P a g e
CIS Controls:
Version 7
69 | P a g e
1.2.3 Ensure GPG keys are configured (Manual)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
Most packages managers implement GPG key signing to verify package integrity during
installation.
Rationale:
It is important to ensure that updates are obtained from a valid source to protect against
spoofing that could lead to the inadvertent installation of malware on the system.
Audit:
Run the following command and verify GPG keys are configured correctly:
Remediation:
Update your package manager GPG keys in accordance with site policy.
CIS Controls:
Version 7
70 | P a g e
1.2.4 Ensure Red Hat Network or Subscription Manager connection is
configured (Manual)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
Systems need to be registered with the Red Hat Network (RHN) or Red Hat Subscription
Manager (RHSM) to receive patch updates. This is usually configured during initial
installation.
Rationale:
It is important to register with the Red Hat Network to make sure that patches are updated
on a regular basis. This helps to reduce the exposure time as new vulnerabilities are
discovered.
Audit:
Verify your system is connected to the Red Hat Network or Red Hat Subscription Manager.
If connected to RHN your systemID will be stored in /etc/sysconfig/rhn/systemid .
If connected to RHSM your systemID can be retrieved with the following command:
# subscription-manager identity
Remediation:
Run one of the following commands to connect to either the Red Hat Network or Red Hat
Subscription Manager:
# rhn_register
# subscription-manager register
71 | P a g e
CIS Controls:
Version 7
72 | P a g e
1.2.5 Disable the rhnsd Daemon (Automated)
Profile Applicability:
Level 2 - Server
Level 2 - Workstation
Description:
The rhnsd daemon polls the Red Hat Network web site for scheduled actions and, if there
are, executes those actions.
Rationale:
Patch management policies may require that organizations test the impact of a patch
before it is deployed in a production environment. Having patches automatically deployed
could have a negative impact on the environment. It is best to not allow an action by default
but only after appropriate consideration has been made. It is recommended that the service
be disabled unless the risk is understood and accepted or you are running your own
satellite . This item is not scored because organizations may have addressed the risk.
Audit:
Run the following command and verify all runlevels are listed as off or rhnsd is not
available:
Remediation:
CIS Controls:
Version 7
9.2 Ensure Only Approved Ports, Protocols and Services Are Running
Ensure that only network ports, protocols, and services listening on a system with
validated business needs, are running on each system.
73 | P a g e
1.3 Filesystem Integrity Checking
AIDE is a file integrity checking tool, similar in nature to Tripwire. While it cannot prevent
intrusions, it can detect unauthorized changes to configuration files by alerting when the
files are changed. When setting up AIDE, decide internally what the site policy will be
concerning integrity checking. Review the AIDE quick start guide and AIDE documentation
before proceeding.
74 | P a g e
1.3.1 Ensure AIDE is installed (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
AIDE takes a snapshot of filesystem state including modification times, permissions, and
file hashes which can then be used to compare against the current state of the filesystem to
detect modifications to the system.
Note: The prelinking feature can interfere with AIDE because it alters binaries to speed up
their start up times. Run prelink -ua to restore the binaries to their prelinked state, thus
avoiding false positives from AIDE.
Rationale:
By monitoring the filesystem state compromised files can be detected to prevent or limit
the exposure of accidental or malicious misconfigurations or modified binaries.
Audit:
# rpm -q aide
aide-<version>
Remediation:
Configure AIDE as appropriate for your environment. Consult the AIDE documentation for
options.
Initialize AIDE:
Run the following commands:
# aide --init
# mv /var/lib/aide/aide.db.new.gz /var/lib/aide/aide.db.gz
75 | P a g e
References:
CIS Controls:
Version 7
76 | P a g e
1.3.2 Ensure filesystem integrity is regularly checked (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
Periodic checking of the filesystem integrity is needed to detect changes to the filesystem.
Rationale:
Periodic file checking allows the system administrator to determine on a regular basis if
critical files have been changed in an unauthorized fashion.
Audit:
Run the following commands to determine if there is a cron job scheduled to run the aide
check.
Remediation:
# crontab -u root -e
0 5 * * * /usr/sbin/aide --check
Additional Information:
The checking in this recommendation occurs every day at 5am. Alter the frequency and
time of the checks in compliance with site policy.
77 | P a g e
CIS Controls:
Version 7
78 | P a g e
1.4 Secure Boot Settings
The recommendations in this section focus on securing the bootloader and settings
involved in the boot process directly.
79 | P a g e
1.4.1 Ensure permissions on bootloader config are configured
(Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
The grub configuration file contains information on boot settings and passwords for
unlocking boot options. The grub configuration is usually located at /boot/grub/grub.conf
and linked as /boot/grub/menu.lst and /etc/grub.conf .
Rationale:
Setting the permissions to read and write for root only prevents non-root users from
seeing the boot parameters or changing them. Non-root users who read the boot
parameters may be able to identify weaknesses in security upon boot and be able to exploit
them.
Audit:
Run the following command and verify Uid and Gid are both 0/root and Access does not
grant permissions to group or other :
Remediation:
Additional Information:
80 | P a g e
CIS Controls:
Version 7
81 | P a g e
1.4.2 Ensure bootloader password is set (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
Setting the boot loader password will require that anyone rebooting the system must enter
a password before being able to set command line boot parameters
Rationale:
Requiring a boot password upon execution of the boot loader will prevent an unauthorized
user from entering boot parameters or changing the boot partition. This prevents users
from weakening security (e.g. turning off SELinux at boot time).
Audit:
Remediation:
# grub-md5-crypt
Password: <password>
Retype Password: <password>
<encrypted-password>
82 | P a g e
Additional Information:
CIS Controls:
Version 7
83 | P a g e
1.4.3 Ensure authentication required for single user mode (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
Single user mode is used for recovery when the system detects an issue during boot or by
manual selection from the bootloader.
Rationale:
Audit:
SINGLE=/sbin/sulogin
Remediation:
SINGLE=/sbin/sulogin
CIS Controls:
Version 7
84 | P a g e
1.4.4 Ensure interactive boot is not enabled (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
Interactive boot allows console users to interactively select which services start on boot.
The PROMPT option provides console users the ability to interactively boot the system and
select which services to start on boot .
Rationale:
Turn off the PROMPT option on the console to prevent console users from potentially
overriding established security settings.
Audit:
Run the following command and verify PROMPT is set to ' no ':
PROMPT=no
Remediation:
PROMPT=no
CIS Controls:
Version 7
85 | P a g e
1.5 Additional Process Hardening
86 | P a g e
1.5.1 Ensure core dumps are restricted (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
Rationale:
Setting a hard limit on core dumps prevents users from overriding the soft variable. If core
dumps are required, consider setting limits for user groups (see limits.conf(5) ). In
addition, setting the fs.suid_dumpable variable to 0 will prevent setuid programs from
dumping core.
Audit:
* hard core 0
# sysctl fs.suid_dumpable
fs.suid_dumpable = 0
fs.suid_dumpable = 0
87 | P a g e
Remediation:
* hard core 0
fs.suid_dumpable = 0
# sysctl -w fs.suid_dumpable=0
CIS Controls:
Version 7
88 | P a g e
1.5.2 Ensure XD/NX support is enabled (Manual)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
Recent processors in the x86 family support the ability to prevent code execution on a per
memory page basis. Generically and on AMD processors, this ability is called No Execute
(NX), while on Intel processors it is called Execute Disable (XD). This ability can help
prevent exploitation of buffer overflow vulnerabilities and should be activated whenever
possible. Extra steps must be taken to ensure that this protection is enabled, particularly on
32-bit x86 systems. Other processors, such as Itanium and POWER, have included such
support since inception and the standard kernel for those platforms supports the feature.
Rationale:
Enabling any feature that can protect against buffer overflow attacks enhances the security
of the system.
Audit:
Run the following command and verify your kernel has identified and activated NX/XD
protection.
Remediation:
On 32 bit systems install a kernel with PAE support, no installation is required on 64 bit
systems:
If necessary configure your bootloader to load the new kernel and reboot the system.
You may need to enable NX or XD support in your bios.
89 | P a g e
Additional Information:
Ensure your system supports the XD or NX bit and has PAE support before implementing
this recommendation as this may prevent it from booting if these are not supported by
your hardware.
CIS Controls:
Version 7
90 | P a g e
1.5.3 Ensure address space layout randomization (ASLR) is enabled
(Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
Rationale:
Randomly placing virtual memory regions will make it difficult to write memory page
exploits as the memory placement will be consistently shifting.
Audit:
# sysctl kernel.randomize_va_space
kernel.randomize_va_space = 2
91 | P a g e
Remediation:
kernel.randomize_va_space = 2
Run the following commands to comment out entries that override the default setting of
kernel.randomize_va_space:
# sysctl -w kernel.randomize_va_space=2
CIS Controls:
Version 7
92 | P a g e
1.5.4 Ensure prelink is disabled (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
prelink is a program that modifies ELF shared libraries and ELF dynamically linked
binaries in such a way that the time needed for the dynamic linker to perform relocations
at startup significantly decreases.
Rationale:
The prelinking feature can interfere with the operation of AIDE, because it changes
binaries. Prelinking can also increase the vulnerability of the system if a malicious user is
able to compromise a common library such as libc.
Audit:
# rpm -q prelink
Remediation:
# prelink -ua
CIS Controls:
Version 7
93 | P a g e
1.6 Mandatory Access Control
Mandatory Access Control (MAC) provides an additional layer of access restrictions to
processes on top of the base Discretionary Access Controls. By restricting how processes
can access files and resources on a system the potential impact from vulnerabilities in the
processes can be reduced.
Impact: Mandatory Access Control limits the capabilities of applications and daemons on a
system, while this can prevent unauthorized access the configuration of MAC can be
complex and difficult to implement correctly preventing legitimate access from occurring.
94 | P a g e
1.6.1 Configure SELinux
SELinux provides a Mandatory Access Control (MAC) system that greatly augments the
default Discretionary Access Control (DAC) model. Under SELinux, every process and every
object (files, sockets, pipes) on the system is assigned a security context, a label that
includes detailed type information about the object. The kernel allows processes to access
objects only if that access is explicitly allowed by the policy in effect. The policy defines
transitions, so that a user can be allowed to run software, but the software can run under a
different context than the user's default. This automatically limits the damage that the
software can do to files accessible by the calling user. The user does not need to take any
action to gain this benefit. For an action to occur, both the traditional DAC permissions
must be satisfied as well as the SELinux MAC rules. The action will not be allowed if either
one of these models does not permit the action. In this way, SELinux rules can only make a
system's permissions more restrictive and secure. SELinux requires a complex policy to
allow all the actions required of a system under normal operation. Three such policies have
been designed for use with RHEL7 and are included with the system: targeted, strict, and
mls. These are described as follows:
targeted: consists mostly of Type Enforcement (TE) rules, and a small number of
Role-Based Access Control (RBAC) rules. Targeted restricts the actions of many
types of programs, but leaves interactive users largely unaffected.
strict: also uses TE and RBAC rules, but on more programs and more aggressively.
mls: implements Multi-Level Security (MLS), which introduces even more kinds of
labels (sensitivity and category) and rules that govern access based on these.
Notes:
This section provides guidance for the configuration of the targeted policy.
This section only applies if SELinux is in use on the system.
Additional Mandatory Access Control systems exist. If a different MAC is used, such as
AppArmor, configure the MAC according to its security guidance.
References:
95 | P a g e
1.6.1.1 Ensure SELinux is installed (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
Rationale:
Without a Mandatory Access Control system installed only the default Discretionary Access
Control system will be available.
Audit:
# rpm -q libselinux
libselinux-<version>
Remediation:
CIS Controls:
Version 7
96 | P a g e
1.6.1.2 Ensure SELinux is not disabled in bootloader configuration
(Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
Configure SELINUX to be enabled at boot time and verify that it has not been overwritten
by the grub boot parameters.
Note: This recommendation is designed around the grub bootloader, if LILO or another
bootloader is in use in your environment enact equivalent settings.
Rationale:
SELinux must be enabled at boot time in your grub configuration to ensure that the
controls it provides are not overridden.
Audit:
Run the following commands and verify that no linux line has the selinux=0 or
enforcing=0 parameters set:
Remediation:
97 | P a g e
CIS Controls:
Version 7
98 | P a g e
1.6.1.3 Ensure SELinux policy is configured (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
Configure SELinux to meet or exceed the default targeted policy, which constrains daemons
and system software only.
Note: If your organization requires stricter policies, ensure that they are set in the
/etc/selinux/config file.
Rationale:
Security configuration requirements vary from site to site. Some sites may mandate a
policy that is stricter than the default policy, which is perfectly acceptable. This item is
intended to ensure that at least the default recommendations are met.
Audit:
Run the following commands and ensure output matches either " targeted " or " mls ":
SELINUXTYPE=targeted
Remediation:
SELINUXTYPE=targeted
99 | P a g e
CIS Controls:
Version 7
100 | P a g e
1.6.1.4 Ensure the SELinux mode is enforcing or permissive (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
Note: you can set individual domains to permissive mode while the system runs in enforcing
mode. For example, to make the httpd_t domain permissive:
Rationale:
Running SELinux in disabled mode is strongly discouraged; not only does the system avoid
enforcing the SELinux policy, it also avoids labeling any persistent objects such as files,
making it difficult to enable SELinux in the future.
Audit:
# getenforce
Enforcing
-OR-
Permissive
101 | P a g e
# grep -Ei '^\s*SELINUX=(enforcing|permissive)' /etc/selinux/config
SELINUX=enforcing
-OR-
SELINUX=permissive
Remediation:
# setenforce 1
OR
To set SELinux mode to Permissive:
# setenforce 0
SELINUX=enforcing
OR
For Permissive mode:
SELINUX=permissive
References:
1. https://access.redhat.com/documentation/en-
us/red_hat_enterprise_linux/7/html/selinux_users_and_administrators_guide/sect-
security-enhanced_linux-introduction-selinux_modes
CIS Controls:
Version 7
102 | P a g e
1.6.1.5 Ensure the SELinux mode is enforcing (Automated)
Profile Applicability:
Level 2 - Server
Level 2 - Workstation
Description:
Note: you can set individual domains to permissive mode while the system runs in enforcing
mode. For example, to make the httpd_t domain permissive:
Rationale:
Running SELinux in disabled mode the system not only avoids enforcing the SELinux policy,
it also avoids labeling any persistent objects such as files, making it difficult to enable
SELinux in the future.
Running SELinux in Permissive mode, though helpful for developing SELinux policy, only
logs access denial entries, but does not deny any operations.
Impact:
SELinux in enforcing mode may interfere with the operation of some software
103 | P a g e
Audit:
# getenforce
Enforcing
SELINUX=enforcing
Remediation:
# setenforce 1
SELINUX=enforcing
Default Value:
SELINUX=enforcing
References:
1. https://access.redhat.com/documentation/en-
us/red_hat_enterprise_linux/7/html/selinux_users_and_administrators_guide/sect-
security-enhanced_linux-introduction-selinux_modes
CIS Controls:
Version 7
104 | P a g e
1.6.1.6 Ensure no unconfined daemons exist (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
Note: Occasionally certain daemons such as backup or centralized management software may
require running unconfined. Any such software should be carefully analyzed and documented
before such an exception is made.
Rationale:
For unconfined processes, SELinux policy rules are applied, but policy rules exist that allow
processes running in unconfined domains almost all access. Processes running in
unconfined domains fall back to using DAC rules exclusively. If an unconfined process is
compromised, SELinux does not prevent an attacker from gaining access to system
resources and data, but of course, DAC rules are still used. SELinux is a security
enhancement on top of DAC rules – it does not replace them
Audit:
Remediation:
Investigate any unconfined processes found during the audit action. They may need to have
an existing security context assigned to them or a policy built for them.
CIS Controls:
Version 7
9.2 Ensure Only Approved Ports, Protocols and Services Are Running
Ensure that only network ports, protocols, and services listening on a system with
validated business needs, are running on each system.
105 | P a g e
1.6.1.7 Ensure SETroubleshoot is not installed (Automated)
Profile Applicability:
Level 1 - Server
Description:
The SETroubleshoot service notifies desktop users of SELinux denials through a user-
friendly interface. The service provides important information around configuration errors,
unauthorized intrusions, and other potential errors.
Rationale:
Audit:
# rpm -q setroubleshoot
Remediation:
CIS Controls:
Version 7
106 | P a g e
1.6.1.8 Ensure the MCS Translation Service (mcstrans) is not installed
(Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
The mcstransd daemon provides category label information to client processes requesting
information. The label translations are defined in /etc/selinux/targeted/setrans.conf
Rationale:
Since this service is not used very often, remove it to reduce the amount of potentially
vulnerable code running on the system.
Audit:
# rpm -q mcstrans
Remediation:
CIS Controls:
Version 7
9.2 Ensure Only Approved Ports, Protocols and Services Are Running
Ensure that only network ports, protocols, and services listening on a system with
validated business needs, are running on each system.
107 | P a g e
1.7 Command Line Warning Banners
The /etc/motd, /etc/issue, and /etc/issue.net files govern warning banners for
standard command line logins for both local and remote users.
108 | P a g e
1.7.1 Ensure message of the day is configured properly (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
The contents of the /etc/motd file are displayed to users after login and function as a
message of the day for authenticated users.
Unix-based systems have typically displayed information about the OS release and patch
level upon logging in to the system. This information can be useful to developers who are
developing software for a particular OS platform. If mingetty(8) supports the following
options, they display operating system information: \m - machine architecture \r -
operating system release \s - operating system name \v - operating system version
Rationale:
Warning messages inform users who are attempting to login to the system of their legal
status regarding the system and must include the name of the organization that owns the
system and any monitoring policies that are in place. Displaying OS and patch level
information in login banners also has the side effect of providing detailed system
information to attackers attempting to target specific exploits of a system. Authorized users
can easily get this information by running the " uname -a " command once they have logged
in.
Audit:
Run the following command and verify that the contents match site policy:
# cat /etc/motd
109 | P a g e
Remediation:
Edit the /etc/motd file with the appropriate contents according to your site policy, remove
any instances of \m , \r , \s , \v or references to the OS platform
OR
If the motd is not used, this file can be removed.
Run the following command to remove the motd file:
# rm /etc/motd
CIS Controls:
Version 7
110 | P a g e
1.7.2 Ensure local login warning banner is configured properly
(Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
The contents of the /etc/issue file are displayed to users prior to login for local terminals.
Unix-based systems have typically displayed information about the OS release and patch
level upon logging in to the system. This information can be useful to developers who are
developing software for a particular OS platform. If mingetty(8) supports the following
options, they display operating system information: \m - machine architecture \r -
operating system release \s - operating system name \v - operating system version - or the
operating system's name
Rationale:
Warning messages inform users who are attempting to login to the system of their legal
status regarding the system and must include the name of the organization that owns the
system and any monitoring policies that are in place. Displaying OS and patch level
information in login banners also has the side effect of providing detailed system
information to attackers attempting to target specific exploits of a system. Authorized users
can easily get this information by running the " uname -a " command once they have logged
in.
Audit:
Run the following command and verify that the contents match site policy:
# cat /etc/issue
111 | P a g e
Remediation:
Edit the /etc/issue file with the appropriate contents according to your site policy,
remove any instances of \m , \r , \s , \v or references to the OS platform
# echo "Authorized uses only. All activity may be monitored and reported." >
/etc/issue
CIS Controls:
Version 7
112 | P a g e
1.7.3 Ensure remote login warning banner is configured properly
(Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
The contents of the /etc/issue.net file are displayed to users prior to login for remote
connections from configured services.
Unix-based systems have typically displayed information about the OS release and patch
level upon logging in to the system. This information can be useful to developers who are
developing software for a particular OS platform. If mingetty(8) supports the following
options, they display operating system information: \m - machine architecture \r -
operating system release \s - operating system name \v - operating system version
Rationale:
Warning messages inform users who are attempting to login to the system of their legal
status regarding the system and must include the name of the organization that owns the
system and any monitoring policies that are in place. Displaying OS and patch level
information in login banners also has the side effect of providing detailed system
information to attackers attempting to target specific exploits of a system. Authorized users
can easily get this information by running the " uname -a " command once they have logged
in.
Audit:
Run the following command and verify that the contents match site policy:
# cat /etc/issue.net
113 | P a g e
Remediation:
Edit the /etc/issue.net file with the appropriate contents according to your site policy,
remove any instances of \m , \r , \s , \v or references to the OS platform
# echo "Authorized uses only. All activity may be monitored and reported." >
/etc/issue.net
CIS Controls:
Version 7
114 | P a g e
1.7.4 Ensure permissions on /etc/motd are configured (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
The contents of the /etc/motd file are displayed to users after login and function as a
message of the day for authenticated users.
Rationale:
If the /etc/motd file does not have the correct ownership it could be modified by
unauthorized users with incorrect or misleading information.
Audit:
Run the following command and verify Uid and Gid are both 0/root and Access is 644 :
# stat /etc/motd
Remediation:
CIS Controls:
Version 7
115 | P a g e
1.7.5 Ensure permissions on /etc/issue are configured (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
The contents of the /etc/issue file are displayed to users prior to login for local terminals.
Rationale:
If the /etc/issue file does not have the correct ownership it could be modified by
unauthorized users with incorrect or misleading information.
Audit:
Run the following command and verify Uid and Gid are both 0/root and Access is 644 :
# stat /etc/issue
Remediation:
CIS Controls:
Version 7
116 | P a g e
1.7.6 Ensure permissions on /etc/issue.net are configured (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
The contents of the /etc/issue.net file are displayed to users prior to login for remote
connections from configured services.
Rationale:
If the /etc/issue.net file does not have the correct ownership it could be modified by
unauthorized users with incorrect or misleading information.
Audit:
Run the following command and verify Uid and Gid are both 0/root and Access is 644 :
# stat /etc/issue.net
Remediation:
CIS Controls:
Version 7
117 | P a g e
1.8 GNOME Display Manager
The GNOME Display Manager (GDM) is a program that manages graphical display servers
and handles graphical user logins.
The system will need to be re-booted, or brought down to run level 3 and back to run level
5 for changes to the GDM configuration to take effect.
Note: If GDM is not installed on the system, this section can be skipped
118 | P a g e
1.8.1 Ensure GNOME Display Manager is removed (Manual)
Profile Applicability:
Level 2 - Server
Description:
The GNOME Display Manager (GDM) is a program that manages graphical display servers
and handles graphical user logins.
Rationale:
If a Graphical User Interface (GUI) is not required, it should be removed to reduce the
attack surface of the system.
Impact:
Removing the GNOME Display manager will remove the GUI from the system.
Audit:
# rpm -q gdm
Remediation:
References:
1. https://wiki.gnome.org/Projects/GDM
CIS Controls:
Version 7
119 | P a g e
1.8.2 Ensure GDM login banner is configured (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
GDM is the GNOME Display Manager which handles graphical login for GNOME based
systems.
Rationale:
Warning messages inform users who are attempting to login to the system of their legal
status regarding the system and must include the name of the organization that owns the
system and any monitoring policies that are in place.
Notes:
If a graphical login is not required, it should be removed to reduce the attack surface
of the system.
Additional options and sections may appear in the /etc/dconf/db/gdm.d/01-banner-
message file.
If a different GUI login service is in use and required on the system, consult your
documentation to disable displaying the last logged on user and apply an equivalent
banner.
Audit:
user-db:user
system-db:gdm
file-db:/usr/share/gdm/greeter-dconf-defaults
Verify that a file exists in /etc/dconf/db/gdm.d/ and includes the following: (This is
typically /etc/dconf/db/gdm.d/01-banner-message)
[org/gnome/login-screen]
banner-message-enable=true
banner-message-text='<banner message>'
120 | P a g e
Remediation:
user-db:user
system-db:gdm
file-db:/usr/share/gdm/greeter-dconf-defaults
Edit or create the file /etc/dconf/db/gdm.d/ and add the following: (This is typically
/etc/dconf/db/gdm.d/01-banner-message)
[org/gnome/login-screen]
banner-message-enable=true
banner-message-text='<banner message>'
Example Banner Text: 'Authorized users only. All activity may be monitored and reported.'
Run the following command to update the system databases:
# dconf update
CIS Controls:
Version 7
121 | P a g e
1.8.3 Ensure last logged in user display is disabled (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
GDM is the GNOME Display Manager which handles graphical login for GNOME based
systems.
Rationale:
Displaying the last logged in user eliminates half of the Userid/Password equation that an
unauthorized person would need to log on.
Warning messages inform users who are attempting to login to the system of their legal
status regarding the system and must include the name of the organization that owns the
system and any monitoring policies that are in place.
Notes:
If a graphical login is not required, it should be removed to reduce the attack surface
of the system.
If a different GUI login service is in use and required on the system, consult your
documentation to disable displaying the last logged on user
Audit:
user-db:user
system-db:gdm
file-db:/usr/share/gdm/greeter-dconf-defaults
Verify that a file exists in /etc/dconf/db/gdm.d/ and includes the following: (This is
typically /etc/dconf/db/gdm.d/00-login-screen)
[org/gnome/login-screen]
disable-user-list=true
122 | P a g e
Remediation:
user-db:user
system-db:gdm
file-db:/usr/share/gdm/greeter-dconf-defaults
Edit or create the file /etc/dconf/db/gdm.d/ and add the following: (This is typically
/etc/dconf/db/gdm.d/00-login-screen)
[org/gnome/login-screen]
# Do not show the user list
disable-user-list=true
# dconf update
CIS Controls:
Version 7
123 | P a g e
1.8.4 Ensure XDCMP is not enabled (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
Rationale:
XDMCP is not a ciphered protocol. This may allow an attacker to capture keystrokes
entered by a user
XDMCP is vulnerable to man-in-the-middle attacks. This may allow an attacker to
steal the credentials of legitimate users by impersonating the XDMCP server.
Audit:
Remediation:
Enable=true
Default Value:
References:
1. https://help.gnome.org/admin/gdm/2.32/configuration.html.en
124 | P a g e
CIS Controls:
Version 7
9.2 Ensure Only Approved Ports, Protocols and Services Are Running
Ensure that only network ports, protocols, and services listening on a system with
validated business needs, are running on each system.
125 | P a g e
1.9 Ensure updates, patches, and additional security software are
installed (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
Periodically patches are released for included software either due to security flaws or to
include additional functionality.
Rationale:
Newer patches may contain security enhancements that would not be available through the
latest full update. As a result, it is recommended that the latest software patches be used to
take advantage of the latest functionality. As with any software installation, organizations
need to determine if a given update meets their requirements and verify the compatibility
and supportability of any additional software against the update revision that is selected.
Audit:
Run the following command and verify there are no updates or patches to install:
Remediation:
Use your package manager to update all packages on the system according to site policy.
The following command will install all available security updates:
Additional Information:
Site policy may mandate a testing period before install onto production systems for
available updates.
The audit and remediation here only cover security updates. Non-security updates can be
audited with and comparing against site policy:
# yum check-update
126 | P a g e
CIS Controls:
Version 7
127 | P a g e
2 Services
While applying system updates and patches helps correct known vulnerabilities, one of the
best ways to protect the system against as yet unreported vulnerabilities is to disable all
services that are not required for normal system operation. This prevents the exploitation
of vulnerabilities discovered at a later date. If a service is not enabled, it cannot be
exploited. The actions in this section of the document provide guidance on some services
which can be safely disabled and under which circumstances, greatly reducing the number
of possible threats to the resulting system. Additionally some services which should remain
enabled but with secure configuration are covered as well as insecure service clients.
128 | P a g e
2.1 inetd Services
inetd is a super-server daemon that provides internet services and passes connections to
configured services. While not commonly used inetd and any unneeded inetd based
services should be disabled if possible.
129 | P a g e
2.1.1 Ensure chargen services are not enabled (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
chargen is a network service that responds with 0 to 512 ASCII characters for each
connection it receives. This service is intended for debugging and testing purposes. It is
recommended that this service be disabled.
Rationale:
Disabling this service will reduce the remote attack surface of the system.
Audit:
Run the following command and verify chargen-dgram and chargen-stream are off or
missing:
Remediation:
CIS Controls:
Version 7
9.2 Ensure Only Approved Ports, Protocols and Services Are Running
Ensure that only network ports, protocols, and services listening on a system with
validated business needs, are running on each system.
130 | P a g e
2.1.2 Ensure daytime services are not enabled (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
daytime is a network service that responds with the server's current date and time. This
service is intended for debugging and testing purposes. It is recommended that this service
be disabled.
Rationale:
Disabling this service will reduce the remote attack surface of the system.
Audit:
Run the following command and verify daytime-dgram and daytime-stream are off or
missing:
# chkconfig --list
Remediation:
Run the following commands to disable daytime -dgram and daytime -stream:
CIS Controls:
Version 7
9.2 Ensure Only Approved Ports, Protocols and Services Are Running
Ensure that only network ports, protocols, and services listening on a system with
validated business needs, are running on each system.
131 | P a g e
2.1.3 Ensure discard services are not enabled (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
discard is a network service that simply discards all data it receives. This service is
intended for debugging and testing purposes. It is recommended that this service be
disabled.
Rationale:
Disabling this service will reduce the remote attack surface of the system.
Audit:
Run the following command and verify discard-dgram and discard-stream are off or
missing:
# chkconfig --list
Remediation:
Run the following commands to disable discard -dgram and discard -stream:
CIS Controls:
Version 7
9.2 Ensure Only Approved Ports, Protocols and Services Are Running
Ensure that only network ports, protocols, and services listening on a system with
validated business needs, are running on each system.
132 | P a g e
2.1.4 Ensure echo services are not enabled (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
echo is a network service that responds to clients with the data sent to it by the client. This
service is intended for debugging and testing purposes. It is recommended that this service
be disabled.
Rationale:
Disabling this service will reduce the remote attack surface of the system.
Audit:
Run the following command and verify echo-dgram and echo-stream are off or missing:
# chkconfig --list
Remediation:
Run the following commands to disable echo -dgram and echo -stream:
CIS Controls:
Version 7
9.2 Ensure Only Approved Ports, Protocols and Services Are Running
Ensure that only network ports, protocols, and services listening on a system with
validated business needs, are running on each system.
133 | P a g e
2.1.5 Ensure time services are not enabled (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
time is a network service that responds with the server's current date and time as a 32 bit
integer. This service is intended for debugging and testing purposes. It is recommended
that this service be disabled.
Rationale:
Disabling this service will reduce the remote attack surface of the system.
Audit:
Run the following command and verify time-dgram and time-stream are off or missing:
# chkconfig --list
Remediation:
Run the following commands to disable time -dgram and time -stream:
CIS Controls:
Version 7
9.2 Ensure Only Approved Ports, Protocols and Services Are Running
Ensure that only network ports, protocols, and services listening on a system with
validated business needs, are running on each system.
134 | P a g e
2.1.6 Ensure rsh server is not enabled (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
The Berkeley rsh-server ( rsh , rlogin , rexec ) package contains legacy services that
exchange credentials in clear-text.
Rationale:
These legacy services contain numerous security exposures and have been replaced with
the more secure SSH package.
Audit:
Run the following command and verify rsh , rlogin , and rexec are off or missing:
# chkconfig --list
Remediation:
135 | P a g e
CIS Controls:
Version 7
9.2 Ensure Only Approved Ports, Protocols and Services Are Running
Ensure that only network ports, protocols, and services listening on a system with
validated business needs, are running on each system.
136 | P a g e
2.1.7 Ensure talk server is not enabled (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
The talk software makes it possible for users to send and receive messages across systems
through a terminal session. The talk client (allows initiate of talk sessions) is installed by
default.
Rationale:
The software presents a security risk as it uses unencrypted protocols for communication.
Audit:
# chkconfig --list
Remediation:
CIS Controls:
Version 7
9.2 Ensure Only Approved Ports, Protocols and Services Are Running
Ensure that only network ports, protocols, and services listening on a system with
validated business needs, are running on each system.
137 | P a g e
2.1.8 Ensure tftp server is not enabled (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
Trivial File Transfer Protocol (TFTP) is a simple file transfer protocol, typically used to
automatically transfer configuration or boot machines from a boot server. The package
tftp-server is used to define and support a TFTP server.
Rationale:
TFTP does not support authentication nor does it ensure the confidentiality or integrity of
data. It is recommended that TFTP be removed, unless there is a specific need for TFTP. In
that case, extreme caution must be used when configuring the services.
Audit:
# chkconfig --list
Remediation:
CIS Controls:
Version 7
9.2 Ensure Only Approved Ports, Protocols and Services Are Running
Ensure that only network ports, protocols, and services listening on a system with
validated business needs, are running on each system.
138 | P a g e
2.1.9 Ensure rsync service is not enabled (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
The rsyncd service can be used to synchronize files between systems over network links.
Rationale:
The rsyncd service presents a security risk as it uses unencrypted protocols for
communication.
Audit:
# chkconfig --list
Remediation:
CIS Controls:
Version 7
9.2 Ensure Only Approved Ports, Protocols and Services Are Running
Ensure that only network ports, protocols, and services listening on a system with
validated business needs, are running on each system.
139 | P a g e
2.1.10 Ensure xinetd is not enabled (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
The eXtended InterNET Daemon ( xinetd ) is an open source super daemon that replaced
the original inetd daemon. The xinetd daemon listens for well known services and
dispatches the appropriate daemon to properly respond to service requests.
Rationale:
If there are no xinetd services required, it is recommended that the daemon be disabled.
Audit:
Run the following command and verify all runlevels are listed as "off" or xinetd is not
available:
Remediation:
CIS Controls:
Version 7
9.2 Ensure Only Approved Ports, Protocols and Services Are Running
Ensure that only network ports, protocols, and services listening on a system with
validated business needs, are running on each system.
140 | P a g e
2.2 Special Purpose Services
This section describes services that are installed on systems that specifically need to run
these services. If any of these services are not required, it is recommended that the package
be removed, or the service be disabled to reduce the potential attack surface.
141 | P a g e
2.2.1 Time Synchronization
It is recommended that physical systems and virtual guests lacking direct access to the
physical host's clock be configured to synchronize their time using a service such as NTP or
chrony.
142 | P a g e
2.2.1.1 Ensure time synchronization is in use (Manual)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
Rationale:
Notes:
On systems where host based time synchronization is not available, verify that chrony
or NTP is installed.
On systems where host based time synchronization is available consult your
documentation and verify that host based synchronization is in use.
If another method for time synchronization is being used, this section may be skipped.
Only one time synchronization package should be installed
Audit:
Run the following commands to verify that a time synchronization packages is installed:
# rpm -q chrony
chrony-<version>
# rpm -q ntp
ntp-<version>
143 | P a g e
Remediation:
OR
To install ntp:
Run the following command:
Note: On systems where host based time synchronization is available consult your
virtualization software documentation and setup host based synchronization.
CIS Controls:
Version 7
144 | P a g e
2.2.1.2 Ensure chrony is configured (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
chrony is a daemon which implements the Network Time Protocol (NTP) and is designed to
synchronize system clocks across a variety of systems and use a source that is highly
accurate. More information on chrony can be found at http://chrony.tuxfamily.org/. chrony
can be configured to be a client and/or a server.
Rationale:
Audit:
server <remote-server>
OPTIONS="-u chrony"
145 | P a g e
Remediation:
server <remote-server>
OPTIONS="-u chrony"
CIS Controls:
Version 7
146 | P a g e
2.2.1.3 Ensure ntp is configured (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
ntp is a daemon which implements the Network Time Protocol (NTP). It is designed to
synchronize system clocks across a variety of systems and use a source that is highly
accurate. More information on NTP can be found at http://www.ntp.org. ntp can be
configured to be a client and/or a server.
Rationale:
If ntp is in use on the system proper configuration is vital to ensuring time synchronization
is working properly.
Audit:
The -4 in the first line is optional and options after default can appear in any order.
Additional restriction lines may exist.
Run the following command and verify remote server is configured properly:
server <remote-server>
OPTIONS="-u ntp:ntp"
147 | P a g e
Additional options may be present.
Remediation:
server <remote-server>
OPTIONS="-u ntp:ntp"
CIS Controls:
Version 7
148 | P a g e
2.2.2 Ensure X11 Server components are not installed (Automated)
Profile Applicability:
Level 1 - Server
Description:
The X Window System provides a Graphical User Interface (GUI) where users can have
multiple windows in which to run programs and various add on. The X Windows system is
typically used on workstations where users login, but not on servers where users typically
do not login.
Rationale:
Unless your organization specifically requires graphical login access via X Windows,
remove it to reduce the potential attack surface.
Impact:
Many Linux systems run applications which require a Java runtime. Some Linux Java
packages have a dependency on specific X Windows xorg-x11-fonts. One workaround to
avoid this dependency is to use the "headless" Java packages for your specific Java runtime.
Audit:
Remediation:
CIS Controls:
Version 7
149 | P a g e
2.2.3 Ensure Avahi Server is not installed (Automated)
Profile Applicability:
Level 1 - Server
Level 2 - Workstation
Description:
Rationale:
Automatic discovery of network services is not normally required for system functionality.
It is recommended to remove this package to reduce the potential attack surface.
Audit:
# rpm -q avahi
Remediation:
CIS Controls:
Version 7
9.2 Ensure Only Approved Ports, Protocols and Services Are Running
Ensure that only network ports, protocols, and services listening on a system with
validated business needs, are running on each system.
150 | P a g e
2.2.4 Ensure CUPS is not installed (Automated)
Profile Applicability:
Level 1 - Server
Description:
The Common Unix Print System (CUPS) provides the ability to print to both local and
network printers. A system running CUPS can also accept print jobs from remote systems
and print them to local printers. It also provides a web based remote administration
capability.
Rationale:
If the system does not need to print jobs or accept print jobs from other systems, it is
recommended that CUPS be removed to reduce the potential attack surface.
Impact:
Disabling CUPS will prevent printing from the system, a common task for workstation
systems.
Audit:
# rpm -q cups
Remediation:
References:
151 | P a g e
CIS Controls:
Version 7
9.2 Ensure Only Approved Ports, Protocols and Services Are Running
Ensure that only network ports, protocols, and services listening on a system with
validated business needs, are running on each system.
152 | P a g e
2.2.5 Ensure DHCP Server is not installed (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
The Dynamic Host Configuration Protocol (DHCP) is a service that allows machines to be
dynamically assigned IP addresses.
Rationale:
Unless a system is specifically set up to act as a DHCP server, it is recommended that the
dhcp package be removed to reduce the potential attack surface.
Audit:
# rpm -q dhcp
Remediation:
References:
1. dhcpd(8)
CIS Controls:
Version 7
9.2 Ensure Only Approved Ports, Protocols and Services Are Running
Ensure that only network ports, protocols, and services listening on a system with
validated business needs, are running on each system.
153 | P a g e
2.2.6 Ensure LDAP server is not installed (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
The Lightweight Directory Access Protocol (LDAP) was introduced as a replacement for
NIS/YP. It is a service that provides a method for looking up information from a central
database.
Rationale:
If the system will not need to act as an LDAP server, it is recommended that the software be
removed to reduce the potential attack surface.
Audit:
# rpm -q openldap-servers
Remediation:
References:
CIS Controls:
Version 7
9.2 Ensure Only Approved Ports, Protocols and Services Are Running
Ensure that only network ports, protocols, and services listening on a system with
validated business needs, are running on each system.
154 | P a g e
2.2.7 Ensure DNS Server is not installed (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
The Domain Name System (DNS) is a hierarchical naming system that maps names to IP
addresses for computers, services and other resources connected to a network.
Rationale:
Unless a system is specifically designated to act as a DNS server, it is recommended that the
package be removed to reduce the potential attack surface.
Audit:
# rpm -q bind
Remediation:
CIS Controls:
Version 7
9.2 Ensure Only Approved Ports, Protocols and Services Are Running
Ensure that only network ports, protocols, and services listening on a system with
validated business needs, are running on each system.
155 | P a g e
2.2.8 Ensure FTP Server is not installed (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
FTP (File Transfer Protocol) is a traditional and widely used standard tool for transferring
files between a server and clients over a network, especially where no authentication is
necessary (permits anonymous users to connect to a server).
Rationale:
Note: Additional FTP servers also exist and should be removed if not required.
Audit:
# rpm -q vsftpd
Remediation:
CIS Controls:
Version 7
9.2 Ensure Only Approved Ports, Protocols and Services Are Running
Ensure that only network ports, protocols, and services listening on a system with
validated business needs, are running on each system.
156 | P a g e
2.2.9 Ensure HTTP server is not installed (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
HTTP or web servers provide the ability to host web site content.
Rationale:
Unless there is a need to run the system as a web server, it is recommended that the
package be removed to reduce the potential attack surface.
Notes:
Several http servers exist. apache, apache2, lighttpd, and nginx are example
packages that provide an HTTP server.
These and other packages should also be audited, and removed if not required.
Audit:
# rpm -q httpd
Remediation:
CIS Controls:
Version 7
9.2 Ensure Only Approved Ports, Protocols and Services Are Running
Ensure that only network ports, protocols, and services listening on a system with
validated business needs, are running on each system.
157 | P a g e
2.2.10 Ensure IMAP and POP3 server is not installed (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
dovecot is an open source IMAP and POP3 server for Linux based systems.
Rationale:
Unless POP3 and/or IMAP servers are to be provided by this system, it is recommended
that the package be removed to reduce the potential attack surface.
Notes:
Several IMAP/POP3 servers exist and can use other service names. courier-imap and
cyrus-imap are example services that provide a mail server.
These and other services should also be audited and the packages removed if not
required.
Audit:
# rpm -q dovecot
Remediation:
CIS Controls:
Version 7
9.2 Ensure Only Approved Ports, Protocols and Services Are Running
Ensure that only network ports, protocols, and services listening on a system with
validated business needs, are running on each system.
158 | P a g e
2.2.11 Ensure Samba is not installed (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
The Samba daemon allows system administrators to configure their Linux systems to share
file systems and directories with Windows desktops. Samba will advertise the file systems
and directories via the Server Message Block (SMB) protocol. Windows desktop users will
be able to mount these directories and file systems as letter drives on their systems.
Rationale:
If there is no need to mount directories and file systems to Windows systems, then this
package can be removed to reduce the potential attack surface.
Audit:
# rpm -q samba
Remediation:
CIS Controls:
Version 7
9.2 Ensure Only Approved Ports, Protocols and Services Are Running
Ensure that only network ports, protocols, and services listening on a system with
validated business needs, are running on each system.
159 | P a g e
2.2.12 Ensure HTTP Proxy Server is not installed (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
Rationale:
Unless a system is specifically set up to act as a proxy server, it is recommended that the
squid package be removed to reduce the potential attack surface.
Note: Several HTTP proxy servers exist. These should be checked and removed unless required.
Audit:
# rpm -q squid
Remediation:
CIS Controls:
Version 7
9.2 Ensure Only Approved Ports, Protocols and Services Are Running
Ensure that only network ports, protocols, and services listening on a system with
validated business needs, are running on each system.
160 | P a g e
2.2.13 Ensure net-snmp is not installed (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
Simple Network Management Protocol (SNMP) is a widely used protocol for monitoring the
health and welfare of network equipment, computer equipment and devices like UPSs.
Net-SNMP is a suite of applications used to implement SNMPv1 (RFC 1157), SNMPv2 (RFCs
1901-1908), and SNMPv3 (RFCs 3411-3418) using both IPv4 and IPv6.
Support for SNMPv2 classic (a.k.a. "SNMPv2 historic" - RFCs 1441-1452) was dropped with
the 4.0 release of the UCD-snmp package.
The Simple Network Management Protocol (SNMP) server is used to listen for SNMP
commands from an SNMP management system, execute the commands or collect the
information and then send results back to the requesting system.
Rationale:
The SNMP server can communicate using SNMPv1, which transmits data in the clear and
does not require authentication to execute commands. SNMPv3 replaces the simple/clear
text password sharing used in SNMPv2 with more securely encoded parameters. If the the
SNMP service is not required, the net-snmp package should be removed to reduce the
attack surface of the system.
The server should be configured for SNMP v3 only. User Authentication and Message
Encryption should be configured.
If SNMP v2 is absolutely necessary, modify the community strings' values.
Audit:
# rpm -q net-snmp
161 | P a g e
Remediation:
CIS Controls:
Version 7
9.2 Ensure Only Approved Ports, Protocols and Services Are Running
Ensure that only network ports, protocols, and services listening on a system with
validated business needs, are running on each system.
162 | P a g e
2.2.14 Ensure NIS server is not installed (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
The ypserv package provides the Network Information Service (NIS). This service, formally
known as Yellow Pages, is a client-server directory service protocol for distributing system
configuration files. The NIS server is a collection of programs that allow for the distribution
of configuration files.
Rationale:
The NIS service is inherently an insecure system that has been vulnerable to DOS attacks,
buffer overflows and has poor authentication for querying NIS maps. NIS generally has
been replaced by such protocols as Lightweight Directory Access Protocol (LDAP). It is
recommended that the ypserv package be removed, and if required a more secure services
be used.
Audit:
# rpm -q ypserv
Remediation:
163 | P a g e
CIS Controls:
Version 7
9.2 Ensure Only Approved Ports, Protocols and Services Are Running
Ensure that only network ports, protocols, and services listening on a system with
validated business needs, are running on each system.
164 | P a g e
2.2.15 Ensure telnet-server is not installed (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
The telnet-server package contains the telnet daemon, which accepts connections from
users from other systems via the telnet protocol.
Rationale:
The telnet protocol is insecure and unencrypted. The use of an unencrypted transmission
medium could allow a user with access to sniff network traffic the ability to steal
credentials. The ssh package provides an encrypted session and stronger security.
Audit:
Run the following command to verify the telnet-server package is not installed:
rpm -q telnet-server
Remediation:
CIS Controls:
Version 7
9.2 Ensure Only Approved Ports, Protocols and Services Are Running
Ensure that only network ports, protocols, and services listening on a system with
validated business needs, are running on each system.
165 | P a g e
2.2.16 Ensure nfs-utils is not installed or the nfs-server service is
disabled (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
The Network File System (NFS) is one of the first and most widely distributed file systems
in the UNIX environment. It provides the ability for systems to mount file systems of other
servers through the network.
Rationale:
If the system does not require network shares, it is recommended that the nfs-utils package
be removed to reduce the attack surface of the system.
Note: many of the libvirt packages used by Enterprise Linux virtualization are dependent on
the nfs-utils package. If the nfs-package is required as a dependency, the nfs-server should be
disabled and masked to reduce the attack surface of the system.
Audit:
# rpm -q nfs-utils
OR
If the nfs-package is required as a dependency:
Run the following command to verify that the nfs-server service is disabled:
166 | P a g e
Remediation:
CIS Controls:
Version 7
9.2 Ensure Only Approved Ports, Protocols and Services Are Running
Ensure that only network ports, protocols, and services listening on a system with
validated business needs, are running on each system.
167 | P a g e
2.2.17 Ensure rpcbind is not installed or the rpcbind service is disabled
(Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
The rpcbind utility maps RPC services to the ports on which they listen. RPC processes
notify rpcbind when they start, registering the ports they are listening on and the RPC
program numbers they expect to serve. The client system then contacts rpcbind on the
server with a particular RPC program number. The rpcbind service redirects the client to
the proper port number so it can communicate with the requested service
Portmapper is an RPC service, which always listens on tcp and udp 111, and is used to map
other RPC services (such as nfs, nlockmgr, quotad, mountd, etc.) to their corresponding
port number on the server. When a remote host makes an RPC call to that server, it first
consults with portmap to determine where the RPC server is listening.
Rationale:
A small request (~82 bytes via UDP) sent to the Portmapper generates a large response (7x
to 28x amplification), which makes it a suitable tool for DDoS attacks. If rpcbind is not
required, it is recommended that the rpcbind package be removed to reduce the attack
surface of the system.
Audit:
# rpm -q rpcbind
OR
If the rpcbind package is required as a dependency:
Run the following commands to verify that rpcbind is disabled:
168 | P a g e
Remediation:
CIS Controls:
Version 7
9.2 Ensure Only Approved Ports, Protocols and Services Are Running
Ensure that only network ports, protocols, and services listening on a system with
validated business needs, are running on each system.
169 | P a g e
2.2.18 Ensure mail transfer agent is configured for local-only mode
(Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
Mail Transfer Agents (MTA), such as sendmail and Postfix, are used to listen for incoming
mail and transfer the messages to the appropriate user or mail server. If the system is not
intended to be a mail server, it is recommended that the MTA be configured to only process
local mail.
Rationale:
The software for all Mail Transfer Agents is complex and most have a long history of
security issues. While it is important to ensure that the system can process local mail
messages, it is not necessary to have the MTA's daemon listening on a port unless the
server is intended to be a mail server that receives and processes mail from other systems.
Notes:
Audit:
Run the following command to verify that the MTA is not listening on any non-loopback
address ( 127.0.0.1 or ::1 )
Nothing should be returned
170 | P a g e
Remediation:
Edit /etc/postfix/main.cf and add the following line to the RECEIVING MAIL section. If
the line already exists, change it to look like the line below:
inet_interfaces = loopback-only
CIS Controls:
Version 7
9.2 Ensure Only Approved Ports, Protocols and Services Are Running
Ensure that only network ports, protocols, and services listening on a system with
validated business needs, are running on each system.
171 | P a g e
2.3 Service Clients
A number of insecure services exist. While disabling the servers prevents a local attack
against these services, it is advised to remove their clients unless they are required.
Note: This should not be considered a comprehensive list of insecure service clients. You may
wish to consider additions to those listed here for your environment.
172 | P a g e
2.3.1 Ensure NIS Client is not installed (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
The Network Information Service (NIS), formerly known as Yellow Pages, is a client-server
directory service protocol used to distribute system configuration files. The NIS client (
ypbind ) was used to bind a machine to an NIS server and receive the distributed
configuration files.
Rationale:
The NIS service is inherently an insecure system that has been vulnerable to DOS attacks,
buffer overflows and has poor authentication for querying NIS maps. NIS generally has
been replaced by such protocols as Lightweight Directory Access Protocol (LDAP). It is
recommended that the service be removed.
Impact:
Many insecure service clients are used as troubleshooting tools and in testing
environments. Uninstalling them can inhibit capability to test and troubleshoot. If they are
required it is advisable to remove the clients after use to prevent accidental or intentional
misuse.
Audit:
Run the following command to verify that the ypbind package is not installed:
# rpm -q ypbind
Remediation:
173 | P a g e
CIS Controls:
Version 7
174 | P a g e
2.3.2 Ensure rsh client is not installed (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
The rsh package contains the client commands for the rsh services.
Rationale:
These legacy clients contain numerous security exposures and have been replaced with the
more secure SSH package. Even if the server is removed, it is best to ensure the clients are
also removed to prevent users from inadvertently attempting to use these commands and
therefore exposing their credentials. Note that removing the rsh package removes the
clients for rsh , rcp and rlogin .
Impact:
Many insecure service clients are used as troubleshooting tools and in testing
environments. Uninstalling them can inhibit capability to test and troubleshoot. If they are
required it is advisable to remove the clients after use to prevent accidental or intentional
misuse.
Audit:
Run the following command to verify that the rsh package is not installed:
# rpm -q rsh
Remediation:
175 | P a g e
CIS Controls:
Version 7
176 | P a g e
2.3.3 Ensure talk client is not installed (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
The talk software makes it possible for users to send and receive messages across systems
through a terminal session. The talk client, which allows initialization of talk sessions, is
installed by default.
Rationale:
The software presents a security risk as it uses unencrypted protocols for communication.
Impact:
Many insecure service clients are used as troubleshooting tools and in testing
environments. Uninstalling them can inhibit capability to test and troubleshoot. If they are
required it is advisable to remove the clients after use to prevent accidental or intentional
misuse.
Audit:
Run the following command to verify that the talk package is not installed:
# rpm -q talk
Remediation:
CIS Controls:
Version 7
177 | P a g e
2.3.4 Ensure telnet client is not installed (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
The telnet package contains the telnet client, which allows users to start connections to
other systems via the telnet protocol.
Rationale:
The telnet protocol is insecure and unencrypted. The use of an unencrypted transmission
medium could allow an unauthorized user to steal credentials. The ssh package provides
an encrypted session and stronger security and is included in most Linux distributions.
Impact:
Many insecure service clients are used as troubleshooting tools and in testing
environments. Uninstalling them can inhibit capability to test and troubleshoot. If they are
required it is advisable to remove the clients after use to prevent accidental or intentional
misuse.
Audit:
Run the following command to verify that the telnet package is not installed:
# rpm -q telnet
Remediation:
178 | P a g e
CIS Controls:
Version 7
179 | P a g e
2.3.5 Ensure LDAP client is not installed (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
The Lightweight Directory Access Protocol (LDAP) was introduced as a replacement for
NIS/YP. It is a service that provides a method for looking up information from a central
database.
Rationale:
If the system will not need to act as an LDAP client, it is recommended that the software be
removed to reduce the potential attack surface.
Impact:
Removing the LDAP client will prevent or inhibit using LDAP for authentication in your
environment.
Audit:
Run the following command to verify that the openldap-clients package is not installed:
# rpm -q openldap-clients
Remediation:
CIS Controls:
Version 7
180 | P a g e
3 Network Configuration
This section provides guidance on for securing the network configuration of the system
through kernel parameters, access list control, and firewall settings.
181 | P a g e
3.1 Disable unused network protocols and devices
To reduce the attack surface of a system, unused network protocols and devices should be
disabled.
182 | P a g e
3.1.1 Disable IPv6 (Manual)
Profile Applicability:
Level 2 - Server
Level 2 - Workstation
Description:
Although IPv6 has many advantages over IPv4, not all organizations have IPv6 or dual
stack configurations implemented.
Rationale:
If IPv6 or dual stack is not to be used, it is recommended that IPv6 be disabled to reduce
the attack surface of the system.
Impact:
If IPv6 is disabled through sysctl config, SSH X11forwarding may no longer function as
expected. We recommend that SSH X11fowarding be disabled, but if required, the following
will allow for SSH X11forwarding with IPv6 disabled through sysctl config:
AddressFamily inet
Audit:
Run the following commands to verify that one of the following methods has been used to
disable IPv6:
IF IPv6 is disabled through the GRUB configuration:
Run the following command and verify output:
183 | P a g e
OR
IF IPv6 is disabled through sysctl settings:
Run the following commands:
# sysctl net.ipv6.conf.all.disable_ipv6
net.ipv6.conf.all.disable_ipv6 = 1
# sysctl net.ipv6.conf.default.disable_ipv6
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
Remediation:
Use one of the two following methods to disable IPv6 on the system:
To disable IPv6 through the GRUB config:
Edit /boot/grub/grub.conf to include ipv6.disable=1 on all kernel lines:
Example:
OR
To disable IPv6 through sysctl settings:
Set the following parameters in /etc/sysctl.conf or a /etc/sysctl.d/*.conf file:
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
# sysctl -w net.ipv6.conf.all.disable_ipv6=1
# sysctl -w net.ipv6.conf.default.disable_ipv6=1
# sysctl -w net.ipv6.route.flush=1
Default Value:
None
184 | P a g e
Additional Information:
Disabling ipv6 via sysctl only disables (unhooks all of the calls) for the ipv6 module, but
doesn't prevent it from loading.
CIS Controls:
Version 7
9.2 Ensure Only Approved Ports, Protocols and Services Are Running
Ensure that only network ports, protocols, and services listening on a system with
validated business needs, are running on each system.
185 | P a g e
3.1.2 Ensure wireless interfaces are disabled (Manual)
Profile Applicability:
Level 1 - Server
Level 2 - Workstation
Description:
Rationale:
If wireless is not to be used, wireless devices should be disabled to reduce the potential
attack surface.
Impact:
Many if not all laptop workstations and some desktop workstations will connect via
wireless requiring these interfaces be enabled.
Audit:
# iw list
Run the following command and verify wireless interfaces are active:
# ip link show up
Remediation:
186 | P a g e
Version 7
187 | P a g e
3.2 Network Parameters (Host Only)
The following network parameters are intended for use if the system is to act as a host
only. A system is considered host only if the system has a single interface, or has multiple
interfaces but will not be configured as a router.
188 | P a g e
3.2.1 Ensure IP forwarding is disabled (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
Rationale:
Setting the flags to 0 ensures that a system with multiple interfaces (for example, a hard
proxy), will never be able to forward packets, and therefore, never serve as a router.
Audit:
# sysctl net.ipv4.ip_forward
net.ipv4.ip_forward = 0
IFIPv6 is enabled:
Run the following commands and verify output matches:
# sysctl net.ipv6.conf.all.forwarding
net.ipv6.conf.all.forwarding = 0
OR
Verify that IPv6 is disabled:
Run the following script. Output will confirm if IPv6 is disabled on the system.
189 | P a g e
#!/bin/bash
Remediation:
Run the following commands to restore the default parameters and set the active kernel
parameters:
CIS Controls:
Version 7
9.2 Ensure Only Approved Ports, Protocols and Services Are Running
Ensure that only network ports, protocols, and services listening on a system with
validated business needs, are running on each system.
190 | P a g e
3.2.2 Ensure packet redirect sending is disabled (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
ICMP Redirects are used to send routing information to other hosts. As a host itself does
not act as a router (in a host only configuration), there is no need to send redirects.
Rationale:
An attacker could use a compromised host to send invalid ICMP redirects to other router
devices in an attempt to corrupt routing and have users access a system set up by the
attacker as opposed to a valid system.
Audit:
# sysctl net.ipv4.conf.all.send_redirects
net.ipv4.conf.all.send_redirects = 0
# sysctl net.ipv4.conf.default.send_redirects
net.ipv4.conf.default.send_redirects = 0
net.ipv4.conf.all.send_redirects = 0
net.ipv4.conf.default.send_redirects= 0
191 | P a g e
Remediation:
net.ipv4.conf.all.send_redirects = 0
net.ipv4.conf.default.send_redirects = 0
# sysctl -w net.ipv4.conf.all.send_redirects=0
# sysctl -w net.ipv4.conf.default.send_redirects=0
# sysctl -w net.ipv4.route.flush=1
CIS Controls:
Version 7
9.2 Ensure Only Approved Ports, Protocols and Services Are Running
Ensure that only network ports, protocols, and services listening on a system with
validated business needs, are running on each system.
192 | P a g e
3.3 Network Parameters (Host and Router)
The following network parameters are intended for use on both host only and router
systems. A system acts as a router if it has at least two interfaces and is configured to
perform routing functions.
193 | P a g e
3.3.1 Ensure source routed packets are not accepted (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
In networking, source routing allows a sender to partially or fully specify the route packets
take through a network. In contrast, non-source routed packets travel a path determined
by routers in the network. In some cases, systems may not be routable or reachable from
some locations (e.g. private addresses vs. Internet routable), and so source routed packets
would need to be used.
Rationale:
Setting net.ipv4.conf.all.accept_source_route,
net.ipv4.conf.default.accept_source_route,
net.ipv6.conf.all.accept_source_route and
net.ipv6.conf.default.accept_source_route to 0 disables the system from accepting
source routed packets.
Assume this system was capable of routing packets to Internet routable addresses on one
interface and private addresses on another interface. Assume that the private addresses
were not routable to the Internet routable addresses and vice versa. Under normal routing
circumstances, an attacker from the Internet routable addresses could not use the system
as a way to reach the private address systems. If, however, source routed packets were
allowed, they could be used to gain access to the private address systems as the route could
be specified, rather than rely on routing protocols that did not allow this routing.
194 | P a g e
Audit:
# sysctl net.ipv4.conf.all.accept_source_route
net.ipv4.conf.all.accept_source_route = 0
# sysctl net.ipv4.conf.default.accept_source_route
net.ipv4.conf.default.accept_source_route = 0
net.ipv4.conf.all.accept_source_route= 0
net.ipv4.conf.default.accept_source_route= 0
IF IPv6 is enabled:
Run the following commands and verify output matches:
# sysctl net.ipv6.conf.all.accept_source_route
net.ipv6.conf.all.accept_source_route = 0
# sysctl net.ipv6.conf.default.accept_source_route
net.ipv6.conf.default.accept_source_route = 0
net.ipv4.conf.all.accept_source_route= 0
net.ipv6.conf.default.accept_source_route= 0
OR
Verify that IPv6 is disabled:
195 | P a g e
Run the following script. Output will confirm if IPv6 is disabled on the system.
#!/bin/bash
Remediation:
net.ipv4.conf.all.accept_source_route = 0
net.ipv4.conf.default.accept_source_route = 0
# sysctl -w net.ipv4.conf.all.accept_source_route=0
# sysctl -w net.ipv4.conf.default.accept_source_route=0
# sysctl -w net.ipv4.route.flush=1
net.ipv6.conf.all.accept_source_route = 0
net.ipv6.conf.default.accept_source_route = 0
# sysctl -w net.ipv6.conf.all.accept_source_route=0
# sysctl -w net.ipv6.conf.default.accept_source_route=0
# sysctl -w net.ipv6.route.flush=1
196 | P a g e
CIS Controls:
Version 7
9.2 Ensure Only Approved Ports, Protocols and Services Are Running
Ensure that only network ports, protocols, and services listening on a system with
validated business needs, are running on each system.
197 | P a g e
3.3.2 Ensure ICMP redirects are not accepted (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
ICMP redirect messages are packets that convey routing information and tell your host
(acting as a router) to send packets via an alternate path. It is a way of allowing an outside
routing device to update your system routing tables. By setting
net.ipv4.conf.all.accept_redirects and net.ipv6.conf.all.accept_redirects to 0,
the system will not accept any ICMP redirect messages, and therefore, won't allow
outsiders to update the system's routing tables.
Rationale:
Attackers could use bogus ICMP redirect messages to maliciously alter the system routing
tables and get them to send packets to incorrect networks and allow your system packets
to be captured.
Audit:
# sysctl net.ipv4.conf.all.accept_redirects
net.ipv4.conf.all.accept_redirects = 0
# sysctl net.ipv4.conf.default.accept_redirects
net.ipv4.conf.default.accept_redirects = 0
net.ipv4.conf.all.accept_redirects= 0
net.ipv4.conf.default.accept_redirects= 0
198 | P a g e
# sysctl net.ipv6.conf.all.accept_redirects
net.ipv6.conf.all.accept_redirects = 0
# sysctl net.ipv6.conf.default.accept_redirects
net.ipv6.conf.default.accept_redirects = 0
net.ipv6.conf.all.accept_redirects= 0
net.ipv6.conf.default.accept_redirects= 0
#!/bin/bash
199 | P a g e
Remediation:
net.ipv4.conf.all.accept_redirects = 0
net.ipv4.conf.default.accept_redirects = 0
# sysctl -w net.ipv4.conf.all.accept_redirects=0
# sysctl -w net.ipv4.conf.default.accept_redirects=0
# sysctl -w net.ipv4.route.flush=1
net.ipv6.conf.all.accept_redirects = 0
net.ipv6.conf.default.accept_redirects = 0
# sysctl -w net.ipv6.conf.all.accept_redirects=0
# sysctl -w net.ipv6.conf.default.accept_redirects=0
# sysctl -w net.ipv6.route.flush=1
CIS Controls:
Version 7
9.2 Ensure Only Approved Ports, Protocols and Services Are Running
Ensure that only network ports, protocols, and services listening on a system with
validated business needs, are running on each system.
200 | P a g e
3.3.3 Ensure secure ICMP redirects are not accepted (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
Secure ICMP redirects are the same as ICMP redirects, except they come from gateways
listed on the default gateway list. It is assumed that these gateways are known to your
system, and that they are likely to be secure.
Rationale:
Audit:
# sysctl net.ipv4.conf.all.secure_redirects
net.ipv4.conf.all.secure_redirects = 0
# sysctl net.ipv4.conf.default.secure_redirects
net.ipv4.conf.default.secure_redirects = 0
net.ipv4.conf.all.secure_redirects= 0
net.ipv4.conf.default.secure_redirects= 0
201 | P a g e
Remediation:
net.ipv4.conf.all.secure_redirects = 0
net.ipv4.conf.default.secure_redirects = 0
# sysctl -w net.ipv4.conf.all.secure_redirects=0
# sysctl -w net.ipv4.conf.default.secure_redirects=0
# sysctl -w net.ipv4.route.flush=1
CIS Controls:
Version 7
9.2 Ensure Only Approved Ports, Protocols and Services Are Running
Ensure that only network ports, protocols, and services listening on a system with
validated business needs, are running on each system.
202 | P a g e
3.3.4 Ensure suspicious packets are logged (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
When enabled, this feature logs packets with un-routable source addresses to the kernel
log.
Rationale:
Enabling this feature and logging these packets allows an administrator to investigate the
possibility that an attacker is sending spoofed packets to their system.
Audit:
# sysctl net.ipv4.conf.all.log_martians
net.ipv4.conf.all.log_martians = 1
# sysctl net.ipv4.conf.default.log_martians
net.ipv4.conf.default.log_martians = 1
net.ipv4.conf.all.log_martians = 1
net.ipv4.conf.default.log_martians = 1
203 | P a g e
Remediation:
net.ipv4.conf.all.log_martians = 1
net.ipv4.conf.default.log_martians = 1
# sysctl -w net.ipv4.conf.all.log_martians=1
# sysctl -w net.ipv4.conf.default.log_martians=1
# sysctl -w net.ipv4.route.flush=1
CIS Controls:
Version 7
204 | P a g e
3.3.5 Ensure broadcast ICMP requests are ignored (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
Rationale:
Accepting ICMP echo and timestamp requests with broadcast or multicast destinations for
your network could be used to trick your host into starting (or participating) in a Smurf
attack. A Smurf attack relies on an attacker sending large amounts of ICMP broadcast
messages with a spoofed source address. All hosts receiving this message and responding
would send echo-reply messages back to the spoofed address, which is probably not
routable. If many hosts respond to the packets, the amount of traffic on the network could
be significantly multiplied.
Audit:
# sysctl net.ipv4.icmp_echo_ignore_broadcasts
net.ipv4.icmp_echo_ignore_broadcasts = 1
net.ipv4.icmp_echo_ignore_broadcasts = 1
Remediation:
net.ipv4.icmp_echo_ignore_broadcasts = 1
# sysctl -w net.ipv4.icmp_echo_ignore_broadcasts=1
# sysctl -w net.ipv4.route.flush=1
205 | P a g e
CIS Controls:
Version 7
9.2 Ensure Only Approved Ports, Protocols and Services Are Running
Ensure that only network ports, protocols, and services listening on a system with
validated business needs, are running on each system.
206 | P a g e
3.3.6 Ensure bogus ICMP responses are ignored (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
Rationale:
Some routers (and some attackers) will send responses that violate RFC-1122 and attempt
to fill up a log file system with many useless error messages.
Audit:
# sysctl net.ipv4.icmp_ignore_bogus_error_responses
net.ipv4.icmp_ignore_bogus_error_responses = 1
net.ipv4.icmp_ignore_bogus_error_responses = 1
Remediation:
net.ipv4.icmp_ignore_bogus_error_responses = 1
# sysctl -w net.ipv4.icmp_ignore_bogus_error_responses=1
# sysctl -w net.ipv4.route.flush=1
207 | P a g e
CIS Controls:
Version 7
9.2 Ensure Only Approved Ports, Protocols and Services Are Running
Ensure that only network ports, protocols, and services listening on a system with
validated business needs, are running on each system.
208 | P a g e
3.3.7 Ensure Reverse Path Filtering is enabled (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
Rationale:
Setting these flags is a good way to deter attackers from sending your system bogus
packets that cannot be responded to. One instance where this feature breaks down is if
asymmetrical routing is employed. This would occur when using dynamic routing protocols
(bgp, ospf, etc) on your system. If you are using asymmetrical routing on your system, you
will not be able to enable this feature without breaking the routing.
Audit:
# sysctl net.ipv4.conf.all.rp_filter
net.ipv4.conf.all.rp_filter = 1
# sysctl net.ipv4.conf.default.rp_filter
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.all.rp_filter = 1
net.ipv4.conf.default.rp_filter = 1
209 | P a g e
Remediation:
net.ipv4.conf.all.rp_filter = 1
net.ipv4.conf.default.rp_filter = 1
# sysctl -w net.ipv4.conf.all.rp_filter=1
# sysctl -w net.ipv4.conf.default.rp_filter=1
# sysctl -w net.ipv4.route.flush=1
CIS Controls:
Version 7
9.2 Ensure Only Approved Ports, Protocols and Services Are Running
Ensure that only network ports, protocols, and services listening on a system with
validated business needs, are running on each system.
210 | P a g e
3.3.8 Ensure TCP SYN Cookies is enabled (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
When tcp_syncookies is set, the kernel will handle TCP SYN packets normally until the
half-open connection queue is full, at which time, the SYN cookie functionality kicks in. SYN
cookies work by not using the SYN queue at all. Instead, the kernel simply replies to the
SYN with a SYN|ACK, but will include a specially crafted TCP sequence number that
encodes the source and destination IP address and port number and the time the packet
was sent. A legitimate connection would send the ACK packet of the three way handshake
with the specially crafted sequence number. This allows the system to verify that it has
received a valid response to a SYN cookie and allow the connection, even though there is no
corresponding SYN in the queue.
Rationale:
Attackers use SYN flood attacks to perform a denial of service attacked on a system by
sending many SYN packets without completing the three way handshake. This will quickly
use up slots in the kernel's half-open connection queue and prevent legitimate connections
from succeeding. SYN cookies allow the system to keep accepting valid connections, even if
under a denial of service attack.
Audit:
# sysctl net.ipv4.tcp_syncookies
net.ipv4.tcp_syncookies = 1
net.ipv4.tcp_syncookies = 1
211 | P a g e
Remediation:
net.ipv4.tcp_syncookies = 1
# sysctl -w net.ipv4.tcp_syncookies=1
# sysctl -w net.ipv4.route.flush=1
CIS Controls:
Version 7
9.2 Ensure Only Approved Ports, Protocols and Services Are Running
Ensure that only network ports, protocols, and services listening on a system with
validated business needs, are running on each system.
212 | P a g e
3.3.9 Ensure IPv6 router advertisements are not accepted (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
This setting disables the system's ability to accept IPv6 router advertisements.
Rationale:
Audit:
# sysctl net.ipv6.conf.all.accept_ra
net.ipv6.conf.all.accept_ra = 0
# sysctl net.ipv6.conf.default.accept_ra
net.ipv6.conf.default.accept_ra = 0
net.ipv6.conf.all.accept_ra = 0
net.ipv6.conf.default.accept_ra = 0
213 | P a g e
Run the following script. Output will confirm if IPv6 is disabled on the system.
#!/bin/bash
Remediation:
IF IPv6 is enabled:
Set the following parameters in /etc/sysctl.conf or a /etc/sysctl.d/* file:
net.ipv6.conf.all.accept_ra = 0
net.ipv6.conf.default.accept_ra = 0
# sysctl -w net.ipv6.conf.all.accept_ra=0
# sysctl -w net.ipv6.conf.default.accept_ra=0
# sysctl -w net.ipv6.route.flush=1
CIS Controls:
Version 7
9.2 Ensure Only Approved Ports, Protocols and Services Are Running
Ensure that only network ports, protocols, and services listening on a system with
validated business needs, are running on each system.
214 | P a g e
3.4 TCP Wrappers
215 | P a g e
3.4.1 Ensure TCP Wrappers is installed (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
TCP Wrappers provides a simple access list and standardized logging method for services
capable of supporting it. In the past, services that were called from inetd and xinetd
supported the use of tcp wrappers. As inetd and xinetd have been falling in disuse, any
service that can support tcp wrappers will have the libwrap.so library attached to it.
Rationale:
TCP Wrappers provide a good simple access list mechanism to services that may not have
that support built in. It is recommended that all services that can support TCP Wrappers,
use it.
Audit:
# rpm -q tcp_wrappers
tcp_wrappers-<version>
# rpm -q tcp_wrappers-libs
tcp_wrappers-libs-<version>
Remediation:
216 | P a g e
Additional Information:
CIS Controls:
Version 7
217 | P a g e
3.4.2 Ensure /etc/hosts.allow is configured (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
The /etc/hosts.allow file specifies which IP addresses are permitted to connect to the
host. It is intended to be used in conjunction with the /etc/hosts.deny file.
Rationale:
The /etc/hosts.allow file supports access control by IP and helps ensure that only
authorized systems can connect to the system.
Audit:
Run the following command and verify the contents of the /etc/hosts.allow file:
# cat /etc/hosts.allow
Remediation:
Additional Information:
Contents of the /etc/hosts.allow file will vary depending on your network configuration.
CIS Controls:
Version 7
218 | P a g e
3.4.3 Ensure /etc/hosts.deny is configured (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
The /etc/hosts.deny file specifies which IP addresses are not permitted to connect to the
host. It is intended to be used in conjunction with the /etc/hosts.allow file.
Rationale:
The /etc/hosts.deny file serves as a failsafe so that any host not specified in
/etc/hosts.allow is denied access to the system.
Audit:
Run the following command and verify the contents of the /etc/hosts.deny file:
# cat /etc/hosts.deny
ALL: ALL
Remediation:
Additional Information:
Contents of the /etc/hosts.deny file may include additional options depending on your
network configuration.
CIS Controls:
Version 7
219 | P a g e
3.4.4 Ensure permissions on /etc/hosts.allow are configured
(Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
Rationale:
It is critical to ensure that the /etc/hosts.allow file is protected from unauthorized write
access. Although it is protected by default, the file permissions could be changed either
inadvertently or through malicious actions.
Audit:
Run the following command and verify Uid and Gid are both 0/root and Access is 644 :
# stat /etc/hosts.allow
Remediation:
CIS Controls:
Version 7
220 | P a g e
3.4.5 Ensure permissions on /etc/hosts.deny are configured
(Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
The /etc/hosts.deny file contains network information that is used by many system
applications and therefore must be readable for these applications to operate.
Rationale:
It is critical to ensure that the /etc/hosts.deny file is protected from unauthorized write
access. Although it is protected by default, the file permissions could be changed either
inadvertently or through malicious actions.
Audit:
Run the following command and verify Uid and Gid are both 0/root and Access is 644 :
# stat /etc/hosts.deny
Remediation:
CIS Controls:
Version 7
221 | P a g e
3.5 Uncommon Network Protocols
The Linux kernel modules support several network protocols that are not commonly used.
If these protocols are not needed, it is recommended that they be disabled in the kernel.
Note: This should not be considered a comprehensive list of uncommon network protocols,
you may wish to consider additions to those listed here for your environment.
222 | P a g e
3.5.1 Ensure DCCP is disabled (Manual)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
The Datagram Congestion Control Protocol (DCCP) is a transport layer protocol that
supports streaming media and telephony. DCCP provides a way to gain access to
congestion control, without having to do it at the application layer, but does not provide in-
sequence delivery.
Rationale:
If the protocol is not required, it is recommended that the drivers not be installed to reduce
the potential attack surface.
Audit:
# modprobe -n -v dccp
install /bin/true
<No output>
Remediation:
223 | P a g e
CIS Controls:
Version 7
9.2 Ensure Only Approved Ports, Protocols and Services Are Running
Ensure that only network ports, protocols, and services listening on a system with
validated business needs, are running on each system.
224 | P a g e
3.5.2 Ensure SCTP is disabled (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
The Stream Control Transmission Protocol (SCTP) is a transport layer protocol used to
support message oriented communication, with several streams of messages in one
connection. It serves a similar function as TCP and UDP, incorporating features of both. It is
message-oriented like UDP, and ensures reliable in-sequence transport of messages with
congestion control like TCP.
Rationale:
If the protocol is not being used, it is recommended that kernel module not be loaded,
disabling the service to reduce the potential attack surface.
Audit:
# modprobe -n -v sctp
install /bin/true
<No output>
Remediation:
225 | P a g e
CIS Controls:
Version 7
9.2 Ensure Only Approved Ports, Protocols and Services Are Running
Ensure that only network ports, protocols, and services listening on a system with
validated business needs, are running on each system.
226 | P a g e
3.5.3 Ensure RDS is disabled (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
The Reliable Datagram Sockets (RDS) protocol is a transport layer protocol designed to
provide low-latency, high-bandwidth communications between cluster nodes. It was
developed by the Oracle Corporation.
Rationale:
If the protocol is not being used, it is recommended that kernel module not be loaded,
disabling the service to reduce the potential attack surface.
Audit:
# modprobe -n -v rds
install /bin/true
<No output>
Remediation:
CIS Controls:
Version 7
9.2 Ensure Only Approved Ports, Protocols and Services Are Running
Ensure that only network ports, protocols, and services listening on a system with
validated business needs, are running on each system.
227 | P a g e
3.5.4 Ensure TIPC is disabled (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
Rationale:
If the protocol is not being used, it is recommended that kernel module not be loaded,
disabling the service to reduce the potential attack surface.
Audit:
# modprobe -n -v tipc
install /bin/true
<No output>
Remediation:
CIS Controls:
Version 7
9.2 Ensure Only Approved Ports, Protocols and Services Are Running
Ensure that only network ports, protocols, and services listening on a system with
validated business needs, are running on each system.
228 | P a g e
3.6 Firewall Configuration
IPtables is an application that allows a system administrator to configure the IPv4 and IPv6
tables, chains and rules provided by the Linux kernel firewall. While several methods of
configuration exist this section is intended only to ensure the resulting IPtables and
IP6tables rules are in place, not how they are configured.
Note: Configuration of a live system's firewall directly over a remote connection will often
result in being locked out
229 | P a g e
3.6.1 Install iptables package
This section provides guidance for installing, enabling, removing, and disabling software
packages necessary for using IPTables as the method for configuring and maintaining a
Host Based Firewall on the system.
230 | P a g e
3.6.1.1 Ensure iptables is installed (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
iptables allows configuration of the IPv4 tables in the linux kernel and the rules stored
within them. Most firewall configuration utilities operate as a front end to iptables.
Rationale:
Audit:
# rpm -q iptables
iptables-<version>
Remediation:
CIS Controls:
Version 7
231 | P a g e
3.6.2 Configure IPv4 iptables
Iptables is used to set up, maintain, and inspect the tables of IP packet filter rules in the
Linux kernel. Several different tables may be defined. Each table contains a number of
built-in chains and may also contain user-defined chains.
Each chain is a list of rules which can match a set of packets. Each rule specifies what to do
with a packet that matches. This is called a 'target', which may be a jump to a user-defined
chain in the same table.
Notes:
This section broadly assumes starting with an empty IPtables firewall ruleset
(established by flushing the rules with iptables -F).
Configuration of a live systems firewall directly over a remote connection will often
result in being locked out.
It is advised to have a known good firewall configuration set to run on boot and to
configure an entire firewall structure in a script that is then run and tested before
saving to boot.
The following script will implement the firewall rules of this section and open port 22(ssh)
from anywhere. This needs to be updated to only allow systems requiring ssh
connectivity to connect as per site policy.
#!/bin/bash
232 | P a g e
3.6.2.1 Ensure IPv4 default deny firewall policy (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
A default deny all policy on connections ensures that any unconfigured network usage will
be rejected.
Rationale:
With a default accept policy the firewall will accept any packet that is not configured to be
denied. It is easier to white list acceptable usage than to black list unacceptable usage.
Note: Changing firewall settings while connected over network can result in being locked out
of the system.
Audit:
Run the following command and verify that the policy for the INPUT , OUTPUT , and FORWARD
chains is DROP or REJECT :
# iptables -L
Remediation:
CIS Controls:
Version 7
233 | P a g e
3.6.2.2 Ensure IPv4 loopback traffic is configured (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
Configure the loopback interface to accept traffic. Configure all other interfaces to deny
traffic to the loopback network (127.0.0.0/8).
Rationale:
Note: Changing firewall settings while connected over network can result in being locked out
of the system.
Audit:
Run the following commands and verify output includes the listed rules in order (packet
and byte counts may differ):
# iptables -L INPUT -v -n
# iptables -L OUTPUT -v -n
234 | P a g e
Remediation:
CIS Controls:
Version 7
235 | P a g e
3.6.2.3 Ensure IPv4 outbound and established connections are
configured (Manual)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
Configure the firewall rules for new outbound, and established connections.
Rationale:
If rules are not in place for new outbound, and established connections all packets will be
dropped by the default policy preventing network usage.
Note: Changing firewall settings while connected over network can result in being locked out
of the system.
Audit:
Run the following command and verify all rules for new outbound, and established
connections match site policy:
# iptables -L -v -n
Remediation:
Configure iptables in accordance with site policy. The following commands will implement
a policy to allow all outbound connections and all established connections:
236 | P a g e
CIS Controls:
Version 7
237 | P a g e
3.6.2.4 Ensure IPv4 firewall rules exist for all open ports (Manual)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
Any ports that have been opened on non-loopback addresses need firewall rules to govern
traffic.
Rationale:
Without a firewall rule configured for open ports default firewall policy will drop all
packets to these ports.
Notes:
Changing firewall settings while connected over network can result in being locked out
of the system.
The remediation command opens up the port to traffic from all sources. Consult
iptables documentation and set any restrictions in compliance with site policy.
Audit:
# ss -4tuln
238 | P a g e
# iptables -L INPUT -v -n
Verify all open ports listening on non-localhost addresses have at least one firewall rule.
Note: The last line identified by the "tcp dpt:22 state NEW" identifies it as a firewall rule for
new connections on tcp port 22.
Remediation:
For each port identified in the audit which does not have a firewall rule establish a proper
rule for accepting inbound connections:
CIS Controls:
Version 7
9.2 Ensure Only Approved Ports, Protocols and Services Are Running
Ensure that only network ports, protocols, and services listening on a system with
validated business needs, are running on each system.
239 | P a g e
3.6.3 Configure IPv6 ip6tables
Ip6tables is used to set up, maintain, and inspect the tables of IPv6 packet filter rules in the
Linux kernel. Several different tables may be defined. Each table contains a number of
built-in chains and may also contain user-defined chains. Each chain is a list of rules which
can match a set of packets. Each rule specifies what to do with a packet that matches. This
is called a `target', which may be a jump to a user-defined chain in the same table.
Notes:
This section broadly assumes starting with an empty ip6tables firewall ruleset
(established by flushing the rules with ip6tables -F).
Configuration of a live systems firewall directly over a remote connection will often
result in being locked out.
It is advised to have a known good firewall configuration set to run on boot and to
configure an entire firewall structure in a script that is then run and tested before
saving to boot.
The following script will implement the firewall rules of this section and open port 22(ssh)
from anywhere. This needs to be updated to only allow systems requiring ssh
connectivity to connect as per site policy.
#!/bin/bash
240 | P a g e
3.6.3.1 Ensure IPv6 default deny firewall policy (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
A default deny all policy on connections ensures that any unconfigured network usage will
be rejected.
Rationale:
With a default accept policy the firewall will accept any packet that is not configured to be
denied. It is easier to white list acceptable usage than to black list unacceptable usage.
Note: Changing firewall settings while connected over network can result in being locked out
of the system.
Audit:
Run the following command and verify that the policy for the INPUT, OUTPUT, and
FORWARD chains is DROP or REJECT:
# ip6tables -L
OR
Verify IPv6 is disabled:
Run the following script. Output will confirm if IPv6 is disabled on the system.
241 | P a g e
#!/bin/bash
Remediation:
CIS Controls:
Version 7
242 | P a g e
3.6.3.2 Ensure IPv6 loopback traffic is configured (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
Configure the loopback interface to accept traffic. Configure all other interfaces to deny
traffic to the loopback network (::1).
Rationale:
Note: Changing firewall settings while connected over network can result in being locked out
of the system.
Audit:
Run the following commands and verify output includes the listed rules in order (packet
and byte counts may differ):
# ip6tables -L INPUT -v -n
# ip6tables -L OUTPUT -v -n
OR
Verify IPv6 is disabled:
Run the following script. Output will confirm if IPv6 is disabled on the system.
243 | P a g e
#!/bin/bash
Remediation:
CIS Controls:
Version 7
244 | P a g e
3.6.3.3 Ensure IPv6 outbound and established connections are
configured (Manual)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
Configure the firewall rules for new outbound, and established IPv6 connections.
Rationale:
If rules are not in place for new outbound, and established connections all packets will be
dropped by the default policy preventing network usage.
Note: Changing firewall settings while connected over network can result in being locked out
of the system.
Audit:
Run the following command and verify all rules for new outbound, and established
connections match site policy:
# ip6tables -L -v -n
OR
Verify IPv6 is disabled:
Run the following script. Output will confirm if IPv6 is disabled on the system.
245 | P a g e
#!/bin/bash
Remediation:
Configure iptables in accordance with site policy. The following commands will implement
a policy to allow all outbound connections and all established connections:
CIS Controls:
Version 7
246 | P a g e
3.6.3.4 Ensure IPv6 firewall rules exist for all open ports (Manual)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
Any ports that have been opened on non-loopback addresses need firewall rules to govern
traffic.
Rationale:
Without a firewall rule configured for open ports default firewall policy will drop all
packets to these ports.
Notes:
Changing firewall settings while connected over network can result in being locked out
of the system.
The remediation command opens up the port to traffic from all sources. Consult
iptables documentation and set any restrictions in compliance with site policy.
Audit:
# ss -6tuln
247 | P a g e
# ip6tables -L INPUT -v -n
Verify all open ports listening on non-localhost addresses have at least one firewall rule.
The last line identified by the "tcp dpt:22 state NEW" identifies it as a firewall rule for new
connections on tcp port 22.
OR
Verify IPv6 is disabled:
Run the following script. Output will confirm if IPv6 is disabled on the system.
#!/bin/bash
Remediation:
For each port identified in the audit which does not have a firewall rule establish a proper
rule for accepting inbound connections:
248 | P a g e
CIS Controls:
Version 7
249 | P a g e
4 Logging and Auditing
The items in this section describe how to configure logging, log monitoring, and auditing,
using tools included in most distributions.
In addition to the local log files created by the steps in this section, it is also recommended
that sites collect copies of their system logs on a secure, centralized log server via an
encrypted connection. Not only does centralized logging help sites correlate events that
may be occurring on multiple systems, but having a second copy of the system log
information may be critical after a system compromise where the attacker has modified the
local log files on the affected system(s). If a log correlation system is deployed, configure it
to process the logs described in this section.
Because it is often necessary to correlate log information from many different systems
(particularly after a security incident) it is recommended that the time be synchronized
among systems and devices connected to the local network. The standard Internet protocol
for time synchronization is the Network Time Protocol (NTP), which is supported by most
network-ready devices. See the ntpd(8) manual page for more information on configuring
NTP.
It is important that all logs described in this section be monitored on a regular basis and
correlated to determine trends. A seemingly innocuous entry in one log could be more
significant when compared to an entry in another log.
Note on log file permissions: There really isn't a "one size fits all" solution to the
permissions on log files. Many sites utilize group permissions so that administrators who
are in a defined security group, such as "wheel" do not have to elevate privileges to root in
order to read log files. Also, if a third party log aggregation tool is used, it may need to have
group permissions to read the log files, which is preferable to having it run setuid to root.
Therefore, there are two remediation and audit steps for log file permissions. One is for
systems that do not have a secured group method implemented that only permits root to
read the log files (root:root 600). The other is for sites that do have such a setup and are
designated as root:securegrp 640 where securegrp is the defined security group (in
some cases wheel).
250 | P a g e
4.1 Configure System Accounting (auditd)
System auditing, through auditd, allows system administrators to monitor their systems
such that they can detect unauthorized access or modification of data. By default, auditd
will audit system logins, account modifications, and authentication events. Events will be
logged to /var/log/audit/audit.log. The recording of these events will use a modest
amount of disk space on a system. If significantly more events are captured, additional on
system or off system storage may need to be allocated.
Notes:
The recommendations in this section implement an audit policy that produces large
quantities of logged data. In some environments it can be challenging to store or
process these logs and as such they are marked as Level 2 for both Servers and
Workstations.
For 64 bit systems that have arch as a rule parameter, you will need two rules: one for
64 bit and one for 32 bit systems. For 32 bit systems, only one rule is needed.
Several recommendations in this section filter based off of auid>=500 for unprivileged
non-system users. Some systems may have a non-default UID_MIN setting, consult the
UID_MIN setting in /etc/login.defs to determine the UID_MIN setting for your
system.
Once all audit rules have been added to a file or files in the /etc/audit/rules.d/
directory, the auditd service must be re-started, or the system rebooted, for the
new rules to be included.
The audit and remediation in this section look for a 'key' value. The 'key' value may
be different for the audit settings on your system.
251 | P a g e
4.1.1 Ensure auditing is enabled
The capturing of system events provides system administrators with information to allow
them to determine if unauthorized access to their system is occurring.
252 | P a g e
4.1.1.1 Ensure auditd is installed (Automated)
Profile Applicability:
Level 2 - Server
Level 2 - Workstation
Description:
auditd is the userspace component to the Linux Auditing System. It's responsible for
writing audit records to the disk
Rationale:
The capturing of system events provides system administrators with information to allow
them to determine if unauthorized access to their system is occurring.
Audit:
audit-<version>
audit-libs-<version>
Remediation:
CIS Controls:
Version 7
253 | P a g e
4.1.1.2 Ensure augenrules is enabled (Automated)
Profile Applicability:
Level 2 - Server
Level 2 - Workstation
Description:
augenrules reads rules from files ending in .rules within the /etc/audit/rules.d
directory. These rules are written to the main rule file: /etc/audit/audit.rules.
When setting this up, any existing rules need to be copied into a file ending in *.rules in
the /etc/audit/rules.d directory or they will be lost when audit.rules gets overwritten.
Rationale:
Keeping audit rules in a .rules file or file(s) within the /etc/audit/rules.d/ directory
allows for more fine grained control of the rules being added to auditd.
Impact:
If a user configures rules in both audit.rules and rules.d, and augenrules is enabled, the
file audit.rules will be override by augenrules
Audit:
Run the following command and verify that USE_AUGENRULES= is set to yes.
USE_AUGENRULES="yes"
Remediation:
USE_AUGENRULES="yes"
254 | P a g e
Default Value:
USE_AUGENRULES="no"
Additional Information:
While reading file names inside /etc/audit/rules.d, augenrules reads files starting
with numeric first and then characters.
CIS Controls:
Version 7
255 | P a g e
4.1.1.3 Ensure auditd service is enabled (Automated)
Profile Applicability:
Level 2 - Server
Level 2 - Workstation
Description:
Rationale:
The capturing of system events provides system administrators with information to allow
them to determine if unauthorized access to their system is occurring.
Audit:
Run the following command and verify runlevels 2 through 5 are "on":
Remediation:
# chkconfig auditd on
CIS Controls:
Version 7
256 | P a g e
4.1.1.4 Ensure auditing for processes that start prior to auditd is
enabled (Automated)
Profile Applicability:
Level 2 - Server
Level 2 - Workstation
Description:
Configure grub so that processes that are capable of being audited can be audited even if
they start up prior to auditd startup.
Rationale:
Audit events need to be captured on processes that start up prior to auditd, so that
potential malicious activity cannot go undetected.
Audit:
Run the following command and verify that each linux line has the audit=1 parameter set:
Remediation:
Run the following command to add audit=1 to each line starting with kernel in grub.conf
Default Value:
Not set
Additional Information:
Note: This recommendation is designed around the grub bootloader, if LILO or another
bootloader is in use in your environment enact equivalent settings.
257 | P a g e
CIS Controls:
Version 7
258 | P a g e
4.1.2 Configure Data Retention
When auditing, it is important to carefully configure the storage requirements for audit
logs. By default, auditd will max out the log files at 5MB and retain only 4 copies of them.
Older versions will be deleted. It is possible on a system that the 20 MBs of audit logs may
fill up the system causing loss of audit data. While the recommendations here provide
guidance, check your site policy for audit storage requirements.
259 | P a g e
4.1.2.1 Ensure audit log storage size is configured (Automated)
Profile Applicability:
Level 2 - Server
Level 2 - Workstation
Description:
Configure the maximum size of the audit log file. Once the log reaches the maximum size, it
will be rotated and a new log file will be started.
Notes:
Rationale:
It is important that an appropriate size is determined for log files so that they do not impact
the system and audit data is not lost.
Audit:
Run the following command and ensure output is in compliance with site policy:
max_log_file = <MB>
Remediation:
max_log_file = <MB>
260 | P a g e
CIS Controls:
Version 7
261 | P a g e
4.1.2.2 Ensure audit logs are not automatically deleted (Automated)
Profile Applicability:
Level 2 - Server
Level 2 - Workstation
Description:
The max_log_file_action setting determines how to handle the audit log file reaching the
max file size. A value of keep_logs will rotate the logs but never delete old logs.
Rationale:
In high security contexts, the benefits of maintaining a long audit history exceed the cost of
storing the audit history.
Audit:
max_log_file_action = keep_logs
Remediation:
max_log_file_action = keep_logs
CIS Controls:
Version 7
262 | P a g e
4.1.2.3 Ensure system is disabled when audit logs are full (Automated)
Profile Applicability:
Level 2 - Server
Level 2 - Workstation
Description:
The auditd daemon can be configured to halt the system when the audit logs are full.
Rationale:
Audit:
space_left_action = email
action_mail_acct = root
admin_space_left_action = halt
Remediation:
space_left_action = email
action_mail_acct = root
admin_space_left_action = halt
263 | P a g e
CIS Controls:
Version 7
264 | P a g e
4.1.2.4 Ensure audit_backlog_limit is sufficient (Automated)
Profile Applicability:
Level 2 - Server
Level 2 - Workstation
Description:
Rationale:
During boot if audit=1, then the backlog will hold 64 records. If more than 64 records are
created during boot, auditd records will be lost and potential malicious activity could go
undetected.
Audit:
Run the following commands and verify the audit_backlog_limit= parameter is set to an
appropriate size for your organization
audit_backlog_limit=<BACKLOG SIZE>
Remediation:
265 | P a g e
CIS Controls:
Version 7
266 | P a g e
4.1.3 Ensure events that modify date and time information are collected
(Automated)
Profile Applicability:
Level 2 - Server
Level 2 - Workstation
Description:
Capture events where the system date and/or time has been modified. The parameters in
this section are set to determine if the adjtimex (tune kernel clock), settimeofday (Set
time, using timeval and timezone structures) stime (using seconds since 1/1/1970) or
clock_settime (allows for the setting of several internal clocks and timers) system calls
have been executed and always write an audit record to the /var/log/audit.log file upon
exit, tagging the records with the identifier "time-change"
Note: Reloading the auditd config to set active settings requires the auditd service to be
restarted, and may require a system reboot.
Rationale:
Unexpected changes in system date and/or time could be a sign of malicious activity on the
system.
Audit:
267 | P a g e
# grep time-change /etc/audit/rules.d/*.rules
Remediation:
For 32 bit systems Edit or create a file in the /etc/audit/rules.d/ directory ending in
.rules
Example: vi /etc/audit/rules.d/10-time_change.rules
Add the following lines:
For 64 bit systems Edit or create a file in the /etc/audit/rules.d/ directory ending in
.rules
Example: vi /etc/audit/rules.d/10-time_change.rules
Add the following lines:
CIS Controls:
Version 7
268 | P a g e
4.1.4 Ensure events that modify user/group information are collected
(Automated)
Profile Applicability:
Level 2 - Server
Level 2 - Workstation
Description:
Record events affecting the group , passwd (user IDs), shadow and gshadow (passwords) or
/etc/security/opasswd (old passwords, based on remember parameter in the PAM
configuration) files. The parameters in this section will watch the files to see if they have
been opened for write or have had attribute changes (e.g. permissions) and tag them with
the identifier "identity" in the audit log file.
Note: Reloading the auditd config to set active settings may require a system reboot.
Rationale:
Unexpected changes to these files could be an indication that the system has been
compromised and that an unauthorized user is attempting to hide their activities or
compromise additional accounts.
Audit:
-w /etc/group -p wa -k identity
-w /etc/passwd -p wa -k identity
-w /etc/gshadow -p wa -k identity
-w /etc/shadow -p wa -k identity
-w /etc/security/opasswd -p wa -k identity
269 | P a g e
-w /etc/group -p wa -k identity
-w /etc/passwd -p wa -k identity
-w /etc/gshadow -p wa -k identity
-w /etc/shadow -p wa -k identity
-w /etc/security/opasswd -p wa -k identity
Remediation:
-w /etc/group -p wa -k identity
-w /etc/passwd -p wa -k identity
-w /etc/gshadow -p wa -k identity
-w /etc/shadow -p wa -k identity
-w /etc/security/opasswd -p wa -k identity
CIS Controls:
Version 7
270 | P a g e
4.1.5 Ensure events that modify the system's network environment are
collected (Automated)
Profile Applicability:
Level 2 - Server
Level 2 - Workstation
Description:
Record changes to network environment files or system calls. The below parameters
monitor the sethostname (set the systems host name) or setdomainname (set the systems
domainname) system calls, and write an audit event on system call exit. The other
parameters monitor the /etc/issue and /etc/issue.net files (messages displayed pre-
login), /etc/hosts (file containing host names and associated IP addresses) and
/etc/sysconfig/network (directory containing network interface scripts and
configurations) files.
Note: Reloading the auditd config to set active settings requires the auditd service to be
restarted, and may require a system reboot.
Rationale:
271 | P a g e
Audit:
Remediation:
For 32 bit systems Edit or create a file in the /etc/audit/rules.d/ directory ending in
.rules
Example: vi /etc/audit/rules.d/10-system_local.rules
Add the following lines:
For 64 bit systems Edit or create a file in the /etc/audit/rules.d/ directory ending in
.rules
Example: vi /etc/audit/rules.d/10-system_local.rules
Add the following lines:
272 | P a g e
-a always,exit -F arch=b64 -S sethostname -S setdomainname -k system-locale
-a always,exit -F arch=b32 -S sethostname -S setdomainname -k system-locale
-w /etc/issue -p wa -k system-locale
-w /etc/issue.net -p wa -k system-locale
-w /etc/hosts -p wa -k system-locale
-w /etc/sysconfig/network -p wa -k system-locale
CIS Controls:
Version 7
273 | P a g e
4.1.6 Ensure events that modify the system's Mandatory Access
Controls are collected (Automated)
Profile Applicability:
Level 2 - Server
Level 2 - Workstation
Description:
Monitor SELinux mandatory access controls. The parameters below monitor any write
access (potential additional, deletion or modification of files in the directory) or attribute
changes to the /etc/selinux/ and /usr/share/selinux/ directories.
Notes:
Rationale:
Audit:
-w /etc/selinux/ -p wa -k MAC-policy
-w /usr/share/selinux/ -p wa -k MAC-policy
274 | P a g e
Remediation:
-w /etc/selinux/ -p wa -k MAC-policy
-w /usr/share/selinux/ -p wa -k MAC-policy
CIS Controls:
Version 7
275 | P a g e
4.1.7 Ensure login and logout events are collected (Automated)
Profile Applicability:
Level 2 - Server
Level 2 - Workstation
Description:
Monitor login and logout events. The parameters below track changes to files associated
with login/logout events.
The file /var/log/lastlog maintain records of the last time a user successfully
logged in.
The /var/run/faillock/ directory maintains records of login failures via the
pam_faillock module.
Note: Reloading the auditd config to set active settings requires the auditd service to be
restarted, and may require a system reboot.
Rationale:
Audit:
-w /var/log/lastlog -p wa -k logins
-w /var/run/faillock/ -p wa -k logins
Remediation:
-w /var/log/lastlog -p wa -k logins
-w /var/run/faillock/ -p wa -k logins
276 | P a g e
CIS Controls:
Version 7
277 | P a g e
4.1.8 Ensure session initiation information is collected (Automated)
Profile Applicability:
Level 2 - Server
Level 2 - Workstation
Description:
Monitor session initiation events. The parameters in this section track changes to the files
associated with session events. The file /var/run/utmp tracks all currently logged in users.
All audit records will be tagged with the identifier "session." The /var/log/wtmp file tracks
logins, logouts, shutdown, and reboot events. The file /var/log/btmp keeps track of failed
login attempts and can be read by entering the command /usr/bin/last -f
/var/log/btmp . All audit records will be tagged with the identifier "logins."
Notes:
The last command can be used to read /var/log/wtmp (last with no parameters)
and /var/run/utmp (last -f /var/run/utmp)
Reloading the auditd config to set active settings requires the auditd service to be
restarted, and may require a system reboot.
Rationale:
Monitoring these files for changes could alert a system administrator to logins occurring at
unusual hours, which could indicate intruder activity (i.e. a user logging in at a time when
they do not normally log in).
Audit:
-w /var/run/utmp -p wa -k session
-w /var/log/wtmp -p wa -k logins
-w /var/log/btmp -p wa -k logins
278 | P a g e
-w /var/run/utmp -p wa -k session
-w /var/log/wtmp -p wa -k logins
-w /var/log/btmp -p wa -k logins
Remediation:
-w /var/run/utmp -p wa -k session
-w /var/log/wtmp -p wa -k logins
-w /var/log/btmp -p wa -k logins
CIS Controls:
Version 7
279 | P a g e
4.1.9 Ensure discretionary access control permission modification events
are collected (Automated)
Profile Applicability:
Level 2 - Server
Level 2 - Workstation
Description:
Monitor changes to file permissions, attributes, ownership and group. The parameters in
this section track changes for system calls that affect file permissions and attributes. The
chmod , fchmod and fchmodat system calls affect the permissions associated with a file. The
chown , fchown , fchownat and lchown system calls affect owner and group attributes on a
file. The setxattr , lsetxattr , fsetxattr (set extended file attributes) and removexattr ,
lremovexattr , fremovexattr (remove extended file attributes) control extended file
attributes. In all cases, an audit record will only be written for non-system user ids (auid >=
500) and will ignore Daemon events (auid = 4294967295). All audit records will be tagged
with the identifier "perm_mod."
Notes:
Systems may have been customized to change the default UID_MIN. To confirm the
UID_MIN for your system, run the following command:
awk '/^\s*UID_MIN/{print $2}' /etc/login.defs
If your systems' UID_MIN is not 500, replace audit>=500 with audit>=<UID_MIN for
your system> in the Audit and Remediation procedures.
Reloading the auditd config to set active settings may require a system reboot.
Rationale:
Monitoring for changes in file attributes could alert a system administrator to activity that
could indicate intruder activity or policy violation.
280 | P a g e
Audit:
281 | P a g e
-a always,exit -F arch=b64 -S chmod,fchmod,fchmodat -F auid>=500 -F auid!=-1
-F key=perm_mod
-a always,exit -F arch=b32 -S chmod,fchmod,fchmodat -F auid>=500 -F auid!=-1
-F key=perm_mod
-a always,exit -F arch=b64 -S chown,fchown,lchown,fchownat -F auid>=500 -F
auid!=-1 -F key=perm_mod
-a always,exit -F arch=b32 -S lchown,fchown,chown,fchownat -F auid>=500 -F
auid!=-1 -F key=perm_mod
-a always,exit -F arch=b64 -S
setxattr,lsetxattr,fsetxattr,removexattr,lremovexattr,fremovexattr -F
auid>=500 -F auid!=-1 -F key=perm_mod
-a always,exit -F arch=b32 -S
setxattr,lsetxattr,fsetxattr,removexattr,lremovexattr,fremovexattr -F
auid>=500 -F auid!=-1 -F key=perm_mod
Remediation:
For 32 bit systems edit or create a file in the /etc/audit/rules.d/ directory ending in
.rules
Example: vi /etc/audit/rules.d/10-perm_mod.rules
Add the following lines:
For 64 bit systems Edit or create a file in the /etc/audit/rules.d/ directory ending in
.rules
Example: vi /etc/audit/rules.d/10-perm_mod.rules
Add the following lines:
282 | P a g e
CIS Controls:
Version 7
283 | P a g e
4.1.10 Ensure unsuccessful unauthorized file access attempts are
collected (Automated)
Profile Applicability:
Level 2 - Server
Level 2 - Workstation
Description:
Monitor for unsuccessful attempts to access files. The parameters below are associated
with system calls that control creation ( creat ), opening ( open , openat ) and truncation (
truncate , ftruncate ) of files. An audit log record will only be written if the user is a non-
privileged user (auid > = 500), is not a Daemon event (auid=4294967295) and if the system
call returned EACCES (permission denied to the file) or EPERM (some other permanent
error associated with the specific system call). All audit records will be tagged with the
identifier "access."
Notes:
Systems may have been customized to change the default UID_MIN. To confirm the
UID_MIN for your system, run the following command:
# awk '/^\s*UID_MIN/{print $2}' /etc/login.defs
If your systems' UID_MIN is not 500, replace audit>=500 with audit>=<UID_MIN for
your system> in the Audit and Remediation procedures.
Reloading the auditd config to set active settings may require a system reboot.
Rationale:
Failed attempts to open, create or truncate files could be an indication that an individual or
process is trying to gain unauthorized access to the system.
284 | P a g e
Audit:
285 | P a g e
Remediation:
For 32 bit systems Edit or create a file in the /etc/audit/rules.d/ directory ending in
.rules
Example: vi /etc/audit/rules.d/10-access.rules
Add the following lines:
For 64 bit systems Edit or create a file in the /etc/audit/rules.d/ directory ending in
.rules
Example: vi /etc/audit/rules.d/10-access.rules
Add the following lines:
CIS Controls:
Version 7
286 | P a g e
4.1.11 Ensure use of privileged commands is collected (Automated)
Profile Applicability:
Level 2 - Server
Level 2 - Workstation
Description:
Monitor privileged programs (those that have the setuid and/or setgid bit set on execution)
to determine if unprivileged users are running these commands.
Notes:
Systems may have been customized to change the default UID_MIN. To confirm the
UID_MIN for your system, run the following command:
If your systems' UID_MIN is not 500, replace audit>=500 with audit>=<UID_MIN for
your system> in the Audit and Remediation procedures.
Reloading the auditd configuration to set active settings may require a system reboot.
Rationale:
Audit:
Run the following command replacing <partition> with a list of partitions where
programs can be executed from on your system:
Verify all resulting lines are a .rules file in /etc/audit/rules.d/ and the output of
auditctl -l
Note: The .rules file output will be auid!=-1 not auid!=4294967295
287 | P a g e
Remediation:
To remediate this issue, the system administrator will have to execute a find command to
locate all the privileged programs and then add an audit line for each one of them.
The audit parameters associated with this are as follows:
-F path=" $1 " - will populate each file name found through the find command and
processed by awk.
-F perm=x - will write an audit record if the file is executed.
-F audit>=500 - will write a record if the user executing the command is not a
privileged user.
-F auid!= 4294967295 - will ignore Daemon events
Edit or create a file in the /etc/audit/rules.d/ directory ending in .rules and add all
resulting lines to the file.
Example:
# find / -xdev \( -perm -4000 -o -perm -2000 \) -type f | awk '{print "-a
always,exit -F path=" $1 " -F perm=x -F auid>='"$(awk '/^\s*UID_MIN/{print
$2}' /etc/login.defs)"' -F auid!=4294967295 -k privileged" }' >>
/etc/audit/rules.d/10-privileged.rules
CIS Controls:
Version 7
288 | P a g e
4.1.12 Ensure successful file system mounts are collected (Automated)
Profile Applicability:
Level 2 - Server
Level 2 - Workstation
Description:
Monitor the use of the mount system call. The mount (and umount ) system call controls the
mounting and unmounting of file systems. The parameters below configure the system to
create an audit record when the mount system call is used by a non-privileged user
Notes:
Systems may have been customized to change the default UID_MIN. To confirm the
UID_MIN for your system, run the following command:
# awk '/^\s*UID_MIN/{print $2}' /etc/login.defs
If your systems' UID_MIN is not 500, replace audit>=500 with audit>=<UID_MIN for
your system> in the Audit and Remediation procedures.
This tracks successful and unsuccessful mount commands.
File system mounts do not have to come from external media and this action still does
not verify write (e.g. CD ROMS).
Reloading the auditd config to set active settings may require a system reboot.
Rationale:
It is highly unusual for a non privileged user to mount file systems to the system. While
tracking mount commands gives the system administrator evidence that external media
may have been mounted (based on a review of the source of the mount and confirming it's
an external media type), it does not conclusively indicate that data was exported to the
media. System administrators who wish to determine if data were exported, would also
have to track successful open , creat and truncate system calls requiring write access to a
file under the mount point of the external media file system. This could give a fair
indication that a write occurred. The only way to truly prove it, would be to track
successful writes to the external media. Tracking write system calls could quickly fill up the
audit log and is not recommended. Recommendations on configuration options to track
data export to media is beyond the scope of this document.
289 | P a g e
Audit:
290 | P a g e
Remediation:
For 32 bit systems Edit or create a file in the /etc/audit/rules.d/ directory ending in
.rules
Example: vi /etc/audit/rules.d/10-mounts.rules
Add the following lines:
For 64 bit systems Edit or create a file in the /etc/audit/rules.d/ directory ending in
.rules
Example: vi /etc/audit/rules.d/10-mounts.rules
Add the following lines:
CIS Controls:
Version 7
291 | P a g e
4.1.13 Ensure file deletion events by users are collected (Automated)
Profile Applicability:
Level 2 - Server
Level 2 - Workstation
Description:
Monitor the use of system calls associated with the deletion or renaming of files and file
attributes. This configuration statement sets up monitoring for following system calls and
tags them with the identifier "delete":
Systems may have been customized to change the default UID_MIN. To confirm the
UID_MIN for your system, run the following command:
# awk '/^\s*UID_MIN/{print $2}' /etc/login.defs
If your systems' UID_MIN is not 500, replace audit>=500 with audit>=<UID_MIN for
your system> in the Audit and Remediation procedures.
At a minimum, configure the audit system to collect file deletion events for all users
and root.
Reloading the auditd config to set active settings may require a system reboot.
Rationale:
Monitoring these calls from non-privileged users could provide a system administrator
with evidence that inappropriate removal of files and file attributes associated with
protected files is occurring. While this audit option will look at all events, system
administrators will want to look for specific privileged files that are being deleted or
altered.
Audit:
292 | P a g e
-a always,exit -F arch=b32 -S unlink -S unlinkat -S rename -S renameat -F
auid>=500 -F auid!=4294967295 -k delete
Remediation:
For 32 bit systems Edit or create a file in the /etc/audit/rules.d/ directory ending in
.rules
Example: vi /etc/audit/rules.d/10-deletion.rules
Add the following lines:
For 64 bit systems Edit or create a file in the /etc/audit/rules.d/ directory ending in
.rules
Example: vi /etc/audit/rules.d/10-deletion.rules
Add the following lines:
293 | P a g e
294 | P a g e
CIS Controls:
Version 7
13 Data Protection
Data Protection
295 | P a g e
4.1.14 Ensure changes to system administration scope (sudoers) is
collected (Automated)
Profile Applicability:
Level 2 - Server
Level 2 - Workstation
Description:
Monitor scope changes for system administrators. If the system has been properly
configured to force system administrators to log in as themselves first and then use the
sudo command to execute privileged commands, it is possible to monitor changes in scope.
The file /etc/sudoers or a file in the /etc/sudoers.d directory will be written to when the
file or its attributes have changed.
Notes: Reloading the auditd config to set active settings may require a system reboot.
Rationale:
Changes in the /etc/sudoers file, or a file in the /etc/sudoers.d/ directory can indicate
that an unauthorized change has been made to scope of system administrator activity.
Audit:
-w /etc/sudoers -p wa -k scope
-w /etc/sudoers.d/ -p wa -k scope
-w /etc/sudoers -p wa -k scope
-w /etc/sudoers.d -p wa -k scope
296 | P a g e
Remediation:
-w /etc/sudoers -p wa -k scope
-w /etc/sudoers.d/ -p wa -k scope
CIS Controls:
Version 7
297 | P a g e
4.1.15 Ensure system administrator command executions (sudo) are
collected (Automated)
Profile Applicability:
Level 2 - Server
Level 2 - Workstation
Description:
sudo provides users with temporary elevated privileges to perform operations. Monitor the
administrator with temporary elevated privileges and the operation(s) they performed.
Rationale:
creating an audit log of administrators with temporary elevated privileges and the
operation(s) they performed is essential to reporting. Administrators will want to correlate
the events written to the audit trail with the records written to sudo logfile to verify if
unauthorized commands have been executed.
Notes:
Systems may have been customized to change the default UID_MIN. To confirm the
UID_MIN for your system, run the following command:
awk '/^\s*UID_MIN/{print $2}' /etc/login.defs
If your systems' UID_MIN is not 500, replace audit>=500 with audit>=<UID_MIN for
your system> in the Audit and Remediation procedures.
Reloading the auditd config to set active settings may require a system reboot.
Audit:
Run the following command to verify that rules are in the running auditd config:
298 | P a g e
# auditctl -l | grep actions
Run the following command to verify that rules are in the running auditd config:
Remediation:
For 32 bit systems Edit or create a file in the /etc/audit/rules.d/ directory ending in
.rules:
Example: vi /etc/audit/rules.d/10-actions.rules
Add the following line:
For 64 bit systems Edit or create a file in the /etc/audit/rules.d/ directory ending in
.rules:
Example: vi /etc/audit/rules.d/10-actions.rules
Add the following lines:
299 | P a g e
-a always,exit -F arch=b64 -C euid!=uid -F euid=0 -F auid>=500 -F
auid!=4294967295 -S execve -k actions
-a always,exit -F arch=b32 -C euid!=uid -F euid=0 -F auid>=500 -F
auid!=4294967295 -S execve -k actions
Additional Information:
Note: Reloading the auditd configuration to set active settings requires the auditd service to
be restarted, and may require a system reboot.
CIS Controls:
Version 7
300 | P a g e
4.1.16 Ensure kernel module loading and unloading is collected
(Automated)
Profile Applicability:
Level 2 - Server
Level 2 - Workstation
Description:
Monitor the loading and unloading of kernel modules. The programs insmod (install a
kernel module), rmmod (remove a kernel module), and modprobe (a more sophisticated
program to load and unload modules, as well as some other features) control loading and
unloading of modules. The init_module (load a module) and delete_module (delete a
module) system calls control loading and unloading of modules. Any execution of the
loading and unloading module programs and system calls will trigger an audit record with
an identifier of "modules".
Note: Reloading the auditd config to set active settings requires the auditd service to be
restarted, and may require a system reboot.
Rationale:
Monitoring the use of insmod , rmmod and modprobe could provide system administrators
with evidence that an unauthorized user loaded or unloaded a kernel module, possibly
compromising the security of the system. Monitoring of the init_module and
delete_module system calls would reflect an unauthorized user attempting to use a
different program to load and unload modules.
301 | P a g e
Audit:
-w /sbin/insmod -p x -k modules
-w /sbin/rmmod -p x -k modules
-w /sbin/modprobe -p x -k modules
-a always,exit -F arch=b32 -S init_module -S delete_module -k modules
-w /sbin/insmod -p x -k modules
-w /sbin/rmmod -p x -k modules
-w /sbin/modprobe -p x -k modules
-a always,exit -F arch=b32 -S init_module,delete_module -F key=modules
-w /sbin/insmod -p x -k modules
-w /sbin/rmmod -p x -k modules
-w /sbin/modprobe -p x -k modules
-a always,exit -F arch=b64 -S init_module -S delete_module -k modules
-w /sbin/insmod -p x -k modules
-w /sbin/rmmod -p x -k modules
-w /sbin/modprobe -p x -k modules
-a always,exit -F arch=b64 -S init_module,delete_module -F key=modules
302 | P a g e
Remediation:
For 32 bit systems Edit or create a file in the /etc/audit/rules.d/ directory ending in
.rules
Example: vi /etc/audit/rules.d/10-modules.rules
Add the following lines:
-w /sbin/insmod -p x -k modules
-w /sbin/rmmod -p x -k modules
-w /sbin/modprobe -p x -k modules
-a always,exit -F arch=b32 -S init_module -S delete_module -k modules
For 64 bit systems Edit or create a file in the /etc/audit/rules.d/ directory ending in
.rules
Example: vi /etc/audit/rules.d/10-modules.rules
Add the following lines:
-w /sbin/insmod -p x -k modules
-w /sbin/rmmod -p x -k modules
-w /sbin/modprobe -p x -k modules
-a always,exit -F arch=b64 -S init_module -S delete_module -k modules
CIS Controls:
Version 7
303 | P a g e
4.1.17 Ensure the audit configuration is immutable (Automated)
Profile Applicability:
Level 2 - Server
Level 2 - Workstation
Description:
Set system audit so that audit rules cannot be modified with auditctl . Setting the flag "-e
2" forces audit to be put in immutable mode. Audit changes can only be made on system
reboot.
Note: This setting will require the system to be rebooted to update the active auditd
configuration settings.
Rationale:
In immutable mode, unauthorized users cannot execute changes to the audit system to
potentially hide malicious activity and then put the audit rules back. Users would most
likely notice a system reboot and that could alert administrators of an attempt to make
unauthorized audit changes.
Audit:
-e 2
Remediation:
Edit or create the file /etc/audit/rules.d/99-finalize.rules and add the following line
at the end of the file:
-e 2
304 | P a g e
CIS Controls:
Version 7
305 | P a g e
4.2 Configure Logging
Logging services should be configured to prevent information leaks and to aggregate logs
on a remote server so that they can be reviewed in the event of a system compromise and
ease log analysis.
306 | P a g e
4.2.1 Configure rsyslog
The rsyslog software is recommended as a replacement for the syslogd daemon and
provides improvements over syslogd, such as connection-oriented (i.e. TCP) transmission
of logs, the option to log to database formats, and the encryption of log data en route to a
central logging server. Note: This section only applies if rsyslog is installed on the system.
307 | P a g e
4.2.1.1 Ensure rsyslog is installed (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
The rsyslog software is the recommended replacement to the original syslogd daemon
which provide improvements over syslogd, such as connection-oriented (i.e. TCP)
transmission of logs, the option to log to database formats, and the encryption of log data
routed to a central logging server.
Rationale:
Audit:
# rpm -q rsyslog
rsyslog-<version>
Remediation:
CIS Controls:
Version 7
308 | P a g e
4.2.1.2 Ensure rsyslog Service is enabled (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
Rationale:
If the rsyslog service is not activated the system may default to the syslogd service or lack
logging instead.
Audit:
Run the following command and verify runlevels 2 through 5 are "on":
Remediation:
# chkconfig rsyslog on
CIS Controls:
Version 7
309 | P a g e
4.2.1.3 Ensure logging is configured (Manual)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
The /etc/rsyslog.conf and /etc/rsyslog.d/*.conf files specifies rules for logging and
which files are to be used to log certain classes of messages.
Rationale:
A great deal of important security-related information is sent via rsyslog (e.g., successful
and failed su attempts, failed login attempts, root login attempts, etc.).
Audit:
# ls -l /var/log/
Remediation:
*.emerg :omusrmsg:*
mail.* -/var/log/mail
mail.info -/var/log/mail.info
mail.warning -/var/log/mail.warn
mail.err /var/log/mail.err
news.crit -/var/log/news/news.crit
news.err -/var/log/news/news.err
news.notice -/var/log/news/news.notice
*.=warning;*.=err -/var/log/warn
*.crit /var/log/warn
*.*;mail.none;news.none -/var/log/messages
local0,local1.* -/var/log/localmessages
local2,local3.* -/var/log/localmessages
local4,local5.* -/var/log/localmessages
local6,local7.* -/var/log/localmessages
310 | P a g e
# pkill -HUP rsyslogd
References:
CIS Controls:
Version 7
311 | P a g e
4.2.1.4 Ensure rsyslog default file permissions configured (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
rsyslog will create logfiles that do not already exist on the system. This setting controls
what permissions will be applied to these newly created files.
Rationale:
It is important to ensure that log files have the correct permissions to ensure that sensitive
data is archived and protected.
Audit:
Run the following command and verify that $FileCreateMode is 0640 or more restrictive:
Remediation:
$FileCreateMode 0640
References:
Additional Information:
You should also ensure this is not overridden with less restrictive settings in any
/etc/rsyslog.d/* conf file.
312 | P a g e
CIS Controls:
Version 7
313 | P a g e
4.2.1.5 Ensure rsyslog is configured to send logs to a remote log host
(Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
The rsyslog utility supports the ability to send logs it gathers to a remote log host running
syslogd(8) or to receive messages from remote hosts, reducing administrative overhead.
Rationale:
Storing log data on a remote host protects log integrity from local attacks. If an attacker
gains root access on the local system, they could tamper with or remove log data that is
stored on the local system
Audit:
Review the /etc/rsyslog.conf and /etc/rsyslog.d/*.conf files and verify that logs are
sent to a central host (where loghost.example.com is the name of your central log host):
*.* @@loghost.example.com
Remediation:
Edit the /etc/rsyslog.conf and /etc/rsyslog.d/*.conf files and add the following line
(where loghost.example.com is the name of your central log host).
*.* @@loghost.example.com
References:
314 | P a g e
Additional Information:
The double "at" sign (@@) directs rsyslog to use TCP to send log messages to the server,
which is a more reliable transport mechanism than the default UDP protocol.
CIS Controls:
Version 7
315 | P a g e
4.2.1.6 Ensure remote rsyslog messages are only accepted on
designated log hosts. (Manual)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
By default, rsyslog does not listen for log messages coming in from remote systems. The
ModLoad tells rsyslog to load the imtcp.so module so it can listen over a network via TCP.
The InputTCPServerRun option instructs rsyslogd to listen on the specified TCP port.
Rationale:
The guidance in the section ensures that remote log hosts are configured to only accept
rsyslog data from hosts within the specified domain and that those systems that are not
designed to be log hosts do not accept any remote rsyslog messages. This provides
protection from spoofed log data and ensures that system administrators are reviewing
reasonably complete syslog data in a central location.
Audit:
Run the following commands and verify the resulting lines are uncommented on
designated log hosts and commented or removed on all others:
$ModLoad imtcp
$InputTCPServerRun 514
316 | P a g e
Remediation:
For hosts that are designated as log hosts, edit the /etc/rsyslog.conf file and un-
comment or add the following lines:
$ModLoad imtcp
$InputTCPServerRun 514
For hosts that are not designated as log hosts, edit the /etc/rsyslog.conf file and
comment or remove the following lines:
# $ModLoad imtcp
# $InputTCPServerRun 514
References:
Additional Information:
The $MoadLoad imtcp line can have the .so extension added to the end of the module, or
use the full path to the module.
CIS Controls:
Version 7
9.2 Ensure Only Approved Ports, Protocols and Services Are Running
Ensure that only network ports, protocols, and services listening on a system with
validated business needs, are running on each system.
317 | P a g e
4.2.2 Ensure permissions on all logfiles are configured (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
Log files stored in /var/log/ contain logged information from many services on the system,
or on log hosts others as well.
Rationale:
It is important to ensure that log files have the correct permissions to ensure that sensitive
data is archived and protected.
Audit:
Run the following command and verify that other has no permissions on any files and
group does not have write or execute permissions on any files:
Remediation:
Run the following command to set permissions on all existing log files:
Additional Information:
You may also need to change the configuration for your logging software or services for any
logs that had incorrect permissions.
CIS Controls:
Version 7
318 | P a g e
4.2.3 Ensure logrotate is configured (Manual)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
The system includes the capability of rotating log files regularly to avoid filling up the
system with logs or making the logs unmanageable large. The file
/etc/logrotate.d/syslog is the configuration file used to rotate log files created by
syslog or rsyslog.
Rationale:
By keeping the log files smaller and more manageable, a system administrator can easily
archive these files to another system and spend less time looking through inordinately
large log files.
Audit:
Remediation:
Additional Information:
If no maxage setting is set for logrotate a situation can occur where logrotate is interrupted
and fails to delete rotated logfiles. It is recommended to set this to a value greater than the
longest any log file should exist on your system to ensure that any such logfile is removed
but standard rotation settings are not overridden.
319 | P a g e
CIS Controls:
Version 7
320 | P a g e
5 Access, Authentication and Authorization
321 | P a g e
5.1 Configure cron
cron is a time-based job scheduler used to schedule jobs, commands or shell scripts, to run
periodically at fixed times, dates, or intervals.
at provides the ability to execute a command or shell script at a specified date and hour, or
after a given interval of time.
322 | P a g e
5.1.1 Ensure cron daemon is enabled (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
Rationale:
While there may not be user jobs that need to be run on the system, the system does have
maintenance jobs that may include security monitoring that have to run, and cron is used
to execute them.
Audit:
Run the following command and verify runlevels 2 through 5 are "on":
Remediation:
# chkconfig crond on
CIS Controls:
Version 7
323 | P a g e
5.1.2 Ensure permissions on /etc/crontab are configured (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
The /etc/crontab file is used by cron to control its own jobs. The commands in this item
make sure that root is the user and group owner of the file and that only the owner can
access the file.
Rationale:
This file contains information on what system jobs are run by cron. Write access to these
files could provide unprivileged users with the ability to elevate their privileges. Read
access to these files could provide users with the ability to gain insight on system jobs that
run on the system and could provide them a way to gain unauthorized privileged access.
Audit:
Run the following command and verify Uid and Gid are both 0/root and Access does not
grant permissions to group or other:
# stat /etc/crontab
Remediation:
324 | P a g e
CIS Controls:
Version 7
325 | P a g e
5.1.3 Ensure permissions on /etc/cron.hourly are configured
(Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
This directory contains system cron jobs that need to run on an hourly basis. The files in
this directory cannot be manipulated by the crontab command, but are instead edited by
system administrators using a text editor. The commands below restrict read/write and
search access to user and group root, preventing regular users from accessing this
directory.
Rationale:
Granting write access to this directory for non-privileged users could provide them the
means for gaining unauthorized elevated privileges. Granting read access to this directory
could give an unprivileged user insight in how to gain elevated privileges or circumvent
auditing controls.
Audit:
Run the following command and verify Uid and Gid are both 0/root and Access does not
grant permissions to group or other :
# stat /etc/cron.hourly/
Remediation:
Run the following commands to set ownership and permissions on the /etc/cron.hourly/
directory:
326 | P a g e
CIS Controls:
Version 7
327 | P a g e
5.1.4 Ensure permissions on /etc/cron.daily are configured (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
The /etc/cron.daily directory contains system cron jobs that need to run on a daily basis.
The files in this directory cannot be manipulated by the crontab command, but are instead
edited by system administrators using a text editor. The commands below restrict
read/write and search access to user and group root, preventing regular users from
accessing this directory.
Rationale:
Granting write access to this directory for non-privileged users could provide them the
means for gaining unauthorized elevated privileges. Granting read access to this directory
could give an unprivileged user insight in how to gain elevated privileges or circumvent
auditing controls.
Audit:
Run the following command and verify Uid and Gid are both 0/root and Access does not
grant permissions to group or other :
# stat /etc/cron.daily/
Remediation:
328 | P a g e
CIS Controls:
Version 7
329 | P a g e
5.1.5 Ensure permissions on /etc/cron.weekly are configured
(Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
The /etc/cron.weekly directory contains system cron jobs that need to run on a weekly
basis. The files in this directory cannot be manipulated by the crontab command, but are
instead edited by system administrators using a text editor. The commands below restrict
read/write and search access to user and group root, preventing regular users from
accessing this directory.
Rationale:
Granting write access to this directory for non-privileged users could provide them the
means for gaining unauthorized elevated privileges. Granting read access to this directory
could give an unprivileged user insight in how to gain elevated privileges or circumvent
auditing controls.
Audit:
Run the following command and verify Uid and Gid are both 0/root and Access does not
grant permissions to group or other :
# stat /etc/cron.weekly
Remediation:
330 | P a g e
CIS Controls:
Version 7
331 | P a g e
5.1.6 Ensure permissions on /etc/cron.monthly are configured
(Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
The /etc/cron.monthly directory contains system cron jobs that need to run on a monthly
basis. The files in this directory cannot be manipulated by the crontab command, but are
instead edited by system administrators using a text editor. The commands below restrict
read/write and search access to user and group root, preventing regular users from
accessing this directory.
Rationale:
Granting write access to this directory for non-privileged users could provide them the
means for gaining unauthorized elevated privileges. Granting read access to this directory
could give an unprivileged user insight in how to gain elevated privileges or circumvent
auditing controls.
Audit:
Run the following command and verify Uid and Gid are both 0/root and Access does not
grant permissions to group or other:
# stat /etc/cron.monthly/
Remediation:
332 | P a g e
CIS Controls:
Version 7
333 | P a g e
5.1.7 Ensure permissions on /etc/cron.d are configured (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
The /etc/cron.d/ directory contains system cron jobs that need to run in a similar manner
to the hourly, daily weekly and monthly jobs from /etc/crontab , but require more
granular control as to when they run. The files in this directory cannot be manipulated by
the crontab command, but are instead edited by system administrators using a text editor.
The commands below restrict read/write and search access to user and group root,
preventing regular users from accessing this directory.
Rationale:
Granting write access to this directory for non-privileged users could provide them the
means for gaining unauthorized elevated privileges. Granting read access to this directory
could give an unprivileged user insight in how to gain elevated privileges or circumvent
auditing controls.
Audit:
Run the following command and verify Uid and Gid are both 0/root and Access does not
grant permissions to group or other :
# stat /etc/cron.d
Remediation:
Run the following commands to set ownership and permissions on /etc/cron.d directory:
334 | P a g e
CIS Controls:
Version 7
335 | P a g e
5.1.8 Ensure cron is restricted to authorized users (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
If cron is installed in the system, configure /etc/cron.allow to allow specific users to use
these services. If /etc/cron.allow does not exist, then /etc/cron.deny is checked. Any
user not specifically defined in those files is allowed to use cron. By removing the file, only
users in /etc/cron.allow are allowed to use cron.
Rationale:
On many systems, only the system administrator is authorized to schedule cron jobs. Using
the cron.allow file to control who can run cron jobs enforces this policy. It is easier to
manage an allow list than a deny list. In a deny list, you could potentially add a user ID to
the system and forget to add it to the deny files.
Audit:
Run the following command and verify /etc/cron.deny does not exist:
# stat /etc/cron.deny
Run the following command and verify Uid and Gid are both 0/root and Access does not
grant permissions to group or other for /etc/cron.allow:
# stat /etc/cron.allow
336 | P a g e
Remediation:
# rm /etc/cron.deny
# touch /etc/cron.allow
Run the following commands to set the owner and permissions on /etc/cron.allow:
Additional Information:
Note: Even though a given user is not listed in cron.allow, cron jobs can still be run as that
user. The cron.allow file only controls administrative access to the crontab command for
scheduling and modifying cron jobs.
CIS Controls:
Version 7
337 | P a g e
5.1.9 Ensure at is restricted to authorized users (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
If at is installed in the system, configure /etc/at.allow to allow specific users to use these
services. If /etc/at.allow does not exist, then /etc/at.deny is checked. Any user not
specifically defined in those files is allowed to use at. By removing the file, only users in
/etc/at.allow are allowed to use at.
Rationale:
On many systems, only the system administrator is authorized to schedule at jobs. Using
the at.allow file to control who can run at jobs enforces this policy. It is easier to manage
an allow list than a deny list. In a deny list, you could potentially add a user ID to the system
and forget to add it to the deny files.
Audit:
Run the following command and verify /etc/at.deny does not exist:
# stat /etc/at.deny
Run the following command and verify Uid and Gid are both 0/root and Access does not
grant permissions to group or other for /etc/at.allow:
# stat /etc/at.allow
338 | P a g e
Remediation:
# rm /etc/at.deny
# touch /etc/at.allow
Run the following commands to set the owner and permissions on /etc/at.allow:
Additional Information:
Note: Even though a given user is not listed in at.allow, at jobs can still be run as that user.
The at.allow file only controls administrative access to the at command for scheduling and
modifying at jobs.
CIS Controls:
Version 7
339 | P a g e
5.2 Configure sudo
sudo allows a permitted user to execute a command as the superuser or another user, as
specified by the security policy. The invoking user's real (not effective) user ID is used to
determine the user name with which to query the security policy.
sudo supports a plugin architecture for security policies and input/output logging. Third
parties can develop and distribute their own policy and I/O logging plugins to work
seamlessly with the sudo front end. The default security policy is sudoers, which is
configured via the file /etc/sudoers.
340 | P a g e
5.2.1 Ensure sudo is installed (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
sudo allows a permitted user to execute a command as the superuser or another user, as
specified by the security policy. The invoking user's real (not effective) user ID is used to
determine the user name with which to query the security policy.
Rationale:
sudo supports a plugin architecture for security policies and input/output logging. Third
parties can develop and distribute their own policy and I/O logging plugins to work
seamlessly with the sudo front end. The default security policy is sudoers, which is
configured via the file /etc/sudoers.
The security policy determines what privileges, if any, a user has to run sudo. The policy
may require that users authenticate themselves with a password or another authentication
mechanism. If authentication is required, sudo will exit if the user's password is not
entered within a configurable time limit. This limit is policy-specific.
Audit:
# rpm -q sudo
sudo-<VERSION>
Remediation:
References:
1. SUDO(8)
341 | P a g e
CIS Controls:
Version 7
342 | P a g e
5.2.2 Ensure sudo commands use pty (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
Rationale:
Attackers can run a malicious program using sudo, which would again fork a background
process that remains even when the main program has finished executing.
This can be mitigated by configuring sudo to run other commands only from a pseudo-pty,
whether I/O logging is turned on or not.
Audit:
Verify that sudo can only run other commands from a pseudo-pty
Run the following command:
Defaults use_pty
Remediation:
Edit the file /etc/sudoers or a file in /etc/sudoers.d/ with visudo or visudo -f <PATH
TO FILE> and add the following line:
Defaults use_pty
References:
1. SUDO(8)
343 | P a g e
Additional Information:
Note: visudo edits the sudoers file in a safe fashion, analogous to vipw(8). visudo locks the
sudoers file against multiple simultaneous edits, provides basic sanity checks, and checks for
parse errors. If the sudoers file is currently being edited you will receive a message to try
again later. The -f option allows you to tell visudo which file to edit.
CIS Controls:
Version 7
344 | P a g e
5.2.3 Ensure sudo log file exists (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
Rationale:
A sudo log file simplifies auditing of sudo commands. This also provides easier isolation to
prevent disclosure of sensitive data.
Impact:
Editing the sudo configuration incorrectly can cause sudo to stop functioning
Audit:
Defaults logfile="/var/log/sudo.log"
Remediation:
Edit the file /etc/sudoers or a file in /etc/sudoers.d/ with visudo or visudo -f <PATH
TO FILE> and add the following line:
Example:
Defaults logfile="/var/log/sudo.log"
References:
1. SUDO(8)
2. VISUDO(8)
345 | P a g e
Additional Information:
Note: visudo edits the sudoers file in a safe fashion, analogous to vipw(8). visudo locks the
sudoers file against multiple simultaneous edits, provides basic sanity checks, and checks for
parse errors. If the sudoers file is currently being edited you will receive a message to try
again later. The -f option allows you to tell visudo which file to edit.
CIS Controls:
Version 7
346 | P a g e
5.3 Configure SSH Server
SSH is a secure, encrypted replacement for common login services such as telnet, ftp,
rlogin, rsh, and rcp. It is strongly recommended that sites abandon older clear-text login
protocols and use SSH to prevent session hijacking and sniffing of sensitive data off the
network.
Notes:
The recommendations in this section only apply if the SSH daemon is installed on the
system, if remote access is not required the SSH daemon can be removed and this
section skipped.
Once all configuration changes have been made to /etc/ssh/sshd_config, the sshd
configuration must be reloaded. Run the following command to reload the sshd
configuration:
347 | P a g e
5.3.1 Ensure permissions on /etc/ssh/sshd_config are configured
(Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
Rationale:
Audit:
Run the following command and verify Uid and Gid are both 0/root and Access does not
grant permissions to group or other:
# stat /etc/ssh/sshd_config
Remediation:
Default Value:
348 | P a g e
CIS Controls:
Version 7
349 | P a g e
5.3.2 Ensure permissions on SSH private host key files are configured
(Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
An SSH private key is one of two files used in SSH public key authentication. In this
authentication method, The possession of the private key is proof of identity. Only a private
key that corresponds to a public key will be able to authenticate successfully. The private
keys need to be stored and handled carefully, and no copies of the private key should be
distributed.
Rationale:
If an unauthorized user obtains the private SSH host key file, the host could be
impersonated
Audit:
NOTE: Either mode 0640 with owner root and group ssh_keys OR mode 0600 with owner root
and group root is acceptable
Run the following command and verify either:
Uid is 0/root and Gid is /ssh_keys and permissions 0640 or more restrictive:
OR
Uid is 0/root and Gid is 0/root and permissions are 0600 or more restrictive:
Example Output:
350 | P a g e
File: ‘/etc/ssh/ssh_host_rsa_key’
Size: 1679 Blocks: 8 IO Block: 4096 regular file
Device: ca01h/51713d Inode: 8628138 Links: 1
Access: (0640/-rw-r-----) Uid: ( 0/ root) Gid: ( 993/ssh_keys)
Access: 2018-10-22 18:24:56.861750616 +0000
Modify: 2018-10-22 18:24:56.861750616 +0000
Change: 2018-10-22 18:24:56.873750616 +0000
Birth: -
File: ‘/etc/ssh/ssh_host_ecdsa_key’
Size: 227 Blocks: 8 IO Block: 4096 regular file
Device: ca01h/51713d Inode: 8631760 Links: 1
Access: (0640/-rw-r-----) Uid: ( 0/ root) Gid: ( 993/ssh_keys)
Access: 2018-10-22 18:24:56.897750616 +0000
Modify: 2018-10-22 18:24:56.897750616 +0000
Change: 2018-10-22 18:24:56.905750616 +0000
Birth: -
File: ‘/etc/ssh/ssh_host_ed25519_key’
Size: 387 Blocks: 8 IO Block: 4096 regular file
Device: ca01h/51713d Inode: 8631762 Links: 1
Access: (0640/-rw-r-----) Uid: ( 0/ root) Gid: ( 993/ssh_keys)
Access: 2018-10-22 18:24:56.945750616 +0000
Modify: 2018-10-22 18:24:56.945750616 +0000
Change: 2018-10-22 18:24:56.957750616 +0000
Birth: -
Remediation:
Run the following commands to set permissions, ownership, and group on the private SSH
host key files:
CIS Controls:
Version 7
351 | P a g e
5.3.3 Ensure permissions on SSH public host key files are configured
(Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
An SSH public key is one of two files used in SSH public key authentication. In this
authentication method, a public key is a key that can be used for verifying digital signatures
generated using a corresponding private key. Only a public key that corresponds to a
private key will be able to authenticate successfully.
Rationale:
If a public host key file is modified by an unauthorized user, the SSH service may be
compromised.
Audit:
Run the following command and verify Access does not grant write or execute permissions
to group or other for all returned files:
Example Output:
352 | P a g e
File: ‘/etc/ssh/ssh_host_rsa_key.pub’
Size: 382 Blocks: 8 IO Block: 4096 regular file
Device: ca01h/51713d Inode: 8631758 Links: 1
Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2018-10-22 18:24:56.861750616 +0000
Modify: 2018-10-22 18:24:56.861750616 +0000
Change: 2018-10-22 18:24:56.881750616 +0000
Birth: -
File: ‘/etc/ssh/ssh_host_ecdsa_key.pub’
Size: 162 Blocks: 8 IO Block: 4096 regular file
Device: ca01h/51713d Inode: 8631761 Links: 1
Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2018-10-22 18:24:56.897750616 +0000
Modify: 2018-10-22 18:24:56.897750616 +0000
Change: 2018-10-22 18:24:56.917750616 +0000
Birth: -
File: ‘/etc/ssh/ssh_host_ed25519_key.pub’
Size: 82 Blocks: 8 IO Block: 4096 regular file
Device: ca01h/51713d Inode: 8631763 Links: 1
Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2018-10-22 18:24:56.945750616 +0000
Modify: 2018-10-22 18:24:56.945750616 +0000
Change: 2018-10-22 18:24:56.961750616 +0000
Birth: -
Remediation:
Run the following commands to set permissions and ownership on the SSH host public key
files
CIS Controls:
Version 7
353 | P a g e
5.3.4 Ensure SSH Protocol is set to 2 (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
SSH supports two different and incompatible protocols: SSH1 and SSH2. SSH1 was the
original protocol and was subject to security issues. SSH2 is more advanced and secure.
Rationale:
Audit:
protocol 2
Remediation:
Protocol 2
Default Value:
Protocol 2
References:
1. SSHD_CONFIG(5)
354 | P a g e
CIS Controls:
Version 7
9.2 Ensure Only Approved Ports, Protocols and Services Are Running
Ensure that only network ports, protocols, and services listening on a system with
validated business needs, are running on each system.
355 | P a g e
5.3.5 Ensure SSH access is limited (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
There are several options available to limit which users and group can access the system
via SSH. It is recommended that at least one of the following options be leveraged:
AllowUsers:
o The AllowUsers variable gives the system administrator the option of
allowing specific users to ssh into the system. The list consists of space
separated user names. Numeric user IDs are not recognized with this
variable. If a system administrator wants to restrict user access further by
only allowing the allowed users to log in from a particular host, the entry can
be specified in the form of user@host.
AllowGroups:
o The AllowGroups variable gives the system administrator the option of
allowing specific groups of users to ssh into the system. The list consists of
space separated group names. Numeric group IDs are not recognized with
this variable.
DenyUsers:
o The DenyUsers variable gives the system administrator the option of denying
specific users to ssh into the system. The list consists of space separated user
names. Numeric user IDs are not recognized with this variable. If a system
administrator wants to restrict user access further by specifically denying a
user's access from a particular host, the entry can be specified in the form of
user@host.
DenyGroups:
o The DenyGroups variable gives the system administrator the option of
denying specific groups of users to ssh into the system. The list consists of
space separated group names. Numeric group IDs are not recognized with
this variable.
Rationale:
Restricting which users can remotely access the system via SSH will help ensure that only
authorized users access the system.
356 | P a g e
Audit:
Verify that the output matches at least one of the following lines:
allowusers <userlist>
allowgroups <grouplist>
denyusers <userlist>
denygroups <grouplist>
Remediation:
Edit the /etc/ssh/sshd_config file to set one or more of the parameter as follows:
AllowUsers <userlist>
OR
AllowGroups <grouplist>
OR
DenyUsers <userlist>
OR
DenyGroups <grouplist>
Default Value:
None
References:
1. SSHD_CONFIG(5)
CIS Controls:
Version 7
357 | P a g e
5.3.6 Ensure SSH LogLevel is appropriate (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
INFO level is the basic level that only records login activity of SSH users. In many situations,
such as Incident Response, it is important to determine when a particular user was active
on a system. The logout record can eliminate those users who disconnected, which helps
narrow the field.
VERBOSE level specifies that login and logout activity as well as the key fingerprint for any
SSH key used for login will be logged. This information is important for SSH key
management, especially in legacy environments.
Rationale:
SSH provides several logging levels with varying amounts of verbosity. DEBUG is specifically
not recommended other than strictly for debugging SSH communications since it provides
so much data that it is difficult to identify important security information.
Audit:
Run the following command and verify that output matches loglevel VERBOSE or loglevel
INFO:
358 | P a g e
Remediation:
LogLevel VERBOSE
OR
LogLevel INFO
Default Value:
LogLevel INFO
References:
1. https://www.ssh.com/ssh/sshd_config/
CIS Controls:
Version 7
359 | P a g e
5.3.7 Ensure SSH X11 forwarding is disabled (Automated)
Profile Applicability:
Level 1 - Workstation
Level 2 - Server
Description:
The X11Forwarding parameter provides the ability to tunnel X11 traffic through an
existing SSH shell session to enable remote graphic connections.
Rationale:
Disable X11 forwarding unless there is an operational requirement to use X11 applications
directly. There is a small risk that the remote X11 servers of users who are logged in via
SSH with X11 forwarding could be compromised by other users on the X11 server. Note
that even if X11 forwarding is disabled, users can always install their own forwarders.
Impact:
X11 programs on the server will not be able to be forwarded to a ssh-client display.
Audit:
x11forwarding no
Run the following command and verify that the output matches:
Nothing is returned
Remediation:
X11Forwarding no
360 | P a g e
Default Value:
X11Forwarding yes
References:
1. SSHD_CONFIG(5)
CIS Controls:
Version 7
9.2 Ensure Only Approved Ports, Protocols and Services Are Running
Ensure that only network ports, protocols, and services listening on a system with
validated business needs, are running on each system.
361 | P a g e
5.3.8 Ensure SSH MaxAuthTries is set to 4 or less (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
Rationale:
Setting the MaxAuthTries parameter to a low number will minimize the risk of successful
brute force attacks to the SSH server. While the recommended setting is 4, set the number
based on site policy.
Audit:
Run the following command and verify that output MaxAuthTries is 4 or less:
maxauthtries 4
Nothing is returned
Remediation:
MaxAuthTries 4
Default Value:
MaxAuthTries 6
362 | P a g e
References:
1. SSHD_CONFIG(5)
CIS Controls:
Version 7
363 | P a g e
5.3.9 Ensure SSH IgnoreRhosts is enabled (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
The IgnoreRhosts parameter specifies that .rhosts and .shosts files will not be used in
RhostsRSAAuthentication or HostbasedAuthentication.
Rationale:
Setting this parameter forces users to enter a password when authenticating with ssh.
Audit:
ignorerhosts yes
Remediation:
IgnoreRhosts yes
Default Value:
IgnoreRhosts yes
References:
1. SSHD_CONFIG(5)
364 | P a g e
CIS Controls:
Version 7
9.2 Ensure Only Approved Ports, Protocols and Services Are Running
Ensure that only network ports, protocols, and services listening on a system with
validated business needs, are running on each system.
365 | P a g e
5.3.10 Ensure SSH HostbasedAuthentication is disabled (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
Rationale:
Even though the .rhosts files are ineffective if support is disabled in /etc/pam.conf,
disabling the ability to use .rhosts files in SSH provides an additional layer of protection.
Audit:
hostbasedauthentication no
Remediation:
HostbasedAuthentication no
Default Value:
HostbasedAuthentication no
References:
1. SSHD_CONFIG(5)
366 | P a g e
CIS Controls:
Version 7
367 | P a g e
5.3.11 Ensure SSH root login is disabled (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
The PermitRootLogin parameter specifies if the root user can log in using ssh. The default
is no.
Rationale:
Disallowing root logins over SSH requires system admins to authenticate using their own
individual account, then escalating to root via sudo. This in turn limits opportunity for non-
repudiation and provides a clear audit trail in the event of a security incident
Audit:
permitrootlogin no
Remediation:
PermitRootLogin no
Default Value:
PermitRootLogin without-password
References:
1. SSHD_CONFIG(5)
368 | P a g e
CIS Controls:
Version 7
369 | P a g e
5.3.12 Ensure SSH PermitEmptyPasswords is disabled (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
The PermitEmptyPasswords parameter specifies if the SSH server allows login to accounts
with empty password strings.
Rationale:
Disallowing remote shell access to accounts that have an empty password reduces the
probability of unauthorized access to the system
Audit:
permitemptypasswords no
Remediation:
PermitEmptyPasswords no
Default Value:
PermitEmptyPasswords no
References:
1. SSHD_CONFIG(5)
370 | P a g e
CIS Controls:
Version 7
371 | P a g e
5.3.13 Ensure SSH PermitUserEnvironment is disabled (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
Rationale:
Permitting users the ability to set environment variables through the SSH daemon could
potentially allow users to bypass security controls (e.g. setting an execution path that has
ssh executing a Trojan’s programs)
Audit:
permituserenvironment no
Remediation:
PermitUserEnvironment no
Default Value:
PermitUserEnvironment no
References:
1. SSHD_CONFIG(5)
372 | P a g e
CIS Controls:
Version 7
373 | P a g e
5.3.14 Ensure only strong Ciphers are used (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
This variable limits the ciphers that SSH can use during communication.
Notes:
Some organizations may have stricter requirements for approved ciphers. Ensure that
ciphers used are in compliance with site policy.
The only "strong" ciphers currently FIPS 140-2 compliant are: aes256-ctr,aes192-
ctr,aes128-ctr
Rationale:
Weak ciphers that are used for authentication to the cryptographic module cannot be relied
upon to provide confidentiality or integrity, and system data may be compromised.
The DES, Triple DES, and Blowfish ciphers, as used in SSH, have a birthday bound of
approximately four billion blocks, which makes it easier for remote attackers to
obtain cleartext data via a birthday attack against a long-duration encrypted session,
aka a "Sweet32" attack
The RC4 algorithm, as used in the TLS protocol and SSL protocol, does not properly
combine state data with key data during the initialization phase, which makes it
easier for remote attackers to conduct plaintext-recovery attacks against the initial
bytes of a stream by sniffing network traffic that occasionally relies on keys affected
by the Invariance Weakness, and then using a brute-force approach involving LSB
values, aka the "Bar Mitzvah" issue
The passwords used during an SSH session encrypted with RC4 can be recovered by
an attacker who is able to capture and replay the session
Error handling in the SSH protocol; Client and Server, when using a block cipher
algorithm in Cipher Block Chaining (CBC) mode, makes it easier for remote
attackers to recover certain plaintext data from an arbitrary block of ciphertext in
an SSH session via unknown vectors
374 | P a g e
Audit:
Remediation:
Edit the /etc/ssh/sshd_config file add/modify the Ciphers line to contain a comma
separated list of the site approved ciphers
Example:
Ciphers aes256-ctr,aes192-ctr,aes128-ctr
Default Value:
Ciphers aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-
cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se
References:
1. https://nvd.nist.gov/vuln/detail/CVE-2016-2183
2. https://nvd.nist.gov/vuln/detail/CVE-2015-2808
3. https://www.kb.cert.org/vuls/id/565052
4. https://www.openssh.com/txt/cbc.adv
5. https://nvd.nist.gov/vuln/detail/CVE-2008-5161
6. https://nvd.nist.gov/vuln/detail/CVE-2013-4548
7. https://www.kb.cert.org/vuls/id/565052
8. https://www.openssh.com/txt/cbc.adv
9. SSHD_CONFIG(5)
375 | P a g e
Additional Information:
The Following are the protocol version 2 ciphers supported by openSSH v5.3p1:
3des-cbc
aes128-cbc
aes192-cbc
aes256-cbc
aes128-ctr
aes192-ctr
aes256-ctr
arcfour
arcfour128
arcfour256
blowfish-cbc
cast128-cbc
rijndael-cbc@lysator.liu.se
cast128-cbc
Weak Ciphers:
3des-cbc
aes128-cbc
aes192-cbc
aes256-cbc
arcfour
arcfour128
arcfour256
blowfish-cbc
cast128-cbc
rijndael-cbc@lysator.liu.se
cast128-cbc
CIS Controls:
Version 7
376 | P a g e
5.3.15 Ensure only strong MAC algorithms are used (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
This variable Specifies the available MAC (message authentication code) algorithms. The
MAC algorithm is used in protocol version 2 for data integrity protection. Multiple
algorithms must be comma-separated.
Notes:
Some organizations may have stricter requirements for approved MACs. Ensure that
MACs used are in compliance with site policy.
The only "strong" MACs currently FIPS 140-2 approved are hmac-sha2-256 and hmac-
sha2-512
Rationale:
MD5 and 96-bit MAC algorithms are considered weak and have been shown to increase
exploitability in SSH downgrade attacks. Weak algorithms continue to have a great deal of
attention as a weak spot that can be exploited with expanded computing power. An
attacker that breaks the algorithm could take advantage of a MiTM position to decrypt the
SSH tunnel and capture credentials and information
Audit:
377 | P a g e
# grep -Ei '^\s*macs\s+([^#]+,)?(hmac-md5|hmac-md5-96|hmac-ripemd160|hmac-
sha1|hmac-sha1-96|umac-64@openssh\.com|hmac-md5-etm@openssh\.com|hmac-md5-96-
etm@openssh\.com|hmac-ripemd160-etm@openssh\.com|hmac-sha1-
etm@openssh\.com|hmac-sha1-96-etm@openssh\.com|umac-64-etm@openssh\.com|umac-
128-etm@openssh\.com)\b' /etc/ssh/sshd_config
Remediation:
Edit the /etc/ssh/sshd_config file and add/modify the MACs line to contain a comma
separated list of the site approved MACs
Example:
MACs hmac-sha2-512,hmac-sha2-256
Default Value:
MACs hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160,hmac-sha1-
96,hmac-md5-96,hmac-sha2-256,hmac-sha2-512,hmac-160@openssh.com
References:
Additional Information:
hmac-md5
hmac-md5-96
hmac-ripemd160
hmac-sha1
hmac-sha1-96
umac-64@openssh.com
umac-128@openssh.com
hmac-md5-etm@openssh.com
hmac-md5-96-etm@openssh.com
hmac-ripemd160-etm@openssh.com
hmac-sha1-etm@openssh.com
hmac-sha1-96-etm@openssh.com
umac-64-etm@openssh.com
umac-128-etm@openssh.com
378 | P a g e
CIS Controls:
Version 7
379 | P a g e
5.3.16 Ensure only strong Key Exchange algorithms are used
(Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
Key exchange is any method in cryptography by which cryptographic keys are exchanged
between two parties, allowing use of a cryptographic algorithm. If the sender and receiver
wish to exchange encrypted messages, each must be equipped to encrypt messages to be
sent and decrypt messages received
Note: The only openSSH 5.3p1 Key Exchange Algorithm currently FIPS 140-2 approved is
diffie-hellman-group-exchange-sha256
Rationale:
Key exchange methods that are considered weak should be removed. A key exchange
method may be weak because too few bits are used or the hashing algorithm is considered
too weak. Using weak algorithms could expose connections to man-in-the-middle attacks
Audit:
380 | P a g e
Remediation:
Edit the /etc/ssh/sshd_config file add/modify the KexAlgorithms line to contain a comma
separated list of the site approved key exchange algorithms
Example:
KexAlgorithms diffie-hellman-group-exchange-sha256
Default Value:
kexalgorithms diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-
sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
References:
1. SSHD_CONFIG(5)
Additional Information:
diffie-hellman-group1-sha1
diffie-hellman-group14-sha1
diffie-hellman-group-exchange-sha1
diffie-hellman-group-exchange-sha256
Weak Key Exchange Algorithms:
diffie-hellman-group1-sha1
diffie-hellman-group14-sha1
diffie-hellman-group-exchange-sha1
CIS Controls:
Version 7
381 | P a g e
5.3.17 Ensure SSH Idle Timeout Interval is configured (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
Rationale:
Having no timeout value associated with a connection could allow an unauthorized user
access to another user's ssh session (e.g. user walks away from their computer and doesn't
lock the screen). Setting a timeout value reduces this risk.
382 | P a g e
Audit:
Run the following commands and verify ClientAliveInterval is between 1 and 300:
clientaliveinterval 300
clientalivecountmax 3
Remediation:
Edit the /etc/ssh/sshd_config file to set the parameters according to site policy. This
should include ClientAliveInterval between 1 and 300 and ClientAliveCountMax
between 1 and 3:
ClientAliveInterval 300
ClientAliveCountMax 3
Default Value:
ClientAliveInterval 0
ClientAliveCountMax 3
References:
1. https://man.openbsd.org/sshd_config
383 | P a g e
CIS Controls:
Version 7
384 | P a g e
5.3.18 Ensure SSH LoginGraceTime is set to one minute or less
(Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
The LoginGraceTime parameter specifies the time allowed for successful authentication to
the SSH server. The longer the Grace period is the more open unauthenticated connections
can exist. Like other session controls in this session the Grace Period should be limited to
appropriate organizational limits to ensure the service is available for needed access.
Rationale:
Setting the LoginGraceTime parameter to a low number will minimize the risk of successful
brute force attacks to the SSH server. It will also limit the number of concurrent
unauthenticated connections While the recommended setting is 60 seconds (1 Minute), set
the number based on site policy.
Audit:
Run the following command and verify that output LoginGraceTime is between 1 and 60
seconds or 1m:
logingracetime 60
Remediation:
LoginGraceTime 60
385 | P a g e
Default Value:
LoginGraceTime 2m
References:
1. SSHD_CONFIG(5)
CIS Controls:
Version 7
386 | P a g e
5.3.19 Ensure SSH warning banner is configured (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
The Banner parameter specifies a file whose contents must be sent to the remote user
before authentication is permitted. By default, no banner is displayed.
Rationale:
Banners are used to warn connecting users of the particular site's policy regarding
connection. Presenting a warning message prior to the normal user login may assist the
prosecution of trespassers on the computer system.
Audit:
banner /etc/issue.net
Remediation:
Banner /etc/issue.net
References:
1. SSHD_CONFIG(5)
CIS Controls:
Version 7
387 | P a g e
5.3.20 Ensure SSH PAM is enabled (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
UsePAM Enables the Pluggable Authentication Module interface. If set to “yes” this will
enable PAM authentication using ChallengeResponseAuthentication and
PasswordAuthentication in addition to PAM account and session module processing for all
authentication types
Rationale:
When usePAM is set to yes, PAM runs through account and session types properly. This is
important if you want to restrict access to services based off of IP, time or other factors of
the account. Additionally, you can make sure users inherit certain environment variables
on login or disallow access to the server
Impact:
If UsePAM is enabled, you will not be able to run sshd(5) as a non-root user.
Audit:
usepam yes
Remediation:
UsePAM yes
388 | P a g e
Default Value:
usePAM yes
References:
1. SSHD_CONFIG(5)
CIS Controls:
Version 7
389 | P a g e
5.3.21 Ensure SSH AllowTcpForwarding is disabled (Automated)
Profile Applicability:
Level 2 - Server
Level 2 - Workstation
Description:
SSH port forwarding is a mechanism in SSH for tunneling application ports from the client
to the server, or servers to clients. It can be used for adding encryption to legacy
applications, going through firewalls, and some system administrators and IT professionals
use it for opening backdoors into the internal network from their home machines
Rationale:
Leaving port forwarding enabled can expose the organization to security risks and back-
doors.
SSH connections are protected with strong encryption. This makes their contents invisible
to most deployed network monitoring and traffic filtering solutions. This invisibility carries
considerable risk potential if it is used for malicious purposes such as data exfiltration.
Cybercriminals or malware could exploit SSH to hide their unauthorized communications,
or to exfiltrate stolen data from the target network
Impact:
SSH tunnels are widely used in many corporate environments that employ mainframe
systems as their application backends. In those environments the applications themselves
may have very limited native support for security. By utilizing tunneling, compliance with
SOX, HIPAA, PCI-DSS, and other standards can be achieved without having to modify the
applications.
390 | P a g e
Audit:
allowtcpforwarding no
Remediation:
AllowTcpForwarding no
Default Value:
AllowTcpForwarding yes
References:
1. https://www.ssh.com/ssh/tunneling/example
2. SSHD_CONFIG(5)
CIS Controls:
Version 7
9.2 Ensure Only Approved Ports, Protocols and Services Are Running
Ensure that only network ports, protocols, and services listening on a system with
validated business needs, are running on each system.
391 | P a g e
5.3.22 Ensure SSH MaxStartups is configured (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
Rationale:
To protect a system from denial of service due to a large number of pending authentication
connection attempts, use the rate limiting function of MaxStartups to protect availability of
sshd logins and prevent overwhelming the daemon.
Audit:
Run the following command and verify that output MaxStartups is 10:30:60 or more
restrictive:
maxstartups 10:30:60
Remediation:
maxstartups 10:30:60
Default Value:
MaxStartups 10:30:100
392 | P a g e
References:
1. SSHD_CONFIG(5)
CIS Controls:
Version 7
393 | P a g e
5.3.23 Ensure SSH MaxSessions is limited (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
The MaxSessions parameter Specifies the maximum number of open sessions permitted
per network connection.
Rationale:
To protect a system from denial of service due to a large number of concurrent sessions,
use the rate limiting function of MaxSessions to protect availability of sshd logins and
prevent overwhelming the daemon.
Audit:
Run the following command and verify that output MaxSessions is 10 or less:
maxsessions 10
Remediation:
MaxSessions 10
Default Value:
MaxSessions 10
394 | P a g e
References:
1. SSHD_CONFIG(5)
CIS Controls:
Version 7
395 | P a g e
5.4 Configure PAM
PAM (Pluggable Authentication Modules) is a service that implements modular
authentication modules on UNIX systems. PAM is implemented as a set of shared objects
that are loaded and executed when a program needs to authenticate a user. Files for PAM
are typically located in the /etc/pam.d directory. PAM must be carefully configured to
secure system authentication. While this section covers some of PAM, please consult other
PAM resources to fully understand the configuration capabilities.
396 | P a g e
5.4.1 Ensure password creation requirements are configured
(Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
The pam_cracklib.so module checks the strength of passwords. It performs checks such as
making sure a password is not a dictionary word, it is a certain length, contains a mix of
characters (e.g. alphabet, numeric, other) and more. The following are definitions of the
pam_cracklib.so options.
Rationale:
Strong passwords protect systems from being hacked through brute force methods.
397 | P a g e
Audit:
Run the following commands and verify all password requirements conform to
organization policy and minlen is 14 or more:
Remediation:
Additional Information:
Additional module options may be set, recommendation requirements only cover including
try_first_pass and minlen set to 14 or more.
CIS Controls:
Version 7
398 | P a g e
5.4.2 Ensure lockout for failed password attempts is configured
(Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
Lock out users after n unsuccessful consecutive login attempts. The first sets of changes are
made to the PAM configuration files. The second set of changes are applied to the program
specific PAM configuration file. The second set of changes must be applied to each program
that will lock out users. Check the documentation for each secondary program for
instructions on how to configure them to work with PAM.
Rationale:
Locking out user IDs after n unsuccessful consecutive login attempts mitigates brute force
password attacks against your systems.
Audit:
Remediation:
399 | P a g e
Additional Information:
Additional module options may be set, recommendation only covers those listed here.
If a user has been locked out because they have reached the maximum consecutive failure
count defined by deny= in the pam_faillock.so module, the user can be unlocked by
issuing the command faillock -u --reset respectively. This command sets the failed
count to 0, effectively unlocking the user.
Use of the "audit" keyword may log credentials in the case of user error during
authentication. This risk should be evaluated in the context of the site policies of your
organization.
CIS Controls:
Version 7
400 | P a g e
5.4.3 Ensure password reuse is limited (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
The /etc/security/opasswd file stores the users' old passwords and can be checked to
ensure that users are not recycling recent passwords.
Rationale:
Forcing users not to reuse their past 5 passwords make it less likely that an attacker will be
able to guess the password.
Note that these change only apply to accounts configured on the local system.
Audit:
Run the following commands and ensure the remember option is '5' or more and included in
all results:
OR
Run the following commands and ensure the remember option is '5' or more and included in
all results:
401 | P a g e
Remediation:
OR
Additional Information:
Additional module options may be set, recommendation only covers those listed here.
CIS Controls:
Version 7
402 | P a g e
5.4.4 Ensure password hashing algorithm is SHA-512 (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
The commands below change password encryption from md5 to sha512 (a much stronger
hashing algorithm). All existing accounts will need to perform a password change to
upgrade the stored hashes to the new algorithm.
Rationale:
The SHA-512 algorithm provides much stronger hashing than MD5, thus providing
additional protection to the system by increasing the level of effort for an attacker to
successfully determine passwords.
Note that these change only apply to accounts configured on the local system.
Audit:
Run the following commands and ensure the sha512 option is included in all results:
Remediation:
403 | P a g e
Additional Information:
Additional module options may be set, recommendation only covers those listed here.
If using authconfig to manage PAM the encryption method can be configured with the
ENCRYPT_METHOD setting in /etc/login.defs
If it is determined that the password algorithm being used is not SHA-512, once it is
changed, it is recommended that all user ID's be immediately expired and forced to change
their passwords on next login. To accomplish that, the following commands can be used.
Any system accounts that need to be expired should be carefully done separately by the
system administrator to prevent any potential problems.
# cat /etc/passwd | awk -F: '( $3 >= 500 && $1 != "nfsnobody" ) { print $1 }'
| xargs -n 1 chage -d 0
CIS Controls:
Version 7
404 | P a g e
5.5 User Accounts and Environment
This section provides guidance on setting up secure defaults for system and user accounts
and their environment.
405 | P a g e
5.5.1 Set Shadow Password Suite Parameters
While a majority of the password control parameters have been moved to PAM, some
parameters are still available through the shadow password suite. Any changes made to
/etc/login.defs will only be applied if the usermod command is used. If user IDs are
added a different way, use the chage command to effect changes to individual user IDs.
406 | P a g e
5.5.1.1 Ensure password expiration is 365 days or less (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
Rationale:
Requiring passwords to be changed helps to mitigate the risk posed by the poor security
practice of passwords being used for multiple accounts, and poorly implemented off-
boarding and change of responsibility policies. This should not be considered a
replacement for proper implementation of these policies and practices.
Note: If it is believed that a user's password may have been compromised, the user's account
should be locked immediately. Local policy should be followed to ensure the secure update of
their password.
Audit:
Run the following command and verify PASS_MAX_DAYS conforms to site policy (no more
than 365 days):
PASS_MAX_DAYS 365
Run the following command and Review list of users and PASS_MAX_DAYS to verify that all
users' PASS_MAX_DAYS conforms to site policy (no more than 365 days):
<user>:<PASS_MAX_DAYS>
407 | P a g e
Remediation:
PASS_MAX_DAYS 365
Modify user parameters for all users with a password set to match:
Additional Information:
CIS Controls:
Version 7
408 | P a g e
5.5.1.2 Ensure minimum days between password changes is configured
(Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
Rationale:
By restricting the frequency of password changes, an administrator can prevent users from
repeatedly changing their password in an attempt to circumvent password reuse controls.
Audit:
Run the following command and verify PASS_MIN_DAYS conforms to site policy (no less than
1 day):
PASS_MIN_DAYS 1
Run the following command and Review list of users and PAS_MIN_DAYS to Verify that all
users' PAS_MIN_DAYS conforms to site policy (no less than 1 day):
<user>:<PASS_MIN_DAYS>
409 | P a g e
Remediation:
PASS_MIN_DAYS 1
Modify user parameters for all users with a password set to match:
CIS Controls:
Version 7
410 | P a g e
5.5.1.3 Ensure password expiration warning days is 7 or more
(Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
Rationale:
Providing an advance warning that a password will be expiring gives users time to think of
a secure password. Users caught unaware may choose a simple password or write it down
where it may be discovered.
Audit:
Run the following command and verify PASS_WARN_AGE conforms to site policy (No less than
7 days):
PASS_WARN_AGE 7
Verify all users with a password have their number of days of warning before password
expires set to 7 or more:
Run the following command and Review list of users and PASS_WARN_AGE to verify that all
users' PASS_WARN_AGE conforms to site policy (No less than 7 days):
<user>:<PASS_WARN_AGE>
411 | P a g e
Remediation:
PASS_WARN_AGE 7
Modify user parameters for all users with a password set to match:
CIS Controls:
Version 7
412 | P a g e
5.5.1.4 Ensure inactive password lock is 30 days or less (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
User accounts that have been inactive for over a given period of time can be automatically
disabled. It is recommended that accounts that are inactive for 30 days after password
expiration be disabled.
Rationale:
Inactive accounts pose a threat to system security since the users are not logging in to
notice failed login attempts or other anomalies.
Audit:
Run the following command and verify INACTIVE conforms to sire policy (no more than 30
days):
INACTIVE=30
Verify all users with a password have Password inactive no more than 30 days after
password expires:
Run the following command and Review list of users and INACTIVE to verify that all users'
INACTIVE conforms to site policy (no more than 30 days):
<user>:<INACTIVE>
413 | P a g e
Remediation:
Run the following command to set the default password inactivity period to 30 days:
# useradd -D -f 30
Modify user parameters for all users with a password set to match:
CIS Controls:
Version 7
414 | P a g e
5.5.1.5 Ensure all users last password change date is in the past
(Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
Rationale:
If a users recorded password change date is in the future then they could bypass any set
password expiration.
Audit:
# for usr in $(cut -d: -f1 /etc/shadow); do [[ $(chage --list $usr | grep
'^Last password change' | cut -d: -f2) > $(date) ]] && echo "$usr :$(chage --
list $usr | grep '^Last password change' | cut -d: -f2)"; done
Remediation:
Investigate any users with a password change date in the future and correct them. Locking
the account, expiring the password, or resetting the password manually may be
appropriate.
CIS Controls:
Version 7
415 | P a g e
5.5.2 Ensure system accounts are secured (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
There are a number of accounts provided with Red Hat 6 that are used to manage
applications and are not intended to provide an interactive shell.
Rationale:
It is important to make sure that accounts that are not being used by regular users are
prevented from being used to provide an interactive shell. By default, most distributions
set the password field for these accounts to an invalid string, but it is also recommended
that the shell field in the password file be set to the nologin shell. This prevents the
account from potentially being used to run any commands.
Note: The root, sync, shutdown, and halt users are exempted from requiring a non-login
shell.
Audit:
awk -F: '($1!="root" && $1!="sync" && $1!="shutdown" && $1!="halt" &&
$1!~/^\+/ && $3<'"$(awk '/^\s*UID_MIN/{print $2}' /etc/login.defs)"' &&
$7!="'"$(which nologin)"'" && $7!="/bin/false") {print}' /etc/passwd
416 | P a g e
Remediation:
Set the shell for any accounts returned by the audit to nologin:
# usermod -L <user>
The following command will set all system accounts to a non login shell:
awk -F: '($1!="root" && $1!="sync" && $1!="shutdown" && $1!="halt" &&
$1!~/^\+/ && $3<'"$(awk '/^\s*UID_MIN/{print $2}' /etc/login.defs)"' &&
$7!="'"$(which nologin)"'" && $7!="/bin/false" && $7!="/usr/bin/false")
{print $1}' /etc/passwd | while read -r user; do usermod -s "$(which
nologin)" "$user"; done
The following command will automatically lock not root system accounts:
CIS Controls:
Version 7
417 | P a g e
5.5.3 Ensure default group for the root account is GID 0 (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
The usermod command can be used to specify which group the root user belongs to. This
affects permissions of files that are created by the root user.
Rationale:
Using GID 0 for the root account helps prevent root -owned files from accidentally
becoming accessible to non-privileged users.
Audit:
Remediation:
Run the following command to set the root user default group to GID 0 :
# usermod -g 0 root
CIS Controls:
Version 7
418 | P a g e
5.5.4 Ensure default user shell timeout is configured (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
Rationale:
Setting a timeout value reduces the window of opportunity for unauthorized user access to
another user's shell session that has been left unattended. It also ends the inactive session
and releases the resources associated with that session.
419 | P a g e
Audit:
Run the following commands to verify that TMOUT is configured to include a timeout of no
more than 900 seconds, to be readonly, and to be exported:
Run the following command to verify that TMOUT is configured in: a .sh file in
/etc/profile.d/, in /etc/profile, or in /etc/bashrc:
Run the following command to verify that TMOUT is not being changed to a longer timeout:
# grep -P '^\s*([^$#;]+\s+)*TMOUT=(9[0-9][1-9]|0+|[1-
9]\d{3,})\b\s*(\S+\s*)*(\s+#.*)?$' /etc/profile /etc/profile.d/*.sh
/etc/bashrc
Remediation:
Review /etc/bashrc, /etc/profile, and all files ending in *.sh in the /etc/profile.d/
directory and remove or edit all TMOUT=_n_ entries to follow local site policy. TMOUT should
not exceed 900 or be equal to 0.
Configure TMOUT in one of the following files:
As multiple lines:
TMOUT=900
readonly TMOUT
export TMOUT
As a single line:
420 | P a g e
Additional Information:
The audit and remediation in this recommendation apply to bash and shell. If other
shells are supported on the system, it is recommended that their configuration files
are also checked. Other methods of setting a timeout exist for other shells not
covered here.
Ensure that the timeout conforms to your local policy.
CIS Controls:
Version 7
421 | P a g e
5.5.5 Ensure default user umask is configured (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
The user file-creation mode mask (umask) is use to determine the file permission for newly
created directories and files. In Linux, the default permissions for any newly created
directory is 0777 (rwxrwxrwx), and for any newly created file it is 0666 (rw-rw-rw-). The
umask modifies the default Linux permissions by restricting (masking) these permissions.
The umask is not simply subtracted, but is processed bitwise. Bits set in the umask are
cleared in the resulting file mode.
umask can be set with either octal or Symbolic values
Octal (Numeric) Value - Represented by either three or four digits. ie umask 0027 or
umask 027. If a four digit umask is used, the first digit is ignored. The remaining
three digits effect the resulting permissions for user, group, and world/other
respectively.
Symbolic Value - Represented by a comma separated list for User u, group g, and
world/other o. The permissions listed are not masked by umask. ie a umask set by
umask u=rwx,g=rx,o= is the Symbolic equivalent of the Octal umask 027. This
umask would set a newly created directory with file mode drwxr-x--- and a newly
created file with file mode rw-r-----.
The default umask is set in a System Wide Shell Configuration File. The user creating
the directories or files has the discretion of changing the permissions via the chmod
command, or choosing a different default umask by adding the umask command into a User
Shell Configuration File, ( .bash_profile or .bashrc), in their home directory.
System Wide Shell Configuration Files:
422 | P a g e
User Shell Configuration Files:
Rationale:
Setting a secure default value for umask ensures that users make a conscious choice about
their file permissions. A permissive umask value could result in directories or files with
excessive permissions that can be read and/or written to by unauthorized users.
Notes:
The audit and remediation in this recommendation apply to bash and shell. If other
shells are supported on the system, it is recommended that their configuration files
also are checked.
Other methods of setting a default user umask exist however the shell configuration
files are the last run and will override other settings if they exist, therefor our
recommendation is to configure in the shell configuration files.
If other methods are in use in your environment they should be audited and the shell
configs should be verified to not override.
Audit:
No System Wide umask is set that allows for a newly created directories's
permissions to be less restrictive than 750 (drwxr-x---) or a newly created file's
permissions to be less restrictive than 640 (rw-r-----). (umask 027 or umask
u=rwx,g=rx,o=)
The default System Wide umask is set to enforce a newly created directories's
permissions to be 750 (drwxr-x---), and a newly created file's permissions be 640
(rw-r-----). (umask 027 or umask u=rwx,g=rx,o=) or more restrictive.
Run the following commands to verify and System Wide umask is: 027, u=rwx,g=rx,o=, or
more restrictive:
423 | P a g e
Run the following command to verify that a System Wide Default umask of 027,
u=rwx,g=rx,o=, or more restrictive is set:
# grep -E '^\s*umask\s+\s*(0[0-7][2-7]7|[0-7][2-
7]7|u=(r?|w?|x?)(r?|w?|x?)(r?|w?|x?),g=(r?x?|x?r?),o=)\s*(\s*#.*)?$'
/etc/profile /etc/profile.d/*.sh /etc/bashrc
Remediation:
Review /etc/bashrc, /etc/profile, and all files ending in *.sh in the /etc/profile.d/ directory
and remove or edit all umask entries to follow local site policy. Any remaining entries
should be: umask 027, umask u=rwx,g=rx,o= or more restrictive.
Configure umask in one of the following files:
Example:
# vi /etc/profile.d/set_umask.sh
umask 027
CIS Controls:
Version 7
13 Data Protection
Data Protection
424 | P a g e
5.6 Ensure root login is restricted to system console (Manual)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
The file /etc/securetty contains a list of valid terminals that may be logged in directly as
root.
Rationale:
Since the system console has special properties to handle emergency situations, it is
important to ensure that the console is in a physically secure location and that
unauthorized consoles have not been defined.
Audit:
# cat /etc/securetty
Remediation:
Remove entries for any consoles that are not in a physically secure location.
CIS Controls:
Version 7
425 | P a g e
5.7 Ensure access to the su command is restricted (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
The su command allows a user to run a command or shell as another user. The program
has been superseded by sudo , which allows for more granular control over privileged
access. Normally, the su command can be executed by any user. By uncommenting the
pam_wheel.so statement in /etc/pam.d/su , the su command will only allow users in the
wheel group to execute su .
Rationale:
Restricting the use of su , and using sudo in its place, provides system administrators better
control of the escalation of user privileges to execute privileged commands. The sudo utility
also provides a better logging and audit mechanism, as it can log each command executed
via sudo , whereas su can only record that a user executed the su program.
Audit:
Run the following command and verify output includes matching line:
Run the following command and verify users in wheel group match site policy:
wheel:x:10:root,<user list>
Remediation:
Create a comma separated list of users in the wheel statement in the /etc/group file:
wheel:x:10:root,<user list>
426 | P a g e
CIS Controls:
Version 7
427 | P a g e
6 System Maintenance
Recommendations in this section are intended as maintenance and are intended to be
checked on a frequent basis to ensure system stability. Many recommendations do not have
quick remediations and require investigation into the cause and best fix available and may
indicate an attempted breach of system security.
428 | P a g e
6.1 System File Permissions
This section provides guidance on securing aspects of system files and directories.
Level 2 - Server
Level 2 - Workstation
Description:
The RPM package manager has a number of useful options. One of these, the --verify (or -
V ) option, can be used to verify that system packages are correctly installed. The --verify
option can be used to verify a particular package or to verify all system packages. If no
output is returned, the package is installed correctly. The following table describes the
meaning of output from the verify option:
Code Meaning
S File size differs.
M File mode differs (includes permissions and file type).
5 The MD5 checksum differs.
D The major and minor version numbers differ on a device file.
L A mismatch occurs in a link.
U The file ownership differs.
G The file group owner differs.
T The file time (mtime) differs.
The rpm -qf command can be used to determine which package a particular file belongs to.
For example the following commands determines which package the /bin/bash file
belongs to:
bash-4.1.2-48.el6.x86_64
To verify the settings for the package that controls the /bin/bash file, run the following:
# rpm -V bash-4.1.2-48.el6.x86_64
.M....... /bin/bash
Note that you can feed the output of the rpm -qf command to the rpm -V command:
429 | P a g e
# rpm -V $(rpm -qf /etc/passwd)
.M...... c /etc/passwd
S.5....T c /etc/printcap
Rationale:
It is important to confirm that packaged system files and directories are maintained with
the permissions they were intended to have from the OS vendor.
Audit:
Run the following command to review all installed packages. Note that this may be very
time consuming and may be best scheduled via the cron utility. It is recommended that the
output of this command be redirected to a file that can be reviewed later.
Remediation:
Correct any discrepancies found and rerun the audit until output is clean or risk is
mitigated or accepted.
References:
1. http://docs.fedoraproject.org/en-
US/Fedora_Draft_Documentation/0.1/html/RPM_Guide/index.html
Additional Information:
Since packages and important files may change with new updates and releases, it is
recommended to verify everything, not just a finite list of files. This can be a time
consuming task and results may depend on site policy therefore it is not a scorable
benchmark item, but is provided for those interested in additional security measures.
Some of the recommendations of this benchmark alter the state of files audited by this
recommendation. The audit command will alert for all changes to a file permissions even if
the new state is more secure than the default.
430 | P a g e
CIS Controls:
Version 7
431 | P a g e
6.1.2 Ensure permissions on /etc/passwd are configured (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
The /etc/passwd file contains user account information that is used by many system
utilities and therefore must be readable for these utilities to operate.
Rationale:
It is critical to ensure that the /etc/passwd file is protected from unauthorized write
access. Although it is protected by default, the file permissions could be changed either
inadvertently or through malicious actions.
Audit:
Run the following command and verify Uid and Gid are both 0/root and Access is 644 :
# stat /etc/passwd
Remediation:
Default Value:
0644
CIS Controls:
Version 7
432 | P a g e
6.1.3 Ensure permissions on /etc/passwd- are configured (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
Rationale:
It is critical to ensure that the /etc/passwd- file is protected from unauthorized access.
Although it is protected by default, the file permissions could be changed either
inadvertently or through malicious actions.
Audit:
Run the following command and verify Uid and Gid are both 0/root and Access is 644 or
more restrictive:
# stat /etc/passwd-
Remediation:
Default Value:
0644
CIS Controls:
Version 7
433 | P a g e
6.1.4 Ensure permissions on /etc/group are configured (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
The /etc/group file contains a list of all the valid groups defined in the system. The
command below allows read/write access for root and read access for everyone else.
Rationale:
Audit:
Run the following command and verify Uid and Gid are both 0/root and Access is 644:
# stat /etc/group
Remediation:
Default Value:
0644
CIS Controls:
Version 7
434 | P a g e
6.1.5 Ensure permissions on /etc/group- are configured (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
The /etc/group- file contains a backup list of all the valid groups defined in the system.
Rationale:
It is critical to ensure that the /etc/group- file is protected from unauthorized access.
Although it is protected by default, the file permissions could be changed either
inadvertently or through malicious actions.
Audit:
Run the following command and verify Uid and Gid are both 0/root and Access is 644 or
more restrictive:
# stat /etc/group-
Remediation:
Default Value:
0644
CIS Controls:
Version 7
435 | P a g e
6.1.6 Ensure permissions on /etc/shadow are configured (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
The /etc/shadow file is used to store the information about user accounts that is critical to
the security of those accounts, such as the hashed password and other security
information.
Rationale:
If attackers can gain read access to the /etc/shadow file, they can easily run a password
cracking program against the hashed password to break it. Other security information that
is stored in the /etc/shadow file (such as expiration) could also be useful to subvert the
user accounts.
Audit:
Run the following command and verify Uid and Gid are 0/root , and Access is 000 :
# stat /etc/shadow
Remediation:
Default Value:
0000
CIS Controls:
Version 7
436 | P a g e
6.1.7 Ensure permissions on /etc/shadow- are configured (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
The /etc/shadow- file is used to store backup information about user accounts that is
critical to the security of those accounts, such as the hashed password and other security
information.
Rationale:
It is critical to ensure that the /etc/shadow- file is protected from unauthorized access.
Although it is protected by default, the file permissions could be changed either
inadvertently or through malicious actions.
Audit:
Run the following command and verify verify Uid and Gid is 0/root, and Access is 000:
# stat /etc/shadow-
Remediation:
Default Value:
0000
CIS Controls:
Version 7
437 | P a g e
6.1.8 Ensure permissions on /etc/gshadow are configured (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
The /etc/gshadow file is used to store the information about groups that is critical to the
security of those accounts, such as the hashed password and other security information.
Rationale:
If attackers can gain read access to the /etc/gshadow file, they can easily run a password
cracking program against the hashed password to break it. Other security information that
is stored in the /etc/gshadow file (such as group administrators) could also be useful to
subvert the group.
Audit:
Run the following command and verify Uid and Gid are 0/root , and Access is 000:
# stat /etc/gshadow
Remediation:
Default Value:
0000
CIS Controls:
Version 7
438 | P a g e
6.1.9 Ensure permissions on /etc/gshadow- are configured (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
The /etc/gshadow- file is used to store backup information about groups that is critical to
the security of those accounts, such as the hashed password and other security
information.
Rationale:
It is critical to ensure that the /etc/gshadow- file is protected from unauthorized access.
Although it is protected by default, the file permissions could be changed either
inadvertently or through malicious actions.
Audit:
Run the following command and verify verify Uid and Gid are 0/root, and Access is 000:
# stat /etc/gshadow-
Remediation:
Default Value:
0000
CIS Controls:
Version 7
439 | P a g e
6.1.10 Ensure no world writable files exist (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
Unix-based systems support variable settings to control access to files. World writable files
are the least secure. See the chmod(2) man page for more information.
Rationale:
Data in world-writable files can be modified and compromised by any user on the system.
World writable files may also indicate an incorrectly written script or program that could
potentially be the cause of a larger compromise to the system's integrity.
Audit:
# df --local -P | awk {'if (NR!=1) print $6'} | xargs -I '{}' find '{}' -xdev
-type f -perm -0002
The command above only searches local filesystems, there may still be compromised items
on network mounted partitions. The following command can be run manually for
individual partitions if needed:
Remediation:
Removing write access for the "other" category ( chmod o-w <filename> ) is advisable, but
always consult relevant vendor documentation to avoid breaking any application
dependencies on a given file.
440 | P a g e
CIS Controls:
Version 7
441 | P a g e
6.1.11 Ensure no unowned files or directories exist (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
Sometimes when administrators delete users from the password file they neglect to
remove all files owned by those users from the system.
Rationale:
A new user who is assigned the deleted user's user ID or group ID may then end up
"owning" these files, and thus have more access on the system than was intended.
Audit:
# df --local -P | awk {'if (NR!=1) print $6'} | xargs -I '{}' find '{}' -xdev
-nouser
The command above only searches local filesystems, there may still be compromised items
on network mounted partitions. The following command can be run manually for
individual partitions if needed:
Remediation:
Locate files that are owned by users or groups not listed in the system configuration files,
and reset the ownership of these files to some active user on the system as appropriate.
CIS Controls:
Version 7
442 | P a g e
6.1.12 Ensure no ungrouped files or directories exist (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
Sometimes when administrators delete users or groups from the system they neglect to
remove all files owned by those users or groups.
Rationale:
A new user who is assigned the deleted user's user ID or group ID may then end up
"owning" these files, and thus have more access on the system than was intended.
Audit:
# df --local -P | awk {'if (NR!=1) print $6'} | xargs -I '{}' find '{}' -xdev
-nogroup
The command above only searches local filesystems, there may still be compromised items
on network mounted partitions. The following command can be run manually for
individual partitions if needed:
Remediation:
Locate files that are owned by users or groups not listed in the system configuration files,
and reset the ownership of these files to some active user on the system as appropriate.
CIS Controls:
Version 7
443 | P a g e
6.1.13 Audit SUID executables (Manual)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
The owner of a file can set the file's permissions to run with the owner's or group's
permissions, even if the user running the program is not the owner or a member of the
group. The most common reason for a SUID program is to enable users to perform
functions (such as changing their password) that require root privileges.
Rationale:
There are valid reasons for SUID programs, but it is important to identify and review such
programs to ensure they are legitimate.
Audit:
# df --local -P | awk {'if (NR!=1) print $6'} | xargs -I '{}' find '{}' -xdev
-type f -perm -4000
The command above only searches local filesystems, there may still be compromised items
on network mounted partitions. The following command can be run manually for
individual partitions if needed:
Remediation:
Ensure that no rogue SUID programs have been introduced into the system. Review the
files returned by the action in the Audit section and confirm the integrity of these binaries.
444 | P a g e
CIS Controls:
Version 7
445 | P a g e
6.1.14 Audit SGID executables (Manual)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
The owner of a file can set the file's permissions to run with the owner's or group's
permissions, even if the user running the program is not the owner or a member of the
group. The most common reason for a SGID program is to enable users to perform
functions (such as changing their password) that require root privileges.
Rationale:
There are valid reasons for SGID programs, but it is important to identify and review such
programs to ensure they are legitimate. Review the files returned by the action in the audit
section and check to see if system binaries have a different md5 checksum than what from
the package. This is an indication that the binary may have been replaced.
Audit:
# df --local -P | awk {'if (NR!=1) print $6'} | xargs -I '{}' find '{}' -xdev
-type f -perm -2000
The command above only searches local filesystems, there may still be compromised items
on network mounted partitions. The following command can be run manually for
individual partitions if needed:
Remediation:
Ensure that no rogue SGID programs have been introduced into the system. Review the
files returned by the action in the Audit section and confirm the integrity of these binaries.
446 | P a g e
CIS Controls:
Version 7
447 | P a g e
6.2 User and Group Settings
This section provides guidance on securing aspects of the users and groups.
Note: The recommendations in this section check local users and groups. Any users or groups
from other sources such as LDAP will not be audited. In a domain environment similar checks
should be performed against domain users and groups.
448 | P a g e
6.2.1 Ensure accounts in /etc/passwd use shadowed passwords
(Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
Local accounts can uses shadowed passwords. With shadowed passwords, The passwords
are saved in shadow password file, /etc/shadow, encrypted by a salted one-way hash.
Accounts with a shadowed password have an x in the second field in /etc/passwd.
Rationale:
The /etc/passwd file also contains information like user ID's and group ID's that are used
by many system programs. Therefore, the /etc/passwd file must remain world readable. In
spite of encoding the password with a randomly-generated one-way hash function, an
attacker could still break the system if they got access to the /etc/passwd file. This can be
mitigated by using shadowed passwords, thus moving the passwords in the /etc/passwd
file to /etc/shadow. The /etc/shadow file is set so only root will be able to read and write.
This helps mitigate the risk of an attacker gaining access to the encoded passwords with
which to perform a dictionary attack.
Notes:
All accounts must have passwords or be locked to prevent the account from being used
by an unauthorized user.
A user account with an empty second field in /etc/passwd allows the account to be
logged into by providing only the username.
Audit:
# awk -F: '($2 != "x" ) { print $1 " is not set to shadowed passwords "}'
/etc/passwd
449 | P a g e
Remediation:
If any accounts in the /etc/passwd file do not have a single x in the password field, run the
following command to set these accounts to use shadowed passwords:
Investigate to determine if the account is logged in and what it is being used for, to
determine if it needs to be forced off.
CIS Controls:
Version 7
450 | P a g e
6.2.2 Ensure /etc/shadow password fields are not empty (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
An account with an empty password field means that anybody may log in as that user
without providing a password.
Rationale:
All accounts must have passwords or be locked to prevent the account from being used by
an unauthorized user.
Audit:
# awk -F: '($2 == "" ) { print $1 " does not have a password "}' /etc/shadow
Remediation:
If any accounts in the /etc/shadow file do not have a password, run the following command
to lock the account until it can be determined why it does not have a password:
# passwd -l <username>
Also, check to see if the account is logged in and investigate what it is being used for to
determine if it needs to be forced off.
CIS Controls:
Version 7
451 | P a g e
6.2.3 Ensure no legacy "+" entries exist in /etc/passwd (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
The character + in various files used to be markers for systems to insert data from NIS
maps at a certain point in a system configuration file. These entries are no longer required
on most systems, but may exist in files that have been imported from other platforms.
Rationale:
These entries may provide an avenue for attackers to gain privileged access on the system.
Audit:
Remediation:
CIS Controls:
Version 7
452 | P a g e
6.2.4 Ensure no legacy "+" entries exist in /etc/shadow (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
The character + in various files used to be markers for systems to insert data from NIS
maps at a certain point in a system configuration file. These entries are no longer required
on most systems, but may exist in files that have been imported from other platforms.
Rationale:
These entries may provide an avenue for attackers to gain privileged access on the system.
Audit:
Remediation:
CIS Controls:
Version 7
453 | P a g e
6.2.5 Ensure no legacy "+" entries exist in /etc/group (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
The character + in various files used to be markers for systems to insert data from NIS
maps at a certain point in a system configuration file. These entries are no longer required
on most systems, but may exist in files that have been imported from other platforms.
Rationale:
These entries may provide an avenue for attackers to gain privileged access on the system.
Audit:
Remediation:
CIS Controls:
Version 7
454 | P a g e
6.2.6 Ensure root is the only UID 0 account (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
Rationale:
This access must be limited to only the default root account and only from the system
console. Administrative access must be through an unprivileged account using an approved
mechanism as noted in Item 5.6 Ensure access to the su command is restricted.
Audit:
Run the following command and verify that only "root" is returned:
root
Remediation:
Remove any users other than root with UID 0 or assign them a new UID if appropriate.
CIS Controls:
Version 7
455 | P a g e
6.2.7 Ensure root PATH Integrity (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
The root user can execute any command on the system and could be fooled into executing
programs unintentionally if the PATH is not set correctly.
Rationale:
Including the current working directory (.) or other writable directory in root 's executable
path makes it likely that an attacker can gain superuser access by forcing an administrator
operating as root to execute a Trojan horse program.
Audit:
#!/bin/bash
Remediation:
456 | P a g e
CIS Controls:
Version 7
457 | P a g e
6.2.8 Ensure all users' home directories exist (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
Users can be defined in /etc/passwd without a home directory or with a home directory
that does not actually exist.
Rationale:
If the user's home directory does not exist or is unassigned, the user will be placed in "/"
and will not be able to write any files or have local environment variables set.
Audit:
#!/bin/bash
Note: The audit script checks all users with interactive shells except halt, sync, shutdown, and
nfsnobody.
458 | P a g e
Remediation:
If any users' home directories do not exist, create them and make sure the respective user
owns the directory. Users without an assigned home directory should be removed or
assigned a home directory as appropriate.
The following script will create a home directory for users with an interactive shell who's
home directory doesn't exist:
#!/bin/bash
CIS Controls:
Version 7
459 | P a g e
6.2.9 Ensure users own their home directories (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
The user home directory is space defined for the particular user to set local environment
variables and to store personal files.
Rationale:
Since the user is accountable for files stored in the user home directory, the user must be
the owner of the directory.
Audit:
#!/bin/bash
460 | P a g e
Remediation:
Change the ownership of any home directories that are not owned by the defined user to
the correct user.
The following script will create missing home directories, set the owner, and set the
permissions for interactive users' home directories:
#!/bin/bash
CIS Controls:
Version 7
461 | P a g e
6.2.10 Ensure users' home directories permissions are 750 or more
restrictive (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
While the system administrator can establish secure permissions for users' home
directories, the users can easily override these.
Rationale:
Group or world-writable user home directories may enable malicious users to steal or
modify other users' data or to gain another user's system privileges.
Audit:
#!/bin/bash
462 | P a g e
Remediation:
Making global modifications to user home directories without alerting the user community
can result in unexpected outages and unhappy users. Therefore, it is recommended that a
monitoring policy be established to report user file permissions and determine the action
to be taken in accordance with site policy.
The following script can be used to remove permissions is excess of 750 from users' home
directories:
#!/bin/bash
CIS Controls:
Version 7
463 | P a g e
6.2.11 Ensure users' dot files are not group or world writable
(Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
While the system administrator can establish secure permissions for users' "dot" files, the
users can easily override these.
Rationale:
Group or world-writable user configuration files may enable malicious users to steal or
modify other users' data or to gain another user's system privileges.
Audit:
#!/bin/bash
464 | P a g e
Remediation:
Making global modifications to users' files without alerting the user community can result
in unexpected outages and unhappy users. Therefore, it is recommended that a monitoring
policy be established to report user dot file permissions and determine the action to be
taken in accordance with site policy.
The following script will remove excessive permissions on dot files within interactive
users' home directories.
#!/bin/bash
CIS Controls:
Version 7
465 | P a g e
6.2.12 Ensure no users have .forward files (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
The .forward file specifies an email address to forward the user's mail to.
Rationale:
Use of the .forward file poses a security risk in that sensitive data may be inadvertently
transferred outside the organization. The .forward file also poses a risk as it can be used to
execute commands that may perform unintended actions.
Audit:
#!/bin/bash
466 | P a g e
Remediation:
Making global modifications to users' files without alerting the user community can result
in unexpected outages and unhappy users. Therefore, it is recommended that a monitoring
policy be established to report user .forward files and determine the action to be taken in
accordance with site policy.
The following script will remove .forward files from interactive users' home directories
#!/bin/bash
CIS Controls:
Version 7
467 | P a g e
6.2.13 Ensure no users have .netrc files (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
The .netrc file contains data for logging into a remote host for file transfers via FTP.
While the system administrator can establish secure permissions for users' .netrc files, the
users can easily override these.
Note: While the complete removal of .netrc files is recommended, if any are required on the
system secure permissions must be applied.
Rationale:
The .netrc file presents a significant security risk since it stores passwords in unencrypted
form. Even if FTP is disabled, user accounts may have brought over .netrc files from other
systems which could pose a risk to those systems.
If a .netrc file is required, and follows local site policy, it should have permissions of 600 or
more restrictive.
468 | P a g e
Audit:
FAILED: for any .netrc file with permissions less restrictive than 600
WARNING: for any .netrc files that exist in interactive users' home directories.
#!/bin/bash
Verify:
Any lines beginning with FAILED: - File should be removed unless deemed
necessary, in accordance with local site policy, and permissions are updated to be
600 or more restrictive
Any lines beginning with WARNING: - File should be removed unless deemed
necessary, and in accordance with local site policy
469 | P a g e
Remediation:
Making global modifications to users' files without alerting the user community can result
in unexpected outages and unhappy users. Therefore, it is recommended that a monitoring
policy be established to report user .netrc file permissions and determine the action to be
taken in accordance with local site policy.
The following script will remove .netrc files from interactive users' home directories
#!/bin/bash
CIS Controls:
Version 7
470 | P a g e
6.2.14 Ensure no users have .rhosts files (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
While no .rhosts files are shipped by default, users can easily create them.
Rationale:
This action is only meaningful if .rhosts support is permitted in the file /etc/pam.conf .
Even though the .rhosts files are ineffective if support is disabled in /etc/pam.conf , they
may have been brought over from other systems and could contain information useful to
an attacker for those other systems.
Audit:
#!/bin/bash
471 | P a g e
Remediation:
Making global modifications to users' files without alerting the user community can result
in unexpected outages and unhappy users. Therefore, it is recommended that a monitoring
policy be established to report user .rhosts files and determine the action to be taken in
accordance with site policy.
The following script will remove .rhosts files from interactive users' home directories
#!/bin/bash
CIS Controls:
Version 7
472 | P a g e
6.2.15 Ensure all groups in /etc/passwd exist in /etc/group (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
Over time, system administration errors and changes can lead to groups being defined in
/etc/passwd but not in /etc/group .
Rationale:
Groups defined in the /etc/passwd file but not in the /etc/group file pose a threat to
system security since group permissions are not properly managed.
Audit:
#!/bin/bash
Remediation:
Analyze the output of the Audit step above and perform the appropriate action to correct
any discrepancies found.
CIS Controls:
Version 7
473 | P a g e
6.2.16 Ensure no duplicate UIDs exist (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
Although the useradd program will not let you create a duplicate User ID (UID), it is
possible for an administrator to manually edit the /etc/passwd file and change the UID
field.
Rationale:
Users must be assigned unique UIDs for accountability and to ensure appropriate access
protections.
Audit:
#!/bin/bash
Remediation:
Based on the results of the audit script, establish unique UIDs and review all files owned by
the shared UIDs to determine which UID they are supposed to belong to.
CIS Controls:
Version 7
474 | P a g e
6.2.17 Ensure no duplicate GIDs exist (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
Although the groupadd program will not let you create a duplicate Group ID (GID), it is
possible for an administrator to manually edit the /etc/group file and change the GID field.
Note: You can also use the grpck command to check for other inconsistencies in the
/etc/group file.
Rationale:
User groups must be assigned unique GIDs for accountability and to ensure appropriate
access protections.
Audit:
#!/bin/bash
Remediation:
Based on the results of the audit script, establish unique GIDs and review all files owned by
the shared GID to determine which group they are supposed to belong to.
CIS Controls:
Version 7
475 | P a g e
6.2.18 Ensure no duplicate user names exist (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
Although the useradd program will not let you create a duplicate user name, it is possible
for an administrator to manually edit the /etc/passwd file and change the user name.
Rationale:
If a user is assigned a duplicate user name, it will create and have access to files with the
first UID for that username in /etc/passwd . For example, if "test4" has a UID of 1000 and a
subsequent "test4" entry has a UID of 2000, logging in as "test4" will use UID 1000.
Effectively, the UID is shared, which is a security problem.
Audit:
#!/bin/bash
Remediation:
Based on the results of the audit script, establish unique user names for the users. File
ownerships will automatically reflect the change as long as the users have unique UIDs.
CIS Controls:
Version 7
476 | P a g e
6.2.19 Ensure no duplicate group names exist (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
Although the groupadd program will not let you create a duplicate group name, it is
possible for an administrator to manually edit the /etc/group file and change the group
name.
Rationale:
If a group is assigned a duplicate group name, it will create and have access to files with the
first GID for that group in /etc/group . Effectively, the GID is shared, which is a security
problem.
Audit:
#!/bin/bash
Remediation:
Based on the results of the audit script, establish unique names for the user groups. File
group ownerships will automatically reflect the change as long as the groups have unique
GIDs.
CIS Controls:
Version 7
477 | P a g e
6.2.20 Ensure shadow group is empty (Automated)
Profile Applicability:
Level 1 - Server
Level 1 - Workstation
Description:
The shadow group allows system programs which require access the ability to read the
/etc/shadow file. No users should be assigned to the shadow group.
Rationale:
Any users assigned to the shadow group would be granted read access to the /etc/shadow
file. If attackers can gain read access to the /etc/shadow file, they can easily run a password
cracking program against the hashed passwords to break them. Other security information
that is stored in the /etc/shadow file (such as expiration) could also be useful to subvert
additional user accounts.
Audit:
Remediation:
Remove all users from the shadow group, and change the primary group of any users with
shadow as their primary group.
CIS Controls:
Version 7
478 | P a g e
Appendix: Summary Table
Control Set
Correctly
Yes No
1 Initial Setup
1.1 Filesystem Configuration
1.1.1 Disable unused filesystems
1.1.1.1 Ensure mounting of cramfs filesystems is disabled
(Automated)
1.1.1.2 Ensure mounting of freevxfs filesystems is disabled
(Automated)
1.1.1.3 Ensure mounting of jffs2 filesystems is disabled
(Automated)
1.1.1.4 Ensure mounting of hfs filesystems is disabled (Automated)
1.1.1.5 Ensure mounting of hfsplus filesystems is disabled
(Automated)
1.1.1.6 Ensure mounting of squashfs filesystems is disabled
(Automated)
1.1.1.7 Ensure mounting of udf filesystems is disabled (Automated)
1.1.2 Ensure /tmp is configured (Automated)
1.1.3 Ensure nodev option set on /tmp partition (Automated)
1.1.4 Ensure nosuid option set on /tmp partition (Automated)
1.1.5 Ensure noexec option set on /tmp partition (Automated)
1.1.6 Ensure separate partition exists for /var (Automated)
1.1.7 Ensure separate partition exists for /var/tmp (Automated)
1.1.8 Ensure nodev option set on /var/tmp partition (Automated)
1.1.9 Ensure nosuid option set on /var/tmp partition
(Automated)
1.1.10 Ensure noexec option set on /var/tmp partition
(Automated)
1.1.11 Ensure separate partition exists for /var/log (Automated)
1.1.12 Ensure separate partition exists for /var/log/audit
(Automated)
1.1.13 Ensure separate partition exists for /home (Automated)
1.1.14 Ensure nodev option set on /home partition (Automated)
1.1.15 Ensure nodev option set on /dev/shm partition
(Automated)
1.1.16 Ensure nosuid option set on /dev/shm partition
(Automated)
1.1.17 Ensure noexec option set on /dev/shm partition
(Automated)
479 | P a g e
1.1.18 Ensure nodev option set on removable media partitions
(Manual)
1.1.19 Ensure nosuid option set on removable media partitions
(Manual)
1.1.20 Ensure noexec option set on removable media partitions
(Manual)
1.1.21 Ensure sticky bit is set on all world-writable directories
(Automated)
1.1.22 Disable Automounting (Automated)
1.1.23 Disable USB Storage (Automated)
1.2 Configure Software Updates
1.2.1 Ensure package manager repositories are configured
(Manual)
1.2.2 Ensure gpgcheck is globally activated (Automated)
1.2.3 Ensure GPG keys are configured (Manual)
1.2.4 Ensure Red Hat Network or Subscription Manager
connection is configured (Manual)
1.2.5 Disable the rhnsd Daemon (Automated)
1.3 Filesystem Integrity Checking
1.3.1 Ensure AIDE is installed (Automated)
1.3.2 Ensure filesystem integrity is regularly checked
(Automated)
1.4 Secure Boot Settings
1.4.1 Ensure permissions on bootloader config are configured
(Automated)
1.4.2 Ensure bootloader password is set (Automated)
1.4.3 Ensure authentication required for single user mode
(Automated)
1.4.4 Ensure interactive boot is not enabled (Automated)
1.5 Additional Process Hardening
1.5.1 Ensure core dumps are restricted (Automated)
1.5.2 Ensure XD/NX support is enabled (Manual)
1.5.3 Ensure address space layout randomization (ASLR) is
enabled (Automated)
1.5.4 Ensure prelink is disabled (Automated)
1.6 Mandatory Access Control
1.6.1 Configure SELinux
1.6.1.1 Ensure SELinux is installed (Automated)
1.6.1.2 Ensure SELinux is not disabled in bootloader configuration
(Automated)
1.6.1.3 Ensure SELinux policy is configured (Automated)
1.6.1.4 Ensure the SELinux mode is enforcing or permissive
(Automated)
480 | P a g e
1.6.1.5 Ensure the SELinux mode is enforcing (Automated)
1.6.1.6 Ensure no unconfined daemons exist (Automated)
1.6.1.7 Ensure SETroubleshoot is not installed (Automated)
1.6.1.8 Ensure the MCS Translation Service (mcstrans) is not
installed (Automated)
1.7 Command Line Warning Banners
1.7.1 Ensure message of the day is configured properly
(Automated)
1.7.2 Ensure local login warning banner is configured properly
(Automated)
1.7.3 Ensure remote login warning banner is configured properly
(Automated)
1.7.4 Ensure permissions on /etc/motd are configured
(Automated)
1.7.5 Ensure permissions on /etc/issue are configured
(Automated)
1.7.6 Ensure permissions on /etc/issue.net are configured
(Automated)
1.8 GNOME Display Manager
1.8.1 Ensure GNOME Display Manager is removed (Manual)
1.8.2 Ensure GDM login banner is configured (Automated)
1.8.3 Ensure last logged in user display is disabled (Automated)
1.8.4 Ensure XDCMP is not enabled (Automated)
1.9 Ensure updates, patches, and additional security software
are installed (Automated)
2 Services
2.1 inetd Services
2.1.1 Ensure chargen services are not enabled (Automated)
2.1.2 Ensure daytime services are not enabled (Automated)
2.1.3 Ensure discard services are not enabled (Automated)
2.1.4 Ensure echo services are not enabled (Automated)
2.1.5 Ensure time services are not enabled (Automated)
2.1.6 Ensure rsh server is not enabled (Automated)
2.1.7 Ensure talk server is not enabled (Automated)
2.1.8 Ensure tftp server is not enabled (Automated)
2.1.9 Ensure rsync service is not enabled (Automated)
2.1.10 Ensure xinetd is not enabled (Automated)
2.2 Special Purpose Services
2.2.1 Time Synchronization
2.2.1.1 Ensure time synchronization is in use (Manual)
2.2.1.2 Ensure chrony is configured (Automated)
2.2.1.3 Ensure ntp is configured (Automated)
481 | P a g e
2.2.2 Ensure X11 Server components are not installed
(Automated)
2.2.3 Ensure Avahi Server is not installed (Automated)
2.2.4 Ensure CUPS is not installed (Automated)
2.2.5 Ensure DHCP Server is not installed (Automated)
2.2.6 Ensure LDAP server is not installed (Automated)
2.2.7 Ensure DNS Server is not installed (Automated)
2.2.8 Ensure FTP Server is not installed (Automated)
2.2.9 Ensure HTTP server is not installed (Automated)
2.2.10 Ensure IMAP and POP3 server is not installed (Automated)
2.2.11 Ensure Samba is not installed (Automated)
2.2.12 Ensure HTTP Proxy Server is not installed (Automated)
2.2.13 Ensure net-snmp is not installed (Automated)
2.2.14 Ensure NIS server is not installed (Automated)
2.2.15 Ensure telnet-server is not installed (Automated)
2.2.16 Ensure nfs-utils is not installed or the nfs-server service is
disabled (Automated)
2.2.17 Ensure rpcbind is not installed or the rpcbind service is
disabled (Automated)
2.2.18 Ensure mail transfer agent is configured for local-only mode
(Automated)
2.3 Service Clients
2.3.1 Ensure NIS Client is not installed (Automated)
2.3.2 Ensure rsh client is not installed (Automated)
2.3.3 Ensure talk client is not installed (Automated)
2.3.4 Ensure telnet client is not installed (Automated)
2.3.5 Ensure LDAP client is not installed (Automated)
3 Network Configuration
3.1 Disable unused network protocols and devices
3.1.1 Disable IPv6 (Manual)
3.1.2 Ensure wireless interfaces are disabled (Manual)
3.2 Network Parameters (Host Only)
3.2.1 Ensure IP forwarding is disabled (Automated)
3.2.2 Ensure packet redirect sending is disabled (Automated)
3.3 Network Parameters (Host and Router)
3.3.1 Ensure source routed packets are not accepted (Automated)
3.3.2 Ensure ICMP redirects are not accepted (Automated)
3.3.3 Ensure secure ICMP redirects are not accepted (Automated)
3.3.4 Ensure suspicious packets are logged (Automated)
3.3.5 Ensure broadcast ICMP requests are ignored (Automated)
3.3.6 Ensure bogus ICMP responses are ignored (Automated)
3.3.7 Ensure Reverse Path Filtering is enabled (Automated)
3.3.8 Ensure TCP SYN Cookies is enabled (Automated)
482 | P a g e
3.3.9 Ensure IPv6 router advertisements are not accepted
(Automated)
3.4 TCP Wrappers
3.4.1 Ensure TCP Wrappers is installed (Automated)
3.4.2 Ensure /etc/hosts.allow is configured (Automated)
3.4.3 Ensure /etc/hosts.deny is configured (Automated)
3.4.4 Ensure permissions on /etc/hosts.allow are configured
(Automated)
3.4.5 Ensure permissions on /etc/hosts.deny are configured
(Automated)
3.5 Uncommon Network Protocols
3.5.1 Ensure DCCP is disabled (Manual)
3.5.2 Ensure SCTP is disabled (Automated)
3.5.3 Ensure RDS is disabled (Automated)
3.5.4 Ensure TIPC is disabled (Automated)
3.6 Firewall Configuration
3.6.1 Install iptables package
3.6.1.1 Ensure iptables is installed (Automated)
3.6.2 Configure IPv4 iptables
3.6.2.1 Ensure IPv4 default deny firewall policy (Automated)
3.6.2.2 Ensure IPv4 loopback traffic is configured (Automated)
3.6.2.3 Ensure IPv4 outbound and established connections are
configured (Manual)
3.6.2.4 Ensure IPv4 firewall rules exist for all open ports (Manual)
3.6.3 Configure IPv6 ip6tables
3.6.3.1 Ensure IPv6 default deny firewall policy (Automated)
3.6.3.2 Ensure IPv6 loopback traffic is configured (Automated)
3.6.3.3 Ensure IPv6 outbound and established connections are
configured (Manual)
3.6.3.4 Ensure IPv6 firewall rules exist for all open ports (Manual)
4 Logging and Auditing
4.1 Configure System Accounting (auditd)
4.1.1 Ensure auditing is enabled
4.1.1.1 Ensure auditd is installed (Automated)
4.1.1.2 Ensure augenrules is enabled (Automated)
4.1.1.3 Ensure auditd service is enabled (Automated)
4.1.1.4 Ensure auditing for processes that start prior to auditd is
enabled (Automated)
4.1.2 Configure Data Retention
4.1.2.1 Ensure audit log storage size is configured (Automated)
4.1.2.2 Ensure audit logs are not automatically deleted
(Automated)
483 | P a g e
4.1.2.3 Ensure system is disabled when audit logs are full
(Automated)
4.1.2.4 Ensure audit_backlog_limit is sufficient (Automated)
4.1.3 Ensure events that modify date and time information are
collected (Automated)
4.1.4 Ensure events that modify user/group information are
collected (Automated)
4.1.5 Ensure events that modify the system's network
environment are collected (Automated)
4.1.6 Ensure events that modify the system's Mandatory Access
Controls are collected (Automated)
4.1.7 Ensure login and logout events are collected (Automated)
4.1.8 Ensure session initiation information is collected
(Automated)
4.1.9 Ensure discretionary access control permission
modification events are collected (Automated)
4.1.10 Ensure unsuccessful unauthorized file access attempts are
collected (Automated)
4.1.11 Ensure use of privileged commands is collected
(Automated)
4.1.12 Ensure successful file system mounts are collected
(Automated)
4.1.13 Ensure file deletion events by users are collected
(Automated)
4.1.14 Ensure changes to system administration scope (sudoers) is
collected (Automated)
4.1.15 Ensure system administrator command executions (sudo)
are collected (Automated)
4.1.16 Ensure kernel module loading and unloading is collected
(Automated)
4.1.17 Ensure the audit configuration is immutable (Automated)
4.2 Configure Logging
4.2.1 Configure rsyslog
4.2.1.1 Ensure rsyslog is installed (Automated)
4.2.1.2 Ensure rsyslog Service is enabled (Automated)
4.2.1.3 Ensure logging is configured (Manual)
4.2.1.4 Ensure rsyslog default file permissions configured
(Automated)
4.2.1.5 Ensure rsyslog is configured to send logs to a remote log
host (Automated)
4.2.1.6 Ensure remote rsyslog messages are only accepted on
designated log hosts. (Manual)
4.2.2 Ensure permissions on all logfiles are configured
(Automated)
484 | P a g e
4.2.3 Ensure logrotate is configured (Manual)
5 Access, Authentication and Authorization
5.1 Configure cron
5.1.1 Ensure cron daemon is enabled (Automated)
5.1.2 Ensure permissions on /etc/crontab are configured
(Automated)
5.1.3 Ensure permissions on /etc/cron.hourly are configured
(Automated)
5.1.4 Ensure permissions on /etc/cron.daily are configured
(Automated)
5.1.5 Ensure permissions on /etc/cron.weekly are configured
(Automated)
5.1.6 Ensure permissions on /etc/cron.monthly are configured
(Automated)
5.1.7 Ensure permissions on /etc/cron.d are configured
(Automated)
5.1.8 Ensure cron is restricted to authorized users (Automated)
5.1.9 Ensure at is restricted to authorized users (Automated)
5.2 Configure sudo
5.2.1 Ensure sudo is installed (Automated)
5.2.2 Ensure sudo commands use pty (Automated)
5.2.3 Ensure sudo log file exists (Automated)
5.3 Configure SSH Server
5.3.1 Ensure permissions on /etc/ssh/sshd_config are configured
(Automated)
5.3.2 Ensure permissions on SSH private host key files are
configured (Automated)
5.3.3 Ensure permissions on SSH public host key files are
configured (Automated)
5.3.4 Ensure SSH Protocol is set to 2 (Automated)
5.3.5 Ensure SSH access is limited (Automated)
5.3.6 Ensure SSH LogLevel is appropriate (Automated)
5.3.7 Ensure SSH X11 forwarding is disabled (Automated)
5.3.8 Ensure SSH MaxAuthTries is set to 4 or less (Automated)
5.3.9 Ensure SSH IgnoreRhosts is enabled (Automated)
5.3.10 Ensure SSH HostbasedAuthentication is disabled
(Automated)
5.3.11 Ensure SSH root login is disabled (Automated)
5.3.12 Ensure SSH PermitEmptyPasswords is disabled
(Automated)
5.3.13 Ensure SSH PermitUserEnvironment is disabled
(Automated)
5.3.14 Ensure only strong Ciphers are used (Automated)
485 | P a g e
5.3.15 Ensure only strong MAC algorithms are used (Automated)
5.3.16 Ensure only strong Key Exchange algorithms are used
(Automated)
5.3.17 Ensure SSH Idle Timeout Interval is configured (Automated)
5.3.18 Ensure SSH LoginGraceTime is set to one minute or less
(Automated)
5.3.19 Ensure SSH warning banner is configured (Automated)
5.3.20 Ensure SSH PAM is enabled (Automated)
5.3.21 Ensure SSH AllowTcpForwarding is disabled (Automated)
5.3.22 Ensure SSH MaxStartups is configured (Automated)
5.3.23 Ensure SSH MaxSessions is limited (Automated)
5.4 Configure PAM
5.4.1 Ensure password creation requirements are configured
(Automated)
5.4.2 Ensure lockout for failed password attempts is configured
(Automated)
5.4.3 Ensure password reuse is limited (Automated)
5.4.4 Ensure password hashing algorithm is SHA-512
(Automated)
5.5 User Accounts and Environment
5.5.1 Set Shadow Password Suite Parameters
5.5.1.1 Ensure password expiration is 365 days or less (Automated)
5.5.1.2 Ensure minimum days between password changes is
configured (Automated)
5.5.1.3 Ensure password expiration warning days is 7 or more
(Automated)
5.5.1.4 Ensure inactive password lock is 30 days or less
(Automated)
5.5.1.5 Ensure all users last password change date is in the past
(Automated)
5.5.2 Ensure system accounts are secured (Automated)
5.5.3 Ensure default group for the root account is GID 0
(Automated)
5.5.4 Ensure default user shell timeout is configured (Automated)
5.5.5 Ensure default user umask is configured (Automated)
5.6 Ensure root login is restricted to system console (Manual)
5.7 Ensure access to the su command is restricted (Automated)
6 System Maintenance
6.1 System File Permissions
6.1.1 Audit system file permissions (Manual)
6.1.2 Ensure permissions on /etc/passwd are configured
(Automated)
486 | P a g e
6.1.3 Ensure permissions on /etc/passwd- are configured
(Automated)
6.1.4 Ensure permissions on /etc/group are configured
(Automated)
6.1.5 Ensure permissions on /etc/group- are configured
(Automated)
6.1.6 Ensure permissions on /etc/shadow are configured
(Automated)
6.1.7 Ensure permissions on /etc/shadow- are configured
(Automated)
6.1.8 Ensure permissions on /etc/gshadow are configured
(Automated)
6.1.9 Ensure permissions on /etc/gshadow- are configured
(Automated)
6.1.10 Ensure no world writable files exist (Automated)
6.1.11 Ensure no unowned files or directories exist (Automated)
6.1.12 Ensure no ungrouped files or directories exist (Automated)
6.1.13 Audit SUID executables (Manual)
6.1.14 Audit SGID executables (Manual)
6.2 User and Group Settings
6.2.1 Ensure accounts in /etc/passwd use shadowed passwords
(Automated)
6.2.2 Ensure /etc/shadow password fields are not empty
(Automated)
6.2.3 Ensure no legacy "+" entries exist in /etc/passwd
(Automated)
6.2.4 Ensure no legacy "+" entries exist in /etc/shadow
(Automated)
6.2.5 Ensure no legacy "+" entries exist in /etc/group
(Automated)
6.2.6 Ensure root is the only UID 0 account (Automated)
6.2.7 Ensure root PATH Integrity (Automated)
6.2.8 Ensure all users' home directories exist (Automated)
6.2.9 Ensure users own their home directories (Automated)
6.2.10 Ensure users' home directories permissions are 750 or
more restrictive (Automated)
6.2.11 Ensure users' dot files are not group or world writable
(Automated)
6.2.12 Ensure no users have .forward files (Automated)
6.2.13 Ensure no users have .netrc files (Automated)
6.2.14 Ensure no users have .rhosts files (Automated)
6.2.15 Ensure all groups in /etc/passwd exist in /etc/group
(Automated)
487 | P a g e
6.2.16 Ensure no duplicate UIDs exist (Automated)
6.2.17 Ensure no duplicate GIDs exist (Automated)
6.2.18 Ensure no duplicate user names exist (Automated)
6.2.19 Ensure no duplicate group names exist (Automated)
6.2.20 Ensure shadow group is empty (Automated)
488 | P a g e
Appendix: Change History
Date Version Changes for this version
January 27, 2021 3.0.0 DELETE - Ensure mounting of FAT filesystems is disabled
January 27, 2021 3.0.0 UPDATE - Ensure separate partition exists for /tmp - Changed
title, updated audit and remediation
January 27, 2021 3.0.0 UPDATE - Ensure nodev option set on /tmp partition - Updated
audit
January 27, 2021 3.0.0 UPDATE - Ensure nosuid option set on /tmp partition - Update
audit
January 27, 2021 3.0.0 UPDATE - Ensure noexec option set on /tmp partition - Update
audit
January 27, 2013 3.0.0 UPDATE - Ensure nodev option set on /var/tmp partition -
Update audit
January 27, 2021 3.0.0 UPDATE - Ensure nosuid option set on /var/tmp partition -
Update audit
January 27, 2021 3.0.0 UPDATE - Ensure noexec option set on /var/tmp partition -
Update audit
January 27, 2021 3.0.0 UPDATE - Ensure nodev option set on /home partition - Update
audit
January 27, 2021 3.0.0 UPDATE - Ensure nodev option set on /dev/shm partition -
Update audit
January 27, 2021 3.0.0 UPDATE - Ensure nosuid option set on /dev/shm partition -
Update audit
489 | P a g e
January 27, 2021 3.0.0 UPDATE - Ensure noexec option set on /dev/shm partition -
Update audit
January 27, 2021 3.0.0 UPDATE - Ensure gpgcheck is globally activated - Update
remediation
January 27, 2021 3.0.0 UPDATE - Ensure permissions on bootloader config are
configured - Account for UEFI boot - Update audit and
remediation
January 27, 2021 3.0.0 UPDATE - Ensure bootloader password is set - Account for
UEFI boot - Update audit and remediation
January 27, 2021 3.0.0 UPDATE - Ensure XD/NX support is enabled - Update audit
January 27, 2021 3.0.0 UPDATE - Ensure address space layout randomization (ASLR)
is enabled - Update audit and remediation
January 27, 2021 3.0.0 UPDATE - Ensure SELinux is not disabled in bootloader
configuration - Move to Level 1, update audit and remediation
January 27, 2021 3.0.0 UPDATE - Ensure SELinux policy is configured - Move to Level
1
January 27, 2021 3.0.0 ADD - Ensure the SELinux mode is enforcing or permissive
January 27, 2021 3.0.0 UPDATE - Ensure the SELinux state is enforcing - Changed title
to "Ensure the SELinux mode is enforcing", update audit
January 27, 2021 3.0.0 UPDATE - Ensure SETroubleshoot is not installed - Moved to
Level 1
January 27, 2021 3.0.0 UPDATE - Ensure the MCS Translation Service (mcstrans) is
not installed - Moved to Level 1
January 27, 2021 3.0.0 UPDATE - Ensure no unconfined daemons exist - Move to Level
1, update audit
January 27, 2021 3.0.0 UPDATE - Ensure message of the day is configured properly -
Update audit and remediation
490 | P a g e
January 27, 2021 3.0.0 UPDATE - Ensure message of the day is configured properly -
Update audit and remediation
January 27, 2021 3.0.0 UPDATE - Ensure local login warning banner is configured
properly - Update audit and remediation
January 27, 2021 3.0.0 UPDATE - Ensure remote login warning banner is configured
properly - Update audit and remediation
January 27, 2021 3.0.0 DELETE - Ensure GDM login banner is configured
January 27, 2021 3.0.0 ADD - Ensure GNOME Display Manager is removed
January 27, 2021 3.0.0 ADD - Ensure GDM login banner is configured
January 27, 2021 3.0.0 ADD - Ensure last logged in user display is disabled
January 27, 2021 3.0.0 UPDATE - Ensure updates, patches, and additional security
software are installed - Update audit, remediation, and add
additional information
January 27, 2021 3.0.0 DELETE - Ensure telnet server is not enabled
January 27, 2021 3.0.0 UPDATE - Ensure time synchronization is in use - Update
Rational Statement, audit, and remediation
January 27, 2021 3.0.0 UPDATE - Ensure chrony is configured - Update audit and
remediation
January 27, 2021 3.0.0 DELETE - Ensure X Window System is not installed
January 27, 2021 3.0.0 ADD - Ensure X11 Server components are not installed
January 27, 2021 3.0.0 DELETE - Ensure Avahi Server is not enabled
January 27, 2021 3.0.0 ADD - Ensure Avahi Server is not installed
491 | P a g e
January 27, 2021 3.0.0 DELETE - Ensure DHCP Server is not enabled
January 27, 2021 3.0.0 ADD - Ensure DHCP Server is not installed
January 27, 2021 3.0.0 DELETE - Ensure LDAP server is not enabled
January 27, 2021 3.0.0 ADD - Ensure LDAP server is not installed
January 27, 2021 3.0.0 DELETE - Ensure NFS and RPC are not enabled
January 27, 2021 3.0.0 ADD - Ensure nfs-utils is not installed or the nfs-server service
is disabled
January 27, 2021 3.0.0 ADD - Ensure rpcbind is not installed or the rpcbind service is
disabled
January 27, 2021 3.0.0 DELETE - Ensure DNS Server is not enabled
January 27, 2021 3.0.0 ADD - Ensure DNS Server is not installed
January 27, 2021 3.0.0 DELETE - Ensure FTP Server is not enabled
January 27, 2021 3.0.0 ADD - Ensure FTP Server is not installed
January 27, 2021 3.0.0 DELETE - Ensure HTTP server is not enabled
January 27, 2021 3.0.0 ADD - Ensure HTTP server is not installed
January 27, 2021 3.0.0 DELETE - Ensure IMAP and POP3 server is not enabled
January 27, 2021 3.0.0 ADD - Ensure IMAP and POP3 server is not installed
January 27, 2021 3.0.0 DELETE - Ensure HTTP Proxy Server is not enabled
January 27, 2021 3.0.0 ADD - Ensure HTTP Proxy Server is not installed
January 27, 2021 3.0.0 DELETE - Ensure SNMP Server is not enabled
January 27, 2021 3.0.0 DELETE - Ensure NIS Server is not enabled
492 | P a g e
January 27, 2021 3.0.0 ADD - Ensure NIS server is not installed
January 27, 2021 3.0.0 ADD - Subsection Disable unused network protocols and
devices
January 27, 2021 3.0.0 UPDATE - Ensure IP forwarding is disabled - Add IPv6 support,
update audit and remediation
January 27, 2021 3.0.0 UPDATE - Ensure source routed packets are not accepted - Add
IPv6 support, update audit and remediation
January 27, 2021 3.0.0 UPDATE - Ensure ICMP redirects are not accepted - Add IPv6
support, update audit and remediation
January 27, 2021 3.0.0 DELETE - Ensure IPv6 redirects are not accepted
January 27, 2021 3.0.0 DELETE - Ensure default deny firewall policy
January 27, 2021 3.0.0 ADD - Ensure IPv4 default deny firewall policy
January 27, 2021 3.0.0 ADD - Ensure IPv4 loopback traffic is configured
January 27, 2021 3.0.0 DELETE - Ensure outbound and established connections are
configured
January 27, 2021 3.0.0 ADD - Ensure IPv4 outbound and established connections are
configured
January 27, 2021 3.0.0 DELETE - Ensure firewall rules exist for all open ports
January 27, 2021 3.0.0 ADD - Ensure IPv4 firewall rules exist for all open ports
January 27, 2021 3.0.0 ADD - Ensure IPv6 default deny firewall policy
493 | P a g e
January 27, 2021 3.0.0 ADD - Ensure IPv6 loopback traffic is configured
January 27, 2021 3.0.0 ADD - Ensure IPv6 outbound and established connections are
configured
January 27, 2021 3.0.0 ADD - Ensure IPv6 firewall rules exist for all open ports
January 27, 2021 3.0.0 UPDATE - Ensure events that modify user/group information
are collected - Update audit and remediation
January 27, 2021 3.0.0 UPDATE - Ensure events that modify the system's network
environment are collected - Update audit and remediation
January 27, 2021 3.0.0 UPDATE - Ensure events that modify the system's Mandatory
Access Controls are collected - Update audit and remediation
January 27, 2021 3.0.0 UPDATE - Ensure session initiation information is collected -
Update audit and remediation
January 27, 2021 3.0.0 UPDATE - Ensure discretionary access control permission
modification events are collected - Update audit and
remediation
January 27, 2021 3.0.0 UPDATE - Ensure unsuccessful unauthorized file access
attempts are collected - Update audit and remediation
January 27, 2021 3.0.0 UPDATE - Ensure use of privileged commands is collected -
Update audit and remediation
January 27, 2021 3.0.0 UPDATE - Ensure successful file system mounts are collected -
Update audit and remediation
January 27, 2021 3.0.0 UPDATE - Ensure file deletion events by users are collected -
Update audit and remediation
494 | P a g e
January 27, 2021 3.0.0 DELETE - Ensure system administrator actions (sudolog) are
collected
January 27, 2021 3.0.0 ADD - Ensure system administrator command executions
(sudo) are collected - Update audit and remediation
January 27, 2021 3.0.0 UPDATE - Ensure kernel module loading and unloading is
collected - Update audit and remediation
January 27, 2021 3.0.0 UPDATE - Ensure the audit configuration is immutable - Update
remediation
January 27, 2021 3.0.0 DELETE - Ensure syslog-ng default file permissions configured
January 27, 2021 3.0.0 DELETE - Ensure syslog-ng is configured to send logs to a
remote log host
January 27, 2021 3.0.0 DELETE - Ensure remote syslog-ng messages are only accepted
on designated log hosts
January 27, 2021 3.0.0 DELETE - Ensure at/cron is restricted to authorized users
January 27, 2021 3.0.0 ADD - Ensure cron is restricted to authorized users
January 27, 2021 3.0.0 ADD - Ensure sudo commands use pty
January 27, 2021 3.0.0 ADD - Ensure sudo log file exists
495 | P a g e
January 27, 2021 3.0.0 ADD - Ensure permissions on SSH private host key files are
configured
January 27, 2021 3.0.0 ADD - Ensure permissions on SSH public host key files are
configured
January 27, 2021 3.0.0 UPDATE - Ensure SSH Protocol is set to 2 - Update audit
January 27, 2021 3.0.0 UPDATE - Ensure SSH access is limited - Update audit
January 27, 2021 3.0.0 DELETE - Ensure SSH LogLevel is set to INFO
January 27, 2021 3.0.0 UPDATE - Ensure SSH X11 forwarding is disabled - Update
audit
January 27, 2021 3.0.0 UPDATE - Ensure SSH MaxAuthTries is set to 4 or less - Update
audit
January 27, 2021 3.0.0 UPDATE - Ensure SSH IgnoreRhosts is enabled - Update audit
January 27, 2021 3.0.0 UPDATE - Ensure SSH root login is disabled - Update audit
January 27, 2021 3.0.0 ADD - Ensure only strong Ciphers are used
January 27, 2021 3.0.0 DELETE - Ensure only approved MAC algorithms are used
January 27, 2021 3.0.0 ADD - Ensure only strong MAC algorithms are used
January 27, 2021 3.0.0 ADD - Ensure only strong Key Exchange algorithms are used
January 27, 2021 3.0.0 UPDATE - Ensure SSH Idle Timeout Interval is configured -
Update audit
496 | P a g e
January 27, 2021 3.0.0 UPDATE - Ensure SSH LoginGraceTime is set to one minute or
less - Update audit
January 27, 2021 3.0.0 UPDATE - Ensure SSH warning banner is configured - Update
audit
January 27, 2021 3.0.0 UPDATE - Ensure password expiration is 365 days or less -
Update audit and remediation
January 27, 2021 3.0.0 DELETE - Ensure minimum days between password changes is
7 or more
January 27, 2021 3.0.0 ADD - Ensure minimum days between password changes is
configured
January 27, 2021 3.0.0 UPDATE - Ensure password expiration warning days is 7 or
more - Update audit
January 27, 2021 3.0.0 UPDATE - Ensure all users last password change date is in the
past - Update audit
January 27, 2021 3.0.0 DELETE - Ensure system accounts are non-login
January 27, 2021 3.0.0 ADD - Ensure system accounts are secured
January 27, 2021 3.0.0 UPDATE - Ensure default user shell timeout is configured - All
sections updated
January 27, 2021 3.0.0 DELETE - Ensure default user umask is 027 or more restrictive
January 27, 2021 3.0.0 ADD - Ensure default user umask is configured
January 27, 2021 3.0.0 ADD - Ensure accounts in /etc/passwd use shadowed
passwords
497 | P a g e
January 27, 2021 3.0.0 UPDATE - Ensure /etc/shadow password fields are not empty -
Update audit
January 27, 2021 3.0.0 UPDATE - Ensure root is the only UID 0 account - Update audit
January 27, 2021 3.0.0 UPDATE - Ensure root PATH Integrity - Update audit
January 27, 2021 3.0.0 UPDATE - Ensure all users' home directories exist - Update
audit and remediation
January 27, 2021 3.0.0 UPDATE - Ensure users own their home directories - Update
audit and remediation
January 27, 2021 3.0.0 UPDATE - Ensure users' home directories permissions are 750
or more restrictive - Update audit and remediation
January 27, 2021 3.0.0 UPDATE - Ensure users' dot files are not group or world
writable - Update audit and remediation
January 27, 2021 3.0.0 UPDATE - Ensure no users have .forward files - Update audit
and remediation
January 27, 2021 3.0.0 UPDATE - Ensure no users have .netrc files - Update audit and
remediation
January 27, 2021 3.0.0 UPDATE - Ensure no users have .rhosts files - Update audit and
remediation
January 27, 2021 3.0.0 UPDATE - Ensure all groups in /etc/passwd exist in /etc/group
- Update audit and remediation
January 27, 2021 3.0.0 UPDATE - Ensure no duplicate GIDs exist - Update audit
January 27, 2021 3.0.0 UPDATE - Ensure no duplicate user names exist - Update audit
January 27, 2021 3.0.0 UPDATE - Ensure no duplicate group names exist - Update
audit
January 27, 2021 3.0.0 UPDATE - Ensure shadow group is empty - Update audit
498 | P a g e