CCE Identifiers in DRAFT Guide to the Secure Configuration of Red Hat Enterprise Linux 6 with references common to ../references/cce-rhel5.xml


CCE ID Rule Title Description CCE Description CCE Mechanism
CCE-14161-4 Ensure /tmp Located On Separate Partition The /tmp directory is a world-writable directory used for temporary file storage. Ensure that it has its own partition or logical volume at installation time, or migrate it using LVM. /tmp should be configured on an appropriate filesystem partition. via /etc/fstab
CCE-14777-7 Ensure /var Located On Separate Partition The /var directory is used by daemons and other system services to store frequently-changing data. Ensure that /var has its own partition or logical volume at installation time, or migrate it using LVM. /var should be configured on an appropriate filesystem partition. via /etc/fstab
CCE-14011-1 Ensure /var/log Located On Separate Partition System logs are stored in the /var/log directory. Ensure that it has its own partition or logical volume at installation time, or migrate it using LVM. /var/log should be configured on an appropriate filesystem partition. via /etc/fstab
CCE-14171-3 Ensure /var/log/audit Located On Separate Partition Audit logs are stored in the /var/log/audit directory. Ensure that it has its own partition or logical volume at installation time, or migrate it later using LVM. Make absolutely certain that it is large enough to store all audit logs that will be created by the auditing daemon. /var/log/audit should be configured on an appropriate filesystem partition. via /etc/fstab
CCE-14559-9 Ensure /home Located On Separate Partition If user home directories will be stored locally, create a separate partition for /home at installation time (or migrate it later using LVM). If /home will be mounted from another system such as an NFS server, then creating a separate partition is not necessary at installation time, and the mountpoint can instead be configured later. /home should be configured on an appropriate filesystem partition. via /etc/fstab
CCE-14440-2 Ensure Red Hat GPG Key Installed To ensure that the system can cryptographically verify base software packages come from Red Hat (and to connect to the Red Hat Network to receive them if desired), the Red Hat GPG key must properly be installed. To ensure that the GPG key is installed, run:
# rhn_register
The GPG Key for Red Hat Network should be installed or uninstalled as appropriate. via rpm
CCE-14914-6 Ensure gpgcheck Enabled In Main Yum Configuration The gpgcheck option should be used to ensure that checking of an RPM package’s signature always occurs prior to its installation. To configure yum to check package signatures before installing them, ensure that the following line appears in /etc/yum.conf in the [main] section:
gpgcheck=1
Package signature checking should be globally activated or deactivated as appropriate. /etc/yum.conf
CCE-14813-0 Ensure gpgcheck Enabled For All Yum Package Repositories To ensure that signature checking is not disabled for any repos, remove any lines from files in /etc/yum.repos.d of the form:
gpgcheck=0
Package signature checking should be activated or deactivated as appropriate for all configured repositories. via all files in /etc/yum.repos.d
Ensure Software Patches Installed The following command prints a list of packages that need to be updated:
# yum check-update
To actually install these updates, run:
# yum update
CCE-4209-3 Install AIDE Install the AIDE package with the command:
# yum install aide
The AIDE package should be installed or not as appropriate via yum
Disable Prelinking The prelinking feature changes binaries in an attempt to decrease their startup time. In order to disable it, change or add the following line inside the file /etc/sysconfig/prelink:
PRELINKING=no
Next, the following command to return binaries to a normal, non-prelinked state:
# /usr/sbin/prelink -ua
Build and Test AIDE Database Run the following command to generate a new database:
# /usr/sbin/aide --init
By default, the database will be written to the file /var/lib/aide/aide.db.new.gz. Storing the database, the configuration file /etc/aide.conf, and the binary /usr/sbin/aide (or hashes of these files), in a secure location (such as on read-only media) provides additional assurance about their integrity. The newly-generated database can be installed as follows:
# cp /var/lib/aide/aide.db.new.gz /var/lib/aide/aide.db.gz
To initiate a manual check, run the following command:
# /usr/sbin/aide --check
If this check produces any unexpected output, investigate.
Configure Periodic Execution of AIDE AIDE should be executed on a periodic basis to check for changes. To implement a daily execution of AIDE at 4:05am using cron, add the following line to /etc/crontab:
05 4 * * * root /usr/sbin/aide --check
AIDE can be executed periodically through other means; this is merely one example.
Manually Verify Integrity of AIDE Manually verify the integrity of the AIDE binaries, configuration file, and database. Possibilities for doing so include:

1. Use sha1sum or md5sum to generate checksums on the files and then visually compare them to those generated from the safely stored versions. This does not, of course, preclude the possibility that such output could also be faked.

2. Mount the stored versions on read-only media and run /bin/diff to verify that there are no differences between the files.

3. Copying the files to another system and performing the hash or file comparisons there may impart additional confidence that the manual verification process is not being interfered with.
CCE-14931-0 Verify File Permissions with RPM The RPM package management system can check file access permissions of installed software packages, including many that are important to system security. The following command will list which files on the system have permissions that are different from what is expected by the RPM database:
# rpm -Va | grep '^.M'
All installed software packages verify or do not verify against the package database. via rpm
CCE-TODO Verify File Hashes with RPM The RPM package management system can check the hashes of installed software packages, including many that are important to system security. Run the following command to list which files on the system have hashes that differ from what is expected by the RPM database:
# rpm -Va | grep '^..5'
A “c” in the second column indicates that a file is a configuration file, which may appropriately be expected to change.
CCE-TODO Install Virus Scanning Software Virus scanning software should be installed and configured to perform scans dynamically on accessed files. If this capability is not available, the system should be configured to scan, at a minimum, all altered files on the system on a daily basis.

Virus signature definition files should be updated frequently. It is recommended that definition files be updated at least every 7 days.
CCE-4249-9 Add nodev Option to Non-Root Local Partitions Legitimate character and block devices should exist in the /dev directory on the root patition or within chroot jails built for system services. All other locations should not allow character and block devices. The nodev option should be enabled or disabled as appropriate for all non-root partitions. via /etc/fstab
CCE-3522-0 Add nodev Option to Removable Media Partitions Removable Media partitions should be mounted with the nodev option. The nodev option should be enabled or disabled as appropriate for all removable media. via /etc/fstab
CCE-4275-4 Add noexec Option to Removable Media Partitions The noexec mount option prevents the direct execution of binaries on the mounted filesystem. Users should not be allowed to execute binaries that exist on partitions mounted from removable media (such as a USB key). The noexec option prevents code from being executed directly from the media itself, and may therefore provide a line of defense against certain types of worms or malicious code. The noexec option should be enabled or disabled as appropriate for all removable media. via /etc/fstab
CCE-4275-4 Add nosuid Option to Removable Media Partitions The nosuid mount option prevents set-user-identifier (suid) and set-group-identifier (sgid) permissions from taking effect. These permissions allow users to execute binaries with the same permissions as the owner and group of the file respectively. Users should not be allowed to introduce suid and guid files into the system via partitions mounted from removeable media. The noexec option should be enabled or disabled as appropriate for all removable media. via /etc/fstab
CCE-14412-1 Add nodev Option to /tmp Legitimate character and block devices should not exist within temporary directories like /tmp. The nodev mount option should be specified for /tmp. The nodev option should be enabled or disabled as appropriate for /tmp. via /etc/fstab
CCE-14927-8 Add noexec Option to /tmp It can be dangerous to allow the execution of binaries from world-writeable temporary storage directories such as /tmp. The noexec mount option prevents binaries from being executed out of /tmp. The noexec option should be enabled or disabled as appropriate for /tmp. via /etc/fstab
CCE-14940-1 Add nosuid Option to /tmp The nosuid mount option should be set for temporary storage partitions such as /tmp. The suid/sgid permissions should not be required in these world-writeable directories. The nosuid option should be enabled or disabled as appropriate for /tmp. via /etc/fstab
CCE-15007-8 Add nodev Option to /dev/shm Legitimate character and block devices should not exist within temporary directories like /dev/shm. The nodev mount option should specified for /dev/shm. The nodev option should be enabled or disabled for /dev/shm. via /etc/fstab
CCE-14703-3 Add noexec Option to /dev/shm It can be dangerous to allow the execution of binaries from world-writeable temporary storage directories such as /dev/shm. The noexec mount option prevents binaries from being executed out of /dev/shm. The noexec option should be enabled or disabled for /dev/shm. via /etc/fstab
CCE-14306-5 Add nosuid Option to /dev/shm The nosuid mount option should be set for temporary storage partitions such as /dev/shm. The suid/sgid permissions should not be required in these world-writeable directories. The nosuid option should be enabled or disabled for /dev/shm. via /etc/fstab
CCE-14584-7 Bind Mount /var/tmp To /tmp The /var/tmp directory should be bind mounted to /tmp in order to consolidate temporary storage into one location protected by the same techniques as /tmp. This is done by editing /etc/fstab and adding the following line if needed:
/tmp     /var/tmp     none     rw,nodev,noexec,nosuid,bind     0 0
See the mount(8) man page for further explanation of bind mounting.
/var/tmp should be configured on an appropriate filesystem partition. via /etc/fstab
CCE-3685-5 Restrict Console Device Access to Desktop Workstations If the display manager has been altered to allow remote users to log in and the host is configured to run at runlevel 5, change console as well as the xconsole directive in the /etc/security/console.perms to the following:
<console>=tty[0-9][0-9]* vc/[0-9][0-9]* :0\.[0-9] :0
<xconsole>=:0\.[0-9] :0
Console device ownership should be restricted to root-only as appropriate. via /etc/security/console.perms.d/50-default.perms
CCE-3685-5 Restrict Console Device Access to Servers If the display manager has been altered to allow remote users to log in and the host is configured to run at runlevel 5, change console as well as the xconsole directive in the /etc/security/console.perms to the following:
<console>=tty[0-9][0-9]* vc/[0-9][0-9]*
Console device ownership should be restricted to root-only as appropriate. via /etc/security/console.perms.d/50-default.perms
CCE-4187-1 Disable Modprobe Loading of USB Storage Driver If USB storage devices should not be used, the modprobe program used for automatic kernel module loading should be configured to not load the USB storage driver upon demand. Add the following line to the appropriate file in /etc/modprobe.d/ to prevent loading of the usb-storage kernel module:
install usb-storage /bin/true
This will prevent the modprobe program from loading the usb-storage module, but will not prevent an administrator (or another program) from using the insmod program to load the module manually.
The USB device support module should be loaded or not as appropriate via /etc/modprobe.conf
CCE-4173-1 Disable Kernel Support for USB via Bootloader Configuration Another means of disabling USB storage is to disable all USB support provided by the operating system. This can be accomplished by adding the nousb argument to the kernel’s boot loader configuration. To disable kernel support for USB, append “nousb” to the kernel line in /etc/grub.conf as follows:
kernel /vmlinuz-VERSION ro vga=ext root=/dev/VolGroup00/LogVol00 rhgb quiet nousb
WARNING: Disabling all kernel support for USB will cause problems for systems with USB-based keyboards, mice, or printers. This guidance is inappropriate for systems which require USB connectivity.
USB kernel support should be enabled or disabled as appropriate. via /etc/grub.conf
CCE-3944-6 Disable Booting from USB Devices An attacker with physical access could try to boot the system from a USB flash drive and then access any data on the system’s hard drive, circumventing the normal operating system’s access controls. To prevent this, configure the BIOS to disallow booting from USB drives. Also configure the BIOS or firmware password as described in the section titled "Set BIOS Password" to prevent unauthorized configuration changes. The ability to boot from USB devices should be enabled or disabled as appropriate via BIOS
CCE-4072-5 Disable the Automounter The autofs daemon mounts and unmounts filesystems, such as user home directories shared via NFS, on demand. In addition, autofs can be used to handle removable media, and the default configuration provides the cdrom device as /misc/cd. However, this method of providing access to removable media is not common, so autofs can almost always be disabled if NFS is not in use. Even if NFS is required, it is almost always possible to configure filesystem mounts statically by editing /etc/fstab rather than relying on the automounter.

If the autofs service is not needed to dynamically mount NFS filesystems or removable media, disable the service for all runlevels:
# chkconfig --level 0123456 autofs off
The autofs service should be enabled or disabled as appropriate. via chkconfig
CCE-4231-7 Disable GNOME Automounting The system’s default desktop environment, GNOME, will mount devices and removable media (such as DVDs, CDs and USB flash drives) whenever they are inserted into the system. Disable automount and autorun within GNOME by running the following:
# gconftool-2 --direct \
	--config-source xml:readwrite:/etc/gconf/gconf.xml.mandatory \
	--type bool \
	--set /apps/nautilus/preferences/media_automount false
# gconftool-2 --direct \
	--config-source xml:readwrite:/etc/gconf/gconf.xml.mandatory \
	--type bool \
	--set /apps/nautilus/preferences/media_autorun_never true
These settings can be verified by running the following:
$ gconftool-2 --direct \
	--config-source xml:read:/etc/gconf/gconf.xml.mandatory \
	--get /apps/nautilus/preferences/media_automount
$ gconftool-2 --direct \
	--config-source xml:read:/etc/gconf/gconf.xml.mandatory \
	--get /apps/nautilus/preferences/media_autorun_never
The GNOME automounter (gnome-volume-manager) should be enabled or disabled as appropriate via gconftool-2
CCE-14089-7 Disable Mounting of cramfs Using the install command inside the appropriate .conf file inside/etc/modprobe.d instructs the kernel module loading system to run the command specified (here, /bin/true) instead of inserting the module in the kernel as normal. This effectively prevents usage of these uncommon filesystems. Support for cramfs filesystems should be enabeld or disabled as appropriate. (1) via /etc/modprobe.conf
CCE-14457-6 Disable Mounting of freevxfs Using the install command inside the appropriate /etc/modprobe.d configuration file. instructs the kernel module loading system to run the command specified (here, /bin/true) instead of inserting the module in the kernel as normal. This effectively prevents usage of these uncommon filesystems. Support for freevxfs filesystems should be enabeld or disabled as appropriate. (1) via /etc/modprobe.conf
CCE-14853-6 Disable Mounting of jffs2 Using the install command inside the appropriate /etc/modprobe.d configuration file. instructs the kernel module loading system to run the command specified (here, /bin/true) instead of inserting the module in the kernel as normal. This effectively prevents usage of these uncommon filesystems. Support for jffs2 filesystems should be enabeld or disabled as appropriate. (1) via /etc/modprobe.conf
CCE-15087-0 Disable Mounting of hfs Using the install command inside the appropriate /etc/modprobe.d configuration file. instructs the kernel module loading system to run the command specified (here, /bin/true) instead of inserting the module in the kernel as normal. This effectively prevents usage of these uncommon filesystems. Support for hfs filesystems should be enabeld or disabled as appropriate. (1) via /etc/modprobe.conf
CCE-14093-9 Disable Mounting of hfsplus Using the install command inside the appropriate /etc/modprobe.d configuration file. instructs the kernel module loading system to run the command specified (here, /bin/true) instead of inserting the module in the kernel as normal. This effectively prevents usage of these uncommon filesystems. Support for hfsplus filesystems should be enabeld or disabled as appropriate. (1) via /etc/modprobe.conf
CCE-14118-4 Disable Mounting of squashfs Using the install command inside the appropriate /etc/modprobe.d configuration file. instructs the kernel module loading system to run the command specified (here, /bin/true) instead of inserting the module in the kernel as normal. This effectively prevents usage of these uncommon filesystems. Support for squashfs filesystems should be enabeld or disabled as appropriate. (1) via /etc/modprobe.conf
CCE-14871-8 Disable Mounting of udf Using the install command inside the appropriate /etc/modprobe.d configuration file. instructs the kernel module loading system to run the command specified (here, /bin/true) instead of inserting the module in the kernel as normal. This effectively prevents usage of these uncommon filesystems. Support for udf filesystems should be enabeld or disabled as appropriate. (1) via /etc/modprobe.conf
CCE-TODO Disable All GNOME Thumbnailers The system’s default desktop environment, GNOME, uses a number of different thumbnailer programs to generate thumbnails for any new or modified content in an opened folder. The following command can disable the execution of these thumbnail applications:
# gconftool-2 --direct \
  --config-source xml:readwrite:/etc/gconf/gconf.xml.mandatory \
  --type bool \
  --set /desktop/gnome/thumbnailers/disable_all true
This effectively prevents an attacker from gaining access to a system through a flaw in GNOME’s Nautilus thumbnail creators.
CCE-3918-0 Verify User Who Owns shadow File To properly set the owner of /etc/shadow, run the command:
# chown root /etc/shadow 
The /etc/shadow file should be owned by the appropriate user. via chown
CCE-3988-3 Verify Group Who Owns shadow File To properly set the group owner of /etc/shadow, run the command:
# chgrp root /etc/shadow 
The /etc/shadow file should be owned by the appropriate group. via chown
CCE-4130-1 Verify Permissions on shadow File To properly set the permissions of /etc/shadow, run the command:
# chmod 0000 /etc/shadow
File permissions for /etc/shadow should be set correctly. via chmod
CCE-3276-3 Verify User Who Owns group File To properly set the owner of /etc/group, run the command:
# chown root /etc/group 
The /etc/group file should be owned by the appropriate user. via chown
CCE-3883-6 Verify Group Who Owns group File To properly set the group owner of /etc/group, run the command:
# chgrp root /etc/group 
The /etc/group file should be owned by the appropriate group. via chown
CCE-3967-7 Verify Permissions on group File To properly set the permissions of /etc/group, run the command:
# chmod 644 /etc/group
File permissions for /etc/group should be set correctly. via chmod
CCE-4210-1 Verify User Who Owns gshadow File To properly set the owner of /etc/gshadow, run the command:
# chown root /etc/gshadow 
The /etc/gshadow file should be owned by the appropriate user. via chown
CCE-4064-2 Verify Group Who Owns gshadow File To properly set the group owner of /etc/gshadow, run the command:
# chgrp root /etc/gshadow 
The /etc/gshadow file should be owned by the appropriate group. via chown
CCE-3932-1 Verify Permissions on gshadow File To properly set the permissions of /etc/gshadow, run the command:
# chmod 0000 /etc/gshadow
File permissions for /etc/gshadow should be set correctly. via chmod
CCE-3958-6 Verify User Who Owns passwd File To properly set the owner of /etc/passwd, run the command:
# chown root /etc/passwd 
The /etc/passwd file should be owned by root.
The /etc/passwd file should be owned by the appropriate user. via chown
CCE-3495-9 Verify Group Who Owns passwd File To properly set the group owner of /etc/passwd, run the command:
# chgrp root /etc/passwd 
The /etc/passwd file should be owned by the appropriate group. via chown
CCE-3566-7 Verify Permissions on passwd File To properly set the permissions of /etc/passwd, run the command:
# chmod 0644 /etc/passwd
File permissions for /etc/passwd should be set correctly. via chmod
Verify that Shared Library Files Have Restrictive Permissions System-wide shared library files, which are linked to executables during process load time or run time, are stored in the following directories by default:
/lib
/lib64
/usr/lib
/usr/lib64
Kernel modules, which can be added to the kernel during runtime, are stored in /lib/modules. All files in these directories should not be group-writable or world-writable.
Verify that Shared Library Files Have Root Ownership System-wide shared library files, which are linked to executables during process load time or run time, are stored in the following directories by default:
/lib
/lib64
/usr/lib
/usr/lib64
Kernel modules, which can be added to the kernel during runtime, are also stored in /lib/modules. All files in these directories should be owned by the root user.
Verify that System Executables Have Restrictive Permissions System executables are stored in the following directories by default:
/bin
/usr/bin
/usr/local/bin
/sbin
/usr/sbin
/usr/local/sbin
All files in these directories should not be group-writable or world-writable.
Verify that System Executables Have Root Ownership System executables are stored in the following directories by default:
/bin
/usr/bin
/usr/local/bin
/sbin
/usr/sbin
/usr/local/sbin
All files in these directories should be owned by the root user.
CCE-3399-3 Verify that All World-Writable Directories Have Sticky Bits Set When the so-called 'sticky bit' is set on a directory, only the owner of a given file may remove that file from the directory. Without the sticky bit, any user with write access to a directory may remove any file in the directory. Setting the sticky bit prevents users from removing each other's files. In cases where there is no reason for a directory to be world-writable, a better solution is to remove that permission rather than to set the sticky bit. However, if a directory is used by a particular application, consult that application's documentation instead of blindly changing modes.
To set the sticky bit on a world-writable directory DIR, run the following command:
# chmod +t DIR
The sticky bit should be set or not set as appropriate for all world-writable directories. via chmod
CCE-3795-2 Ensure No World-Writable Files Exist Data in world-writable files can be modified by any user on the system. In almost all circumstances, files can be configured using a combination of user and group permissions to support whatever legitimate access is needed without the risk caused by world-writable files.

It is generally a good idea to remove global (other) write access to a file when it is discovered. However, check with documentation for specific applications before making changes. Also, monitor for recurring world-writable files, as these may be symptoms of a misconfigured application or user account.
The world-write permission should be enabled or disabled as appropriate for all files. via chmod
CCE-14970-8 Ensure All Setgid Executables Are Authorized The SGID (set group id) bit should be set only on files that were installed via authorized means. A straightforward means of identifying unauthorized SGID files is determine if any were not installed as part of an RPM package, which is cryptographically verified. Investigate the origin of any unpackaged SGID files. Files with the setgid attribute enabled should be reviewed as appropriate to determine whether that condition is correct. via find
CCE-14340-4 Ensure All SUID Executables Are Authorized The SUID (set user id) bit should be set only on files that were installed via authorized means. A straightforward means of identifying unauthorized SGID files is determine if any were not installed as part of an RPM package, which is cryptographically verified. Investigate the origin of any unpackaged SUID files. Files with the setuid attribute enabled should be reviewed as appropriate to determine whether that condition is correct. via find
CCE-4223-4 Ensure All Files Are Owned by a User If any files are not owned by a user, then the cause of their lack of ownership should be investigated. Following this, the files should be deleted or assigned to an appropriate user. All files should be owned by a user as appropriate via chown
CCE-3573-3 Ensure All Files Are Owned by a Group If any files are not owned by a group, then the cause of their lack of group-ownership should be investigated. Following this, the files should be deleted or assigned to an appropriate group. All files should be owned by a group as appropriate via chgrp
CCE-14794-2 Ensure All World-Writable Directories Are Owned by a System Account All directories in local partitions which are world-writable should be owned by root or another system account. If any world-writable directories are not owned by a system account, this should be investigated. Following this, the files should be deleted or assigned to an appropriate group. All world-writable directories should be owned by an appropriate user. via chown
CCE-4220-0 Set Daemon Umask The file /etc/init.d/functions includes initialization parameters for most or all daemons started at boot time. The default umask of 022 prevents creation of group- or world-writable files. To set the default umask for daemons, edit the following line, inserting 022 or 027 for UMASK appropriately:
umask UMASK
Setting the umask to too restrictive a setting can cause serious errors at runtime. Many daemons on the system already individually restrict themselves to a umask of 077 in their own init scripts.
The daemon umask should be set as appropriate via /etc/sysconfig/init
CCE-4225-9 Disable Core Dumps for All Users To disable core dumps for all users, add the following line to /etc/security/limits.conf:
*     hard   core    0
Core dumps for all users should be enabled or disabled as appropriate via /etc/security/limits.conf
CCE-4247-3 Disable Core Dumps for SUID programs To set the runtime status of the fs.suid_dumpable kernel parameter, run the following command:
# sysctl -w fs.suid_dumpable0
Core dumps for setuid programs should be enabled or disabled as appropriate via sysctl - fs.suid_dumpable
CCE-4168-1 Enable ExecShield To set the runtime status of the kernel.exec-shield kernel parameter, run the following command:
# sysctl -w kernel.exec-shield1
ExecShield should be enabled or disabled as appropriate via sysctl - kernel.exec-shield
CCE-4146-7 Enable Randomized Layout of Virtual Address Space To set the runtime status of the kernel.randomize_va_space kernel parameter, run the following command:
# sysctl -w kernel.randomize_va_space1
ExecShield randomized placement of virtual memory regions should be enabled or disabled as appropriate via sysctl - kernel.randomize_va_space
CCE-4172-3 Install PAE Kernel on Supported 32-bit x86 Systems Systems that are using the 64-bit x86 kernel package do not need to install the kernel-PAE package because the 64-bit x86 kernel already includes this support. However, if the system is 32-bit and also supports the PAE and NX features as determined in the previous section, the kernel-PAE package should be installed to enable XD or NX support:
# yum install kernel-PAE
The installation process should also have configured the bootloader to load the new kernel at boot. Verify this at reboot and modify /etc/grub.conf if necessary.
Kernel support for the XD/NX processor feature should be enabled or disabled as appropriate via kernel-PAE
CCE-4177-2 Enable NX or XD Support in the BIOS Reboot the system and enter the BIOS or Setup configuration menu. Navigate the BIOS configuration menu and make sure that the option is enabled. The setting may be located under a Security section. Look for Execute Disable (XD) on Intel-based systems and No Execute (NX) on AMD-based systems. The XD/NX processor feature should be enabled or disabled as appropriate in the BIOS via BIOS
CCE-3977-6 Ensure SELinux Not Disabled in /etc/grub.conf SELinux can be disabled at boot time by an argument in /etc/grub.conf. Remove any instances of selinux=0 from the kernel arguments in that file to prevent SELinux from being being disabled at boot. SELinux should be enabled or disabled as appropriate via /etc/selinux/config
CCE-3999-0 Ensure SELinux State is Enforcing The SELinux state should be set to enforcing at system boot time. In the file /etc/selinux/config, add or correct the line SELINUX=enforcing to configure the system to boot into enforcing mode. The SELinux state should be set appropriately. via /etc/selinux/config
CCE-3624-4 Configure SELinux Policy The SELinux targeted policy is appropriate for general-purpose desktops and servers, as well as systems in many other roles. To configure the system to use this policy, add or correct the following line in /etc/selinux/config:
SELINUXTYPE=targeted
Other policies, such as mls, provide additional security labeling and greater confinement but are not compatible with many general-purpose use cases.
The SELinux policy should be set appropriately. via /etc/selinux/config
CCE-4129-3 Enable the SELinux Context Restoration Service (restorecond) The restorecond service utilizes inotify to look for the creation of new files listed in the /etc/selinux/restorecond.conf configuration file. When a file is created, restorecond ensures that the file receives the proper SELinux security context. The restorecond service can be enabled with the following command:
# chkconfig restorecond on
The restorecond service should be enabled or disabled as appropriate. via chkconfig
Ensure No Daemons are Unconfined by SELinux Daemons for which the SELinux policy does not contain rules will inherit the context of the parent process. Because daemons are launched during startup and descend from the init process, they inherit the initrc_t context.

To check for unconfined daemons, run the following command:
# ps -eZ | egrep "initrc" | egrep -vw "tr|ps|egrep|bash|awk" | tr ':' ' ' | awk '{ print $NF }'
It should produce no output in a well-configured system.
CCE-14991-4 Ensure No Device Files are Unlabeled by SELinux Device files are used for communication with important system resources. SELinux contexts should exist for these. By checking for unlabeled_t file contexts, we can determine if the system is optimally configured. The system includes or does not include any device files with the unlabeled SELinux type. via chmod
CCE-3485-0 Restrict Virtual Console Root Logins To restrict root logins through the (deprecated) virtual console devices, ensure lines of this form do not appear in /etc/securetty:
vc/1
vc/2
vc/3
vc/4
Logins through the specified virtual console device should be enabled or disabled as appropriate via /etc/securetty
CCE-4256-4 Restrict Serial Port Root Logins To restrict root logins on serial ports, ensure lines of this form do not appear in /etc/securetty:
ttyS0
ttyS1
Login prompts on serial ports should be enabled or disabled as appropriate. via /etc/securetty
CCE-3987-5 Ensure that System Accounts Do Not Run a Shell Upon Login Some accounts are not associated with a human user of the system, and exist to perform some administrative function. Should an attacker be able to log into these accounts, he or she should not be granted access to a shell.

Ensure that no shells are granted to system accounts. First, obtain a listing of all users, their UIDs, and their shells, by running:
$ awk -F: '{print $1 ":" $3 ":" $7}' /etc/passwd
Identify the system accounts from this listing. These will primarily be the accounts with UID numbers less than 500, other than root.
Login access to non-root system accounts should be enabled or disabled as appropriate via /etc/passwd
CCE-4009-7 Verify Only Root Has UID 0 If any account other than root has a UID of 0, this misconfiguration should be investigated and the accounts other than root should be removed or have their UID changed. Anonymous root logins are enabled or disabled as appropriate via /etc/passwd
CCE-4238-2 Prevent Log In to Accounts With Empty Password If an account is configured for password authentication but does not have an assigned password, it may be possible to log into the account without authentication. Remove any instances of the nullok option in /etc/pam.d/system-auth-ac to prevent logins with empty passwords. Login access to accounts without passwords should be enabled or disabled as appropriate via /etc/shadow
CCE-14300-8 Verify All Account Password Hashes are Shadowed If any password hashes are stored in /etc/passwd (in the second field, instead of an x), the cause of this misconfiguration should be investigated. The account should have its password reset and the hash should be properly stored, or the account should be deleted entirely. Password hashes are shadowed or not shadowed for all accounts in /etc/passwd as appropriate. via /etc/password
CCE-TODO Verify No netrc Files Exist The .netrc files contain login information used to auto-login into FTP servers and reside in the user's home directory. These files may contain unencrypted passwords to remote FTP servers making them susceptible to access by unauthorized users and should not be used. Any .netrc files should be removed.
CCE-4154-1 Set Password Minimum Length in login.defs To specify password length requirements for new accounts, edit the file /etc/login.defs and add or correct the following lines:
PASS_MIN_LEN LENGTH


The DoD requirement is 14. If a program consults /etc/login.defs and also another PAM module (such as pam_cracklib) during a password change operation, then the most restrictive must be satisfied. See PAM section for more information about enforcing password quality requirements.
The password minimum length should be set appropriately (1) via pam_cracklib
CCE-4180-6 Set Password Minimum Age To specify password minimum age for new accounts, edit the file /etc/login.defs and add or correct the following line, replacing DAYS appropriately:
PASS_MIN_DAYS DAYS
The DoD requirement is 7.
The "minimum password age" policy should meet minimum requirements. via /etc/login.defs
CCE-4092-3 Set Password Maximum Age To specify password maximum age for new accounts, edit the file /etc/login.defs and add or correct the following line, replacing DAYS appropriately:
PASS_MAX_DAYS DAYS
A value of 180 days is sufficient for many environments. The DoD requirement is 60.
The "maximum password age" policy should meet minimum requirements. via /etc/login.defs
CCE-4097-2 Set Password Warning Age To specify how many days prior to password expiration that a warning will be issued to users, edit the file /etc/login.defs and add or correct the following line:
PASS_WARN_AGE DAYS
A value of 7 days is considered for appropriate for many environments.
The password warn age should be set appropriately via /etc/login.defs
Set Account Expiration Following Inactivity To specify the number of days after a password expires (which signifies inactivity) until an account is permanently disabled, add or correct the following lines in /etc/defaults/useradd, substituting NUM_DAYS appropriately:
INACTIVE=NUM_DAYS
A value of 35 is recommended. If a password is currently on the verge of expiration, then 35 days remain until the account is automatically disabled. However, if the password will not expire for another 60 days, then 95 days could elapse until the account would be automatically disabled. See the useradd man page for more information. Determining the inactivity timeout must be done with careful consideration of the length of a "normal" period of inactivity for users in the particular environment. Setting the timeout too low incurs support costs and also has the potential to impact availability of the system to legitimate users.
CCE-15054-0 Set Password Retry Prompts Permitted Per-session The pam_cracklib module's retry= parameter controls how many times a program will re-prompt a user after an incorrect password entry, on a per-session basis. To configure this, open:
/etc/pam.d/system-auth
Locate the retry= parameter, the DoD required value is 3.
The number of times a user is prompted to provide a new password if it fails to meet configured password strength requirements (also known as the retry value) should be set appropriately. (1) via pam_cracklib
CCE-14113-5 Set Password Strength Minimum Digit Characters The pam_cracklib module's dcredit= parameter controls requirements for usage of digits in a password. When set to a negative number, any password will be required to contain that many digits. When set to a positive number, pam_cracklib will grant +1 additional length credit for each digit. The minimum number of digits required for new passwords should be set as appropriate. via pam_cracklib
CCE-14672-0 Set Password Strength Minimum Uppercase Characters The pam_cracklib module's ucredit= parameter controls requirements for usage of uppercase letters in a password. When set to a negative number, any password will be required to contain that many uppercase characters. When set to a positive number, pam_cracklib will grant +1 additional length credit for each uppercase character. The minimum number of upper case characters required for new passwords should be set as appropriate. via pam_cracklib
CCE-14122-6 Set Password Strength Minimum Special Characters The pam_cracklib module's ocredit= parameter controls requirements for usage of special (or ``other'') characters in a password. When set to a negative number, any password will be required to contain that many special characters. When set to a positive number, pam_cracklib will grant +1 additional length credit for each special character. The minimum number of special characters required for new passwords should be set as appropriate. via pam_cracklib
CCE-14712-4 Set Password Strength Minimum Lowercase Characters The pam_cracklib module's lcredit= parameter controls requirements for usage of lowercase letters in a password. When set to a negative number, any password will be required to contain that many lowercase characters. When set to a positive number, pam_cracklib will grant +1 additional length credit for each lowercase character. The minimum number of lower case characters required for new passwords should be set as appropriate. via pam_cracklib
CCE-14701-7 Set Password Strength Minimum Different Characters The pam_cracklib module's difok= parameter controls requirements for usage of different characters during a password change. The password strength parameters should require new passwords to differ from old ones by the appropriate minimum number of characters. via PAM
CCE-3410-8 Set Deny For Failed Password Attempts This requires further investigation. The "account lockout threshold" policy should meet minimum requirements. via PAM
CCE-14063-2 Set Password Hashing Algorithm The system's default algorithm for storing password hashes in /etc/shadow is SHA-512. In order to ensure the system is still configured to use SHA-512 algorithm, the following line must appear in /etc/login.defs:
ENCRYPT_METHOD SHA512
Also ensure that the pam_unix.so module in the password section in /etc/pam.d/system-auth includes the argument sha512.
If this is not the case, the following command can be run to fix:
# /usr/sbin/authconfig --passalgo=sha512 --update
This ensures that when users change their passwords, hashes for the new passwords will be generated using the SHA-512 algorithm.
The password hashing algorithm should be configured as appropriate. via PAM
CCE-14939-3 Limit Password Reuse Do not allow users to reuse recent passwords. This can be accomplished by using the remember option for the pam_unix PAM module. In order to prevent a user from re-using any of their last passwords, append remember= to the password line which uses the pam_unix module in the file /etc/pam.d/system-auth, as shown:
password sufficient pam_unix.so existing_options remember=
Old (and thus no longer valid) passwords are stored in the file /etc/security/opasswd. The DoD requirement is currently 24 passwords.
The "password reuse" policy should meet minimum requirements. via PAM
Limit the Number of Concurrent Login Sessions Allowed Per User Limiting the number of allowed users and sessions per user can limit risks related to Denial of Service attacks. This addresses concurrent sessions for a single account and does not address concurrent sessions by a single user via multiple accounts. To set the number of concurrent sessions per user add the following line in /etc/security/limits.conf:
* hard maxlogins MAX
Where MAX is the maximum number of login sessions allowed.
CCE-3301-9 Ensure that Root's Path Does Not Include Relative Paths or Null Directories Ensure that none of the directories in root's path is equal to a single . character, or that it contains any instances that lead to relative path traversal, such as .. or beginning a path without the slash (/) character. Also ensure that there are no "empty" elements in the path, such as in these examples:
PATH=:/bin
PATH=/bin:
PATH=/bin::/sbin
These empty elements have the same effect as a single . character.
The PATH variable should be set correctly for user root
CCE-14957-5 Ensure that Root's Path Does Not Include World or Group-Writable Directories For each element in root's path, run:
# ls -ld DIR
and ensure that write permissions are disabled for group and other.
The PATH variable for root includes or does not include any world-writable or group-writable directories as appropriate. via echo $PATH
CCE-4090-7 Ensure that User Home Directories are not Group-Writable or World-Readable For each human user USER of the system, view the permissions of the user's home directory:
# ls -ld /home/USER
Ensure that the directory is not group-writable and that it is not world-readable. If necessary, repair the permissions:
# chmod g-w /home/USER
# chmod o-rwx /home/USER
File permissions should be set correctly for the home directories for all user accounts.
CCE-3844-8 Ensure the Default Bash Umask is Set Correctly To ensure the default umask for users of the Bash shell is set properly, add or correct the umask setting in /etc/bashrc to read as follows:
umask 077
The default umask for all users should be set correctly for the bash shell umask
CCE-4227-5 Ensure the Default C Shell Umask is Set Correctly To ensure the default umask for users of the C shell is set properly, add or correct the umask setting in /etc/csh.cshrc to read as follows:
umask 077
The default umask for all users should be set correctly for the csh shell
CCE-14847-8 Ensure the Default Umask is Set Correctly in /etc/profile To ensure the default umask controlled by /etc/profile is set properly, add or correct the umask setting in /etc/profile to read as follows:
umask 077
The default umask for all users should be set correctly in /etc/profile via /etc/profile
CCE-14107-7 Ensure the Default Umask is Set Correctly in login.defs To ensure the default umask controlled by /etc/login.defs is set properly, add or correct the umask setting in /etc/login.defs to read as follows:
umask 077
The default umask for all users should be set correctly in /etc/login.defs via /etc/login.def
CCE-4144-2 Verify /boot/grub/grub.conf User Ownership The file /etc/grub.conf is a symbolic link to /boot/grub/grub.conf which should be owned by the root user to prevent destruction or modification of the file. To properly set the owner of /boot/grub/grub.conf, run the command:
# chown root /boot/grub/grub.conf 
The /etc/grub.conf file should be owned by the appropriate user. via chown
CCE-4197-0 Verify /boot/grub/grub.conf Group Ownership The file /etc/grub.conf is a symbolic link to /boot/grub/grub.conf which should be group-owned by the root group to prevent destruction or modification of the file. To properly set the group owner of /boot/grub/grub.conf, run the command:
# chgrp  /boot/grub/grub.conf 
The /etc/grub.conf file should be owned by the appropriate group. via chown
CCE-3923-0 Verify /boot/grub/grub.conf Permissions File permissions for /boot/grub/grub.conf should be set to 600, which is the default. To properly set the permissions of /boot/grub/grub.conf, run the command:
# chmod  /boot/grub/grub.conf
File permissions for /etc/grub.conf should be set correctly. via chmod
CCE-3818-2 Set Boot Loader Password The grub boot loader should have password protection enabled to protect boot-time settings. To do so, select a password and then generate a hash from it by running:
# grub-crypt --sha-512
You will then be prompted to enter a password. Insert the following line into /etc/grub.conf immediately after the header comments. (Use the output from grub-crypt as the value of password-hash):
password --encrypted password-hash
The grub boot loader should have password protection enabled or disabled as appropriate via /etc/grub.conf
CCE-4241-6 Require Authentication for Single User Mode Single-user mode is intended as a system recovery method, providing a single user root access to the system by providing a boot option at startup. By default, no authentication is performed if single-user mode is selected.

To require entry of the root password even if the system is started in single-user mode, add or correct the following line in the file /etc/sysconfig/init:
SINGLE=/sbin/sulogin
The requirement for a password to boot into single-user mode should be configured correctly. via /etc/inittab
CCE-4245-7 Disable Interactive Boot To disable the ability for users to perform interactive startups, edit the file /etc/sysconfig/init. Add or correct the line:
PROMPT=no
The PROMPT option allows the console user to perform an interactive system startup, in which it is possible to select the set of services which are started on boot.
The ability for users to perform interactive startups should be enabled or disabled as appropriate. via /etc/sysconfig/init
CCE-3315-9 Set GNOME Login Inactivity Timeout The idle time-out value for period of inactivity GNOME desktop lockout should be 15 minutes.
# gconftool-2 \
  --direct \
  --config-source xml:readwrite:/etc/gconf/gconf.xml.mandatory \
  --type int \
  --set /apps/gnome-screensaver/idle_delay 15
The allowed period of inactivity gnome desktop lockout should be configured correctly. via gconftool-2
CCE-14604-3 GNOME Desktop Screensaver Mandatory Use Idle activation of the screen saver should be enabled
# gconftool-2 --direct \
  --config-source xml:readwrite:/etc/gconf/gconf.xml.mandatory \
  --type bool \
  --set /apps/gnome-screensaver/idle_activation_enabled true
The gnome desktop screensaver should be enabled or disabled as appropriate as a mandatory setting for all users. (1) via gconftool-2
CCE-14023-6 Enable Screen Lock Activation After Idle Period Idle activation of the screen lock should be enabled.
# gconftool-2 --direct \
  --config-source xml:readwrite:/etc/gconf/gconf.xml.mandatory \
  --type bool \
  --set /apps/gnome-screensaver/lock_enabled true
The screen lock (password protection) function of the gnome desktop screensaver should be enabled or disabled as appropriate as a mandatory setting for all users. (1) via gconftool-2
CCE-14735-5 Implement Blank Screen Saver The screen saver should be blank.
# gconftool-2
  --direct \
  --config-source xml:readwrite:/etc/gconf/gconf.xml.mandatory \
  --type string \
  --set /apps/gnome-screensaver/mode blank-only
The screen blanking function of the gnome desktop screensaver should be enabled or disabled as appropriate as a mandatory setting for all users. (1) via gconftool-2
CCE-3910-7 Install the vlock Package To enable console screen locking, install the vlock package:
# yum install vlock
Instruct users to invoke the program when necessary, in order to prevent passersby from abusing their login:
$ vlock
The -a option can be used to prevent switching to other virtual consoles.
The vlock package should be installed or not as appropriate via gconftool-2
CCE-4060-0 Modify the System Login Banner The contents of the file /etc/issue are displayed on the screen just above the login prompt for users logging directly into a terminal. Remote login programs such as SSH or FTP can be configured to display /etc/issue as well. Instructions for configuring these daemons are available later.

By default, the system will display the version of the OS, the kernel version, and the host name.

Edit /etc/issue. Replace the default text with a message compliant with the local site policy or a legal disclaimer.
The system login banner text should be set correctly. via /etc/motd
CCE-4188-9 Enable GUI Warning Banner To enable displaying a login warning banner in the GNOME Display Manager's login screen, run the following command:
sudo -u gdm gconftool-2 \
  --type bool \
  --set /apps/gdm/simple-greeter/banner_message_enable true
To display a banner, this setting must be enabled and then banner text must also be set.
The direct gnome login warning banner should be set correctly. via RHEL.xml
CCE-4188-9 Set GUI Warning Banner Text To set the text shown by the GNOME Display Manager in the login screen, run the following command:
sudo -u gdm gconftool-2 \
  --type string \
  --set /apps/gdm/simple-greeter/banner_message_text \
  "Text of the warning banner here"
When entering a warning banner that spans several lines, remember to begin and end the string with ". This command writes directly to the file /var/lib/gdm/.gconf/apps/gdm/simple-greeter/%gconf.xml, and this file can later be edited directly if necessary.
The direct gnome login warning banner should be set correctly. via RHEL.xml
Disable the User List GDM's list of previously logged in users should not be displayed.
Disable Unused Interfaces If the system does not require network communications but still needs to use the loopback interface, remove all files of the form ifcfg-interface except for ifcfg-lo from /etc/sysconfig/network-scripts:
# rm /etc/sysconfig/network-scripts/ifcfg-interface
If the system is a standalone machine with no need for network access or even communication over the loopback device, then disable this service. The network service can be disabled with the following command:
# chkconfig network off
CCE-14054-1 Disable Zeroconf Networking Zeroconf networking allows the system to assign itself an IP address and engage in IP communication without a statically-assigned address or even a DHCP server. Automatic address assignment via Zeroconf (or DHCP) is not recommended. To disable Zeroconf automatic route assignment in the 169.245.0.0 subnet, add or correct the following line in /etc/sysconfig/network:
NOZEROCONF=yes
Zeroconf networking should be enabled or disabled as appropriate. via /etc/sysconfig/network
CCE-15013-6 Ensure System is Not Acting as a Network Sniffer The system should not be acting as a network sniffer, which can capture all traffic on the network to which it is connected. Run the following to determine if any interface is running in promiscuous mode:
$ ip link | grep PROMISC
The system should act as a network sniffer or not as appropriate. via /proc/net/packet
CCE-4151-7 Disable Kernel Parameter for Sending ICMP Redirects by Default To set the runtime status of the net.ipv4.conf.default.send_redirects kernel parameter, run the following command:
# sysctl -w net.ipv4.conf.default.send_redirects0
The default setting for sending ICMP redirects should be enabled or disabled for network interfaces as appropriate. via sysctl - net.ipv4.conf.default.send_redirects
CCE-4155-8 Disable Kernel Parameter for Sending ICMP Redirects for All Interfaces To set the runtime status of the net.ipv4.conf.all.send_redirects kernel parameter, run the following command:
# sysctl -w net.ipv4.conf.all.send_redirects0
Sending ICMP redirects should be enabled or disabled for all interfaces as appropriate. via sysctl - net.ipv4.conf.all.send_redirects
CCE-3561-8 Disable Kernel Parameter for IP Forwarding To set the runtime status of the net.ipv4.ip_forward kernel parameter, run the following command:
# sysctl -w net.ipv4.ip_forward0
IP forwarding should be enabled or disabled as appropriate. via sysctl - net.ipv4.ip_forward
CCE-4236-6 Disable Kernel Parameter for Accepting Source-Routed Packets for All Interfaces To set the runtime status of the net.ipv4.conf.all.accept_source_route kernel parameter, run the following command:
# sysctl -w net.ipv4.conf.all.accept_source_route0
Accepting source routed packets should be enabled or disabled for all interfaces as appropriate. via sysctl - net.ipv4.conf.all.accept_source_route
CCE-4217-6 Disable Kernel Parameter for Accepting ICMP Redirects for All Interfaces To set the runtime status of the net.ipv4.conf.all.accept_redirects kernel parameter, run the following command:
# sysctl -w net.ipv4.conf.all.accept_redirects0
Accepting ICMP redirects should be enabled or disabled for all interfaces as appropriate. via sysctl - net.ipv4.conf.all.accept_redirects
CCE-3472-8 Disable Kernel Parameter for Accepting Secure Redirects for All Interfaces To set the runtime status of the net.ipv4.conf.all.secure_redirects kernel parameter, run the following command:
# sysctl -w net.ipv4.conf.all.secure_redirects0
Accepting "secure" ICMP redirects (those from gateways listed in the default gateways list) should be enabled or disabled for all interfaces as appropriate. via sysctl - net.ipv4.conf.all.secure_redirects
CCE-4320-8 Enable Kernel Parameter to Log Martian Packets To set the runtime status of the net.ipv4.conf.all.log_martians kernel parameter, run the following command:
# sysctl -w net.ipv4.conf.all.log_martians1
Logging of "martian" packets (those with impossible addresses) should be enabled or disabled for all interfaces as appropriate. via sysctl - net.ipv4.conf.all.log_martians
CCE-4091-5 Disable Kernel Parameter for Accepting Source-Routed Packets By Default To set the runtime status of the net.ipv4.conf.default.accept_source_route kernel parameter, run the following command:
# sysctl -w net.ipv4.conf.default.accept_source_route0
The default setting for accepting source routed packets should be enabled or disabled for network interfaces as appropriate. via sysctl - net.ipv4.conf.default.accept_source_route
CCE-4186-3 Disable Kernel Parameter for Accepting ICMP Redirects By Default To set the runtime status of the net.ipv4.conf.default.accept_redirects kernel parameter, run the following command:
# sysctl -w net.ipv4.conf.default.accept_redirects0
The default setting for accepting ICMP redirects should be enabled or disabled for network interfaces as appropriate. via sysctl - net.ipv4.conf.default.accept_redirects
CCE-3339-9 Disable Kernel Parameter for Accepting Secure Redirects By Default To set the runtime status of the net.ipv4.conf.default.secure_redirects kernel parameter, run the following command:
# sysctl -w net.ipv4.conf.default.secure_redirects0
The default setting for accepting "secure" ICMP redirects (those from gateways listed in the default gateways list) should be enabled or disabled for network interfaces as appropriate. via sysctl - net.ipv4.conf.default.secure_redirects
CCE-3644-2 Enable Kernel Parameter to Ignore ICMP Broadcast Echo Requests To set the runtime status of the net.ipv4.icmp_echo_ignore_broadcasts kernel parameter, run the following command:
# sysctl -w net.ipv4.icmp_echo_ignore_broadcasts1
Ignoring ICMP echo requests (pings) sent to broadcast / multicast addresses should be enabled or disabled as appropriate. via sysctl - net.ipv4.icmp_echo_ignore_broadcasts
CCE-4133-5 Enable Kernel Parameter to Ignore Bogus ICMP Error Responses To set the runtime status of the net.ipv4.icmp_ignore_bogus_error_responses kernel parameter, run the following command:
# sysctl -w net.ipv4.icmp_ignore_bogus_error_responses1
Ignoring bogus ICMP responses to broadcasts should be enabled or disabled as appropriate. via sysctl - net.ipv4.icmp_ignore_bogus_error_messages
CCE-4265-5 Enable Kernel Parameter to Use TCP Syncookies To set the runtime status of the net.ipv4.tcp_syncookies kernel parameter, run the following command:
# sysctl -w net.ipv4.tcp_syncookies1
Sending TCP syncookies should be enabled or disabled as appropriate. via sysctl - net.ipv4.tcp_syncookies
CCE-4080-8 Enable Kernel Parameter to Use Reverse Path Filtering for All Interfaces To set the runtime status of the net.ipv4.conf.all.rp_filter kernel parameter, run the following command:
# sysctl -w net.ipv4.conf.all.rp_filter1
Performing source validation by reverse path should be enabled or disabled for all interfaces as appropriate. via sysctl - net.ipv4.conf.all.rp_filter
CCE-3840-6 Enable Kernel Parameter to Use Reverse Path Filtering by Default To set the runtime status of the net.ipv4.conf.default.rp_filter kernel parameter, run the following command:
# sysctl -w net.ipv4.conf.default.rp_filter1
The default setting for performing source validation by reverse path should be enabled or disabled for network interfaces as appropriate. via sysctl - net.ipv4.conf.default.rp_filter
CCE-3628-5 Disable WiFi or Bluetooth BIOS Some systems that include built-in wireless support offer the ability to disable the device through the BIOS. This is system-specific; consult your hardware manual or explore the BIOS setup during boot. All wireless devices should be enabled or disabled in the BIOS as appropriate. via BIOS menus
CCE-4276-2 Deactivate Wireless Network Interfaces Deactivating wireless network interfaces should prevent normal usage of the wireless capability.

First, identify the interfaces available with the command:
# ifconfig -a
>Additionally,the following command may also be used to determine whether wireless support ('extensions') is included for a particular interface, though this may not always be a clear indicator:
# iwconfig
After identifying any wireless interfaces (which may have names like wlan0, ath0, wifi0, em1 or eth0), deactivate the interface with the command:
# ifdown interface
These changes will only last until the next reboot. To disable the interface for future boots, remove the appropriate interface file from /etc/sysconfig/network-scripts:
# rm /etc/sysconfig/network-scripts/ifcfg-interface
All wireless interfaces should be enabled or disabled as appropriate. via ifconfig
CCE-4355-4 Disable Bluetooth Service The bluetooth service can be disabled with the following command:
# chkconfig bluetooth off
The bluetooth service should be enabled or disabled as appropriate. via chkconfig
CCE-14948-4 Disable Bluetooth Kernel Modules The kernel's module loading system can be configured to prevent loading of the Bluetooth module. Add the following to the appropriate /etc/modprobe.d configuration file to prevent the loading of the Bluetooth module:
install net-pf-31 /bin/true
install bluetooth /bin/true
Bluetooth kernel modules should be enabled or disabled as appropriate. via /etc/modprobe.conf
CCE-3562-6 Disable IPv6 Networking Support Automatic Loading To prevent the IPv6 kernel module (ipv6) from loading the IPv6 networking stack, add the following line to /etc/modprobe.d/disabled.conf (or another file in /etc/modprobe.d):
options ipv6 disable=1
This permits the IPv6 module to be loaded (and thus satisfy other modules that depend on it), while disabling support for the IPv6 protocol.
Automatic loading of the IPv6 kernel module should be enabled or disabled as appropriate. via /etc/modprobe.conf
Disable Interface Usage of IPv6 To prevent configuration of IPv6 for all interfaces, add or correct the following lines in /etc/sysconfig/network:
NETWORKING_IPV6=no
IPV6INIT=no
For each network interface IFACE , add or correct the following lines in /etc/sysconfig/network-scripts/ ifcfg-IFACE as an additional prevention mechanism:
IPV6INIT=no
Disable Support for RPC IPv6 RPC services for NFSv4 try to load transport modules for udp6 and tcp6 by default, even if IPv6 has been disabled in /etc/modprobe.d. To prevent RPC services such as rpc.mountd from attempting to start IPv6 network listeners, remove or comment out the following two lines in /etc/netconfig:
udp6       tpi_clts      v     inet6    udp     -       -
tcp6       tpi_cots_ord  v     inet6    tcp     -       -
CCE-4269-7 Disable Accepting IPv6 Router Advertisements The default setting for accepting IPv6 router advertisements should be: for all interfaces. To do so add the following lines to /etc/sysctl.conf to limit the configuration information requested from other systems, and accepted from the network:
net.ipv6.conf.default.accept_ra = 
Accepting IPv6 router advertisements should be enabled or disabled as appropriate for all network interfaces. via sysctl -w net.ipv6.conf.default.accept_ra=1
CCE-4313-3 Disable Accepting IPv6 Redirects The setting for accepting IPv6 redirects should be: for all interfaces. To do so add the following lines to /etc/sysctl.conf to limit the configuration information requested from other systems, and accepted from the network:
net.ipv6.conf.default.accept_redirects = 
Accepting redirects from IPv6 routers should be enabled or disabled as appropriate for all network interfaces. via sysctl -w net.ipv6.conf.default.accept_redirects=1
Manually Assign Global IPv6 Address To manually assign an IP address for an interface IFACE , edit the file /etc/sysconfig/network-scripts/ifcfg-IFACE. Add or correct the following line (substituting the correct IPv6 address):
IPV6ADDR=2001:0DB8::ABCD/64
Manually assigning an IP address is preferable to accepting one from routers or from the network otherwise. The example address here is an IPv6 address reserved for documentation purposes, as defined by RFC3849.
CCE-3842-2 Use Privacy Extensions for Address To introduce randomness into the automatic generation of IPv6 addresses, add or correct the following line in /etc/sysconfig/network-scripts/ifcfg-IFACE:
IPV6_PRIVACY=rfc3041
Automatically-generated IPv6 addresses are based on the underlying hardware (e.g. Ethernet) address, and so it becomes possible to track a piece of hardware over its lifetime using its traffic. If it is important for a system's IP address to not trivially reveal its hardware address, this setting should be applied.
IPv6 privacy extensions should be configured appropriately for all interfaces. via IPV6_PRIVACY in /etc/sysconfig/network-scripts/ifcfg-<interface>
Manually Assign IPv6 Router Address Edit the file /etc/sysconfig/network-scripts/ifcfg-IFACE, and add or correct the following line (substituting your gateway IP as appropriate):
IPV6_DEFAULTGW=2001:0DB8::0001
Router addresses should be manually set and not accepted via any autoconfiguration or router advertisement.
CCE-4221-8 Limit Network-Transmitted Configuration Add the following lines to /etc/sysctl.conf to limit the configuration information requested from other systems, and accepted from the network:
net.ipv6.conf.default.router_solicitations = 0
net.ipv6.conf.default.accept_ra_rtr_pref = 0
net.ipv6.conf.default.accept_ra_pinfo = 0
net.ipv6.conf.default.accept_ra_defrtr = 0
net.ipv6.conf.default.autoconf = 0
net.ipv6.conf.default.dad_transmits = 0
net.ipv6.conf.default.max_addresses = 1
The router_solicitations setting determines how many router solicitations are sent when bringing up the interface. If addresses are statically assigned, there is no need to send any solicitations.
The accept_ra_pinfo setting controls whether the system will accept prefix info from the router.
The accept_ra_defrtr setting controls whether the system will accept Hop Limit settings from a router advertisement. Setting it to 0 prevents a router from changing your default IPv6 Hop Limit for outgoing packets.
The autoconf setting controls whether router advertisements can cause the system to assign a global unicast address to an interface.
The dad_transmits setting determines how many neighbor solicitations to send out per address (global and link-local) when bringing up an interface to ensure the desired address is unique on the network.
The max_addresses setting determines how many global unicast IPv6 addresses can be assigned to each interface. The default is 16, but it should be set to exactly the number of statically configured global addresses required.
The default setting for accepting router preference via IPv6 router advertisement should be enabled or disabled for network interfaces as appropriate. via sysctl - net.ipv6.conf.default.accept_ra_rtr_pref The default number of global unicast IPv6 addresses allowed per network interface should be set appropriately. via sysctl - net.ipv6.conf.default.max_addresses The default number of IPv6 router solicitations for network interfaces to send should be set appropriately. via sysctl - net.ipv6.conf.default.router_solicitations The default number of IPv6 duplicate address detection solicitations for network interfaces to send per configured address should be set appropriately. via sysctl - net.ipv6.conf.default.dad_transmits The default setting for autoconfiguring network interfaces using prefix information in IPv6 router advertisements should be enabled or disabled as appropriate. via sysctl - net.ipv6.conf.default.autoconf The default setting for accepting prefix information via IPv6 router advertisement should be enabled or disabled for network interfaces as appropriate. via sysctl - net.ipv6.conf.default.accept_ra_pinfo The default setting for accepting a default router via IPv6 router advertisement should be enabled or disabled for network interfaces as appropriate. via sysctl - net.ipv6.conf.default.accept_ra_defrtr
CCE-4167-3 Verify ip6tables Enabled The ip6tables service can be enabled with the following command:
# chkconfig ip6tables on
The ip6tables service should be enabled or disabled as appropriate. via chkconfig
CCE-4189-7 Verify iptables Enabled The iptables service can be enabled with the following command:
# chkconfig iptables on
The iptables service should be enabled or disabled as appropriate. via chkconfig
CCE-14264-6 Set Default Iptables Policy for Incoming Packets To set the default policy to DROP (instead of ACCEPT) for the built-in INPUT chain which processes incoming packets, add or correct the following line in /etc/sysconfig/iptables:
:INPUT DROP [0:0]
The default policy for iptables INPUT table should be set as appropriate. via /etc/sysconfig/iptables
CCE-14264-6 Set Default Iptables Policy for Forwarded Packets To set the default policy to DROP (instead of ACCEPT) for the built-in FORWARD chain which processes packets that will be forwarded from one interface to another, add or correct the following line in /etc/sysconfig/iptables:
:FORWARD DROP [0:0]
The default policy for iptables INPUT table should be set as appropriate. via /etc/sysconfig/iptables
CCE-14268-7 Disable DCCP Support The Datagram Congestion Control Protocol (DCCP) is a relatively new transport layer protocol, designed to support streaming media and telephony. To configure the system to prevent the dccp kernel module from being loaded, add the following line to a file in the directory /etc/modprobe.d:
install dccp /bin/true
Disable or enable support for DCCP as appropriate. via /etc/modprobe.conf
CCE-14132-5 Disable SCTP Support The Stream Control Transmission Protocol (SCTP) is a transport layer protocol, designed to support the idea of message-oriented communication, with several streams of messages within one connection. To configure the system to prevent the sctp kernel module from being loaded, add the following line to a file in the directory /etc/modprobe.d:
install sctp /bin/true
Disable or enable support for SCTP as appropriate. via /etc/modprobe.conf
CCE-14027-7 Disable RDS Support The Reliable Datagram Sockets (RDS) protocol is a transport layer protocol designed to provide reliable high- bandwidth, low-latency communications between nodes in a cluster. To configure the system to prevent the rds kernel module from being loaded, add the following line to a file in the directory /etc/modprobe.d:
install rds /bin/true
Disable or enable support for RDS as appropriate. via /etc/modprobe.conf
CCE-14911-2 Disable TIPC Support The Transparent Inter-Process Communication (TIPC) protocol is designed to provide communications between nodes in a cluster. To configure the system to prevent the tipc kernel module from being loaded, add the following line to a file in the directory /etc/modprobe.d:
install tipc /bin/true
Disable or enable support for TIPC as appropriate. via /etc/modprobe.conf
Install openswan Package The Openswan package provides an implementation of IPsec and IKE, which permits the creation of secure tunnels over untrusted networks. The openswan package can be installed with the following command:
# yum install openswan
CCE-17742-8 Ensure rsyslog is Installed Rsyslog is installed by default. The rsyslog package can be installed with the following command:
# yum install rsyslog
The rsyslog package should be installed or uninstalled as appropriate. via yum
CCE-17698-2 Enable rsyslog Service The rsyslog service provides syslog-style logging by default on RHEL 6. The rsyslog service can be enabled with the following command:
# chkconfig rsyslog on
The rsyslog service should be enabled or disabled as appropriate. via chkconfig
CCE-18095-0 Ensure Log Files Exist The log files written by rsyslog are determined by the second part of each rule line in /etc/rsyslog.conf. These typically all appear in /var/log. For any log file LOGFILE referenced in /etc/rsyslog.conf which does not already exist the following commands will create it and apply proper permissions:
# touch LOGFILE
# chown root:root LOGFILE
# chmod 0600 LOGFILE
File permissions for all rsyslog log files should be set correctly. via chmod
CCE-17857-4 Ensure Log Files Are Owned By Appropriate User The owner of all log files written by rsyslog should be root. These log files are determined by the second part of each Rule line in /etc/rsyslog.conf typically all appear in /var/log. For each log file LOGFILE referenced in /etc/rsyslog.conf, run the following command to inspect the file's owner:
$ ls -l LOGFILE
If the owner is not root, run the following command to correct this:
# chown root LOGFILE
All rsyslog log files should be owned by the appropriate user. via chown
CCE-18240-2 Ensure Log Files Are Owned By Appropriate Group The group-owner of all log files written by rsyslog should be root. These log files are determined by the second part of each Rule line in /etc/rsyslog.conf and typically all appear in /var/log. For each log file LOGFILE referenced in /etc/rsyslog.conf, run the following command to inspect the file's group owner:
$ ls -l LOGFILE
If the owner is not root, run the following command to correct this:
# chgrp root LOGFILE
All rsyslog log files should be owned by the appropriate group. via chown
CCE-18095-0 Ensure System Log Files Have Correct Permissions The file permissions for all log files written by rsyslog should be set to 600, or more restrictive. These log files are determined by the second part of each Rule line in /etc/rsyslog.conf and typically all appear in /var/log. For each log file LOGFILE referenced in /etc/rsyslog.conf, run the following command to inspect the file's permissions:
$ ls -l LOGFILE
If the permissions are not 600 or more restrictive, run the following command to correct this:
# chmod 0600 LOGFILE
File permissions for all rsyslog log files should be set correctly. via chmod
CCE-17248-6 Ensure Logs Sent To Remote Host To configure rsyslog to send logs to a remote log server, open /etc/rsyslog.conf and read and understand the last section of the file, which describes the multiple directives necessary to activate remote logging. Along with these other directives, the system can be configured to forward its logs to a particular log server by adding or correcting one of the following lines, substituting loghost.example.com appropriately. The choice of protocol depends on the environment of the system; although TCP and RELP provide more reliable message delivery, they may not be supported in all environments.
To use UDP for log message delivery:
*.* @loghost.example.com

To use TCP for log message delivery:
*.* @@loghost.example.com

To use RELP for log message delivery:
*.* :omrelp:loghost.example.com
Rsyslog logs should be sent to a remote loghost or not as appropriate. via /etc/rsyslog.conf
CCE-17639-6 Ensure rsyslog Does Not Accept Remote Messages Unless Acting As Log Server The rsyslog daemon should not accept remote messages unless the system acts as a log server. To ensure that it is not listening on the network, ensure the following lines are not found in /etc/rsyslog.conf:
$ModLoad imtcp.so
$InputTCPServerRun port
$ModLoad imudp.so
$InputUDPServerRun port
$ModLoad imrelp.so
$InputRELPServerRun port
Rsyslog should accept remote messages or not as appropriate. via /etc/rsyslog.conf
CCE-TODO Enable rsyslog to Accept Messages via TCP, if Acting As Log Server The rsyslog daemon should not accept remote messages unless the system acts as a log server. If the system needs to act as a central log server, add the following lines to /etc/rsyslog.conf to enable reception of messages over TCP:
$ModLoad imtcp.so
$InputTCPServerRun 514
CCE-TODO Enable rsyslog to Accept Messages via UDP, if Acting As Log Server The rsyslog daemon should not accept remote messages unless the system acts as a log server. If the system needs to act as a central log server, add the following lines to /etc/rsyslog.conf to enable reception of messages over UDP:
$ModLoad imudp.so
$InputUDPServerRun 514
CCE-4182-2 Ensure Logrotate Runs Periodically The logrotate service should be enabled. The logrotate (syslog rotater) service should be enabled or disabled as appropriate. via cron
CCE-4323-2 Configure Logwatch HostLimit Line On a central logserver, you want Logwatch to summarize all syslog entries, including those which did not originate on the logserver itself. The HostLimit setting tells Logwatch to report on all hosts, not just the one on which it is running.
 HostLimit = no 
The logwatch service should be enabled or disabled as appropriate via cron
CCE-4323-2 Configure Logwatch SplitHosts Line If SplitHosts is set, Logwatch will separate entries by hostname. This makes the report longer but significantly more usable. If it is not set, then Logwatch will not report which host generated a given log entry, and that information is almost always necessary
 SplitHosts = yes 
The logwatch service should be enabled or disabled as appropriate via cron
Disable Logwatch on Clients if a Logserver Exists Does your site have a central logserver which has been configured to report on logs received from all systems? If so:
 
# rm /etc/cron.daily/0logwatch 
If no logserver exists, it will be necessary for each machine to run Logwatch individually. Using a central logserver provides the security and reliability benefits discussed earlier, and also makes monitoring logs easier and less time-intensive for administrators.
CCE-4292-9 Enable auditd Service The auditd service is an essential userspace component of the Linux Auditing System, as it is responsible for writing audit records to disk. The auditd service can be enabled with the following command:
# chkconfig auditd on
The auditd service should be enabled or disabled as appropriate. via chkconfig
CCE-15026-8 Enable Auditing for Processes Which Start Prior to the Audit Daemon To ensure that all processes can be audited, even those which start prior to the audit daemon, add the argument audit=1 to the kernel line in /etc/grub.conf, in the manner below:
kernel /vmlinuz-version ro vga=ext root=/dev/VolGroup00/LogVol00 rhgb quiet audit=1
The kernel arguments should enable or disable auditing early in the boot process as appropriate. via grub.conf
Configure auditd Number of Logs Retained Determine how many log files auditd should retain when it rotates logs. Edit the file /etc/audit/auditd.conf. Add or modify the following line, substituting NUMLOGS with the correct value:
num_logs = NUMLOGS
Set the value to 5 for general-purpose systems. Note that values less than 2 result in no log rotation.
Configure auditd Max Log File Size Determine the amount of audit data (in megabytes) which should be retained in each log file. Edit the file /etc/audit/auditd.conf. Add or modify the following line, substituting the correct value for STOREMB:
max_log_file = STOREMB
Set the value to 6 (MB) or higher for general-purpose systems. Larger values, of course, support retention of even more audit data.
Configure auditd max_log_file_action Upon Reaching Maximum Log Size The default action to take when the logs reach their maximum size is to rotate the log files, discarding the oldest one. To configure the action taken by auditd, add or correct the line:
max_log_file_action = ACTION
Possible values for ACTION are described in the auditd.conf man page. These include:
  • ignore
  • syslog
  • suspend
  • rotate
  • keep_logs
Set the ACTION to rotate to ensure log rotation occurs. This is the default. The setting is case-insensitive.
Configure auditd space_left Action on Low Disk Space The auditd service can be configured to take an action when disk space starts to run low. Edit the file /etc/audit/auditd.conf. Modify the following line, substituting ACTION appropriately:
space_left_action = ACTION
Possible values for ACTION are described in the auditd.conf man page. These include:
  • ignore
  • syslog
  • email
  • exec
  • suspend
  • single
  • halt
Set this to email (instead of the default, which is suspend) as it is more likely to get prompt attention.
Configure auditd admin_space_left Action on Low Disk Space The auditd service can be configured to take an action when disk space is running low but prior to running out of space completely. Edit the file /etc/audit/auditd.conf. Add or modify the following line, substituting ACTION appropriately:
admin_space_left_action = ACTION
Possible values for ACTION are described in the auditd.conf man page. These include:
  • ignore
  • syslog
  • email
  • exec
  • suspend
  • single
  • halt
Set this value to single to cause the system to switch to single user mode for corrective action. For certain systems, the need for availability outweighs the need to log all actions, and a different setting should be determined.
Configure auditd mail_acct Action on Low Disk Space The auditd service can be configured to send email to a designated account in certain situations. Add or correct the following line in /etc/audit/auditd.conf to ensure that administrators are notified via email for those situations:
action_mail_acct = root
CCE-14051-7 Record attempts to alter time through adjtimex On a 32-bit system, add the following to /etc/audit/audit.rules:
# audit_time_rules
-a always,exit -F arch=b32 -S adjtimex -k audit_time_rules
On a 64-bit system, add the following to /etc/audit/audit.rules:
# audit_time_rules
-a always,exit -F arch=b64 -S adjtimex -k audit_time_rules
The -k option allows for the specification of a key in string form that can be used for better reporting capability through ausearch and aureport. Multiple system calls can be defined on the same line to save space if desired, but is not required. See an example of multiple combined syscalls:
-a always,exit -F arch=b64 -S adjtimex -S settimeofday -S clock_settime 
-k audit_time_rules
Auditing should be configured to record date and time modification events as appropriate. via /etc/audit/audit.rules or auditctl
CCE-14051-7 Record attempts to alter time through settimeofday On a 32-bit system, add the following to /etc/audit/audit.rules:
# audit_time_rules
-a always,exit -F arch=b32 -S settimeofday -k audit_time_rules
On a 64-bit system, add the following to /etc/audit/audit.rules:
# audit_time_rules
-a always,exit -F arch=b64 -S settimeofday -k audit_time_rules
The -k option allows for the specification of a key in string form that can be used for better reporting capability through ausearch and aureport. Multiple system calls can be defined on the same line to save space if desired, but is not required. See an example of multiple combined syscalls:
-a always,exit -F arch=b64 -S adjtimex -S settimeofday -S clock_settime 
-k audit_time_rules
Auditing should be configured to record date and time modification events as appropriate. via /etc/audit/audit.rules or auditctl
CCE-14051-7 Record Attempts to Alter Time Through stime On a 32-bit system, add the following to /etc/audit/audit.rules:
# audit_time_rules
-a always,exit -F arch=b32 -S stime -k audit_time_rules
On a 64-bit system, the "-S time" is not necessary. The -k option allows for the specification of a key in string form that can be used for better reporting capability through ausearch and aureport. Multiple system calls can be defined on the same line to save space if desired, but is not required. See an example of multiple combined syscalls:
-a always,exit -F arch=b64 -S adjtimex -S settimeofday -S clock_settime 
-k audit_time_rules
Auditing should be configured to record date and time modification events as appropriate. via /etc/audit/audit.rules or auditctl
CCE-14051-7 Record Attempts to Alter Time Through clock_settime On a 32-bit system, add the following to /etc/audit/audit.rules:
# audit_time_rules
-a always,exit -F arch=b32 -S clock_settime -k audit_time_rules
On a 64-bit system, add the following to /etc/audit/audit.rules:
# audit_time_rules
-a always,exit -F arch=b64 -S clock_settime -k audit_time_rules
The -k option allows for the specification of a key in string form that can be used for better reporting capability through ausearch and aureport. Multiple system calls can be defined on the same line to save space if desired, but is not required. See an example of multiple combined syscalls:
-a always,exit -F arch=b64 -S adjtimex -S settimeofday -S clock_settime 
-k audit_time_rules
Auditing should be configured to record date and time modification events as appropriate. via /etc/audit/audit.rules or auditctl
CCE-14051-7 Record Attempts to Alter the localtime File Add the following to /etc/audit/audit.rules:
-w /etc/localtime -p wa -k audit_time_rules
The -k option allows for the specification of a key in string form that can be used for better reporting capability through ausearch and aureport and should always be used.
Auditing should be configured to record date and time modification events as appropriate. via /etc/audit/audit.rules or auditctl
CCE-14829-6 Record Events that Modify User/Group Information Add the following to /etc/audit/audit.rules, in order to capture events that modify account changes:
# audit_account_changes
-w /etc/group -p wa -k audit_account_changes
-w /etc/passwd -p wa -k audit_account_changes
-w /etc/gshadow -p wa -k audit_account_changes
-w /etc/shadow -p wa -k audit_account_changes
-w /etc/security/opasswd -p wa -k audit_account_changes
Auditing should be configured to record user/group information modification events as appropriate. via /etc/audit/audit.rules or auditctl
CCE-14816-3 Record Events that Modify the System's Network Environment Add the following to /etc/audit/audit.rules, setting ARCH to either b32 or b64 as appropriate for your system:
# audit_network_modifications
-a exit,always -F arch=ARCH -S sethostname -S setdomainname -k audit_network_modifications
-w /etc/issue -p wa -k audit_network_modifications
-w /etc/issue.net -p wa -k audit_network_modifications
-w /etc/hosts -p wa -k audit_network_modifications
-w /etc/sysconfig/network -p wa -k audit_network_modifications
Auditing should be configured to record changes to the system network environment as appropriate. via /etc/audit/audit.rules or auditctl
CCE-14821-3 Record Events that Modify the System's Mandatory Access Controls Add the following to /etc/audit/audit.rules:
-w /etc/selinux/ -p wa -k MAC-policy
Auditing should be configured to record changes to the system's mandatory access controls as appropriate. via /etc/audit/audit.rules or auditctl
CCE-14058-2 Record Events that Modify the System's Discretionary Access Controls - chmod At a minimum the audit system should collect file permission changes for all users and root. Add the following to /etc/audit/audit.rules:
-a always,exit -F arch=b32 -S chmod -F auid>=500 -F auid!=4294967295 \
    -k perm_mod
If the system is 64 bit then also add the following:
-a always,exit -F arch=b64 -S chmod  -F auid>=500 -F auid!=4294967295 \
    -k perm_mod
Auditing should be configured to record changes to discretionary access control permissions as appropriate. via /etc/audit/audit.rules or auditctl
CCE-14058-2 Record Events that Modify the System's Discretionary Access Controls - chown At a minimum the audit system should collect file permission changes for all users and root. Add the following to /etc/audit/audit.rules:
-a always,exit -F arch=b32 -S chown -F auid>=500 -F auid!=4294967295 \
    -k perm_mod
If the system is 64 bit then also add the following:
-a always,exit -F arch=b64 -S chown -F auid>=500 -F auid!=4294967295 \
    -k perm_mod
Auditing should be configured to record changes to discretionary access control permissions as appropriate. via /etc/audit/audit.rules or auditctl
CCE-14058-2 Record Events that Modify the System's Discretionary Access Controls - fchmod At a minimum the audit system should collect file permission changes for all users and root. Add the following to /etc/audit/audit.rules:
-a always,exit -F arch=b32 -S fchmod -F auid>=500 -F auid!=4294967295 \
    -k perm_mod
If the system is 64 bit then also add the following:
-a always,exit -F arch=b64 -S fchmod -F auid>=500 -F auid!=4294967295 \
    -k perm_mod
Auditing should be configured to record changes to discretionary access control permissions as appropriate. via /etc/audit/audit.rules or auditctl
CCE-14058-2 Record Events that Modify the System's Discretionary Access Controls - fchmodat At a minimum the audit system should collect file permission changes for all users and root. Add the following to /etc/audit/audit.rules:
-a always,exit -F arch=b32 -S fchmodat -F auid>=500 -F auid!=4294967295 \
    -k perm_mod
If the system is 64 bit then also add the following:
-a always,exit -F arch=b64 -S fchmodat -F auid>=500 -F auid!=4294967295 \
    -k perm_mod
Auditing should be configured to record changes to discretionary access control permissions as appropriate. via /etc/audit/audit.rules or auditctl
CCE-14058-2 Record Events that Modify the System's Discretionary Access Controls - fchown At a minimum the audit system should collect file permission changes for all users and root. Add the following to /etc/audit/audit.rules:
-a always,exit -F arch=b32 -S fchown -F auid>=500 -F auid!=4294967295 \
    -k perm_mod
If the system is 64 bit then also add the following:
-a always,exit -F arch=b64 -S fchown -F auid>=500 -F auid!=4294967295 \
    -k perm_mod
Auditing should be configured to record changes to discretionary access control permissions as appropriate. via /etc/audit/audit.rules or auditctl
CCE-14058-2 Record Events that Modify the System's Discretionary Access Controls - fchownat At a minimum the audit system should collect file permission changes for all users and root. Add the following to /etc/audit/audit.rules:
-a always,exit -F arch=b32 -S fchownat -F auid>=500 -F auid!=4294967295 \
    -k perm_mod
If the system is 64 bit then also add the following:
-a always,exit -F arch=b64 -S fchownat -F auid>=500 -F auid!=4294967295 \
    -k perm_mod
Auditing should be configured to record changes to discretionary access control permissions as appropriate. via /etc/audit/audit.rules or auditctl
CCE-14058-2 Record Events that Modify the System's Discretionary Access Controls - fremovexattr At a minimum the audit system should collect file permission changes for all users and root. Add the following to /etc/audit/audit.rules:
-a always,exit -F arch=b32 -S fremovexattr -F auid>=500 -F auid!=4294967295 \
    -k perm_mod
If the system is 64 bit then also add the following:
-a always,exit -F arch=b64 -S fremovexattr -F auid>=500 -F auid!=4294967295 \
    -k perm_mod
Auditing should be configured to record changes to discretionary access control permissions as appropriate. via /etc/audit/audit.rules or auditctl
CCE-14058-2 Record Events that Modify the System's Discretionary Access Controls - fsetxattr At a minimum the audit system should collect file permission changes for all users and root. Add the following to /etc/audit/audit.rules:
-a always,exit -F arch=b32 -S fsetxattr -F auid>=500 -F auid!=4294967295 \
    -k perm_mod
If the system is 64 bit then also add the following:
-a always,exit -F arch=b64 -S fsetxattr -F auid>=500 -F auid!=4294967295 \
    -k perm_mod
Auditing should be configured to record changes to discretionary access control permissions as appropriate. via /etc/audit/audit.rules or auditctl
CCE-14058-2 Record Events that Modify the System's Discretionary Access Controls - lchown At a minimum the audit system should collect file permission changes for all users and root. Add the following to /etc/audit/audit.rules:
-a always,exit -F arch=b32 -S lchown -F auid>=500 -F auid!=4294967295 \
    -k perm_mod
If the system is 64 bit then also add the following:
-a always,exit -F arch=b64 -S lchown -F auid>=500 -F auid!=4294967295 \
    -k perm_mod
Auditing should be configured to record changes to discretionary access control permissions as appropriate. via /etc/audit/audit.rules or auditctl
CCE-14058-2 Record Events that Modify the System's Discretionary Access Controls - lremovexattr At a minimum the audit system should collect file permission changes for all users and root. Add the following to /etc/audit/audit.rules:
-a always,exit -F arch=b32 -S lremovexattr -F auid>=500 -F auid!=4294967295 \
    -k perm_mod
If the system is 64 bit then also add the following:
-a always,exit -F arch=b64 -S lremovexattr -F auid>=500 -F auid!=4294967295 \
    -k perm_mod
Auditing should be configured to record changes to discretionary access control permissions as appropriate. via /etc/audit/audit.rules or auditctl
CCE-14058-2 Record Events that Modify the System's Discretionary Access Controls - lsetxattr At a minimum the audit system should collect file permission changes for all users and root. Add the following to /etc/audit/audit.rules:
-a always,exit -F arch=b32 -S lsetxattr -F auid>=500 -F auid!=4294967295 \
    -k perm_mod
If the system is 64 bit then also add the following:
-a always,exit -F arch=b64 -S lsetxattr -F auid>=500 -F auid!=4294967295 \
    -k perm_mod
Auditing should be configured to record changes to discretionary access control permissions as appropriate. via /etc/audit/audit.rules or auditctl
CCE-14058-2 Record Events that Modify the System's Discretionary Access Controls - removexattr At a minimum the audit system should collect file permission changes for all users and root. Add the following to /etc/audit/audit.rules:
-a always,exit -F arch=b32 -S removexattr -F auid>=500 -F auid!=4294967295 \
    -k perm_mod
If the system is 64 bit then also add the following:
-a always,exit -F arch=b64 -S removexattr -F auid>=500 -F auid!=4294967295 \
    -k perm_mod
Auditing should be configured to record changes to discretionary access control permissions as appropriate. via /etc/audit/audit.rules or auditctl
CCE-14058-2 Record Events that Modify the System's Discretionary Access Controls - setxattr At a minimum the audit system should collect file permission changes for all users and root. Add the following to /etc/audit/audit.rules:
-a always,exit -F arch=b32 -S setxattr -F auid>=500 -F auid!=4294967295 \
    -k perm_mod
If the system is 64 bit then also add the following:
-a always,exit -F arch=b64 -S setxattr -F auid>=500 -F auid!=4294967295 \
    -k perm_mod
Auditing should be configured to record changes to discretionary access control permissions as appropriate. via /etc/audit/audit.rules or auditctl
CCE-14904-7 Record Attempts to Alter Logon and Logout Events The audit system already collects login info for all users and root. To watch for attempted manual edits of files involved in storing logon events, add the following to /etc/audit/audit.rules:
-w /var/log/faillog -p wa -k logins 
-w /var/log/lastlog -p wa -k logins
Auditing should be configured to record logon and logout events as appropriate. via /etc/audit/audit.rules or auditctl
CCE-14679-5 Record Attempts to Alter Process and Session Initiation Information The audit system already collects process information for all users and root. To watch for attempted manual edits of files involved in storing such process information, add the following to /etc/audit/audit.rules:
-w /var/run/utmp -p wa -k session
-w /var/log/btmp -p wa -k session
-w /var/log/wtmp -p wa -k session
Auditing should be configured to record process and session initiation events as appropriate. via /etc/audit/audit.rules or auditctl
CCE-14917-9 Ensure auditd Collects Unauthorized Access Attempts to Files (unsuccessful) At a minimum the audit system should collect unauthorized file accesses for all users and root. Add the following to /etc/audit/audit.rules, setting ARCH to either b32 or b64 as appropriate for your system:
-a always,exit -F arch=ARCH -S creat -S open -S openat -S truncate \
    -S ftruncate -F exit=-EACCES -F auid>=500 -F auid!=4294967295 -k access
-a always,exit -F arch=ARCH -S creat -S open -S openat -S truncate \
    -S ftruncate -F exit=-EPERM -F auid>=500 -F auid!=4294967295 -k access
Auditing should be configured to record unauthorized attempts to access files as appropriate. via /etc/audit/audit.rules or auditctl
CCE-14296-8 Ensure auditd Collects Information on the Use of Privileged Commands At a minimum the audit system should collect the execution of privileged commands for all users and root. To find the relevant setuid programs:
# find / -type f -perm -4000 -o -perm -2000 2>/dev/null
Then, for each setuid program on the system, add a line of the following form to /etc/audit/audit.rules, where SETUID_PROG_PATH is the full path to each setuid program in the list:
-a always,exit -F path=SETUID_PROG_PATH -F perm=x -F auid>=500 -F auid!=4294967295 -k privileged
Auditing should be configured to record use of privileged commands as appropriate. via /etc/audit/audit.rules or auditctl
CCE-14569-8 Ensure auditd Collects Information on Exporting to Media (successful) At a minimum the audit system should collect media exportation events for all users and root. Add the following to /etc/audit/audit.rules, setting ARCH to either b32 or b64 as appropriate for your system:
-a always,exit -F arch=ARCH -S mount -F auid>=500 -F auid!=4294967295 -k export
Auditing should be configured to record data export to media events as appropriate. via /etc/audit/audit.rules or auditctl
CCE-14820-5 Ensure auditd Collects File Deletion Events by User At a minimum the audit system should collect file deletion events for all users and root. Add the following to /etc/audit/audit.rules, setting ARCH to either b32 or b64 as appropriate for your system:
-a always,exit -F arch=ARCH -S unlink -S unlinkat -S rename -S renameat \
    -F auid>=500 -F auid!=4294967295 -k delete
Auditing should be configured to record file and program deletion events as appropriate. via /etc/audit/audit.rules or auditctl
CCE-14824-7 Ensure auditd Collects System Administrator Actions At a minimum the audit system should collect administrator actions for all users and root. Add the following to /etc/audit/audit.rules:
-w /etc/sudoers -p wa -k actions
Auditing should be configured to record administrator and security personnel action events as appropriate. via /etc/audit/audit.rules or auditctl
CCE-14688-6 Ensure auditd Collects Information on Kernel Module Loading and Unloading Add the following to /etc/audit/audit.rules in order to capture kernel module loading and unloading events:
-w /sbin/insmod -p x -k modules
-w /sbin/rmmod -p x -k modules
-w /sbin/modprobe -p x -k modules
-a always,exit -S init_module -S delete_module -k modules
Auditing should be configured to record kernel module loading and unloading events as appropriate. via /etc/audit/audit.rules or auditctl
CCE-14692-8 Make the auditd Configuration Immutable Add the following to /etc/audit/audit.rules in order to make the configuration immutable:
-e 2
With this setting, a reboot will be required to change any audit rules.
Auditing should be configured to make auditd configuration immutable as appropriate. via /etc/audit/audit.rules or auditctl
CCE-4252-3 Disable xinetd Service The xinetd service can be disabled with the following command:
# chkconfig xinetd off
The xinetd service should be enabled or disabled as appropriate. via chkconfig
CCE-4164-0 Uninstall xinetd Package The xinetd package can be uninstalled with the following command:
# yum erase xinetd
The xinetd package should be installed or uninstalled as appropriate. via yum
CCE-3390-2 Disable telnet Service The telnet service can be disabled with the following command:
# chkconfig telnet off
The telnet service should be enabled or disabled as appropriate. via chkconfig
CCE-4330-7 Uninstall telnet-server Package The telnet-server package can be uninstalled with the following command:
# yum erase telnet-server
The telnet-server package should be installed or uninstalled as appropriate. via yum
CCE-4308-3 Uninstall rsh-server Package The rsh-server package can be uninstalled with the following command:
# yum erase rsh-server
The rsh package should be installed or uninstalled as appropriate. via yum
CCE-undefined Disable rexec Service The rexec service, which is available with the rsh-server package and runs as a service through xinetd, should be disabled. The rexec service can be disabled with the following command:
# chkconfig rexec off
CCE-4141-8 Disable rsh Service The rsh service, which is available with the rsh-server package and runs as a service through xinetd, should be disabled. The rsh service can be disabled with the following command:
# chkconfig rsh off
The rsh service should be enabled or disabled as appropriate. via chkconfig
CCE-3537-8 Disable rlogin Service The rlogin service, which is available with the rsh-server package and runs as a service through xinetd, should be disabled. The rlogin service can be disabled with the following command:
# chkconfig rlogin off
The rlogin service should be enabled or disabled as appropriate. via chkconfig
CCE-TODO Remove Rsh Trust Files The files /etc/hosts.equiv and ~/.rhosts (in each user's home directory) list remote hosts and users that are trusted by the local system when using the rshd daemon. To remove these files, run the following command to delete them from any location:
# rm /etc/hosts.equiv
$ rm ~/.rhosts
CCE-4348-9 Uninstall ypserv Package The ypserv package can be uninstalled with the following command:
# yum erase ypserv
The ypserv package should be installed or uninstalled as appropriate. via yum
CCE-3705-1 Disable ypbind Service The ypbind service, which allows the system to act as a client in a NIS or NIS+ domain, should be disabled. The ypbind service can be disabled with the following command:
# chkconfig ypbind off
The ypbind service should be enabled or disabled as appropriate. via chkconfig
CCE-4273-9 Disable tftp Service The tftp service should be disabled. The tftp service can be disabled with the following command:
# chkconfig tftp off
The tftp service should be enabled or disabled as appropriate. via chkconfig
CCE-3916-4 Uninstall tftp-server Package The tftp-server package can be removed with the following command:
# yum erase tftp-server
The tftp-server package should be installed or uninstalled as appropriate. via yum
CCE-TODO Ensure tftp Daemon Uses Secure Mode If running the tftp service is necessary, it should be configured to change its root directory at startup. To do so, ensure that /etc/xinetd.d/tftp includes -s as a command line argument, as shown in the following example (which is also the default):
server_args = -s /var/lib/tftpboot
CCE-TODO Disable Automatic Bug Reporting Tool (abrtd) The Automatic Bug Reporting Tool (abrtd) daemon collects and reports crash data when an application crash is detected. Using a variety of plugins, abrtd can email crash reports to system administrators, log crash reports to files, or forward crash reports to a centralized issue tracking system such as RHTSupport. The abrtd service can be disabled with the following command:
# chkconfig abrtd off
CCE-4298-6 Disable Advanced Configuration and Power Interface (acpid) The Advanced Configuration and Power Interface Daemon (acpid) dispatches ACPI events (such as power/reset button depressed) to userspace programs. The acpid service can be disabled with the following command:
# chkconfig acpid off
The acpid service should be enabled or disabled as appropriate. via chkconfig
CCE-TODO Disable At Service (atd) The at and batch commands can be used to schedule tasks that are meant to be executed only once. This allows delayed execution in a manner similar to cron, except that it is not recurring. The daemon atd keeps track of tasks scheduled via at and batch, and executes them at the specified time. The atd service can be disabled with the following command:
# chkconfig atd off
CCE-TODO Disable Certmonger Service (certmonger) Certmonger is a D-Bus based service that attempts to simplify interaction with certifying authorities on networks which use public-key infrastructure. It is often combined with Red Hat's IPA (Identity Policy Audit) security information management solution to aid in the management of certificates. The certmonger service can be disabled with the following command:
# chkconfig certmonger off
CCE-TODO Disable Control Group Config (cgconfig) Control groups allow an administrator to allocate system resources (such as CPU, memory, network bandwidth, etc) among a defined group (or groups) of processes executing on a system. The cgconfig daemon starts at boot and establishes the predefined control groups. The cgconfig service can be disabled with the following command:
# chkconfig cgconfig off
CCE-TODO Disable Control Group Rules Engine (cgred) The cgred service moves tasks into control groups according to parameters set in the /etc/cgrules.conf configuration file. The cgred service can be disabled with the following command:
# chkconfig cgred off
CCE-4051-9 Disable CPU Speed (cpuspeed) The cpuspeed service can adjust the clock speed of supported CPUs based upon the current processing load thereby conserving power and reducing heat. The cpuspeed service can be disabled with the following command:
# chkconfig cpuspeed off
The cpuspeed service should be enabled or disabled as appropriate. via chkconfig
CCE-4364-6 Disable Hardware Abstraction Layer Service (haldaemon) The Hardware Abstraction Layer Daemon (haldaemon) collects and maintains information about the system's hardware configuration. This service is required on a workstation running a desktop environment, and may be necessary on any system which deals with removable media or devices. The haldaemon service can be disabled with the following command:
# chkconfig haldaemon off
The haldaemon service should be enabled or disabled as appropriate. via chkconfig
CCE-4123-6 Enable IRQ Balance (irqbalance) The irqbalance service optimizes the balance between power savings and performance through distribution of hardware interrupts across multiple processors. The irqbalance service can be enabled with the following command:
# chkconfig irqbalance on
The irqbalance service should be enabled or disabled as appropriate. via chkconfig
CCE-3425-6 Disable KDump Kernel Crash Analyzer (kdump) The kdump service provides a kernel crash dump analyzer. It uses the kexec system call to boot a secondary kernel ("capture" kernel) following a system crash, which can load information from the crashed kernel for analysis. The kdump service can be disabled with the following command:
# chkconfig kdump off
The kdump service should be enabled or disabled as appropriate. via chkconfig
CCE-3854-7 Disable Software RAID Monitor (mdmonitor) The mdmonitor service is used for monitoring a software RAID (hardware RAID setups do not use this service). The mdmonitor service can be disabled with the following command:
# chkconfig mdmonitor off
The mdmonitor service should be enabled or disabled as appropriate. via chkconfig
CCE-3822-4 Disable D-Bus IPC Service (messagebus) D-Bus provides an IPC mechanism used by a growing list of programs, such as those used for Gnome, Bluetooth, and Avahi. Due to these dependencies, disabling D-Bus may not be practical for many systems. The messagebus service can be disabled with the following command:
# chkconfig messagebus off
The messagebus service should be enabled or disabled as appropriate. via chkconfig
CCE-TODO Disable Network Console (netconsole) The netconsole service is responsible for loading the netconsole kernel module, which logs kernel printk messages over UDP to a syslog server. This allows debugging of problems where disk logging fails and serial consoles are impractical. The netconsole service can be disabled with the following command:
# chkconfig netconsole off
CCE-TODO Disable ntpdate Service (ntpdate) The ntpdate service sets the local hardware clock by polling NTP servers when the system boots. It synchronizes to the NTP servers listed in /etc/ntp/step-tickers or /etc/ntp.conf and then sets the local hardware clock to the newly synchronized system time. The ntpdate service can be disabled with the following command:
# chkconfig ntpdate off
CCE-TODO Disable Odd Job Daemon (oddjobd) The oddjobd service exists to provide an interface and access control mechanism through which specified privileged tasks can run tasks for unprivileged client applications. Communication with oddjobd through the system message bus. The oddjobd service can be disabled with the following command:
# chkconfig oddjobd off
CCE-TODO Disable Portreserve (portreserve) The portreserve service is a TCP port reservation utility that can be used to prevent portmap from binding to well known TCP ports that are required for other services. The portreserve service can be disabled with the following command:
# chkconfig portreserve off
CCE-TODO Enable Process Accounting (psacct) The process accounting service (psacct) works with programs including acct and ac to allow system administrators to view user activity, such as commands issued by users of the system. The psacct service can be enabled with the following command:
# chkconfig psacct on
CCE-3854-7 Disable Apache Qpid (qpidd) The qpidd service provides high speed, secure, guaranteed delivery services. It is an implementation of the Advanced Message Queuing Protocol. By default the qpidd service will bind to port 5672 and listen for connection attempts. The qpidd service can be disabled with the following command:
# chkconfig qpidd off
The mdmonitor service should be enabled or disabled as appropriate. via chkconfig
CCE-TODO Disable Quota Netlink (quota_nld) The quota_nld service provides notifications to users of disk space quota violations. It listens to the kernel via a netlink socket for disk quota violations and notifies the appropriate user of the violation using D-Bus or by sending a message to the terminal that the user has last accessed. The quota_nld service can be disabled with the following command:
# chkconfig quota_nld off
CCE-TODO Disable Network Router Discovery Daemon (rdisc) The rdisc service implements the client side of the ICMP Internet Router Discovery Protocol (IRDP), which allows discovery of routers on the local subnet. If a router is discovered then the local routing table is updated with a corresponding default route. By default this daemon is disabled. The rdisc service can be disabled with the following command:
# chkconfig rdisc off
CCE-3416-5 Disable Red Hat Network Service (rhnsd) The Red Hat Network service automatically queries Red Hat Network servers to determine whether there are any actions that should be executed, such as package updates. This only occurs if the system was registered to an RHN server or satellite and managed as such. The rhnsd service can be disabled with the following command:
# chkconfig rhnsd off
The rhnsd service should be enabled or disabled as appropriate. via chkconfig
CCE-TODO Disable Red Hat Subscription Manager Daemon (rhsmcertd) The Red Hat Subscription Manager (rhsmcertd) periodically checks for changes in the entitlement certificates for a registered system and updates it accordingly. The rhsmcertd service can be disabled with the following command:
# chkconfig rhsmcertd off
CCE-TODO Disable Cyrus SASL Authentication Daemon (saslauthd) The saslauthd service handles plaintext authentication requests on behalf of the SASL library. The service isolates all code requiring superuser privileges for SASL authentication into a single process, and can also be used to provide proxy authentication services to clients that do not understand SASL based authentication. The saslauthd service can be disabled with the following command:
# chkconfig saslauthd off
CCE-3455-3 Disable SMART Disk Monitoring Service (smartd) SMART (Self-Monitoring, Analysis, and Reporting Technology) is a feature of hard drives that allows them to detect symptoms of disk failure and relay an appropriate warning. The smartd service can be disabled with the following command:
# chkconfig smartd off
The smartd service should be enabled or disabled as appropriate. via chkconfig
CCE-TODO Disable System Statistics Reset Service (sysstat) The sysstat service resets various I/O and CPU performance statistics to zero in order to begin counting from a fresh state at boot time. The sysstat service can be disabled with the following command:
# chkconfig sysstat off
CCE-4324-0 Enable cron Service The crond service is used to execute commands at preconfigured times. It is required by almost all systems to perform necessary maintenance tasks, such as notifying root of system activity. The crond service can be enabled with the following command:
# chkconfig crond on
The crond service should be enabled or disabled as appropriate. via chkconfig
Disable anacron Service The cronie-anacron package which provides anacron functionality is installed by default. To disable anacron support, run the following commands:
# yum install cronie-noanacron
# yum erase cronie-anacron
The anacron service provides cron functionality for systems such as laptops and workstations that may be shut down during the normal times that cron jobs are scheduled to run. On systems which do not require this additional functionality, anacron could needlessly increase the possible attack surface for an intruder.
CCE-14466-7 Disable atd Service The at service can be disabled with the following command:
# chkconfig at off
The at daemon should be enabled or disabled as appropriate. via chkconfig
CCE-4268-9 Disable SSH Server If Possible (Unusual) The SSH server service, sshd, is commonly needed. However, if it can be disabled, do so. The sshd service can be disabled with the following command:
# chkconfig sshd off
This is unusual, as SSH is a common method for encrypted and authenticated remote access.
The sshd service should be enabled or disabled as appropriate. via chkconfig
CCE-4295-2 Remove SSH Server iptables Firewall exception (Unusual) By default, inbound connections to SSH’s port are allowed. If the SSH server is not being used, this exception should be removed from the firewall configuration.

Edit the files /etc/sysconfig/iptables and /etc/sysconfig/ip6tables (if IPv6 is in use). In each file, locate and delete the line:
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
This is unusual, as SSH is a common method for encrypted and authenticated remote access.
Inbound connections to the ssh port should be allowed or denied as appropriate /etc/sysconfig/iptables
CCE-4325-7 Allow Only SSH Protocol 2 Only SSH protocol version 2 connections should be permitted. The default setting in /etc/ssh/sshd_config is correct, and can be verified by ensuring that the following line appears:
Protocol 2
SSH version 1 protocol support should be enabled or disabled as appropriate. via /etc/ssh/sshd_config
Limit Users' SSH Access By default, the SSH configuration allows any user with an account to access the system. In order to specify the users that are allowed to login via SSH and deny all other users, add or correct the following line in the /etc/ssh/sshd_config file:
DenyUsers USER1 USER2
Where USER1 and USER2 are valid user names.
CCE-3845-5 Set SSH Idle Timeout Interval SSH allows administrators to set an idle timeout interval. After this interval has passed, the idle user will be automatically logged out.

To set an idle timeout interval, edit the following line in /etc/ssh/sshd_config as follows:
ClientAliveInterval interval
The timeout interval is given in seconds. To have a timeout of 15 minutes, set interval to 900.

If a shorter timeout has already been set for the login shell, that value will preempt any SSH setting made here. Keep in mind that some processes may stop SSH from correctly detecting that the user is idle.
The SSH idle timout interval should be set to an appropriate value via /etc/ssh/sshd_config
CCE-14061-6 Set SSH Client Alive Count To ensure that the SSH idle timeout occurs precisely when the ClientAliveInterval is set, edit /etc/ssh/sshd_config as follows:
ClientAliveCountMax 0
The SSH 'keep alive' message count should be set to an appropriate value. via /etc/ssh/sshd_config
CCE-4475-0 Disable SSH Support for .rhosts Files SSH can emulate the behavior of the obsolete rsh command in allowing users to enable insecure access to their accounts via .rhosts files.

To ensure that this behavior is disabled, add or correct the following line:
IgnoreRhosts yes
Emulation of the rsh command through the ssh server should be enabled or disabled as appropriate via /etc/ssh/sshd_config
CCE-4370-3 Disable Host-Based Authentication SSH's cryptographic host-based authentication is more secure than .rhosts authentication, since hosts are cryptographically authenticated. However, it is not recommended that hosts unilaterally trust one another, even within an organization.

To disable host-based authentication, add or correct the following line:
HostbasedAuthentication no
SSH host-based authentication should be enabled or disabled as appropriate via /etc/ssh/sshd_config
CCE-4387-7 Disable SSH Root Login The root user should never be allowed to login to a system directly over a network. To disable root login via SSH, add or correct the following line:
PermitRootLogin no
Root login via SSH should be enabled or disabled as appropriate via /etc/ssh/sshd_config
CCE-3660-8 Disable SSH Access via Empty Passwords To explicitly disallow remote login from accounts with empty passwords, add or correct the following line:
PermitEmptyPasswords no
Any accounts with empty passwords should be disabled immediately, and PAM configuration should prevent users from being able to assign themselves empty passwords.
Remote connections from accounts with empty passwords should be enabled or disabled as appropriate via /etc/ssh/sshd_config
CCE-4431-3 Enable SSH Warning Banner To enable the warning banner and ensure it is consistent across the system, add or correct the following line in /etc/ssh/sshd_config:
Banner /etc/issue
Another section contains information on how to create an appropriate system-wide warning banner.
SSH warning banner should be enabled or disabled as appropriate via /etc/ssh/sshd_config
CCE-4422-2 Do Not Allow SSH Environment Options To ensure users are not able to present environment options to the SSH daemon, add or correct the following line in /etc/ssh/sshd_config:
PermitUserEnvironment no
X Windows should be installed or removed as appropriate via yum
CCE-14491-5 Use Only Approved Ciphers Limit the ciphers to those algorithms which are FIPS-approved. Counter (CTR) mode is also preferred over cipher-block chaining (CBC) mode. The following line in /etc/ssh/sshd_config demonstrates use of FIPS-approved ciphers in CTR mode:
Ciphers aes128-ctr,aes192-ctr,aes256-ctr
The man page sshd_config(5) contains a list of supported ciphers. Note that older or less capable versions of SSH client or server software may still be found on systems such as networking equipment, and these may not support CTR mode. This may become an issue if, for example, these systems need to retrieve files from your SSH server using SFTP. TODO: Need to investigate current status of this. Earlier issues with CBC were supposed to be fixed.
Appropriate ciphers should be used for SSH. via /etc/ssh/sshd_config
CCE-4462-8 Disable X Windows Startup By Setting Runlevel Setting the system's runlevel to 3 will prevent automatic startup of the X server. To do so, ensure that the following line in /etc/inittab features a 3 as shown:
id:3:initdefault:
X Windows should be enabled or disabled at system boot as appropriate via /etc/inittab
CCE-4422-2 Remove the X Windows Package Group Removing all packages which constitute the X Window System ensures that users or malicious software cannot start X. To do so, run the following command:
# yum groupremove "X Window System"
X Windows should be installed or removed as appropriate via yum
CCE-4365-3 Disable Avahi Server Software The avahi-daemon service can be disabled with the following command:
# chkconfig avahi-daemon off
The avahi-daemon service should be enabled or disabled as appropriate. via chkconfig
Serve Avahi Only via Required Protocol If you are using only IPv4, edit /etc/avahi/avahi-daemon.conf and ensure the following line exists in the [server] section:
use-ipv6=no
Similarly, if you are using only IPv6, disable IPv4 sockets with the line:
use-ipv4=no
Check Avahi Responses' TTL Field To make Avahi ignore packets unless the TTL field is 255, edit /etc/avahi/avahi-daemon.conf and ensure the following line appears in the [server] section:
check-response-ttl=yes
Prevent Other Programs from Using Avahi's Port To prevent other mDNS stacks from running, edit /etc/avahi/avahi-daemon.conf and ensure the following line appears in the [server] section:
disallow-other-stacks=yes
Disable Avahi Publishing To prevent other mDNS stacks from running, edit /etc/avahi/avahi-daemon.conf and ensure the following line appears in the [server] section:
disallow-other-stacks=yes
CCE-3755-6 Disable the CUPS Service The cups service can be disabled with the following command:
# chkconfig cups off
CUPS service should be enabled or disabled as appropriate via chkconfig
CCE-3649-1 Disable Firewall Access to Printing Service If the system does not need to act as a network print server, edit the files /etc/sysconfig/iptables and /etc/sysconfig/ip6tables (if IPv6 is in use). In each file, locate and delete the lines:
-A RH-Firewall-1-INPUT -p udp -m udp --dport 631 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m tcp --dport 631 -j ACCEPT
Firewall access to printing service should be enabled or disabled as appropriate via /etc/sysconfig/iptables
CCE-4420-6 Disable Printer Browsing Entirely if Possible By default, CUPS listens on the network for printer list broadcasts on UDP port 631. This functionality is called printer browsing. To disable printer browsing entirely, edit the CUPS configuration file, located at /etc/cups/cupsd.conf, to include the following:
Browsing Off
Remote print browsing should be enabled or disabled as appropriate via /etc/cups/cupsd.conf
CCE-4407-3 Disable Print Server Capabilities To prevent remote users from potentially connecting to and using locally configured printers, disable the CUPS print server sharing capabilities. To do so, limit how the server will listen for print jobs by removing the more generic port directive from /etc/cups/cupsd.conf:
Port 631
and replacing it with the Listen directive:
Listen localhost:631
This will prevent remote users from printing to locally configured printers while still allowing local users on the machine to print normally.
CUPS should be allowed or denied the ability to listen for Incoming printer information as appropriate via /etc/cups/cupsd.conf
CCE-4336-4 Disable DHCP Service The dhcpd service should be disabled on any system that does not need to act as a DHCP server. The dhcpd service can be disabled with the following command:
# chkconfig dhcpd off
The dhcpd service should be enabled or disabled as appropriate. via chkconfig
CCE-4464-4 Uninstall DHCP Server Package If the system does not need to act as a DHCP server, the dhcp package can be uninstalled. The dhcp package can be removed with the following command:
# yum erase dhcp
The dhcp package should be installed or uninstalled as appropriate. via yum
CCE-4257-2 Do Not Use Dynamic DNS To prevent the DHCP server from receiving DNS information from clients, edit /etc/dhcpd.conf, and add or correct the following global option:
ddns-update-style none;
The dynamic DNS feature of the DHCP server should be enabled or disabled as appropriate via /etc/dhcpd.conf
CCE-4403-2 Deny Decline Messages Edit /etc/dhcpd.conf and add or correct the following global option to prevent the DHCP server from responding the DHCPDECLINE messages, if possible:
deny declines;
DHCPDECLINE messages should be accepted or denied by the DHCP server as appropriate via /etc/dhcpd.conf
CCE-4345-5 Deny BOOTP Queries Unless your network needs to support older BOOTP clients, disable support for the bootp protocol by adding or correcting the global option:
deny bootp;
BOOTP queries should be accepted or denied by the DHCP server as appropriate via /etc/dhcpd.conf
CCE-3733-3 Configure Logging Ensure that the following line exists in /etc/syslog.conf:
daemon.*           /var/log/daemon.log
Configure logwatch or other log monitoring tools to summarize error conditions reported by the dhcpd process.
dhcpd logging should be enabled or disabled as appropriate. via /etc/syslog.conf
CCE-4191-3 Disable DHCP Client For each interface IFACE on the system (e.g. eth0), edit /etc/sysconfig/network-scripts/ifcfg-IFACE and make the following changes:
  • Correct the BOOTPROTO line to read:
    BOOTPROTO=static
  • Add or correct the following lines, substituting the appropriate values based on your site’s addressing scheme:
    NETMASK=255.255.255.0
    IPADDR=192.168.1.2
    GATEWAY=192.168.1.1
The dhcp client service should be enabled or disabled as appropriate for each interface. via /etc/sysconfig/network-scripts/ifcfg-IFACE
CCE-4376-0 Enable the NTP Daemon The ntpd service can be enabled with the following command:
# chkconfig ntpd on
The ntpd service should be enabled or disabled as appropriate. via chkconfig
CCE-4385-1 Specify a Remote NTP Server To specify a remote NTP server for time synchronization, edit the file /etc/ntp.conf. Add or correct the following lines, substituting the IP or hostname of a remote NTP server for ntpserver:
server ntpserver
This instructs the NTP software to contact that remote server to obtain time data.
A remote NTP Server for time synchronization should be specified or not as appropriate via /etc/ntp.conf
Specify Additional Remote NTP Servers Additional NTP servers can be specified for time synchronization in the file /etc/ntp.conf. To do so, add additional lines of the following form, substituting the IP address or hostname of a remote NTP server for ntpserver:
server ntpserver
CCE-14068-1 Enable Postfix (postfix) The Postfix mail transfer agent is used for local mail delivery within the system. The default configuration only listens for connections to the default SMTP port (port 25) on the loopback interface (127.0.0.1). It is recommended to leave this service enabled for local mail delivery. The postfix service can be enabled with the following command:
# chkconfig postfix on
The postfix package should be installed or uninstalled as appropriate. via yum
CCE-15018-5 Disable Postfix Network Listening Edit the file /etc/postfix/main.cf to ensure that only the following inet_interfaces line appears:
inet_interfaces = localhost
Postfix network listening should be enabled or disabled for as appropriate. via /etc/postfix/main.cf
Configure iptables to Allow Access to the Mail Server Edit /etc/sysconfig/iptables. Add the following line, ensuring that it appears before the final LOG and DROP lines for the RH-Firewall-1-INPUT chain:
-A RH-Firewall-1-INPUT -m state --state NEW -p tcp --dport 25 -j ACCEPT
Verify System Logging and Log Permissions for Mail Edit the file /etc/rsyslog.conf. Add or correct the following line if necessary (this is the default):
mail.*					-/var/log/maillog
Run the following commands to ensure correct permissions on the mail log:
# chown root:root /var/log/maillog
# chmod 600 /var/log/maillog
Ensure log will be rotated as appropriate by adding or correcting the following line if needed into the list on the first line of /etc/logrotate.d/syslog (this is the default):
/var/log/maillog
Install the SSL Certificate Create the PKI directory for mail certificates, if it does not already exist:
# mkdir /etc/pki/tls/mail
# chown root:root /etc/pki/tls/mail
# chmod 755 /etc/pki/tls/mail
Using removable media or some other secure transmission format, install the files generated in the previous step onto the mail server:
/etc/pki/tls/mail/serverkey.pem: the private key mailserverkey.pem
/etc/pki/tls/mail/servercert.pem: the certificate file mailservercert.pem
Verify the ownership and permissions of these files:
# chown root:root /etc/pki/tls/mail/serverkey.pem
# chown root:root /etc/pki/tls/mail/servercert.pem
# chmod 600 /etc/pki/tls/mail/serverkey.pem
# chmod 644 /etc/pki/tls/mail/servercert.pem
Verify that the CA’s public certificate file has been installed as /etc/pki/tls/CA/cacert.pem, and has the correct permissions:
# chown root:root /etc/pki/tls/CA/cacert.pem
# chmod 644 /etc/pki/tls/CA/cacert.pem
Limit Denial of Service Attacks Edit /etc/postfix/main.cf. Add or correct the following lines:
default_process_limit = 100
smtpd_client_connection_count_limit = 10
smtpd_client_connection_rate_limit = 30
queue_minfree = 20971520
header_size_limit = 51200
message_size_limit = 10485760
smtpd_recipient_limit = 100
Configure SMTP Greeting Banner Edit /etc/postfix/main.cf, and add or correct the following line, substituting some other wording for the banner information if you prefer:
smtpd_banner = $myhostname ESMTP
Configure Trusted Networks and Hosts Edit /etc/postfix/main.cf, and configure the contents of the mynetworks variable in one of the following ways:
  • If any machine in the subnet containing the MTA may be trusted to relay messages, add or correct the line:
    mynetworks_style = subnet
  • If only the MTA host itself is trusted to relay messages, add or correct:
    mynetworks_style = host
  • If the set of machines which can relay is more complicated, manually specify an entry for each netblock or IP address which is trusted to relay by setting the mynetworks variable directly:
    mynetworks = 10.0.0.0/16 , 192.168.1.0/24 , 127.0.0.1
Allow Unlimited Relaying for Trusted Networks Only Edit /etc/postfix/main.cf, and add or correct the smtpd_recipient_restrictions definition so that it contains at least:
smtpd_recipient_restrictions =
    ...
    permit_mynetworks,
    reject_unauth_destination,
    ...
Require SMTP AUTH Before Relaying from Untrusted Clients SMTP authentication allows remote clients to relay mail safely by requiring them to authenticate before submit- ting mail. Postfix’s SMTP AUTH uses an authentication library called SASL, which is not part of Postfix itself. This section describes how to configure authentication using the Cyrus-SASL implementation. See below for a discussion of other options.

To enable the use of SASL authentication, edit /etc/postfix/main.cf and add or correct the following settings:
smtpd_sasl_auth_enable = yes
smtpd_recipient_restrictions =
    ...
    permit_mynetworks,
    permit_sasl_authenticated,
    reject_unauth_destination,
    ...
Then edit /usr/lib/sasl2/smtpd.conf and add or correct the following line with the correct authentication mechanism for SASL to use:
pwcheck_method: saslauthd
The saslauthd service can be enabled with the following command:
# chkconfig saslauthd on
Require TLS for SMTP AUTH Edit /etc/postfix/main.cf, and add or correct the following lines:
smtpd_tls_CApath = /etc/pki/tls/CA
smtpd_tls_CAfile = /etc/pki/tls/CA/cacert.pem
smtpd_tls_cert_file = /etc/pki/tls/mail/servercert.pem
smtpd_tls_key_file = /etc/pki/tls/mail/serverkey.pem
smtpd_tls_security_level = may
smtpd_tls_auth_only = yes
CCE-14894-0 Configure LDAP to Use TLS For All Transactions Configure LDAP to enforce TLS use. First, edit the file /etc/pam_ldap.conf, and add or correct the following lines:
ssl start_tls
Then review the LDAP server and ensure TLS has been configured.
LDAP client requires or does not require LDAP servers to use TLS for SSL communications as appropriate. via /etc/ldap.conf
CCE-14894-0 Configure Certificate Directives for LDAP Use of TLS Ensure a copy of the site's CA certificate has been placed in the file /etc/pki/tls/CA/cacert.pem. Configure LDAP to enforce TLS use and to trust certificates signed by the site's CA. First, edit the file /etc/pam_ldap.conf, and add or correct either of the following lines:
tls_cacertdir /etc/pki/tls/CA
or
tls_cacertfile /etc/pki/tls/CA/cacert.pem
Then review the LDAP server and ensure TLS has been configured.
LDAP client requires or does not require LDAP servers to use TLS for SSL communications as appropriate. via /etc/ldap.conf
CCE-3501-4 Uninstall openldap-servers Package The openldap-servers package should be removed if not in use. Is this machine the OpenLDAP server? If not, remove the package:
# yum erase openldap-servers
The openldap-servers RPM is not installed by default on RHEL6 machines. It is needed only by the OpenLDAP server, not by the clients which use LDAP for authentication. If the system is not intended for use as an LDAP Server it should be removed.
The ldap service should be enabled or disabled as appropriate. via chkconfig
CCE-3501-4 Configure Domain-Specific Parameters The ldap server should be configured to use a domain specific suffix. Is this system an OpenLDAP server? If so, edit the ldap configuration file at /etc/openldap/slapd.d/cn=config/olcDatabase={*}bdb.ldif to include suffix information relevant to your domain.
olcSuffix: "dc=example,dc=com "
olcRootDN: "cn=Manager,dc=example,dc=com "
where dc=example,dc=com is the same root you will use on the LDAP clients.
These are basic LDAP configuration directives. The suffix parameter gives the root name of all information served by this LDAP server, and should be some name related to your domain. The rootdn parameter names LDAP’s privileged user, who is allowed to read or write all data managed by this LDAP server.
The ldap service should be enabled or disabled as appropriate. via chkconfig
LDAP Configuration File Security Is this system an OpenLDAP server? If so, ensure that the configuration files are protected from unauthorized access or modification.

Edit the ldap configuration file at /etc/openldap/slapd.d/cn=config/olcDatabase={*}bdb.ldif. Ensure that the configuration file has reasonable permissions:
# chown root:ldap /etc/openldap/slapd.d/cn=config/olcDatabase={*}bdb.ldif
# chmod 640 /etc/openldap/slapd.d/cn=config/olcDatabase={*}bdb.ldif
Protect configuration files containing the hashed password the same way you would protect other files, such as /etc/shadow, which contain hashed authentication data.
Configure LDAP Root Password Is this system an OpenLDAP server? If so, ensure that the RootDN uses a secure password.

Generate a hashed password using the slappasswd utility:
# slappasswd
New password:
Re-enter new password:
This will output a hashed password string.

Edit the file /etc/openldap/slapd.d/cn=config/olcDatabase={*}bdb.ldif, and add or correct the line:
olcRootPW: {SSHA}hashed-password-string
Be sure to select a secure password for the LDAP root user, since this user has permission to read and write all LDAP data, so a compromise of the LDAP root password will probably enable a full compromise of your site. In addition, be sure to use a reasonably strong hash function. The default hash function should be used. The default hash function is a salted SHA-1 algorith which is FIPS 160-1 compliant. Insecure schemes such as crypt should not be used.
CCE-4360-4 Protect LDAP Certificate Files Create the PKI directory for LDAP certificates if it does not already exist:
# mkdir /etc/pki/tls/ldap
# chown root:root /etc/pki/tls/ldap
# chmod 755 /etc/pki/tls/ldap
Using removable media or some other secure transmission format, install the files generated in the previous step onto the LDAP server:
  • /etc/pki/tls/ldap/serverkey.pem: the private key ldapserverkey.pem
  • /etc/pki/tls/ldap/servercert.pem: the certificate file ldapservercert.pem
Verify the ownership and permissions of these files:
# chown root:ldap /etc/pki/tls/ldap/serverkey.pem
# chown root:ldap /etc/pki/tls/ldap/servercert.pem
# chmod 640 /etc/pki/tls/ldap/serverkey.pem
# chmod 640 /etc/pki/tls/ldap/servercert.pem
Verify that the CA’s public certificate file has been installed as /etc/pki/tls/CA/cacert.pem, and has the correct permissions:
# mkdir /etc/pki/tls/CA
# chown root:root /etc/pki/tls/CA/cacert.pem
# chmod 644 /etc/pki/tls/CA/cacert.pem
As a result of these steps, the LDAP server will have access to its own private certificate and the key with which that certificate is encrypted, and to the public certificate file belonging to the CA. Note that it would be possible for the key to be protected further, so that processes running as ldap could not read it. If this were done, the LDAP server process would need to be restarted manually whenever the server rebooted.
File permissions for /etc/pki/tls/CA/cacert.pem should be set correctly. via chmod File permissions for /etc/pki/tls/ldap/serverkey.pem should be set correctly. via chmod The /etc/pki/tls/ldap file should be owned by the appropriate user. via chown File permissions for /etc/pki/tls/ldap/servercert.pem should be set correctly. via chmod The /etc/pki/tls/ldap/serverkey.pem file should be owned by the appropriate user. via chown The /etc/pki/tls/CA/cacert.pem file should be owned by the appropriate user. via chown File permissions for /etc/pki/tls/ldap should be set correctly. via chmod The /etc/pki/tls/CA/cacert.pem file should be owned by the appropriate group. via chown The /etc/pki/tls/ldap/serverkey.pem file should be owned by the appropriate group. via chown The /etc/pki/tls/ldap file should be owned by the appropriate group. via chown The /etc/pki/tls/ldap/servercert.pem file should be owned by the appropriate user. via chown The /etc/pki/tls/ldap/servercert.pem file should be owned by the appropriate group. via chown
Configure slapd to Protect Authentication Information Use ldapmodify to add these entries to the database. Add or correct the following access specifications: 1. Protect the user’s password by allowing the user himself or the LDAP administrators to change it, allowing the anonymous user to authenticate against it, and allowing no other access:
olcAccess: to attrs=userPassword
    by self write
    by group/groupOfUniqueNames/uniqueMember="cn=admins ,ou=groups,dc=example,dc=com " write
    by anonymous auth
    by * none
olcAccess: to attrs=shadowLastChange
    by self write
    by group/groupOfUniqueNames/uniqueMember="cn=admins ,ou=groups,dc=example,dc=com " write
    by * read
2. Allow anyone to read other information, and allow the administrators to change it:
olcAccess: to *
    by group/groupOfUniqueNames/uniqueMember="cn=admins ,ou=groups,dc=example,dc=com " write
    by * read
Access rules are applied in the order encountered, so more specific rules should appear first. In particular, the rule restricting access to userPassword must appear before the rule allowing access to all data. The shadowLastChange attribute is a timestamp, and is only critical if your site implements password expiration. If your site does not have an LDAP administrators group, the LDAP root user (called Manager in this guide) will be able to change data without an explicit access statement.
CCE-4484-2 Correct Permissions on LDAP Server Files Correct the permissions on the ldap server’s files:
# chown ldap:root /var/lib/ldap/*
Some manual methods of inserting information into the LDAP database may leave these files with incorrect permissions. This will prevent slapd from starting correctly.
The /var/lib/ldap/* files should be owned by the appropriate group. via chown The /var/lib/ldap/* files should be owned by the appropriate user. via chown
Configure iptables to Allow Access to the LDAP Server Determine an appropriate network block, netwk , and network mask, mask , representing the machines on your network which will synchronize to this server. Edit /etc/sysconfig/iptables. Add the following lines, ensuring that they appear before the final LOG and DROP lines for the RH-Firewall-1-INPUT chain:
-A RH-Firewall-1-INPUT -s netwk /mask -m state --state NEW -p tcp --dport 389 -j ACCEPT
-A RH-Firewall-1-INPUT -s netwk /mask -m state --state NEW -p tcp --dport 636 -j ACCEPT
The default Iptables configuration does not allow inbound access to any services. These modifications allow access to the LDAP primary (389) and encrypted-only (636) ports, while keeping all other ports on the server in their default protected state. Note: Even if the LDAP server restricts connections so that only encrypted queries are allowed, it will probably be necessary to allow traffic to the default port 389. This is true because many LDAP clients implement encryption by connecting to the primary port and issuing the STARTTLS command.
Configure Logging for LDAP
  1. Edit the file /etc/rsyslog.conf. Add or correct the following line:
    local4.*
  2. Create the log file with safe permissions:
    # touch /var/log/ldap.log
    # chown root:root /var/log/ldap.log
    # chmod 0600 /var/log/ldap.log
  3. Edit the file /etc/logrotate.d/syslog and add the pathname
    /var/log/ldap.log
    to the space-separated list in the first line.
  4. Edit the LDAP configuration file /etc/openldap/slapd.conf and set a reasonable set of default log parameters, such as:
    loglevel stats2
OpenLDAP sends its log data to the syslog facility local4 at priority debug. By default, RHEL5 does not store this facility at all. The syslog configuration suggested here will store any output logged by slapd in the file /var/log/ldap.log, and will include that file in the standard log rotation for syslog files. By default, LDAP’s logging is quite verbose. The loglevel parameter is a space-separated list of items to be logged. Specifying stats2 will reduce the log output somewhat, but this level will still produce some logging every time an LDAP query is made. (This may be appropriate, depending on your site’s auditing requirements.) In order to capture only slapd startup messages, specify loglevel none. See slapd.conf(5) for detailed information about the loglevel parameter.
CCE-4396-8 Disable Network File System Lock Service (nfslock) The Network File System Lock (nfslock) service starts the required remote procedure call (RPC) processes which allow clients to lock files on the server. If the local machine is not configured to mount NFS filesystems then this service should be disabled. The nfslock service can be disabled with the following command:
# chkconfig nfslock off
The nfslock service should be enabled or disabled as appropriate. via chkconfig
CCE-3535-2 Disable Secure RPC Client Service (rpcgssd) The rpcgssd service manages RPCSEC GSS contexts required to secure protocols that use RPC (most often Kerberos and NFS). The rpcgssd service is the client-side of RPCSEC GSS. If the system does not require secure RPC then this service should be disabled. The rpcgssd service can be disabled with the following command:
# chkconfig rpcgssd off
The rpcgssd service should be enabled or disabled as appropriate. via chkconfig
CCE-3568-3 Disable RPC ID Mapping Service (rpcidmapd) The rpcidmapd service is used to map user names and groups to UID and GID numbers on NFSv4 mounts. If NFS is not in use on the local system then this service should be disabled. The rpcidmapd service can be disabled with the following command:
# chkconfig rpcidmapd off
The rpcidmapd service should be enabled or disabled as appropriate. via chkconfig
CCE-4533-6 Disable Network File Systems (netfs) The netfs script manages the boot-time mounting of several types of networked filesystems, of which NFS and Samba are the most common. If these filesystem types are not in use, the script can be disabled, protecting the system somewhat against accidental or malicious changes to /etc/fstab and against flaws in the netfs script itself. The netfs service can be disabled with the following command:
# chkconfig netfs off
The netfs service should be enabled or disabled as appropriate. via chkconfig
CCE-TODO Disable RPC Bind Service (rpcbind) The rpcbind service is responsible for mapping RPC services to the TCP ports that they listen on. The rpcbind service also directs RPC clients to the proper port number that corresponds to the service the clients wants to communicate with. Unless RPC services are needed on the local system it is recommended to disable this service. The rpcbind service can be disabled with the following command:
# chkconfig rpcbind off
CCE-4559-1 Configure lockd to use static TCP port Configure the lockd daemon to use a static TCP port as opposed to letting the RPC Bind service dynamically assign a port. Edit the file /etc/sysconfig/nfs. Add or correct the following line:
LOCKD_TCPPORT=lockd-port
Where lockd-port is a port which is not used by any other service on your network.
The lockd service should be configured to use a static port or a dynamic portmapper port for TCP as appropriate via /etc/sysconfig/nfs
CCE-4310-9 Configure lockd to use static UDP port Configure the lockd daemon to use a static UDP port as opposed to letting the RPC Bind service dynamically assign a port. Edit the file /etc/sysconfig/nfs. Add or correct the following line:
LOCKD_UDPPORT=lockd-port
Where lockd-port is a port which is not used by any other service on your network.
The lockd service should be configured to use a static port or a dynamic portmapper port for UDP as appropriate via /etc/sysconfig/nfs
CCE-3667-3 Configure statd to use static port Configure the statd daemon to use a static port as opposed to letting the RPC Bind service dynamically assign a port. Edit the file /etc/sysconfig/nfs. Add or correct the following line:
STATD_PORT=statd-port
Where statd-port is a port which is not used by any other service on your network.
The statd service should be configured to use a static port or a dynamic portmapper port as appropriate via /etc/sysconfig/nfs
CCE-4438-8 Configure mountd to use static port Configure the mountd daemon to use a static port as opposed to letting the RPC Bind service dynamically assign a port. Edit the file /etc/sysconfig/nfs. Add or correct the following line:
MOUNTD_PORT=statd-port
Where mountd-port is a port which is not used by any other service on your network.
The mountd service should be configured to use a static port or a dynamic portmapper port as appropriate via /etc/sysconfig/nfs
CCE-4473-5 Disable Network File System (nfs) The Network File System (NFS) service allows remote hosts to mount and interact with shared filesystems on the local machine. If the local machine is not designated as a NFS server then this service should be disabled. The nfs service can be disabled with the following command:
# chkconfig nfs off
The nfs service should be enabled or disabled as appropriate via chkconfig
CCE-4491-7 Disable Secure RPC Server Service (rpcsvcgssd) The rpcsvcgssd service manages RPCSEC GSS contexts required to secure protocols that use RPC (most often Kerberos and NFS). The rpcsvcgssd service is the server-side of RPCSEC GSS. If the system does not require secure RPC then this service should be disabled. The rpcsvcgssd service can be disabled with the following command:
# chkconfig rpcsvcgssd off
The rpcsvcgssd service should be enabled or disabled as appropriate via chkconfig
CCE-4368-7 Mount Remote Filesystems with nodev The nodev option should be enabled for all NFS mounts The nodev option should be enabled or disabled for all NFS mounts as appropriate via /etc/fstab
CCE-4024-6 Mount Remote Filesystems with nosuid The nosuid option should be enabled for all NFS mounts The nosuid option should be enabled or disabled for all NFS mounts as appropriate via /etc/fstab
CCE-4544-3 Use Root-Squashing on All Exports If a filesystem is exported using root squashing, requests from root on the client are considered to be unprivileged (mapped to a user such as nobody). This provides some mild protection against remote abuse of an NFS server. Root squashing is enabled by default, and should not be disabled.

Ensure that no line in /etc/exports contains the option no_root_squash.
Root squashing should be enabled or disabled as appropriate for all NFS shares via /etc/exports
CCE-4465-1 Restrict NFS Clients to Privileged Ports By default, Linux’s NFS implementation requires that all client requests be made from ports less than 1024. If your organization has control over machines connected to its network, and if NFS requests are prohibited at the border firewall, this offers some protection against malicious requests from unprivileged users. Therefore, the default should not be changed.

Ensure that no line in /etc/exports contains the option insecure.
Restriction of NFS clients to privileged ports should be enabled or disabled as appropriate via /etc/exports
CCE-TO:DO Ensure Insecure File Locking is Not Allowed By default the NFS server requires secure file-lock requests, which require credentials from the client in order to lock a file. Most NFS clients send credentials with file lock requests, however, there are a few clients that do not send credentials when requesting a file-lock, allowing the client to only be able to lock world-readable files. To get around this, the insecure_locks option can be used so these clients can access the desired export. This poses a security risk by potentially allowing the client access to data for which it does not have authorization. Remove any instances of the insecure_locks option from the file /etc/exports.
CCE-3578-2 Disable DNS Server The named service can be disabled with the following command:
# chkconfig named off
The named service should be enabled or disabled as appropriate. via chkconfig
CCE-4219-2 Uninstall bind Package To remove the bind package, which contains the named service, run the following command:
# yum erase bind
The bind package should be installed or uninstalled as appropriate. via yum
CCE-3985-9 Run DNS Software in a chroot Jail Install the bind-chroot package:
# yum install bind-chroot
Place a valid named.conf file inside the chroot jail:
# cp /etc/named.conf /var/named/chroot/etc/named.conf
# chown root:root /var/named/chroot/etc/named.conf
# chmod 644 /var/named/chroot/etc/named.conf
Create and populate an appropriate zone directory within the jail, based on the options directive. If your named.conf includes:
options {
directory "/path/to/DIRNAME ";
...
}
then copy that directory and its contents from the original zone directory:
# cp -r /path/to/DIRNAME /var/named/chroot/DIRNAME
Edit the file /etc/sysconfig/named. Add or correct the line:
ROOTDIR=/var/named/chroot
The /var/named/chroot/etc/named.conf file should be owned by the appropriate group. via chown File permissions for /var/named/chroot/etc/named.conf should be set correctly. via chmod The /var/named/chroot/etc/named.conf file should be owned by the appropriate user. via chown
CCE-4399-2 Disable Dynamic Updates Is there a mission-critical reason to enable the risky dynamic update functionality? If not, edit /etc/named.conf. For each zone specification, correct the following directive if necessary:
zone "example.com " IN {
  allow-update { none; };
  ...
};
LDAP's dynamic updates feature should be enabled or disabled as appropriate via /etc/named.conf
CCE-3919-8 Disable vsftpd Service The vsftpd service can be disabled with the following command:
# chkconfig vsftpd off
The vsftpd service should be enabled or disabled as appropriate. via chkconfig
CCE-14881-7 Uninstall vsftpd Package The vsftpd package can be removed with the following command:
# yum erase vsftpd
The vsftpd package should be installed or uninstalled as appropriate. via yum
CCE-14881-7 Install vsftpd Package If this machine must operate as an FTP server, install the vsftpd package via the standard channels:
# yum install vsftpd
The vsftpd package should be installed or uninstalled as appropriate. via yum
CCE-4549-2 Enable Logging of All FTP Transactions Edit the vsftpd configuration file. Add or correct the following configuration options:
xferlog_enable=YES
xferlog_std_format=NO
log_ftp_protocol=YES
Logging of vsftpd transactions should be enabled or disabled as appropriate via /etc/vsftpd.conf
CCE-4554-2 Create Warning Banners for All FTP Users Edit the vsftpd configuration file, which resides at /etc/vsftpd/vsftpd.conf by default. Add or correct the following configuration options:
banner_file=/etc/issue
A warning banner for all FTP users should be enabled or disabled as appropriate via /etc/vsftpd.conf
CCE-4443-8 Restrict Access to Anonymous Users if Possible Is there a mission-critical reason for users to transfer files to/from their own accounts using FTP, rather than using a secure protocol like SCP/SFTP? If not, edit the vsftpd configuration file. Add or correct the following configuration option:
local_enable=NO
If non-anonymous FTP logins are necessary, follow the guidance in the remainder of this section to secure these logins as much as possible.
Local user login to the vsftpd service should be enabled or disabled as appropriate via /etc/vsftpd.conf
CCE-4461-0 Disable FTP Uploads if Possible Is there a mission-critical reason for users to upload files via FTP? If not: Edit the vsftpd configuration file. Add or correct the following configuration options:
write_enable=NO
If FTP uploads are necessary, follow the guidance in the remainder of this section to secure these transactions as much as possible.
File uploads via vsftpd should be enabled or disabled as appropriate via /etc/vsftpd.conf
Place the FTP Home Directory on its Own Partition By default, the anonymous FTP root is the home directory of the ftp user account. The df command can be used to verify that this directory is on its own partition.
CCE-4338-0 Disable httpd Service The httpd service can be disabled with the following command:
# chkconfig httpd off
The httpd service should be enabled or disabled as appropriate. via chkconfig
CCE-4514-6 Uninstall httpd Package The httpd package can be removed with the following command:
# yum erase httpd
The httpd package should be installed or uninstalled as appropriate. via yum
CCE-4474-3 Set httpd ServerTokens Directive to Prod ServerTokens Prod restricts information in page headers, returning only the word "Apache."

Add or correct the following directive in /etc/httpd/conf/httpd.conf:
ServerTokens Prod
The apache2 server's ServerTokens value should be set appropriately via /etc/httpd/conf/httpd.conf
CCE-3756-4 Set httpd ServerSignature Directive to Off ServerSignature Off restricts httpd from displaying server version number on error pages.

Add or correct the following directive in /etc/httpd/conf/httpd.conf:
ServerSignature Off
The apache2 server's ServerSignature value should be set appropriately via /etc/httpd/conf/httpd.conf
Disable HTTP Digest Authentication The auth_digest module provides encrypted authentication sessions. If this functionality is unnecessary, comment out the related module:
#LoadModule auth_digest_module modules/mod_auth_digest.so
Disable HTTP mod_rewrite The mod_rewrite module is very powerful and can protect against certain classes of web attacks. However, it is also very complex and has a significant history of vulnerabilities itself. If its functionality is unnecessary, comment out the related module:
#LoadModule rewrite_module modules/mod_rewrite.so
Disable LDAP Support The ldap module provides HTTP authentication via an LDAP directory. If its functionality is unnecessary, comment out the related modules:
#LoadModule ldap_module modules/mod_ldap.so
#LoadModule authnz_ldap_module modules/mod_authnz_ldap.so
If LDAP is to be used, SSL encryption should be used as well.
Disable Server Side Includes Server Side Includes provide a method of dynamically generating web pages through the insertion of server-side code. However, the technology is also deprecated and introduces significant security concerns. If this functionality is unnecessary, comment out the related module:
#LoadModule include_module modules/mod_include.so
If there is a critical need for Server Side Includes, they should be enabled with the option IncludesNoExec to prevent arbitrary code execution. Additionally, user supplied data should be encoded to prevent cross-site scripting vulnerabilities.
Disable MIME Magic The mime_magic module provides a second layer of MIME support that in most configurations is likely extraneous. If its functionality is unnecessary, comment out the related module:
#LoadModule mime_magic_module modules/mod_mime_magic.so
Disable WebDAV (Distributed Authoring and Versioning) WebDAV is an extension of the HTTP protocol that provides distributed and collaborative access to web content. If its functionality is unnecessary, comment out the related modules:
#LoadModule dav_module modules/mod_dav.so
#LoadModule dav_fs_module modules/mod_dav_fs.so
If there is a critical need for WebDAV, extra care should be taken in its configuration. Since DAV access allows remote clients to manipulate server files, any location on the server that is DAV enabled should be protected by access controls.
Disable Server Activity Status The status module provides real-time access to statistics on the internal operation of the web server. This may constitute an unnecessary information leak and should be disabled unless necessary. To do so, comment out the related module:
#LoadModule status_module modules/mod_status.so
If there is a critical need for this module, ensure that access to the status page is properly restricted to a limited set of hosts in the status handler configuration.
Disable Web Server Configuration Display The info module creates a web page illustrating the configuration of the web server. This can create an unnecessary security leak and should be disabled. If its functionality is unnecessary, comment out the module:
#LoadModule info_module modules/mod_info.so
If there is a critical need for this module, use the Location directive to provide an access control list to restrict access to the information.
Disable URL Correction on Misspelled Entries The speling module attempts to find a document match by allowing one misspelling in an otherwise failed request. If this functionality is unnecessary, comment out the module:
#LoadModule speling_module modules/mod_speling.so
This functionality weakens server security by making site enumeration easier.
Disable Proxy Support The proxy module provides proxying support, allowing httpd to forward requests and serve as a gateway for other servers. If its functionality is unnecessary, comment out the module:
#LoadModule proxy_module modules/mod_proxy.so
If proxy support is needed, load mod_proxy and the appropriate proxy protocol handler module (one of mod_proxy_http, mod_proxy_ftp, or mod_proxy_connect). Additionally, make certain that a server is secure before enabling proxying, as open proxy servers are a security risk. mod_proxy_balancer enables load balancing, but requires that mod status be enabled.
Disable Cache Support The cache module allows httpd to cache data, optimizing access to frequently accessed content. However, it introduces potential security flaws such as the possibility of circumventing Allow and Deny directives.

If this functionality is unnecessary, comment out the module:
#LoadModule cache_module modules/mod_cache.so
If caching is required, it should not be enabled for any limited-access content.
Disable CGI Support The cgi module allows HTML to interact with the CGI web programming language.

If this functionality is unnecessary, comment out the module:
#LoadModule cgi_module modules/mod_cgi.so
If the web server requires the use of CGI, enable mod_cgi.
Restrict Root Directory The httpd root directory should always have the most restrictive configuration enabled.
<Directory / >
   Options None
   AllowOverride None
   Order allow,deny
</Directory>
Restrict Web Directory The default configuration for the web (/var/www/html) Directory allows directory indexing (Indexes) and the following of symbolic links (FollowSymLinks). Neither of these is recommended.

The /var/www/html directory hierarchy should not be viewable via the web, and symlinks should only be followed if the owner of the symlink also owns the linked file.

Ensure that this policy is adhered to by altering the related section of the configuration:
<Directory "/var/www/html">
#  ...
   Options SymLinksIfOwnerMatch
#  ...
</Directory>
Restrict Other Critical Directories All accessible web directories should be configured with similarly restrictive settings. The Options directive should be limited to necessary functionality and the AllowOverride directive should be used only if needed. The Order and Deny access control tags should be used to deny access by default, allowing access only where necessary.
Limit Available Methods Web server methods are defined in section 9 of RFC 2616 (http://www.ietf.org/rfc/rfc2616.txt). If a web server does not require the implementation of all available methods, they should be disabled.

Note: GET and POST are the most common methods. A majority of the others are limited to the WebDAV protocol.
<Directory /var/www/html>
# ...
   # Only allow specific methods (this command is case-sensitive!)
   <LimitExcept GET POST>
      Order allow,deny
   </LimitExcept>
# ...
</Directory>
Install mod_ssl Install the mod_ssl module:
# yum install mod_ssl
Install mod_security Install the security module:
# yum install mod_security
CCE-4574-0 Set Permissions on the /var/log/httpd/ Directory Ensure that the permissions on the web server log directory is set to 700:
# chmod 700 /var/log/httpd/
This is its default setting.
File permissions for /var/log/httpd should be set correctly. via chmod
Set Permissions on the /etc/httpd/conf/ Directory Set permissions on the web server configuration directory to 750:
# chmod 750 /etc/httpd/conf/
CCE-4386-9 Set Permissions on All Configuration Files Inside /etc/httpd/conf/ Set permissions on the web server configuration files to 640:
# chmod 640 /etc/httpd/conf/*
File permissions for /etc/httpd/conf/* should be set correctly. via chmod
CCE-3847-1 Disable Dovecot Service The dovecot service can be disabled with the following command:
# chkconfig dovecot off
The dovecot service should be enabled or disabled as appropriate. via chkconfig
CCE-4239-0 Uninstall dovecot Package The dovecot package can be uninstalled with the following command:
# yum erase dovecot
The dovecot package should be installed or uninstalled as appropriate. via yum
CCE-4384-4 Support Only the Necessary Protocols Dovecot supports the IMAP and POP3 protocols, as well as SSL-protected versions of those protocols. Configure the Dovecot server to support only the protocols needed by your site. Edit /etc/dovecot/dovecot.conf. Add or correct the following lines, replacing PROTOCOL with only the subset of protocols (imap, imaps, pop3, pop3s) required:
protocols = PROTOCOL
If possible, require SSL protection for all transactions. The SSL protocol variants listen on alternate ports (995 instead of 110 for pop3s, and 993 instead of 143 for imaps), and require SSL-aware clients. An alternate approach is to listen on the standard port and require the client to use the STARTTLS command before authenticating.
Dovecot should be configured to support the imaps protocol or not as necessary via /etc/dovecot.conf Dovecot should be configured to support the pop3s protocol or not as necessary via /etc/dovecot.conf Dovecot should be configured to support the pop3 protocol or not as necessary via /etc/dovecot.conf Dovecot should be configured to support the imap protocol or not as necessary via /etc/dovecot.conf
Enable the SSL flag in /etc/dovecot.conf To allow clients to make encrypted connections the ssl flag in Dovecot's configuration file needs to be set to yes.

Edit /etc/dovecot/conf.d/10-ssl.conf and add or correct the following line:
ssl = yes
Configure Dovecot to Use the SSL Certificate file This option tell Dovecot where to find the the mail server's SSL Certificate.

Edit /etc/dovecot/conf.d/10-ssl.conf and add or correct the following line. The path below is the default path set by the Dovecot installation. If you are using a different path, ensure you reference the appropriate file:
ssl_cert = </etc/pki/dovecot/certs/dovecot.pem
Configure Dovecot to Use the SSL Key file This option tell Dovecot where to find the the mail server's SSL Key.

Edit /etc/dovecot/conf.d/10-ssl.conf and add or correct the following line. The path below is the default path set by the Dovecot installation. If you are using a different path, ensure you reference the appropriate file:
ssl_key = </etc/pki/dovecot/private/dovecot.pem
CCE-4552-6 Disable Plaintext Authentication To prevent Dovecot from attempting plaintext authentication of clients, edit /etc/dovecot/conf.d/10-auth.conf and add or correct the following line:
disable_plaintext_auth = yes
Dovecot plaintext authentication of clients should be enabled or disabled as necessary via /etc/dovecot.conf
CCE-4551-8 Disable Samba The smb service can be disabled with the following command:
# chkconfig smb off
The smb service should be enabled or disabled as appropriate. via chkconfig
Disable Root Access Administrators should not use administrator accounts to access Samba file and printer shares. Disable the root user and the wheel administrator group:
[share]
  invalid users = root @wheel
If administrator accounts cannot be disabled, ensure that local machine passwords and Samba service passwords do not match.
Disable Root Access By default, Samba will attempt to negotiate with Microsoft Windows machines to set a common communication protocol. Newer versions of Microsoft Windows may require the use of NTLMv2. NTLMv2 is the preferred protocol for authentication, but since older machines do not support it, Samba has disabled it by default. Enable it with the following:
[global]
  client ntlmv2 auth = yes
CCE-14075-6 Require Client SMB Packet Signing, if using smbclient To require samba clients running smbclient to use packet signing, add the following to the [global] section of the Samba configuration file:
client signing = mandatory
Requiring samba clients such as smbclient to use packet signing ensures that they can only communicate with servers that support packet signing.
Client SMB packet signing should be required or not required for smbclient as appropriate. via /etc/samba/smb.conf
CCE-15029-2 Require Client SMB Packet Signing, if using mount.cifs Require packet signing of clients who mount Samba shares using the mount.cifs program (e.g., those who specify shares in /etc/fstab). To do so, ensure that signing options (either sec=krb5i or sec=ntlmv2i) are used.

See the mount.cifs(8) man page for more information. A Samba client should only communicate with servers who can support SMB packet signing.
Client SMB packet signing should be required or not required for mount.cifs as appropriate. via /etc/fstab
CCE-4556-7 Disable Squid The squid service can be disabled with the following command:
# chkconfig squid off
The squid service should be enabled or disabled as appropriate. via chkconfig
CCE-4076-6 Uninstall squid Package The squid package can be removed with the following command:
# yum erase squid
The squid package should be installed or uninstalled as appropriate. via yum
CCE-3765-5 Disable snmpd Service The snmpd service can be disabled with the following command:
# chkconfig snmpd off
The snmpd service should be enabled or disabled as appropriate. via chkconfig
CCE-14081-4 Uninstall net-snmp Package The net-snmp package provides the snmpd service. The net-snmpd package can be removed with the following command:
# yum erase net-snmpd
The net-snmpd package should be installed or uninstalled as appropriate. via yum