CCE ID | Rule Title | Description |
Ensure Solid State Drives Do Not Contribute To Random-Number Entropy Pool | For each solid-state drive on the system, run:
# echo 0 > /sys/block/DRIVE/queue/add_random |
|
CCE-26435-8 | Ensure /tmp Located On Separate Partition |
The /tmp directory is a world-writable directory used
for temporary file storage. Ensure it has its own partition or
logical volume at installation time, or migrate it using LVM.
|
CCE-26639-5 | 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.
|
CCE-26215-4 | 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.
|
CCE-26436-6 | 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.
|
CCE-26557-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.
|
CCE-27596-6 | Encrypt Partitions |
Red Hat Enterprise Linux 6 natively supports partition encryption through the
Linux Unified Key Setup-on-disk-format (LUKS) technology. The easiest way to
encrypt a partition is during installation time.
For manual installations, select the Encrypt checkbox during
partition creation to encrypt the partition. When this
option is selected the system will prompt for a passphrase to use in
decrypting the partition. The passphrase will subsequently need to be entered manually
every time the system boots.
For automated/unattended installations, it is possible to use Kickstart by adding the --encrypted and --passphrase= options to the definition of each partition to be
encrypted. For example, the following line would encrypt the root partition:
part / --fstype=ext3 --size=100 --onpart=hda1 --encrypted --passphrase=PASSPHRASEAny PASSPHRASE is stored in the Kickstart in plaintext, and the Kickstart must then be protected accordingly. Omitting the --passphrase= option from the partition definition will cause the
installer to pause and interactively ask for the passphrase during installation.
Detailed information on encrypting partitions using LUKS can be found on the Red Hat Documentation web site: https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/chap-Security_Guide-Encryption.html#sect-Security_Guide-LUKS_Disk_Encryption |
CCE-26506-6 | Ensure Red Hat GPG Key Installed |
To ensure the system can cryptographically verify base software
packages come from Red Hat (and to connect to the Red Hat Network to
receive them), the Red Hat GPG key must properly be installed.
To install the Red Hat GPG key, run:
$ sudo rhn_registerIf the system is not connected to the Internet or an RHN Satellite, then install the Red Hat GPG key from trusted media such as the Red Hat installation CD-ROM or DVD. Assuming the disc is mounted in /media/cdrom , use the following command as the root user to import
it into the keyring:
$ sudo rpm --import /media/cdrom/RPM-GPG-KEY |
CCE-26709-6 | Ensure gpgcheck Enabled In Main Yum Configuration | The gpgcheck option controls whether
RPM packages' signatures are always checked prior to installation.
To configure yum to check package signatures before installing
them, ensure the following line appears in /etc/yum.conf in
the [main] section:
gpgcheck=1 |
CCE-26647-8 | Ensure gpgcheck Enabled For All Yum Package Repositories | To ensure signature checking is not disabled for
any repos, remove any lines from files in /etc/yum.repos.d of the form:
gpgcheck=0 |
CCE-27635-2 | Ensure Software Patches Installed | If the system is joined to the Red Hat Network, a Red Hat Satellite Server,
or a yum server, run the following command to install updates:
$ sudo yum updateIf the system is not configured to use one of these sources, updates (in the form of RPM packages) can be manually downloaded from the Red Hat Network and installed using rpm .
|
CCE-27024-9 | Install AIDE |
Install the AIDE package with the command:
$ sudo yum install aide |
CCE-27221-1 | 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=noNext, run the following command to return binaries to a normal, non-prelinked state: $ sudo /usr/sbin/prelink -ua |
CCE-27135-3 | Build and Test AIDE Database | Run the following command to generate a new database:
$ sudo /usr/sbin/aide --initBy 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:
$ sudo cp /var/lib/aide/aide.db.new.gz /var/lib/aide/aide.db.gzTo initiate a manual check, run the following command: $ sudo /usr/sbin/aide --checkIf this check produces any unexpected output, investigate. |
CCE-27222-9 | Configure Periodic Execution of AIDE |
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 --checkAIDE can be executed periodically through other means; this is merely one example. |
CCE-26731-0 | Verify and Correct 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.
After locating a file with incorrect permissions, run the following command to determine which package owns it:
$ rpm -qf FILENAMENext, run the following command to reset its permissions to the correct values: $ sudo rpm --setperms PACKAGENAME |
CCE-27223-7 | 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. If the file was not expected to change, investigate the cause of the change using audit logs or other means. The package can then be reinstalled to restore the file. Run the following command to determine which package owns the file: $ rpm -qf FILENAMEThe package can be reinstalled from a yum repository using the command: $ sudo yum reinstall PACKAGENAMEAlternatively, the package can be reinstalled from trusted media using the command: $ sudo rpm -Uvh PACKAGENAME |
CCE-27409-2 | Install Intrusion Detection Software |
The base Red Hat platform already includes a sophisticated auditing system that
can detect intruder activity, as well as SELinux, which provides host-based
intrusion prevention capabilities by confining privileged programs and user
sessions which may become compromised. In DoD environments, supplemental intrusion detection tools, such as, the McAfee Host-based Security System, are available to integrate with existing infrastructure. When these supplemental tools interfere with the proper functioning of SELinux, SELinux takes precedence. |
CCE-27529-7 | Install Virus Scanning Software | Install virus scanning software, which uses signatures to search for the presence of viruses on the filesystem. The McAfee VirusScan Enterprise for Linux virus scanning tool is provided for DoD systems. Ensure virus definition files are no older than 7 days, or their last release. Configure the virus scanning software to perform scans dynamically on all accessed files. If this is not possible, configure the system to scan all altered files on the system on a daily basis. If the system processes inbound SMTP mail, configure the virus scanner to scan all received mail. |
CCE-27045-4 | Add nodev Option to Non-Root Local Partitions | The nodev mount option prevents files from being
interpreted as character or block devices.
Legitimate character and block devices should exist only in
the /dev directory on the root partition or within chroot
jails built for system services.
Add the nodev option to the fourth column of
/etc/fstab for the line which controls mounting of
any non-root local partitions.
|
CCE-26860-7 | Add nodev Option to Removable Media Partitions | The nodev mount option prevents files from being
interpreted as character or block devices.
Legitimate character and block devices should exist only in
the /dev directory on the root partition or within chroot
jails built for system services.
Add the nodev option to the fourth column of
/etc/fstab for the line which controls mounting of
any removable media partitions.
|
CCE-27196-5 | Add noexec Option to Removable Media Partitions | The noexec mount option prevents the direct
execution of binaries on the mounted filesystem.
Preventing the direct execution of binaries from removable media (such as a USB
key) provides a defense against malicious software that may be present on such
untrusted media.
Add the noexec option to the fourth column of
/etc/fstab for the line which controls mounting of
any removable media partitions.
|
CCE-27056-1 | 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 SGID
files into the system via partitions mounted from removeable media.
Add the nosuid option to the fourth column of
/etc/fstab for the line which controls mounting of
any removable media partitions.
|
CCE-26499-4 | Add nodev Option to /tmp |
The nodev mount option can be used to prevent device files from
being created in /tmp .
Legitimate character and block devices should not exist
within temporary directories like /tmp .
Add the nodev option to the fourth column of
/etc/fstab for the line which controls mounting of
/tmp .
|
CCE-26720-3 | Add noexec Option to /tmp | The noexec mount option can be used to prevent binaries
from being executed out of /tmp .
Add the noexec option to the fourth column of
/etc/fstab for the line which controls mounting of
/tmp .
|
CCE-26762-5 | Add nosuid Option to /tmp | The nosuid mount option can be used to prevent
execution of setuid programs in /tmp . The SUID and SGID permissions
should not be required in these world-writable directories.
Add the nosuid option to the fourth column of
/etc/fstab for the line which controls mounting of
/tmp .
|
CCE-26778-1 | Add nodev Option to /dev/shm | The nodev mount option can be used to prevent creation
of device files in /dev/shm .
Legitimate character and block devices should not exist
within temporary directories like /dev/shm .
Add the nodev option to the fourth column of
/etc/fstab for the line which controls mounting of
/dev/shm .
|
CCE-26622-1 | Add noexec Option to /dev/shm | The noexec mount option can be used to prevent binaries
from being executed out of /dev/shm .
It can be dangerous to allow the execution of binaries
from world-writable temporary storage directories such as /dev/shm .
Add the noexec option to the fourth column of
/etc/fstab for the line which controls mounting of
/dev/shm .
|
CCE-26486-1 | Add nosuid Option to /dev/shm | The nosuid mount option can be used to prevent execution
of setuid programs in /dev/shm . The SUID and SGID permissions should not
be required in these world-writable directories.
Add the nosuid option to the fourth column of
/etc/fstab for the line which controls mounting of
/dev/shm .
|
CCE-26582-7 | Bind Mount /var/tmp To /tmp | The /var/tmp directory is a world-writable directory.
Bind-mount it to /tmp in order to consolidate temporary storage into
one location protected by the same techniques as /tmp . To do so, edit
/etc/fstab and add the following line:
/tmp /var/tmp none rw,nodev,noexec,nosuid,bind 0 0See the mount(8) man page for further explanation of bind mounting.
|
CCE-27016-5 | Disable Modprobe Loading of USB Storage Driver |
To prevent USB storage devices from being used, configure the kernel module loading system
to prevent automatic loading of the USB storage driver.
To configure the system to prevent the usb-storage
kernel module from being loaded, add the following line to a file in the directory /etc/modprobe.d :
install usb-storage /bin/trueThis 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. |
CCE-27011-6 | Disable Kernel Support for USB via Bootloader Configuration |
All USB support can be disabled by adding the nousb
argument to the kernel's boot loader configuration. To do so,
append "nousb" to the kernel line in /etc/grub.conf as shown:
kernel /vmlinuz-VERSION ro vga=ext root=/dev/VolGroup00/LogVol00 rhgb quiet nousbWARNING: Disabling all kernel support for USB will cause problems for systems with USB-based keyboards, mice, or printers. This configuration is infeasible for systems which require USB devices, which is common. |
CCE-26923-3 | Disable Booting from USB Devices in Boot Firmware | Configure the system boot firmware (historically called BIOS on PC systems) to disallow booting from USB drives. |
CCE-27131-2 | Assign Password to Prevent Changes to Boot Firmware Configuration | Assign a password to the system boot firmware (historically called BIOS on PC systems) to require a password for any configuration changes. |
CCE-26976-1 | 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 may be
possible to configure filesystem mounts statically by editing /etc/fstab
rather than relying on the automounter.
The autofs service can be disabled with the following command:
$ sudo chkconfig autofs off |
CCE-27035-5 | 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:
$ sudo gconftool-2 --direct \ --config-source xml:readwrite:/etc/gconf/gconf.xml.mandatory \ --type bool \ --set /apps/nautilus/preferences/media_automount false $ sudo gconftool-2 --direct \ --config-source xml:readwrite:/etc/gconf/gconf.xml.mandatory \ --type bool \ --set /apps/nautilus/preferences/media_autorun_never true |
CCE-26340-0 | Disable Mounting of cramfs |
To configure the system to prevent the cramfs
kernel module from being loaded, add the following line to a file in the directory /etc/modprobe.d :
install cramfs /bin/trueThis effectively prevents usage of this uncommon filesystem. |
CCE-26544-7 | Disable Mounting of freevxfs |
To configure the system to prevent the freevxfs
kernel module from being loaded, add the following line to a file in the directory /etc/modprobe.d :
install freevxfs /bin/trueThis effectively prevents usage of this uncommon filesystem. |
CCE-26670-0 | Disable Mounting of jffs2 |
To configure the system to prevent the jffs2
kernel module from being loaded, add the following line to a file in the directory /etc/modprobe.d :
install jffs2 /bin/trueThis effectively prevents usage of this uncommon filesystem. |
CCE-26800-3 | Disable Mounting of hfs |
To configure the system to prevent the hfs
kernel module from being loaded, add the following line to a file in the directory /etc/modprobe.d :
install hfs /bin/trueThis effectively prevents usage of this uncommon filesystem. |
CCE-26361-6 | Disable Mounting of hfsplus |
To configure the system to prevent the hfsplus
kernel module from being loaded, add the following line to a file in the directory /etc/modprobe.d :
install hfsplus /bin/trueThis effectively prevents usage of this uncommon filesystem. |
CCE-26404-4 | Disable Mounting of squashfs |
To configure the system to prevent the squashfs
kernel module from being loaded, add the following line to a file in the directory /etc/modprobe.d :
install squashfs /bin/trueThis effectively prevents usage of this uncommon filesystem. |
CCE-26677-5 | Disable Mounting of udf |
To configure the system to prevent the udf
kernel module from being loaded, add the following line to a file in the directory /etc/modprobe.d :
install udf /bin/trueThis effectively prevents usage of this uncommon filesystem. |
CCE-27224-5 | 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:
$ sudo gconftool-2 --direct \ --config-source xml:readwrite:/etc/gconf/gconf.xml.mandatory \ --type bool \ --set /desktop/gnome/thumbnailers/disable_all trueThis effectively prevents an attacker from gaining access to a system through a flaw in GNOME's Nautilus thumbnail creators. |
CCE-26947-2 | Verify User Who Owns shadow File |
To properly set the owner of /etc/shadow , run the command:
$ sudo chown root /etc/shadow |
CCE-26967-0 | Verify Group Who Owns shadow File |
To properly set the group owner of /etc/shadow , run the command:
$ sudo chgrp root /etc/shadow |
CCE-26992-8 | Verify Permissions on shadow File |
To properly set the permissions of /etc/shadow , run the command:
$ sudo chmod 0000 /etc/shadow |
CCE-26822-7 | Verify User Who Owns group File |
To properly set the owner of /etc/group , run the command:
$ sudo chown root /etc/group |
CCE-26930-8 | Verify Group Who Owns group File |
To properly set the group owner of /etc/group , run the command:
$ sudo chgrp root /etc/group |
CCE-26954-8 | Verify Permissions on group File |
To properly set the permissions of /etc/group , run the command:
$ sudo chmod 644 /etc/group |
CCE-27026-4 | Verify User Who Owns gshadow File |
To properly set the owner of /etc/gshadow , run the command:
$ sudo chown root /etc/gshadow |
CCE-26975-3 | Verify Group Who Owns gshadow File |
To properly set the group owner of /etc/gshadow , run the command:
$ sudo chgrp root /etc/gshadow |
CCE-26951-4 | Verify Permissions on gshadow File |
To properly set the permissions of /etc/gshadow , run the command:
$ sudo chmod 0000 /etc/gshadow |
CCE-26953-0 | Verify User Who Owns passwd File |
To properly set the owner of /etc/passwd , run the command:
$ sudo chown root /etc/passwd |
CCE-26856-5 | Verify Group Who Owns passwd File |
To properly set the group owner of /etc/passwd , run the command:
$ sudo chgrp root /etc/passwd |
CCE-26868-0 | Verify Permissions on passwd File |
To properly set the permissions of /etc/passwd , run the command:
$ sudo chmod 0644 /etc/passwd |
CCE-27381-3 | 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/lib64Kernel 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. If any file in these
directories is found to be group-writable or world-writable, correct
its permission with the following command:
$ sudo chmod go-w FILE |
CCE-27424-1 | 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/lib64Kernel 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. If the directory, or any file in these
directories, is found to be owned by a user other than root correct its
ownership with the following command:
$ sudo chown root FILE |
CCE-27289-8 | Verify that System Executables Have Restrictive Permissions |
System executables are stored in the following directories by default:
/bin /sbin /usr/bin /usr/libexec /usr/local/bin /usr/local/sbin /usr/sbinAll files in these directories should not be group-writable or world-writable. If any file FILE in these directories is found to be group-writable or world-writable, correct its permission with the following command: $ sudo chmod go-w FILE |
CCE-27623-8 | Verify that System Executables Have Root Ownership |
System executables are stored in the following directories by default:
/bin /sbin /usr/bin /usr/libexec /usr/local/bin /usr/local/sbin /usr/sbinAll files in these directories should be owned by the root user.
If any file FILE in these directories is found
to be owned by a user other than root, correct its ownership with the
following command:
$ sudo chown root FILE |
CCE-26840-9 | 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: $ sudo chmod +t DIR |
CCE-26910-0 | Ensure No World-Writable Files Exist | 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. |
CCE-26769-0 | Ensure All SGID 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. |
CCE-26497-8 | 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. |
CCE-27032-2 | 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. |
CCE-26872-2 | 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. |
CCE-26642-9 | 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. |
CCE-27031-4 | 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:
umaskSetting 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. |
CCE-27033-0 | 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 |
CCE-27044-7 | Disable Core Dumps for SUID programs |
To set the runtime status of the fs.suid_dumpable kernel parameter,
run the following command:
$ sudo sysctl -w fs.suid_dumpable=0If this is not the system's default value, add the following line to /etc/sysctl.conf :
fs.suid_dumpable = 0 |
CCE-27007-4 | Enable ExecShield |
To set the runtime status of the kernel.exec-shield kernel parameter,
run the following command:
$ sudo sysctl -w kernel.exec-shield=1If this is not the system's default value, add the following line to /etc/sysctl.conf :
kernel.exec-shield = 1 |
CCE-26999-3 | Enable Randomized Layout of Virtual Address Space |
To set the runtime status of the kernel.randomize_va_space kernel parameter,
run the following command:
$ sudo sysctl -w kernel.randomize_va_space=2If this is not the system's default value, add the following line to /etc/sysctl.conf :
kernel.randomize_va_space = 2 |
CCE-27010-8 | 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:
$ sudo yum install kernel-PAEThe 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. |
CCE-27163-5 | 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. |
CCE-27366-4 | Restrict Access to Kernel Message Buffer |
To set the runtime status of the kernel.dmesg_restrict kernel parameter,
run the following command:
$ sudo sysctl -w kernel.dmesg_restrict=1If this is not the system's default value, add the following line to /etc/sysctl.conf :
kernel.dmesg_restrict = 1 |
CCE-26956-3 | 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 disabled at boot.
|
CCE-26969-6 | Ensure SELinux State is Enforcing | The SELinux state should be set to at
system boot time. In the file /etc/selinux/config , add or correct the
following line to configure the system to boot into enforcing mode:
SELINUX= |
CCE-26875-5 | 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=Other policies, such as mls , provide additional security labeling
and greater confinement but are not compatible with many general-purpose
use cases.
|
CCE-26991-0 | 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 the file receives the proper SELinux
security context.
The restorecond service can be enabled with the following command:
$ sudo chkconfig --level 2345 restorecond on |
CCE- | Uninstall setroubleshoot Package | The SETroubleshoot service notifies desktop users of SELinux
denials. The service provides information around configuration errors,
unauthorized intrusions, and other potential errors.
The setroubleshoot package can be removed with the following command:
$ sudo yum erase setroubleshoot |
CCE- | Uninstall mcstrans Package | The mcstransd daemon provides category label information
to client processes requesting information. The label translations are defined
in /etc/selinux/targeted/setrans.conf .
The mcstrans package can be removed with the following command:
$ sudo yum erase mcstrans |
CCE-27111-4 | 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: $ sudo 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-26774-0 | Ensure No Device Files are Unknown to SELinux | Device files, which are used for communication with important
system resources, should be labeled with proper SELinux types. If any device
files carry the SELinux type device_t , report the bug so that policy can be corrected. Supply information about what the device is and what programs use it.
|
CCE-26891-2 | Direct root Logins Not Allowed | To further limit access to the root account, administrators
can disable root logins at the console by editing the /etc/securetty file.
This file lists all devices the root user is allowed to login to. If the file does
not exist at all, the root user can login through any communication device on the
system, whether via the console or via a raw network interface. This is dangerous
as user can login to his machine as root via Telnet, which sends the password in
plain text over the network. By default, Red Hat Enteprise Linux's
/etc/securetty file only allows the root user to login at the console
physically attached to the machine. To prevent root from logging in, remove the
contents of this file. To prevent direct root logins, remove the contents of this
file by typing the following command:
$ sudo echo > /etc/securetty |
CCE-26855-7 | 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 |
CCE-27047-0 | 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 |
CCE-26795-5 | Restrict Web Browser Use for Administrative Accounts | Enforce policy requiring administrative accounts use web browsers only for local service administration. |
CCE-26966-2 | 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,
they should not be granted access to a shell.
The login shell for each local account is stored in the last field of each line in /etc/passwd . System accounts are those user accounts with a user ID less than
500. The user ID is stored in the third field.
If any system account SYSACCT (other than root) has a login shell,
disable it with the command:
$ sudo usermod -s /sbin/nologin SYSACCT |
CCE-26971-2 | 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. |
CCE-27125-4 | Root Path Must Be Vendor Default |
Assuming root shell is bash, edit the following files:
~/.profile ~/.bashrcChange any PATH variables to the vendor default for root and remove any
empty PATH entries or references to relative paths.
|
CCE-27038-9 | 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
onto the account without authentication. Remove any instances of the nullok
option in /etc/pam.d/system-auth to
prevent logins with empty passwords.
|
CCE-26476-2 | 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.
|
CCE-27379-7 | All GIDs referenced in /etc/passwd must be defined in /etc/group | Add a group to the system for each GID referenced without a corresponding group. |
CCE-27225-2 | 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-27002-5 | 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 The DoD requirement is 14 .
The FISMA requirement is 12 .
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.
|
CCE-27013-2 | 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:
PASS_MIN_DAYSA value of 1 day is considered for sufficient for many environments. The DoD requirement is 1. |
CCE-26985-2 | 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:
PASS_MAX_DAYSA value of 180 days is sufficient for many environments. The DoD requirement is 60. |
CCE-26988-6 | 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_AGEThe DoD requirement is 7. |
CCE-27283-1 | 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/default/useradd , substituting
NUM_DAYS appropriately:
INACTIVE=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-27609-7 | Ensure All Accounts on the System Have Unique Names | Change usernames, or delete accounts, so each has a unique name. |
CCE-27474-6 | Assign Expiration Date to Temporary Accounts |
In the event temporary or emergency accounts are required, configure the system
to terminate them after a documented time period. For every temporary and
emergency account, run the following command to set an expiration date on it,
substituting USER and YYYY-MM-DD appropriately:
$ sudo chage -E YYYY-MM-DD USER YYYY-MM-DD indicates the documented expiration date for the account.
|
CCE-27291-4 | Set Last Login/Access Notification | To configure the system to notify users of last login/access
using pam_lastlog , add the following line immediately after session required pam_limits.so :
session required pam_lastlog.so showfailed |
CCE-27123-9 | Set Password Retry Prompts Permitted Per-Session | To configure the number of retry prompts that are permitted per-session:
Edit the pam_cracklib.so statement in /etc/pam.d/system-auth to
show retry= , or a lower value if site policy is more restrictive.
The DoD requirement is a maximum of 3 prompts per session. |
CCE-27227-8 | Set Password to Maximum of Three Consecutive Repeating Characters | The pam_cracklib module's maxrepeat parameter controls requirements for
consecutive repeating characters. When set to a positive number, it will reject passwords
which contain more than that number of consecutive characters. Add maxrepeat=
after pam_cracklib.so to prevent a run of ( + 1) or more identical characters:password required pam_cracklib.so maxrepeat= |
CCE-26374-9 | 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.
Add dcredit=-1 after pam_cracklib.so to require use of a digit in passwords.
|
CCE-26615-5 | Set Password Minimum Length | The pam_cracklib module's minlen parameter controls requirements for
minimum characters required in a password. Add minlen=
after pam_pwquality to set minimum password length requirements.
|
CCE-26601-5 | 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.
Add ucredit=-1 after pam_cracklib.so to require use of an upper case character in passwords.
|
CCE-26409-3 | 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.
Add ocredit= after pam_cracklib.so to require use of a special character in passwords.
|
CCE-26631-2 | 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.
Add lcredit=-1 after pam_cracklib.so to require use of a lowercase character in passwords.
|
CCE-26615-5 | Set Password Strength Minimum Different Characters | The pam_cracklib module's difok parameter controls requirements for
usage of different characters during a password change.
Add difok= after pam_cracklib.so to require differing
characters when changing passwords. The DoD requirement is 4 .
|
CCE-27115-5 | Set Password Strength Minimum Different Categories | The pam_cracklib module's minclass parameter controls requirements for
usage of different character classes, or types, of character that must exist in a password
before it is considered valid. For example, setting this value to three (3) requires that
any password must have characters from at least three different categories in order to be
approved. The default value is zero (0), meaning there are no required classes. There are
four categories available:
* Upper-case characters * Lower-case characters * Digits * Special characters (for example, punctuation)Add minclass= after pam_cracklib.so entry into the
/etc/pam.d/system-auth file in order to require differing categories of
characters when changing passwords.
For example to require at least three character classes to be used in password, use minclass=3 .
|
CCE-26844-1 | Set Deny For Failed Password Attempts |
To configure the system to lock out accounts after a number of incorrect login
attempts using pam_faillock.so , modify the content of both
/etc/pam.d/system-auth and /etc/pam.d/password-auth as follows:
|
CCE-27110-6 | Set Lockout Time For Failed Password Attempts |
To configure the system to lock out accounts after a number of incorrect login
attempts and require an administrator to unlock the account using pam_faillock.so ,
modify the content of both /etc/pam.d/system-auth and /etc/pam.d/password-auth as follows:
|
CCE-27215-3 | Set Interval For Counting Failed Password Attempts |
Utilizing pam_faillock.so , the fail_interval directive configures the system to lock out accounts after a number of incorrect login
attempts. Modify the content of both /etc/pam.d/system-auth and /etc/pam.d/password-auth as follows:
|
CCE-26741-9 | Limit Password Reuse | Do not allow users to reuse recent passwords. This can be
accomplished by using the remember option for the pam_unix
or pam_pwhistory PAM modules. In the file
/etc/pam.d/system-auth , append remember=
to the line which refers to the pam_unix.so or
pam_pwhistory.so module, as shown below:
|
CCE-26303-8 | Set Password Hashing Algorithm in /etc/pam.d/system-auth |
In /etc/pam.d/system-auth , the password section of
the file controls which PAM modules execute during a password change.
Set the pam_unix.so module in the
password section to include the argument sha512 , as shown below:
password sufficient pam_unix.so sha512 other arguments...This will help ensure when local users change their passwords, hashes for the new passwords will be generated using the SHA-512 algorithm. This is the default. |
CCE-27228-6 | Set Password Hashing Algorithm in /etc/login.defs |
In /etc/login.defs , add or correct the following line to ensure
the system will use SHA-512 as the hashing algorithm:
ENCRYPT_METHOD SHA512 |
CCE-27229-4 | Set Password Hashing Algorithm in /etc/libuser.conf |
In /etc/libuser.conf , add or correct the following line in its
[defaults] section to ensure the system will use the SHA-512
algorithm for password hashing:
crypt_style = sha512 |
CCE-27457-1 | 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. The DoD requirement is 10. To set the number of concurrent
sessions per user add the following line in /etc/security/limits.conf :
* hard maxlogins |
CCE-26826-8 | 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::/sbinThese empty elements have the same effect as a single . character.
|
CCE-26768-2 | Ensure that Root's Path Does Not Include World or Group-Writable Directories |
For each element in root's path, run:
$ sudo ls -ld DIRand ensure that write permissions are disabled for group and other. |
CCE-26981-1 | Ensure that User Home Directories are not Group-Writable or World-Readable | For each human user of the system, view the
permissions of the user's home directory:
$ sudo ls -ld /home/USEREnsure that the directory is not group-writable and that it is not world-readable. If necessary, repair the permissions: $ sudo chmod g-w /home/USER $ sudo chmod o-rwx /home/USER |
CCE-26917-5 | 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 |
CCE-27034-8 | 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 |
CCE-26669-2 | 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 |
CCE-26371-5 | 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 |
CCE-26995-1 | Verify /etc/grub.conf User Ownership | The file /etc/grub.conf should
be owned by the root user to prevent destruction
or modification of the file.
To properly set the owner of /etc/grub.conf , run the command:
$ sudo chown root /etc/grub.conf |
CCE-27022-3 | Verify /etc/grub.conf Group Ownership | The file /etc/grub.conf should
be group-owned by the root group to prevent
destruction or modification of the file.
To properly set the group owner of /etc/grub.conf , run the command:
$ sudo chgrp root /etc/grub.conf |
CCE-26949-8 | 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:
$ sudo chmod 600 /boot/grub/grub.conf |
CCE-26911-8 | 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 the following command:
$ grub-crypt --sha-512When 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-hashNOTE: To meet FISMA Moderate, the bootloader password MUST differ from the root password. |
CCE-27040-5 | 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 |
CCE-27567-7 | Disable Ctrl-Alt-Del Reboot Activation |
By default, the system includes the following line in
/etc/init/control-alt-delete.conf
to reboot the system when the Ctrl-Alt-Del key sequence is pressed:
exec /sbin/shutdown -r now "Control-Alt-Delete pressed" To configure the system to log a message instead of rebooting the system, alter that line to read as follows: exec /usr/bin/logger -p security.info "Control-Alt-Delete pressed" |
CCE-27043-9 | Disable Interactive Boot |
To disable the ability for users to perform interactive startups, perform both
of the following:
PROMPT option of the /etc/sysconfig/init file and
the confirm kernel boot argument of the /etc/grub.conf file
allow 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.
|
CCE-26828-4 | Set GNOME Login Inactivity Timeout |
Run the following command to set the idle time-out value for
inactivity in the GNOME desktop to minutes:
$ sudo gconftool-2 \ --direct \ --config-source xml:readwrite:/etc/gconf/gconf.xml.mandatory \ --type int \ --set /desktop/gnome/session/idle_delay |
CCE-26600-7 | GNOME Desktop Screensaver Mandatory Use |
Run the following command to activate the screensaver
in the GNOME desktop after a period of inactivity:
$ sudo gconftool-2 --direct \ --config-source xml:readwrite:/etc/gconf/gconf.xml.mandatory \ --type bool \ --set /apps/gnome-screensaver/idle_activation_enabled true |
CCE-26235-2 | Enable Screen Lock Activation After Idle Period |
Run the following command to activate locking of the screensaver
in the GNOME desktop when it is activated:
$ sudo gconftool-2 --direct \ --config-source xml:readwrite:/etc/gconf/gconf.xml.mandatory \ --type bool \ --set /apps/gnome-screensaver/lock_enabled true |
CCE-26638-7 | Implement Blank Screensaver |
Run the following command to set the screensaver mode
in the GNOME desktop to a blank screen:
$ sudo gconftool-2 --direct \ --config-source xml:readwrite:/etc/gconf/gconf.xml.mandatory \ --type string \ --set /apps/gnome-screensaver/mode blank-only |
CCE-26940-7 | Install the screen Package |
To enable console screen locking, install the screen package:
$ sudo yum install screenInstruct users to begin new terminal sessions with the following command: $ screenThe console can now be locked with the following key combination: ctrl+a x |
CCE-27440-7 | Enable Smart Card Login |
To enable smart card authentication, consult the documentation at:
|
CCE-26974-6 | Modify the System Login Banner |
To configure the system login banner:
Edit /etc/issue . Replace the default text with a message
compliant with the local site policy or a legal disclaimer.
The DoD required text is either:
You are accessing a U.S. Government (USG) Information System (IS) that is
provided for USG-authorized use only. By using this IS (which includes any
device attached to this IS), you consent to the following conditions:
OR: Use of this or any other DoD interest computer system constitutes consent to monitoring at all times.
OR: I've read & consent to terms in IS user agreem't.
|
CCE-27195-7 | Enable GUI Warning Banner |
To enable displaying a login warning banner in the GNOME
Display Manager's login screen, run the following command:
$ sudo gconftool-2 --direct \ --config-source xml:readwrite:/etc/gconf/gconf.xml.mandatory \ --type bool \ --set /apps/gdm/simple-greeter/banner_message_enable trueTo display a banner, this setting must be enabled and then banner text must also be set. |
CCE-27017-3 | Set GUI Warning Banner Text |
To set the text shown by the GNOME Display Manager
in the login screen, run the following command:
$ sudo gconftool-2 --direct \ --config-source xml:readwrite:/etc/gconf/gconf.xml.mandatory \ --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 either to the /etc/gconf/gconf.xml.mandatory/%gconf-tree.xml
if it exists or to the file /etc/gconf/gconf.xml.mandatory/apps/gdm/simple-greeter/%gconf.xml .
Either of these files can later be edited directly if necessary.
|
CCE-27230-2 | Disable the User List | In the default graphical environment, users logging
directly into the system are greeted with a login screen that displays
all known users. This functionality should be disabled.
Run the following command to disable the user list: $ sudo gconftool-2 --direct \ --config-source xml:readwrite:/etc/gconf/gconf.xml.mandatory \ --type bool \ --set /apps/gdm/simple-greeter/disable_user_list true |
CCE-27151-0 | 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.254.0.0
subnet, add or correct the following line in /etc/sysconfig/network :
NOZEROCONF=yes |
CCE-27152-8 | 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 |
CCE-27001-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:
$ sudo sysctl -w net.ipv4.conf.default.send_redirects=0If this is not the system's default value, add the following line to /etc/sysctl.conf :
net.ipv4.conf.default.send_redirects = 0 |
CCE-27004-1 | 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:
$ sudo sysctl -w net.ipv4.conf.all.send_redirects=0If this is not the system's default value, add the following line to /etc/sysctl.conf :
net.ipv4.conf.all.send_redirects = 0 |
CCE-26866-4 | Disable Kernel Parameter for IP Forwarding |
To set the runtime status of the net.ipv4.ip_forward kernel parameter,
run the following command:
$ sudo sysctl -w net.ipv4.ip_forward=0If this is not the system's default value, add the following line to /etc/sysctl.conf :
net.ipv4.ip_forward = 0 |
CCE-27037-1 | Configure 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:
$ sudo sysctl -w net.ipv4.conf.all.accept_source_route=0If this is not the system's default value, add the following line to /etc/sysctl.conf :
net.ipv4.conf.all.accept_source_route = 0 |
CCE-27027-2 | Configure 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:
$ sudo sysctl -w net.ipv4.conf.all.accept_redirects=0If this is not the system's default value, add the following line to /etc/sysctl.conf :
net.ipv4.conf.all.accept_redirects = 0 |
CCE-26854-0 | Configure 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:
$ sudo sysctl -w net.ipv4.conf.all.secure_redirects=0If this is not the system's default value, add the following line to /etc/sysctl.conf :
net.ipv4.conf.all.secure_redirects = 0 |
CCE-27066-0 | Configure 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:
$ sudo sysctl -w net.ipv4.conf.all.log_martians=1If this is not the system's default value, add the following line to /etc/sysctl.conf :
net.ipv4.conf.all.log_martians = 1 |
CCE-26983-7 | Configure 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:
$ sudo sysctl -w net.ipv4.conf.default.accept_source_route=0If this is not the system's default value, add the following line to /etc/sysctl.conf :
net.ipv4.conf.default.accept_source_route = 0 |
CCE-27015-7 | Configure 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:
$ sudo sysctl -w net.ipv4.conf.default.accept_redirects=0If this is not the system's default value, add the following line to /etc/sysctl.conf :
net.ipv4.conf.default.accept_redirects = 0 |
CCE-26831-8 | Configure 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:
$ sudo sysctl -w net.ipv4.conf.default.secure_redirects=0If this is not the system's default value, add the following line to /etc/sysctl.conf :
net.ipv4.conf.default.secure_redirects = 0 |
CCE-26883-9 | Configure 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:
$ sudo sysctl -w net.ipv4.icmp_echo_ignore_broadcasts=1If this is not the system's default value, add the following line to /etc/sysctl.conf :
net.ipv4.icmp_echo_ignore_broadcasts = 1 |
CCE-26993-6 | Configure 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:
$ sudo sysctl -w net.ipv4.icmp_ignore_bogus_error_responses=1If this is not the system's default value, add the following line to /etc/sysctl.conf :
net.ipv4.icmp_ignore_bogus_error_responses = 1 |
CCE-27053-8 | Configure Kernel Parameter to Use TCP Syncookies |
To set the runtime status of the net.ipv4.tcp_syncookies kernel parameter,
run the following command:
$ sudo sysctl -w net.ipv4.tcp_syncookies=1If this is not the system's default value, add the following line to /etc/sysctl.conf :
net.ipv4.tcp_syncookies = 1 |
CCE-26979-5 | Configure 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:
$ sudo sysctl -w net.ipv4.conf.all.rp_filter=1If this is not the system's default value, add the following line to /etc/sysctl.conf :
net.ipv4.conf.all.rp_filter = 1 |
CCE-26915-9 | Configure 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:
$ sudo sysctl -w net.ipv4.conf.default.rp_filter=1If this is not the system's default value, add the following line to /etc/sysctl.conf :
net.ipv4.conf.default.rp_filter = 1 |
CCE-26878-9 | Disable WiFi or Bluetooth in 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. |
CCE-27057-9 | 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 -aAdditionally, the following command may be used to determine whether wireless support is included for a particular interface, though this may not always be a clear indicator: $ iwconfigAfter identifying any wireless interfaces (which may have names like wlan0 , ath0 , wifi0 , em1 or
eth0 ), deactivate the interface with the command:
$ sudo ifdown interfaceThese 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 :
$ sudo rm /etc/sysconfig/network-scripts/ifcfg-interface |
CCE-27081-9 | Disable Bluetooth Service |
The bluetooth service can be disabled with the following command:
$ sudo chkconfig bluetooth off $ sudo service bluetooth stop |
CCE-26763-3 | 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 bluetooth /bin/true |
CCE-27153-6 | Disable IPv6 Networking Support Automatic Loading | To prevent the IPv6 kernel module (ipv6 ) from binding to the
IPv6 networking stack, add the following line to
/etc/modprobe.d/disabled.conf (or another file in
/etc/modprobe.d ):
options ipv6 disable=1This permits the IPv6 module to be loaded (and thus satisfy other modules that depend on it), while disabling support for the IPv6 protocol. |
CCE-27161-9 | Disable Interface Usage of IPv6 | To disable interface usage of IPv6, add or correct the following lines in /etc/sysconfig/network :
NETWORKING_IPV6=no IPV6INIT=no |
CCE-27232-8 | 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-27164-3 | Configure Accepting IPv6 Router Advertisements |
To set the runtime status of the net.ipv6.conf.default.accept_ra kernel parameter,
run the following command:
$ sudo sysctl -w net.ipv6.conf.default.accept_ra=0If this is not the system's default value, add the following line to /etc/sysctl.conf :
net.ipv6.conf.default.accept_ra = 0 |
CCE-27166-8 | Configure Accepting IPv6 Redirects |
To set the runtime status of the net.ipv6.conf.default.accept_redirects kernel parameter,
run the following command:
$ sudo sysctl -w net.ipv6.conf.default.accept_redirects=0If this is not the system's default value, add the following line to /etc/sysctl.conf :
net.ipv6.conf.default.accept_redirects = 0 |
CCE-27233-6 | Manually Assign Global IPv6 Address | To manually assign an IP address for an interface, edit the
file /etc/sysconfig/network-scripts/ifcfg-interface . Add or correct the
following line (substituting the correct IPv6 address):
IPV6ADDR=2001:0DB8::ABCD/64Manually 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-27154-4 | 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-interface :
IPV6_PRIVACY=rfc3041Automatically-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. |
CCE-27234-4 | Manually Assign IPv6 Router Address | Edit the file
/etc/sysconfig/network-scripts/ifcfg-interface , and add or correct
the following line (substituting your gateway IP as appropriate):
IPV6_DEFAULTGW=2001:0DB8::0001Router addresses should be manually set and not accepted via any auto-configuration or router advertisement. |
CCE-27006-6 | Verify ip6tables Enabled if Using IPv6 |
The ip6tables service can be enabled with the following command:
$ sudo chkconfig --level 2345 ip6tables on |
CCE-27317-7 | Set Default ip6tables 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/ip6tables :
:INPUT DROP [0:0]If changes were required, reload the ip6tables rules: $ sudo service ip6tables reload |
CCE-27018-1 | Verify iptables Enabled |
The iptables service can be enabled with the following command:
$ sudo chkconfig --level 2345 iptables on |
CCE-26444-0 | 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] |
CCE-27186-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] |
CCE-26448-1 | 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 |
CCE-26410-1 | 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 |
CCE-26239-4 | 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 |
CCE-26696-5 | 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 |
CCE-27626-1 | Install openswan or libreswan Package | The openswan and libreswan packages provide 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:
$ sudo yum install openswanThe libreswan package can be installed with the following command:
$ sudo yum install libreswan |
CCE-26809-4 | Ensure rsyslog is Installed |
Rsyslog is installed by default.
The rsyslog package can be installed with the following command:
$ sudo yum install rsyslog |
CCE-26807-8 | Enable rsyslog Service | The rsyslog service provides syslog-style logging by default on Red Hat Enterprise Linux 6.
The rsyslog service can be enabled with the following command:
$ sudo chkconfig --level 2345 rsyslog on |
CCE-26812-8 | 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 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 owner:
$ ls -l LOGFILEIf the owner is not root , run the following command to
correct this:
$ sudo chown root LOGFILE |
CCE-26821-9 | 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 LOGFILEIf the owner is not root , run the following command to
correct this:
$ sudo chgrp root LOGFILE |
CCE-27190-8 | 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 LOGFILEIf the permissions are not 600 or more restrictive, run the following command to correct this: $ sudo chmod 0600 LOGFILE |
CCE-26801-1 | 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 |
CCE-26803-7 | 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 $InputTCPServerRun port $ModLoad imudp $UDPServerRun port $ModLoad imrelp $InputRELPServerRun port |
CCE-27235-1 | 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 $InputTCPServerRun 514 |
CCE-27236-9 | 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 $UDPServerRun 514 |
CCE-27014-0 | Ensure Logrotate Runs Periodically | The logrotate utility allows for the automatic rotation of
log files. The frequency of rotation is specified in /etc/logrotate.conf ,
which triggers a cron task. To configure logrotate to run daily, add or correct
the following line in /etc/logrotate.conf :
# rotate log files frequency daily |
CCE-27197-3 | 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 |
CCE-27069-4 | 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 |
CCE-27162-7 | 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:
$ sudo rm /etc/cron.daily/0logwatchIf 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-27058-7 | 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:
$ sudo chkconfig --level 2345 auditd on |
CCE-26785-6 | Enable Auditing for Processes Which Start Prior to the Audit Daemon | To ensure 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 |
CCE-27522-2 | 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 of :
num_logs = NUMLOGSSet the value to 5 for general-purpose systems. Note that values less than 2 result in no log rotation. |
CCE-27550-3 | 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 of for STOREMB:
max_log_file = STOREMBSet the value to 6 (MB) or higher for general-purpose systems.
Larger values, of course,
support retention of even more audit data. |
CCE-27237-7 | 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 in /etc/audit/auditd.conf :
max_log_file_action = ACTIONPossible values for ACTION are described in the auditd.conf man
page. These include:
ACTION to rotate to ensure log rotation
occurs. This is the default. The setting is case-insensitive.
|
CCE-27238-5 | 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 = ACTIONPossible values for ACTION are described in the auditd.conf man page.
These include:
email (instead of the default,
which is suspend ) as it is more likely to get prompt attention. Acceptable values
also include suspend , single , and halt .
|
CCE-27239-3 | 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 = ACTIONSet this value to single to cause the system to switch to single-user
mode for corrective action. Acceptable values also include suspend and
halt . For certain systems, the need for availability
outweighs the need to log all actions, and a different setting should be
determined. Details regarding all possible values for ACTION are described in the
auditd.conf man page.
|
CCE-27241-9 | 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 = |
Configure auditd flush priority | The auditd service can be configured to
synchronously write audit event data to disk. Add or correct the following
line in /etc/audit/auditd.conf to ensure that audit event data is
fully synchronized with the log files on the disk:
flush = |
|
CCE-26933-2 | Configure auditd to use audispd's syslog plugin | To configure the auditd service to use the
syslog plug-in of the audispd audit event multiplexor, set
the active line in /etc/audisp/plugins.d/syslog.conf to
yes . Restart the auditd service:
$ sudo service auditd restart |
CCE-26242-8 | 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_rulesOn 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_rulesThe -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 -k audit_time_rules |
CCE-27203-9 | 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_rulesOn 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_rulesThe -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 -k audit_time_rules |
CCE-27169-2 | Record Attempts to Alter Time Through stime | Add the following line to /etc/audit/audit.rules for both
32-bit and 64-bit systems:
# audit_time_rules -a always,exit -F arch=b32 -S stime -k audit_time_rulesSince the 64-bit version of the "stime" system call is not defined in the audit lookup table, the corresponding "-F arch=b64" form of this rule is not expected to be defined on 64-bit systems (the aforementioned "-F arch=b32" stime rule form itself is sufficient for both 32-bit and 64-bit systems). 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 -k audit_time_rules |
CCE-27170-0 | Record Attempts to Alter Time Through clock_settime | On a 32-bit system, add the following to /etc/audit/audit.rules :
# time-change -a always,exit -F arch=b32 -S clock_settime -F a0=0x0 -F key=time-changeOn a 64-bit system, add the following to /etc/audit/audit.rules :
# time-change -a always,exit -F arch=b64 -S clock_settime -F a0=0x0 -F key=time-changeThe -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 -k audit_time_rules |
CCE-27172-6 | Record Attempts to Alter the localtime File | Add the following to /etc/audit/audit.rules :
-w /etc/localtime -p wa -k audit_time_rulesThe -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. |
CCE-26664-3 | 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_rules_usergroup_modification -w /etc/group -p wa -k audit_rules_usergroup_modification -w /etc/passwd -p wa -k audit_rules_usergroup_modification -w /etc/gshadow -p wa -k audit_rules_usergroup_modification -w /etc/shadow -p wa -k audit_rules_usergroup_modification -w /etc/security/opasswd -p wa -k audit_rules_usergroup_modification |
CCE-26648-6 | 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_rules_networkconfig_modification -a always,exit -F arch=ARCH -S sethostname -S setdomainname -k audit_rules_networkconfig_modification -w /etc/issue -p wa -k audit_rules_networkconfig_modification -w /etc/issue.net -p wa -k audit_rules_networkconfig_modification -w /etc/hosts -p wa -k audit_rules_networkconfig_modification -w /etc/sysconfig/network -p wa -k audit_rules_networkconfig_modification |
CCE-27243-5 | System Audit Logs Must Have Mode 0640 or Less Permissive |
If log_group in /etc/audit/auditd.conf is set to a group other than the root
group account, change the mode of the audit log files with the following command:
$ sudo chmod 0640 audit_file Otherwise, change the mode of the audit log files with the following command: $ sudo chmod 0600 audit_file |
CCE-27244-3 | System Audit Logs Must Be Owned By Root |
To properly set the owner of /var/log , run the command:
$ sudo chown root /var/log |
CCE-26657-7 | 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 |
CCE-26280-8 | 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_modIf 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 |
CCE-27173-4 | 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_modIf 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 |
CCE-27174-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_modIf 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 |
CCE-27175-9 | 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_modIf 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 |
CCE-27177-5 | 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_modIf 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 |
CCE-27178-3 | 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_modIf 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 |
CCE-27179-1 | 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_modIf 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 |
CCE-27180-9 | 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_modIf 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 |
CCE-27181-7 | 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_modIf 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 |
CCE-27182-5 | 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_modIf 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 |
CCE-27183-3 | 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_modIf 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 |
CCE-27184-1 | 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_modIf 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 |
CCE-27185-8 | 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_modIf 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 |
CCE-26691-6 | Record Attempts to Alter Login 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 login events, add the following to /etc/audit/audit.rules :
-w /var/log/tallylog -p wa -k logins -w /var/run/faillock/ -p wa -k logins -w /var/log/lastlog -p wa -k logins |
CCE-26610-6 | 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 |
CCE-26712-0 | 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 :
-a always,exit -F arch=b32 -S creat -S open -S openat -S open_by_handle_at -S truncate -S ftruncate -F exit=-EACCES -F auid>=500 -F auid!=4294967295 -k access -a always,exit -F arch=b32 -S creat -S open -S openat -S open_by_handle_at -S truncate -S ftruncate -F exit=-EPERM -F auid>=500 -F auid!=4294967295 -k accessIf the system is 64 bit then also add the following: -a always,exit -F arch=b64 -S creat -S open -S openat -S open_by_handle_at -S truncate -S ftruncate -F exit=-EACCES -F auid>=500 -F auid!=4294967295 -k access -a always,exit -F arch=b64 -S creat -S open -S openat -S open_by_handle_at -S truncate -S ftruncate -F exit=-EPERM -F auid>=500 -F auid!=4294967295 -k access |
CCE-26457-2 | 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 / setgid programs, run the following command
for each local partition PART:
$ sudo find PART -xdev -type f -perm -4000 -o -type f -perm -2000 2>/dev/nullThen, for each setuid / setgid 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 / setgid program
in the list:
-a always,exit -F path=SETUID_PROG_PATH -F perm=x -F auid>=500 -F auid!=4294967295 -k privileged |
CCE-26573-6 | 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 |
CCE-26651-0 | 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 rmdir -S unlink -S unlinkat -S rename -S renameat -F auid>=500 -F auid!=4294967295 -k delete |
CCE-26662-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 |
CCE-26611-4 | 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, setting ARCH to either b32 or b64 as appropriate for your system:
-w /sbin/insmod -p x -k modules -w /sbin/rmmod -p x -k modules -w /sbin/modprobe -p x -k modules -a always,exit -F arch=ARCH -S init_module -S delete_module -k modules |
CCE-26612-2 | Make the auditd Configuration Immutable | Add the following to /etc/audit/audit.rules in order
to make the configuration immutable:
-e 2With this setting, a reboot will be required to change any audit rules. |
CCE-27046-2 | Disable xinetd Service |
The xinetd service can be disabled with the following command:
$ sudo chkconfig xinetd off |
CCE-27005-8 | Uninstall xinetd Package | The xinetd package can be uninstalled with the following command:
$ sudo yum erase xinetd |
CCE-26836-7 | Disable telnet Service |
The telnet service can be disabled with the following command:
$ sudo chkconfig telnet off |
CCE-27073-6 | Uninstall telnet-server Package | The telnet-server package can be uninstalled with
the following command:
$ sudo yum erase telnet-server |
CCE- | Remove telnet Clients | The telnet client allows users to start connections to other systems via the telnet protocol. |
CCE-27062-9 | Uninstall rsh-server Package | The rsh-server package can be uninstalled with
the following command:
$ sudo yum erase rsh-server |
CCE-27208-8 | 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:
$ sudo chkconfig rexec off |
CCE-26994-4 | 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:
$ sudo chkconfig rsh off |
CCE- | Uninstal rsh Package | The rsh package contains the client commands
for the rsh services |
CCE-26865-6 | 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:
$ sudo chkconfig rlogin off |
CCE-27270-8 | 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:
$ sudo rm /etc/hosts.equiv $ rm ~/.rhosts |
CCE-27079-3 | Uninstall ypserv Package | The ypserv package can be uninstalled with
the following command:
$ sudo yum erase ypserv |
CCE-26894-6 | 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:
$ sudo chkconfig ypbind off |
CCE- | Remove NIS Client | The Network Information Service (NIS), formerly known as Yellow Pages,
is a client-server directory service protocol used to distribute system configuration
files. The NIS client (ypbind ) was used to bind a machine to an NIS server
and receive the distributed configuration files. |
CCE-27055-3 | Disable tftp Service | The tftp service should be disabled.
The tftp service can be disabled with the following command:
$ sudo chkconfig tftp off |
CCE-26946-4 | Uninstall tftp-server Package |
The tftp-server package can be removed with the following command:
$ sudo yum erase tftp-server |
CCE- | Remove tftp | Trivial File Transfer Protocol (TFTP) is a simple file transfer protocol,
typically used to automatically transfer configuration or boot files between machines.
TFTP does not support authentication and can be easily hacked. The package
tftp is a client program that allows for connections to a tftp server.
|
CCE-27272-4 | 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
/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- | Uninstall talk-server Package |
The talk-server package can be removed with the following command:
$ sudo yum erase talk-server |
CCE- | Uninstall talk Package | The talk package contains the client program for the
Internet talk protocol, which allows the user to chat with other users on
different systems. Talk is a communication program which copies lines from one
terminal to the terminal of another user.
|
CCE-27247-6 | 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:
$ sudo chkconfig abrtd off |
CCE-27061-1 | 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:
$ sudo chkconfig acpid off |
CCE-27267-4 | 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:
$ sudo chkconfig certmonger off |
CCE-27250-0 | 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:
$ sudo chkconfig cgconfig off |
CCE-27252-6 | 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:
$ sudo chkconfig cgred off |
CCE-26973-8 | 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:
$ sudo chkconfig cpuspeed off |
CCE-27086-8 | 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:
$ sudo chkconfig haldaemon off |
CCE-26990-2 | 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:
$ sudo chkconfig --level 2345 irqbalance on |
CCE-26850-8 | 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:
$ sudo chkconfig kdump off |
CCE-27193-2 | Disable Software RAID Monitor (mdmonitor) | The mdmonitor service is used for monitoring a software RAID array; hardware
RAID setups do not use this service.
The mdmonitor service can be disabled with the following command:
$ sudo chkconfig mdmonitor off |
CCE-26913-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:
$ sudo chkconfig messagebus off |
CCE-27254-2 | 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:
$ sudo chkconfig netconsole off |
CCE-27256-7 | 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:
$ sudo chkconfig ntpdate off |
CCE-27257-5 | 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:
$ sudo chkconfig oddjobd off |
CCE-27258-3 | 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:
$ sudo chkconfig portreserve off |
CCE-27259-1 | 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:
$ sudo chkconfig --level 2345 psacct on |
CCE-26928-2 | 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:
$ sudo chkconfig qpidd off |
CCE-27260-9 | 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:
$ sudo chkconfig quota_nld off |
CCE-27261-7 | 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:
$ sudo chkconfig rdisc off |
CCE-26846-6 | 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:
$ sudo chkconfig rhnsd off |
CCE-27262-5 | 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:
$ sudo chkconfig rhsmcertd off |
CCE-27263-3 | 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:
$ sudo chkconfig saslauthd off |
CCE-26853-2 | 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:
$ sudo chkconfig smartd off |
CCE-27265-8 | 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:
$ sudo chkconfig sysstat off |
CCE-27070-2 | 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:
$ sudo chkconfig --level 2345 crond on |
CCE-27158-5 | Disable anacron Service | The cronie-anacron package, which provides anacron
functionality, is installed by default.
The cronie-anacron package can be removed with the following command:
$ sudo yum erase cronie-anacron |
CCE-27249-2 | 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:
$ sudo chkconfig atd off |
CCE-27054-6 | 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:
$ sudo chkconfig sshd offThis is unusual, as SSH is a common method for encrypted and authenticated remote access. |
CCE-27060-3 | 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 INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPTThis is unusual, as SSH is a common method for encrypted and authenticated remote access. |
CCE-27072-8 | 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 |
CCE-27556-0 | 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 USER2Where USER1 and USER2 are valid user names.
|
CCE-26919-1 | 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:
ClientAliveIntervalThe 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. |
CCE-26282-4 | Set SSH Client Alive Count | To ensure the SSH idle timeout occurs precisely when the ClientAliveCountMax is set,
edit /etc/ssh/sshd_config as
follows:
ClientAliveCountMax 0 |
CCE-27124-7 | 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 this behavior is disabled, add or correct the following line in /etc/ssh/sshd_config :
IgnoreRhosts yes |
CCE-27091-8 | Disable Host-Based Authentication | SSH's cryptographic host-based authentication is
more secure than .rhosts authentication. 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 in /etc/ssh/sshd_config :
HostbasedAuthentication no |
CCE-27100-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
in /etc/ssh/sshd_config :
PermitRootLogin no |
CCE-26887-0 | Disable SSH Access via Empty Passwords | To explicitly disallow remote login from accounts with
empty passwords, add or correct the following line in
/etc/ssh/sshd_config :
PermitEmptyPasswords noAny accounts with empty passwords should be disabled immediately, and PAM configuration should prevent users from being able to assign themselves empty passwords. |
CCE-27112-2 | 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/issueAnother section contains information on how to create an appropriate system-wide warning banner. |
CCE-27201-3 | 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 |
CCE-26555-3 | 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:
Ciphers aes128-ctr,aes192-ctr,aes256-ctr,aes128-cbc,3des-cbc,aes192-cbc,aes256-cbcThe man page sshd_config(5) contains a list of supported ciphers.
|
Use Only Approved MACs | Limit the MACs to those hash algorithms which are FIPS-approved.
The following line in /etc/ssh/sshd_config
demonstrates use of FIPS-approved MACs:
MACs hmac-sha2-512,hmac-sha2-256,hmac-sha1The man page sshd_config(5) contains a list of supported MACs.
|
|
CCE-27119-7 | 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 the following line in /etc/inittab
features a 3 as shown:
id:3:initdefault: |
CCE-27198-1 | Remove the X Windows Package Group | Removing all packages which constitute the X Window System
ensures users or malicious software cannot start X.
To do so, run the following command:
$ sudo yum groupremove "X Window System" |
CCE-27087-6 | Disable Avahi Server Software |
The avahi-daemon service can be disabled with the following command:
$ sudo chkconfig avahi-daemon off |
CCE-27590-9 | 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=noSimilarly, if you are using only IPv6, disable IPv4 sockets with the line: use-ipv4=no |
CCE-27340-9 | 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 |
CCE-27308-6 | 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 |
CCE-27526-3 | Disable Avahi Publishing |
To prevent Avahi from publishing its records, edit /etc/avahi/avahi-daemon.conf
and ensure the following line appears in the [publish] section:
disable-publishing=yes |
CCE-27300-3 | Restrict Information Published by Avahi |
If it is necessary to publish some information to the network, it should not be joined
by any extraneous information, or by information supplied by a non-trusted source
on the system.
Prevent user applications from using Avahi to publish services by adding or
correcting the following line in the [publish] section:
disable-user-service-publishing=yesImplement as many of the following lines as possible, to restrict the information published by Avahi. publish-addresses=no publish-hinfo=no publish-workstation=no publish-domain=noInspect the files in the directory /etc/avahi/services/ . Unless there
is an operational need to publish information about each of these services,
delete the corresponding file.
|
CCE-26899-5 | Disable the CUPS Service |
The cups service can be disabled with the following command:
$ sudo chkconfig cups off |
CCE-27108-0 | 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 |
CCE-27107-2 | 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 631and replacing it with the Listen directive:
Listen localhost:631This will prevent remote users from printing to locally configured printers while still allowing local users on the machine to print normally. |
CCE-27074-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:
$ sudo chkconfig dhcpd off |
CCE-27120-5 | 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:
$ sudo yum erase dhcp |
CCE-27049-6 | Do Not Use Dynamic DNS | To prevent the DHCP server from receiving DNS information from
clients, edit /etc/dhcp/dhcpd.conf , and add or correct the following global
option: ddns-update-style none; |
CCE-27106-4 | Deny Decline Messages | Edit /etc/dhcp/dhcpd.conf and add or correct the following
global option to prevent the DHCP server from responding the DHCPDECLINE
messages, if possible: deny declines; |
CCE-27077-7 | 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; |
Minimize Served Information | Edit /etc/dhcp/dhcpd.conf. Examine each address range section within
the file, and ensure that the following options are not defined unless there is
an operational need to provide this information via DHCP:
option domain-name option domain-name-servers option nis-domain option nis-servers option ntp-servers option routers option time-offset |
|
CCE-26898-7 | Configure Logging | Ensure that the following line exists in
/etc/rsyslog.conf :
daemon.* /var/log/daemon.logConfigure logwatch or other log monitoring tools to summarize error conditions reported by the dhcpd process. |
CCE-27021-5 | Disable DHCP Client |
For each interface on the system (e.g. eth0), edit
/etc/sysconfig/network-scripts/ifcfg-interface and make the
following changes:
|
Minimize the DHCP-Configured Options | Create the file /etc/dhcp/dhclient.conf , and add an
appropriate setting for each of the ten configuration settings which can be
obtained via DHCP. For each setting, do one of the following:
If the setting should not be configured remotely by the DHCP server, select an appropriate static value, and add the line: supersede
If the setting should be configured remotely by the DHCP server, add the lines:
requestFor example, suppose the DHCP server should provide only the IP address itself and the subnet mask. Then the entire file should look like: supersede domain-name "example.com"; supersede domain-name-servers 192.168.1.2; supersede nis-domain ""; supersede nis-servers ""; supersede ntp-servers "ntp.example.com "; supersede routers 192.168.1.1; supersede time-offset -18000; request subnet-mask; require subnet-mask; |
|
CCE-27093-4 | Enable the NTP Daemon |
The ntpd service can be enabled with the following command:
$ sudo chkconfig --level 2345 ntpd on |
CCE-27098-3 | 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 ntpserverThis instructs the NTP software to contact that remote server to obtain time data. |
CCE-26958-9 | 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-26325-1 | Enable Postfix Service | 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:
$ sudo chkconfig --level 2345 postfix on |
CCE-27515-6 | Uninstall Sendmail Package | Sendmail is not the default mail transfer agent and is
not installed by default.
The sendmail package can be removed with the following command:
$ sudo yum erase sendmail |
CCE-26780-7 | Disable Postfix Network Listening |
Edit the file /etc/postfix/main.cf to ensure that only the following
inet_interfaces line appears:
inet_interfaces = localhost |
CCE-27508-1 | 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 |
CCE-26690-8 | Configure LDAP Client 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_tlsThen review the LDAP server and ensure TLS has been configured. |
CCE-27189-0 | Configure Certificate Directives for LDAP Use of TLS | Ensure a copy of a trusted 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 that CA. First, edit the file
/etc/pam_ldap.conf , and add or correct either of the following lines:
tls_cacertdir /etc/pki/tls/CAor tls_cacertfile /etc/pki/tls/CA/cacert.pemThen review the LDAP server and ensure TLS has been configured. |
CCE-26858-1 | 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.
$ sudo yum erase openldap-serversThe openldap-servers RPM is not installed by default on Red Hat Enterprise Linux 6 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. |
CCE-27104-9 | 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:
$ sudo chkconfig nfslock off |
CCE-26864-9 | 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:
$ sudo chkconfig rpcgssd off |
CCE-26870-6 | 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:
$ sudo chkconfig rpcidmapd off |
CCE-27137-9 | 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:
$ sudo chkconfig netfs off |
CCE-27149-4 | 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-portWhere lockd-port is a port which is not used by any other service on
your network.
|
CCE-27063-7 | 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-portWhere lockd-port is a port which is not used by any other service on
your network.
|
CCE-26889-6 | 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-portWhere statd-port is a port which is not used by any other service on your network.
|
CCE-27114-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-portWhere mountd-port is a port which is not used by any other service on your network.
|
CCE-27414-2 | Specify UID and GID for Anonymous NFS Connections | To specify the UID and GID for remote root users, edit the /etc/exports file and add the following for each export:
anonuid=Note that a value of "-1" is technically acceptable as this will randomize the anonuid and
anongid values on a Red Hat Enterprise Linux 6 based NFS server. While acceptable from a security perspective,
a value of -1 may cause interoperability issues, particularly with Red Hat Enterprise Linux 7 client systems.
|
CCE-27199-9 | 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:
$ sudo chkconfig nfs off |
CCE-27122-1 | 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:
$ sudo chkconfig rpcsvcgssd off |
CCE-27090-0 | Mount Remote Filesystems with nodev |
Add the nodev option to the fourth column of
/etc/fstab for the line which controls mounting of
any NFS mounts.
|
CCE-26972-0 | Mount Remote Filesystems with nosuid |
Add the nosuid option to the fourth column of
/etc/fstab for the line which controls mounting of
any NFS mounts.
|
CCE-27138-7 | 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 .
|
CCE-27121-3 | Restrict NFS Clients to Privileged Ports | By default, the server 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.
To ensure that the default has not been changed, ensure no line in /etc/exports contains the option insecure .
|
CCE-27167-6 | 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-26873-0 | Disable DNS Server |
The named service can be disabled with the following command:
$ sudo chkconfig named off |
CCE-27030-6 | Uninstall bind Package | To remove the bind package, which contains the
named service, run the following command:
$ sudo yum erase bind |
CCE-27528-9 | Disable Zone Transfers from the Nameserver | Is it necessary for a secondary nameserver to receive zone data
via zone transfer from the primary server? If not, follow the instructions in
this section. If so, see the next section for instructions on protecting zone
transfers.
Add or correct the following directive within /etc/named.conf :
options { allow-transfer { none; }; ... } |
CCE-27496-9 | Authenticate Zone Transfers | If it is necessary for a secondary nameserver to receive zone data
via zone transfer from the primary server, follow the instructions here. Use
dnssec-keygen to create a symmetric key file in the current directory:
$ cd /tmp $ sudo dnssec-keygen -a HMAC-MD5 -b 128 -n HOST dns.example.com Kdns.example.com .+aaa +iiiiiThis output is the name of a file containing the new key. Read the file to find the base64-encoded key string: $ sudo cat Kdns.example.com .+NNN +MMMMM .key dns.example.com IN KEY 512 3 157 base64-key-stringAdd the directives to /etc/named.conf on the primary server:
key zone-transfer-key { algorithm hmac-md5; secret "base64-key-string "; }; zone "example.com " IN { type master; allow-transfer { key zone-transfer-key; }; ... };Add the directives below to /etc/named.conf on the secondary nameserver:
key zone-transfer-key { algorithm hmac-md5; secret "base64-key-string "; }; server IP-OF-MASTER { keys { zone-transfer-key; }; }; zone "example.com " IN { type slave; masters { IP-OF-MASTER ; }; ... }; |
CCE-27105-6 | 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; }; ... }; |
CCE-26948-0 | Disable vsftpd Service |
The vsftpd service can be disabled with the following command:
$ sudo chkconfig vsftpd off |
CCE-26687-4 | Uninstall vsftpd Package |
The vsftpd package can be removed with the following command:
$ sudo yum erase vsftpd |
CCE-27187-4 | Install vsftpd Package | If this machine must operate as an FTP server, install the vsftpd package via the standard channels.
$ sudo yum install vsftpd |
CCE-27142-9 | Enable Logging of All FTP Transactions | Add or correct the following configuration options within the vsftpd
configuration file, located at /etc/vsftpd/vsftpd.conf :
xferlog_enable=YES xferlog_std_format=NO log_ftp_protocol=YES |
CCE-27145-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 |
CCE-27115-5 | 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=NOIf non-anonymous FTP logins are necessary, follow the guidance in the remainder of this section to secure these logins as much as possible. |
Limit Users Allowed FTP Access if Necessary | If there is a mission-critical reason for users to access their accounts via the insecure FTP protocol, limit the set of users who are allowed this access. Edit the vsftpd configuration file. Add or correct the following configuration options:
userlist_enable=YES userlist_file=/etc/vsftp.ftpusers userlist_deny=NOEdit the file /etc/vsftp.ftpusers . For each user USERNAME who should be allowed to access the system via FTP, add a line containing that user's name:
USERNAMEIf anonymous access is also required, add the anonymous usernames to /etc/vsftp.ftpusers as well.
anonymous ftp |
|
CCE-27117-1 | 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 to add or correct the following configuration options:
write_enable=NOIf FTP uploads are necessary, follow the guidance in the remainder of this section to secure these transactions as much as possible. |
CCE-27411-8 | 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. |
Configure Firewalls to Protect the FTP Server | By default, iptables
blocks access to the ports used by the web server.
To configure iptables to allow port
21 traffic one must edit
/etc/sysconfig/iptables and
/etc/sysconfig/ip6tables (if IPv6 is in use).
Add the following line, ensuring that it appears before the final LOG
and DROP lines for the INPUT chain:
-A INPUT -m state --state NEW -p tcp --dport 21 -j ACCEPTEdit the file /etc/sysconfig/iptables-config . Ensure that the space-separated list of modules contains
the FTP connection tracking module:
IPTABLES_MODULES="ip_conntrack_ftp" |
|
CCE-27075-1 | Disable httpd Service |
The httpd service can be disabled with the following command:
$ sudo chkconfig httpd off |
CCE-27133-8 | Uninstall httpd Package |
The httpd package can be removed with the following command:
$ sudo yum erase httpd |
CCE-27425-8 | 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 |
CCE-27586-7 | 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 |
CCE-27553-7 | 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 |
CCE-27570-1 | 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 |
CCE-27395-3 | 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.soIf LDAP is to be used, SSL encryption should be used as well. |
CCE-27558-6 | 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.soIf 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.
|
CCE-27541-2 | 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 |
CCE-27329-2 | 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.soIf 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. |
CCE-27468-8 | 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.soIf 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. |
CCE-27507-3 | 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.soIf there is a critical need for this module, use the Location directive to provide
an access control list to restrict access to the information.
|
CCE-27276-5 | 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.soThis functionality weakens server security by making site enumeration easier. |
CCE-27442-3 | 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.soIf 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.
|
CCE-26859-9 | 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.soIf caching is required, it should not be enabled for any limited-access content. |
CCE-27362-3 | 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.soIf the web server requires the use of CGI, enable mod_cgi .
|
CCE-27009-0 | Restrict Root Directory |
The httpd root directory should always have the most restrictive configuration enabled.
<Directory / > Options None AllowOverride None Order allow,deny </Directory> |
CCE-27574-3 | 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> |
CCE-27565-1 | 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.
|
CCE-27581-8 | 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> |
CCE-27403-5 | Install mod_ssl |
Install the mod_ssl module:
$ sudo yum install mod_ssl |
CCE-27525-5 | Install mod_security |
Install the security module:
$ sudo yum install mod_security |
CCE-27150-2 | Set Permissions on the /var/log/httpd/ Directory |
Ensure that the permissions on the web server log directory is set to 700:
$ sudo chmod 700 /var/log/httpd/This is its default setting. |
CCE-27487-8 | Set Permissions on the /etc/httpd/conf/ Directory |
Set permissions on the web server configuration directory to 750:
$ sudo chmod 750 /etc/httpd/conf/ |
CCE-27316-9 | Set Permissions on All Configuration Files Inside /etc/httpd/conf/ |
Set permissions on the web server configuration files to 640:
$ sudo chmod 640 /etc/httpd/conf/* |
CCE-26922-5 | Disable Dovecot Service |
The dovecot service can be disabled with the following command:
$ sudo chkconfig dovecot off |
CCE-27039-7 | Uninstall dovecot Package | The dovecot package can be uninstalled
with the following command:
$ sudo yum erase dovecot |
CCE-27571-9 | 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 |
CCE-27459-7 | Configure Dovecot to Use the SSL Certificate file | This option tells 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 (note: 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 |
CCE-27633-7 | Configure Dovecot to Use the SSL Key file | This option tells 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 (note: 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-27144-5 | 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 |
CCE-27143-7 | Disable Samba |
The smb service can be disabled with the following command:
$ sudo chkconfig smb off |
CCE-27533-9 | Disable Root Access to SMB Shares | 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 @wheelIf administrator accounts cannot be disabled, ensure that local machine passwords and Samba service passwords do not match. |
CCE-26328-5 | 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, /etc/samba/smb.conf :
client signing = mandatoryRequiring samba clients such as smbclient to use packet
signing ensures they can
only communicate with servers that support packet signing.
|
CCE-26792-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 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.
|
CCE-27146-0 | Disable Squid |
The squid service can be disabled with the following command:
$ sudo chkconfig squid off |
CCE-26977-9 | Uninstall squid Package |
The squid package can be removed with the following command:
$ sudo yum erase squid |
CCE-26906-8 | Disable snmpd Service |
The snmpd service can be disabled with the following command:
$ sudo chkconfig snmpd off |
CCE-26332-7 | Uninstall net-snmp Package | The net-snmp package provides the snmpd service.
The net-snmp package can be removed with the following command:
$ sudo yum erase net-snmp |
CCE-27365-6 | Configure SNMP Service to Use Only SNMPv3 or Newer |
Edit /etc/snmp/snmpd.conf , removing any references to rocommunity , rwcommunity , or com2sec .
Upon doing that, restart the SNMP service:
$ sudo service snmpd restart |
CCE-27593-3 | Ensure Default Password Is Not Used |
Edit /etc/snmp/snmpd.conf , remove default community string public .
Upon doing that, restart the SNMP service:
$ sudo service snmpd restart |
Product Meets this Requirement | This requirement is a permanent not a finding. No fix is required. | |
Product Meets this Requirement | This requirement is a permanent not a finding. No fix is required. | |
Product Meets this Requirement | This requirement is a permanent not a finding. No fix is required. | |
Guidance Does Not Meet this Requirement Due to Impracticality or Scope | This requirement is NA. No fix is required. | |
Implementation of the Requirement is Not Supported | This requirement is a permanent finding and cannot be fixed. An appropriate mitigation for the system must be implemented but this finding cannot be considered fixed. | |
Guidance Does Not Meet this Requirement Due to Impracticality or Scope | This requirement is NA. No fix is required. | |
A process for prompt installation of OS updates must exist. | Procedures to promptly apply software updates must be established and executed. The Red Hat operating system provides support for automating such a process, by running the yum program through a cron job or by managing the system and its packages through the Red Hat Network or a Satellite Server. |