Upstream STIG for Red Hat Enterprise Linux 6 Server
This profile is developed under the DoD consensus model and DISA FSO Vendor STIG process, serving as the upstream development environment for the Red Hat Enterprise Linux 6 Server STIG. As a result of the upstream/downstream relationship between the SCAP Security Guide project and the official DISA FSO STIG baseline, users should expect variance between SSG and DISA FSO content. For official DISA FSO STIG content, refer to http://iase.disa.mil/stigs/os/unix-linux/Pages/red-hat.aspx. While this profile is packaged by Red Hat as part of the SCAP Security Guide package, please note that commercial support of this SCAP content is NOT available. This profile is provided as example SCAP content with no endorsement for suitability or production readiness. Support for this profile is provided by the upstream SCAP Security Guide community on a best-effort basis. The upstream project homepage is https://www.open-scap.org/security-policies/scap-security-guide/.


ID Severity Title Discussion (Rationale) Fix Text (Description) Check Text (OCIL Check) SRG Refs CCI Refs 800-53 Refs
partition_for_tmp low Ensure /tmp Located On Separate Partition The /tmp partition is used as temporary storage by many programs. Placing /tmp in its own partition enables the setting of more restrictive mount options, which can help protect programs which use it. 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. CCI-001208
SC-32
partition_for_var low Ensure /var Located On Separate Partition Ensuring that /var is mounted on its own partition enables the setting of more restrictive mount options. This helps protect system services such as daemons or other programs which use it. It is not uncommon for the /var directory to contain world-writable directories installed by other software packages. 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. CCI-001208
SC-32
partition_for_var_log low Ensure /var/log Located On Separate Partition Placing /var/log in its own partition enables better separation between log files and other files in /var/. 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. CCI-001208
SC-32
partition_for_var_log_audit low Ensure /var/log/audit Located On Separate Partition Placing /var/log/audit in its own partition enables better separation between audit files and other files, and helps ensure that auditing cannot be halted due to the partition running out of space. 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. CCI-000137
CCI-000138
CCI-001208
AU-4
AU-4
SC-32
partition_for_home low Ensure /home Located On Separate Partition Ensuring that /home is mounted on its own partition enables the setting of more restrictive mount options, and also helps ensure that users cannot trivially fill partitions used for log or audit data storage. 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. CCI-001208
SC-32
ensure_redhat_gpgkey_installed high Ensure Red Hat GPG Key Installed The Red Hat GPG key is necessary to cryptographically verify packages are from Red Hat. 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_register
If 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
CCI-000351
CM-5 (3)
service_rhnsd_disabled low Disable Red Hat Network Service (rhnsd) Although systems management and patching is extremely important to system security, management by a system outside the enterprise enclave is not desirable for some environments. However, if the system is being managed by RHN or RHN Satellite Server the rhnsd daemon can remain on. 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
SRG-OS-000096-GPOS-00050
CCI-000382
CM-7
security_patches_up_to_date medium Ensure Software Patches Installed Installing software updates is a fundamental mitigation against the exploitation of publicly-known vulnerabilities. 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 update
If 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.
SRG-OS-000191-GPOS-00080
CCI-001227
CCI-001233
SI-2 a
SI-2 (2)
ensure_gpgcheck_globally_activated medium Ensure gpgcheck Enabled In Main Yum Configuration Ensuring the validity of packages' cryptographic signatures prior to installation ensures the authenticity of the software and protects against malicious tampering. 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
CCI-000352
CCI-000663
CM-5 (3)
SA-7
ensure_gpgcheck_never_disabled low Ensure gpgcheck Enabled For All Yum Package Repositories Ensuring all packages' cryptographic signatures are valid prior to installation ensures the authenticity of the software and protects against malicious tampering. 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
CCI-000352
CCI-000663
CM-5 (3)
SA-7
package_aide_installed medium Install AIDE The AIDE package must be installed if it is to be available for integrity checking. Install the AIDE package with the command:
$ sudo yum install aide
CCI-001069
RA-5 (7)
enable_selinux_bootloader medium Ensure SELinux Not Disabled in /etc/grub.conf Disabling a major host protection feature, such as SELinux, at boot time prevents it from confining system services at boot time. Further, it increases the chances that it will remain off during system operation. 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. CCI-000022
CCI-000032
AC-3 (3) (a)
AC-4 (8)
no_rsh_trust_files high Remove Rsh Trust Files Trust files are convenient, but when used in conjunction with the R-services, they can allow unauthenticated access to a system. 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
CCI-001436
AC-17 (8)
selinux_state medium Ensure SELinux State is Enforcing Setting the SELinux state to enforcing ensures SELinux is able to confine potentially compromised processes to the security policy, which is designed to prevent them from causing damage to the system or further elevating their privileges. 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=
CCI-000022
CCI-000032
CCI-000026
AC-3 (3) (a)
AC-4 (8)
AC-4 (2)
selinux_policytype low Configure SELinux Policy Setting the SELinux policy to targeted or a more specialized policy ensures the system will confine processes that are likely to be targeted for exploitation, such as network or system services. Note: During the development or debugging of SELinux modules, it is common to temporarily place non-production systems in permissive mode. In such temporary cases, SELinux policies should be developed, and once work is completed, the system should be reconfigured to . 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.
CCI-000022
CCI-000032
AC-3 (3) (a)
AC-4 (8)
selinux_all_devicefiles_labeled low Ensure No Device Files are Unknown to SELinux If a device file carries the SELinux type device_t, then SELinux cannot properly restrict access to the device file. 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. CCI-000022
CCI-000032
AC-3 (3) (a)
AC-4 (8)
securetty_root_login_console_only medium Restrict Virtual Console Root Logins Preventing direct root login to virtual console devices helps ensure accountability for actions taken on the system using the root account. 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
SRG-OS-000109-GPOS-00056
CCI-000770
IA-2 (5) (b)
restrict_serial_port_logins low Restrict Serial Port Root Logins Preventing direct root login to serial port interfaces helps ensure accountability for actions taken on the systems using the root account. To restrict root logins on serial ports, ensure lines of this form do not appear in /etc/securetty:
ttyS0
ttyS1
SRG-OS-000109-GPOS-00056
CCI-000770
IA-2 (5) (b)
no_shelllogin_for_systemaccounts medium Ensure that System Accounts Do Not Run a Shell Upon Login Ensuring shells are not given to system accounts upon login makes it more difficult for attackers to make use of system accounts. 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 UID_MIN, where value of the UID_MIN directive is set in /etc/login.defs configuration file. In the default configuration UID_MIN is set to 500, thus 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
CCI-000178
IA-5 e
no_empty_passwords high Prevent Log In to Accounts With Empty Password If an account has an empty password, anyone could log in and run commands with the privileges of that account. Accounts with empty passwords should never be used in operational environments. 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.
accounts_password_all_shadowed medium Verify All Account Password Hashes are Shadowed The hashes for all user account passwords should be stored in the file /etc/shadow and never in /etc/passwd, which is readable by all users. 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. CCI-000201
IA-5 (6)
accounts_no_uid_except_zero medium Verify Only Root Has UID 0 An account has root authority if it has a UID of 0. Multiple accounts with a UID of 0 afford more opportunity for potential intruders to guess a password for a privileged account. Proper configuration of sudo is recommended to afford multiple system administrators access to root privileges in an accountable manner. 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. SRG-OS-000480-GPOS-00232
SRG-OS-000480-GPOS-00231
SRG-OS-000480-GPOS-00230
SRG-OS-000480-GPOS-00229
SRG-OS-000480-GPOS-00228
SRG-OS-000480-GPOS-00227
SRG-OS-000480-GPOS-00226
SRG-OS-000480-GPOS-00225
SRG-OS-000360-GPOS-00147
CCI-000366
CM-6 b
userowner_shadow_file medium Verify User Who Owns shadow File The /etc/shadow file contains the list of local system accounts and stores password hashes. Protection of this file is critical for system security. Failure to give ownership of this file to root provides the designated owner with access to sensitive information which could weaken the system security posture. To properly set the owner of /etc/shadow, run the command:
$ sudo chown root /etc/shadow
CCI-000225
AC-6
groupowner_shadow_file medium Verify Group Who Owns shadow File The /etc/shadow file stores password hashes. Protection of this file is critical for system security. To properly set the group owner of /etc/shadow, run the command:
$ sudo chgrp root /etc/shadow
CCI-000225
AC-6
file_permissions_etc_shadow medium Verify Permissions on shadow File The /etc/shadow file contains the list of local system accounts and stores password hashes. Protection of this file is critical for system security. Failure to give ownership of this file to root provides the designated owner with access to sensitive information which could weaken the system security posture. To properly set the permissions of /etc/shadow, run the command:
$ sudo chmod 0000 /etc/shadow
CCI-000225
AC-6
file_owner_etc_gshadow medium Verify User Who Owns gshadow File The /etc/gshadow file contains group password hashes. Protection of this file is critical for system security. To properly set the owner of /etc/gshadow, run the command:
$ sudo chown root /etc/gshadow
SRG-OS-000480-GPOS-00232
SRG-OS-000480-GPOS-00231
SRG-OS-000480-GPOS-00230
SRG-OS-000480-GPOS-00229
SRG-OS-000480-GPOS-00228
SRG-OS-000480-GPOS-00227
SRG-OS-000480-GPOS-00226
SRG-OS-000480-GPOS-00225
SRG-OS-000360-GPOS-00147
CCI-000366
CM-6 b
file_groupowner_etc_gshadow medium Verify Group Who Owns gshadow File The /etc/gshadow file contains group password hashes. Protection of this file is critical for system security. To properly set the group owner of /etc/gshadow, run the command:
$ sudo chgrp root /etc/gshadow
CCI-000225
AC-6
file_permissions_etc_gshadow medium Verify Permissions on gshadow File The /etc/gshadow file contains group password hashes. Protection of this file is critical for system security. To properly set the permissions of /etc/gshadow, run the command:
$ sudo chmod 0000 /etc/gshadow
CCI-000225
AC-6
file_owner_etc_passwd medium Verify User Who Owns passwd File The /etc/passwd file contains information about the users that are configured on the system. Protection of this file is critical for system security. To properly set the owner of /etc/passwd, run the command:
$ sudo chown root /etc/passwd
CCI-000225
AC-6
file_groupowner_etc_passwd medium Verify Group Who Owns passwd File The /etc/passwd file contains information about the users that are configured on the system. Protection of this file is critical for system security. To properly set the group owner of /etc/passwd, run the command:
$ sudo chgrp root /etc/passwd
CCI-000225
AC-6
file_permissions_etc_passwd medium Verify Permissions on passwd File If the /etc/passwd file is writable by a group-owner or the world the risk of its compromise is increased. The file contains the list of accounts on the system and associated information, and protection of this file is critical for system security. To properly set the permissions of /etc/passwd, run the command:
$ sudo chmod 0644 /etc/passwd
CCI-000225
AC-6
file_owner_etc_group medium Verify User Who Owns group File The /etc/group file contains information regarding groups that are configured on the system. Protection of this file is important for system security. To properly set the owner of /etc/group, run the command:
$ sudo chown root /etc/group
file_groupowner_etc_group medium Verify Group Who Owns group File The /etc/group file contains information regarding groups that are configured on the system. Protection of this file is important for system security. To properly set the group owner of /etc/group, run the command:
$ sudo chgrp root /etc/group
CCI-000225
AC-6
file_permissions_etc_group medium Verify Permissions on group File The /etc/group file contains information regarding groups that are configured on the system. Protection of this file is important for system security. To properly set the permissions of /etc/group, run the command:
$ sudo chmod 644 /etc/group
CCI-000225
AC-6
file_permissions_library_dirs medium Verify that Shared Library Files Have Restrictive Permissions Files from shared library directories are loaded into the address space of processes (including privileged ones) or of the kernel itself at runtime. Restrictive permissions are necessary to protect the integrity of the system. System-wide shared library files, which are linked to executables during process load time or run time, are stored in the following directories by default:
/lib
/lib64
/usr/lib
/usr/lib64
Kernel modules, which can be added to the kernel during runtime, are stored in /lib/modules. All files in these directories should not be group-writable or world-writable. 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
SRG-OS-000259-GPOS-00100
CCI-001499
CM-5 (6)
file_ownership_library_dirs medium Verify that Shared Library Files Have Root Ownership Files from shared library directories are loaded into the address space of processes (including privileged ones) or of the kernel itself at runtime. Proper ownership is necessary to protect the integrity of the system. System-wide shared library files, which are linked to executables during process load time or run time, are stored in the following directories by default:
/lib
/lib64
/usr/lib
/usr/lib64
Kernel modules, which can be added to the kernel during runtime, are also stored in /lib/modules. All files in these directories should be owned by the root user. 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
SRG-OS-000259-GPOS-00100
CCI-001499
CM-5 (6)
file_permissions_binary_dirs medium Verify that System Executables Have Restrictive Permissions System binaries are executed by privileged users, as well as system services, and restrictive permissions are necessary to ensure execution of these programs cannot be co-opted. System executables are stored in the following directories by default:
/bin
/sbin
/usr/bin
/usr/libexec
/usr/local/bin
/usr/local/sbin
/usr/sbin
All 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
SRG-OS-000259-GPOS-00100
CCI-001499
CM-5 (6)
file_ownership_binary_dirs medium Verify that System Executables Have Root Ownership System binaries are executed by privileged users as well as system services, and restrictive permissions are necessary to ensure that their execution of these programs cannot be co-opted. System executables are stored in the following directories by default:
/bin
/sbin
/usr/bin
/usr/libexec
/usr/local/bin
/usr/local/sbin
/usr/sbin
All 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
SRG-OS-000259-GPOS-00100
CCI-001499
CM-5 (6)
file_permissions_var_log_audit low System Audit Logs Must Have Mode 0640 or Less Permissive If users can write to audit logs, audit trails can be modified or destroyed. 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
CCI-000166
AU-10
accounts_password_minlen_login_defs medium Set Password Minimum Length in login.defs Requiring a minimum password length makes password cracking attacks more difficult by ensuring a larger search space. However, any security benefit from an onerous requirement must be carefully weighed against usability problems, support costs, or counterproductive behavior that may result. To specify password length requirements for new accounts, edit the file /etc/login.defs and add or correct the following lines:
PASS_MIN_LEN 


As of the DISA Red Hat 6 STIG - Ver 1, Rel 13 (28-OCT-2016), the DoD requirement is now 15. 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.
SRG-OS-000078-GPOS-00046
CCI-000205
IA-5 (1) (a)
accounts_minimum_age_login_defs medium Set Password Minimum Age Setting the minimum password age protects against users cycling back to a favorite password after satisfying the password reuse requirement. To specify password minimum age for new accounts, edit the file /etc/login.defs and add or correct the following line:
PASS_MIN_DAYS 
A value of 1 day is considered for sufficient for many environments. The DoD requirement is 1.
SRG-OS-000075-GPOS-00043
CCI-000198
IA-5 (1) (d)
accounts_maximum_age_login_defs medium Set Password Maximum Age Setting the password maximum age ensures users are required to periodically change their passwords. This could possibly decrease the utility of a stolen password. Requiring shorter password lifetimes increases the risk of users writing down the password in a convenient location subject to physical compromise. To specify password maximum age for new accounts, edit the file /etc/login.defs and add or correct the following line:
PASS_MAX_DAYS 
A value of 180 days is sufficient for many environments. The DoD requirement is 60.
SRG-OS-000076-GPOS-00044
CCI-000180
CCI-000199
IA-5 f
IA-5 (1) (d)
accounts_password_warn_age_login_defs low Set Password Warning Age Setting the password warning age enables users to make the change at a practical time. To specify how many days prior to password expiration that a warning will be issued to users, edit the file /etc/login.defs and add or correct the following line:
PASS_WARN_AGE 
The DoD requirement is 7.
accounts_password_pam_retry low Set Password Retry Prompts Permitted Per-Session Setting the password retry prompts that are permitted on a per-session basis to a low value requires some software, such as SSH, to re-connect. This can slow down and draw additional attention to some types of password-guessing attacks. Note that this is different from account lockout, which is provided by the pam_faillock module. 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.
CCI-001092
SC-5
accounts_password_pam_dcredit low Set Password Strength Minimum Digit Characters Requiring digits makes password guessing attacks more difficult by ensuring a larger search space. 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. SRG-OS-000071-GPOS-00039
CCI-000194
IA-5 (1) (a)
accounts_password_pam_ucredit low Set Password Strength Minimum Uppercase Characters Requiring a minimum number of uppercase characters makes password guessing attacks more difficult by ensuring a larger search space. 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. SRG-OS-000069-GPOS-00037
CCI-000192
IA-5 (1) (a)
accounts_password_pam_ocredit low Set Password Strength Minimum Special Characters Requiring a minimum number of special characters makes password guessing attacks more difficult by ensuring a larger search space. 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. SRG-OS-000266-GPOS-00101
CCI-001619
IA-5 (1) (a)
accounts_password_pam_lcredit low Set Password Strength Minimum Lowercase Characters Requiring a minimum number of lowercase characters makes password guessing attacks more difficult by ensuring a larger search space. 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. SRG-OS-000070-GPOS-00038
CCI-000193
IA-5 (1) (a)
accounts_password_pam_difok low Set Password Strength Minimum Different Characters Requiring a minimum number of different characters during password changes ensures that newly changed passwords should not resemble previously compromised ones. Note that passwords which are changed on compromised systems will still be compromised, however. 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. SRG-OS-000072-GPOS-00040
CCI-000195
IA-5 (1) (b)
accounts_passwords_pam_faillock_deny medium Set Deny For Failed Password Attempts Locking out user accounts after a number of incorrect attempts prevents direct password guessing attacks. 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:

  • Add the following line immediately before the pam_unix.so statement in the AUTH section:
    auth required pam_faillock.so preauth silent deny= unlock_time= fail_interval=
  • Add the following line immediately after the pam_unix.so statement in the AUTH section:
    auth [default=die] pam_faillock.so authfail deny= unlock_time= fail_interval=
  • Add the following line immediately before the pam_unix.so statement in the ACCOUNT section:
    account required pam_faillock.so
SRG-OS-000021-GPOS-00005
CCI-000044
AC-7 a
set_password_hashing_algorithm_systemauth medium Set Password Hashing Algorithm in /etc/pam.d/system-auth Using a stronger hashing algorithm makes password cracking attacks more difficult. 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.
SRG-OS-000120-GPOS-00061
CCI-000803
IA-7
set_password_hashing_algorithm_logindefs medium Set Password Hashing Algorithm in /etc/login.defs Using a stronger hashing algorithm makes password cracking attacks more difficult. 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
SRG-OS-000120-GPOS-00061
CCI-000803
IA-7
set_password_hashing_algorithm_libuserconf medium Set Password Hashing Algorithm in /etc/libuser.conf Using a stronger hashing algorithm makes password cracking attacks more difficult. 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
SRG-OS-000120-GPOS-00061
CCI-000803
IA-7
file_user_owner_grub_conf medium Verify /etc/grub.conf User Ownership Only root should be able to modify important boot parameters. 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
CCI-000225
AC-6
file_group_owner_grub_conf medium Verify /etc/grub.conf Group Ownership The root group is a highly-privileged group. Furthermore, the group-owner of this file should not have any access privileges anyway. 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
CCI-000225
AC-6
file_permissions_grub_conf medium Verify /boot/grub/grub.conf Permissions Proper permissions ensure that only the root user can modify important boot parameters. 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
CCI-000225
AC-6
bootloader_password medium Set Boot Loader Password Password protection on the boot loader configuration ensures users with physical access cannot trivially alter important bootloader settings. These include which kernel to use, and whether to enter single-user mode. 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-512
When prompted to enter a password, insert the following line into /etc/grub.conf immediately after the header comments. (Use the output from grub-crypt as the value of password-hash):
password --encrypted password-hash
NOTE: To meet FISMA Moderate, the bootloader password MUST differ from the root password.
SRG-OS-000080-GPOS-00048
CCI-000213
AC-3
require_singleuser_auth medium Require Authentication for Single User Mode This prevents attackers with physical access from trivially bypassing security on the machine and gaining root access. Such accesses are further prevented by configuring the bootloader password. 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
SRG-OS-000080-GPOS-00048
CCI-000213
AC-3
disable_interactive_boot medium Disable Interactive Boot Using interactive boot, the console user could disable auditing, firewalls, or other services, weakening system security. To disable the ability for users to perform interactive startups, perform both of the following:
  1. Edit the file /etc/sysconfig/init. Add or correct the line:
    PROMPT=no
  2. Inspect the kernel boot arguments (which follow the word kernel) in /etc/grub.conf and ensure the confirm argument is not present.
Both the 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.
SRG-OS-000080-GPOS-00048
CCI-000213
AC-3
package_screen_installed low Install the screen Package Installing screen ensures a console locking capability is available for users who may need to suspend console logins. To enable console screen locking, install the screen package:
$ sudo yum install screen
Instruct users to begin new terminal sessions with the following command:
$ screen
The console can now be locked with the following key combination:
ctrl+a x
SRG-OS-000030-GPOS-00011
CCI-000058
AC-11 a
banner_etc_issue medium Modify the System Login Banner An appropriate warning message reinforces policy awareness during the login process and facilitates possible legal action against attackers. 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:
-The USG routinely intercepts and monitors communications on this IS for purposes including, but not limited to, penetration testing, COMSEC monitoring, network operations and defense, personnel misconduct (PM), law enforcement (LE), and counterintelligence (CI) investigations.
-At any time, the USG may inspect and seize data stored on this IS.
-Communications using, or data stored on, this IS are not private, are subject to routine monitoring, interception, and search, and may be disclosed or used for any USG-authorized purpose.
-This IS includes security measures (e.g., authentication and access controls) to protect USG interests -- not for your personal benefit or privacy.
-Notwithstanding the above, using this IS does not constitute consent to PM, LE or CI investigative searching or monitoring of the content of privileged communications, or work product, related to personal representation or services by attorneys, psychotherapists, or clergy, and their assistants. Such communications and work product are private and confidential. See User Agreement for details.


OR:

Use of this or any other DoD interest computer system constitutes consent to monitoring at all times.
This is a DoD interest computer system. All DoD interest computer systems and related equipment are intended for the communication, transmission, processing, and storage of official U.S. Government or other authorized information only. All DoD interest computer systems are subject to monitoring at all times to ensure proper functioning of equipment and systems including security devices and systems, to prevent unauthorized use and violations of statutes and security regulations, to deter criminal activity, and for other similar purposes. Any user of a DoD interest computer system should be aware that any information placed in the system is subject to monitoring and is not subject to any expectation of privacy.
If monitoring of this or any other DoD interest computer system reveals possible evidence of violation of criminal statutes, this evidence and any other related information, including identification information about the user, may be provided to law enforcement officials. If monitoring of this or any other DoD interest computer systems reveals violations of security regulations or unauthorized use, employees who violate security regulations or make unauthorized use of DoD interest computer systems are subject to appropriate disciplinary action.
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.
SRG-OS-000023-GPOS-00006
SRG-OS-000228-GPOS-00088
SRG-OS-000228-GPOS-00088
SRG-OS-000228-GPOS-00088
SRG-OS-000228-GPOS-00088
SRG-OS-000228-GPOS-00088
CCI-000048
CCI-001384
CCI-001385
CCI-001386
CCI-001387
CCI-001388
AC-8 a
AC-8 c
AC-8 c
AC-8 c
AC-8 c
AC-8 c
sysctl_kernel_randomize_va_space medium Enable Randomized Layout of Virtual Address Space Address space layout randomization (ASLR) makes it more difficult for an attacker to predict the location of attack code they have introduced into a process's address space during an attempt at exploitation. Additionally, ASLR makes it more difficult for an attacker to know the location of existing code in order to re-purpose it using return oriented programming (ROP) techniques. To set the runtime status of the kernel.randomize_va_space kernel parameter, run the following command:
$ sudo sysctl -w kernel.randomize_va_space=2
If this is not the system's default value, add the following line to /etc/sysctl.conf:
kernel.randomize_va_space = 2
sysctl_kernel_exec_shield medium Enable ExecShield ExecShield uses the segmentation feature on all x86 systems to prevent execution in memory higher than a certain address. It writes an address as a limit in the code segment descriptor, to control where code can be executed, on a per-process basis. When the kernel places a process's memory regions such as the stack and heap higher than this address, the hardware prevents execution in that address range. To set the runtime status of the kernel.exec-shield kernel parameter, run the following command:
$ sudo sysctl -w kernel.exec-shield=1
If this is not the system's default value, add the following line to /etc/sysctl.conf:
kernel.exec-shield = 1
CCI-002530
sysctl_net_ipv4_conf_default_send_redirects medium Disable Kernel Parameter for Sending ICMP Redirects by Default Sending ICMP redirects permits the system to instruct other systems to update their routing information. The ability to send ICMP redirects is only appropriate for systems acting as routers. 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=0
If this is not the system's default value, add the following line to /etc/sysctl.conf:
net.ipv4.conf.default.send_redirects = 0
CCI-001551
AC-4
sysctl_net_ipv4_conf_all_send_redirects medium Disable Kernel Parameter for Sending ICMP Redirects for All Interfaces Sending ICMP redirects permits the system to instruct other systems to update their routing information. The ability to send ICMP redirects is only appropriate for systems acting as routers. 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=0
If this is not the system's default value, add the following line to /etc/sysctl.conf:
net.ipv4.conf.all.send_redirects = 0
CCI-001551
AC-4
sysctl_net_ipv4_ip_forward medium Disable Kernel Parameter for IP Forwarding IP forwarding permits the kernel to forward packets from one network interface to another. The ability to forward packets between two networks is only appropriate for systems acting as routers. To set the runtime status of the net.ipv4.ip_forward kernel parameter, run the following command:
$ sudo sysctl -w net.ipv4.ip_forward=0
If this is not the system's default value, add the following line to /etc/sysctl.conf:
net.ipv4.ip_forward = 0
SRG-OS-000480-GPOS-00232
SRG-OS-000480-GPOS-00231
SRG-OS-000480-GPOS-00230
SRG-OS-000480-GPOS-00229
SRG-OS-000480-GPOS-00228
SRG-OS-000480-GPOS-00227
SRG-OS-000480-GPOS-00226
SRG-OS-000480-GPOS-00225
SRG-OS-000360-GPOS-00147
CCI-000366
CM-6 b
sysctl_net_ipv4_conf_all_accept_source_route medium Configure Kernel Parameter for Accepting Source-Routed Packets for All Interfaces Accepting source-routed packets in the IPv4 protocol has few legitimate uses. It should be disabled unless it is absolutely required. 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=0
If this is not the system's default value, add the following line to /etc/sysctl.conf:
net.ipv4.conf.all.accept_source_route = 0
CCI-001551
AC-4
sysctl_net_ipv4_conf_all_accept_redirects medium Configure Kernel Parameter for Accepting ICMP Redirects for All Interfaces Accepting ICMP redirects has few legitimate uses. It should be disabled unless it is absolutely required. 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=0
If this is not the system's default value, add the following line to /etc/sysctl.conf:
net.ipv4.conf.all.accept_redirects = 0
CCI-001503
CCI-001551
CM-6 d
AC-4
sysctl_net_ipv4_conf_all_secure_redirects medium Configure Kernel Parameter for Accepting Secure Redirects for All Interfaces Accepting "secure" ICMP redirects (from those gateways listed as default gateways) has few legitimate uses. It should be disabled unless it is absolutely required. 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=0
If this is not the system's default value, add the following line to /etc/sysctl.conf:
net.ipv4.conf.all.secure_redirects = 0
CCI-001503
CCI-001551
CM-6 d
AC-4
sysctl_net_ipv4_conf_all_log_martians low Configure Kernel Parameter to Log Martian Packets The presence of "martian" packets (which have impossible addresses) as well as spoofed packets, source-routed packets, and redirects could be a sign of nefarious network activity. Logging these packets enables this activity to be detected. 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=1
If this is not the system's default value, add the following line to /etc/sysctl.conf:
net.ipv4.conf.all.log_martians = 1
CCI-000126
AU-2 d
sysctl_net_ipv4_conf_default_accept_source_route medium Configure Kernel Parameter for Accepting Source-Routed Packets By Default Accepting source-routed packets in the IPv4 protocol has few legitimate uses. It should be disabled unless it is absolutely required. 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=0
If this is not the system's default value, add the following line to /etc/sysctl.conf:
net.ipv4.conf.default.accept_source_route = 0
CCI-001551
AC-4
sysctl_net_ipv4_conf_default_secure_redirects medium Configure Kernel Parameter for Accepting Secure Redirects By Default Accepting "secure" ICMP redirects (from those gateways listed as default gateways) has few legitimate uses. It should be disabled unless it is absolutely required. 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=0
If this is not the system's default value, add the following line to /etc/sysctl.conf:
net.ipv4.conf.default.secure_redirects = 0
CCI-001551
AC-4
sysctl_net_ipv4_conf_default_accept_redirects low Configure Kernel Parameter for Accepting ICMP Redirects By Default This feature of the IPv4 protocol has few legitimate uses. It should be disabled unless it is absolutely required. 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=0
If this is not the system's default value, add the following line to /etc/sysctl.conf:
net.ipv4.conf.default.accept_redirects = 0
CCI-001551
AC-4
sysctl_net_ipv4_icmp_echo_ignore_broadcasts low Configure Kernel Parameter to Ignore ICMP Broadcast Echo Requests Ignoring ICMP echo requests (pings) sent to broadcast or multicast addresses makes the system slightly more difficult to enumerate on the network. 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=1
If this is not the system's default value, add the following line to /etc/sysctl.conf:
net.ipv4.icmp_echo_ignore_broadcasts = 1
CCI-001551
AC-4
sysctl_net_ipv4_icmp_ignore_bogus_error_responses low Configure Kernel Parameter to Ignore Bogus ICMP Error Responses Ignoring bogus ICMP error responses reduces log size, although some activity would not be logged. 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=1
If this is not the system's default value, add the following line to /etc/sysctl.conf:
net.ipv4.icmp_ignore_bogus_error_responses = 1
sysctl_net_ipv4_tcp_syncookies medium Configure Kernel Parameter to Use TCP Syncookies A TCP SYN flood attack can cause a denial of service by filling a system's TCP connection table with connections in the SYN_RCVD state. Syncookies can be used to track a connection when a subsequent ACK is received, verifying the initiator is attempting a valid connection and is not a flood source. This feature is activated when a flood condition is detected, and enables the system to continue servicing valid connection requests. To set the runtime status of the net.ipv4.tcp_syncookies kernel parameter, run the following command:
$ sudo sysctl -w net.ipv4.tcp_syncookies=1
If this is not the system's default value, add the following line to /etc/sysctl.conf:
net.ipv4.tcp_syncookies = 1
SRG-OS-000142-GPOS-00071
CCI-001092
CCI-001095
SC-5
SC-5 (2)
sysctl_net_ipv4_conf_all_rp_filter medium Configure Kernel Parameter to Use Reverse Path Filtering for All Interfaces Enabling reverse path filtering drops packets with source addresses that should not have been able to be received on the interface they were received on. It should not be used on systems which are routers for complicated networks, but is helpful for end hosts and routers serving small networks. 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=1
If this is not the system's default value, add the following line to /etc/sysctl.conf:
net.ipv4.conf.all.rp_filter = 1
CCI-001551
AC-4
sysctl_net_ipv4_conf_default_rp_filter medium Configure Kernel Parameter to Use Reverse Path Filtering by Default Enabling reverse path filtering drops packets with source addresses that should not have been able to be received on the interface they were received on. It should not be used on systems which are routers for complicated networks, but is helpful for end hosts and routers serving small networks. 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=1
If this is not the system's default value, add the following line to /etc/sysctl.conf:
net.ipv4.conf.default.rp_filter = 1
kernel_module_ipv6_option_disabled medium Disable IPv6 Networking Support Automatic Loading Any unnecessary network stacks - including IPv6 - should be disabled, to reduce the vulnerability to exploitation. 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=1
This permits the IPv6 module to be loaded (and thus satisfy other modules that depend on it), while disabling support for the IPv6 protocol.
CCI-001551
AC-4
sysctl_net_ipv6_conf_default_accept_redirects medium Configure Accepting IPv6 Redirects By Default An illicit ICMP redirect message could result in a man-in-the-middle attack. 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=0
If this is not the system's default value, add the following line to /etc/sysctl.conf:
net.ipv6.conf.default.accept_redirects = 0
CCI-001551
AC-4
service_ip6tables_enabled medium Verify ip6tables Enabled if Using IPv6 The ip6tables service provides the system's host-based firewalling capability for IPv6 and ICMPv6. The ip6tables service can be enabled with the following command:
$ sudo chkconfig --level 2345 ip6tables on
CCI-000032
CCI-000066
CCI-001115
CCI-001118
CCI-001092
CCI-001117
CCI-001098
CCI-001100
CCI-001097
CCI-001414
AC-4 (8)
AC-17 e
SC-7 (9)
SC-7 (12)
SC-5
SC-7 (11)
SC-7 b
SC-7 (2)
SC-7 a
AC-4
service_iptables_enabled medium Verify iptables Enabled The iptables service provides the system's host-based firewalling capability for IPv4 and ICMP. The iptables service can be enabled with the following command:
$ sudo chkconfig --level 2345 iptables on
CCI-000032
CCI-000066
CCI-001115
CCI-001118
CCI-001092
CCI-001117
CCI-001098
CCI-001100
CCI-001097
CCI-001414
AC-4 (8)
AC-17 e
SC-7 (9)
SC-7 (12)
SC-5
SC-7 (11)
SC-7 b
SC-7 (2)
SC-7 a
AC-4
set_iptables_default_rule medium Set Default iptables Policy for Incoming Packets In iptables the default policy is applied only after all the applicable rules in the table are examined for a match. Setting the default policy to DROP implements proper design for a firewall, i.e. any packets which are not explicitly permitted should not be accepted. 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]
CCI-000066
CCI-001109
CCI-001154
CCI-001414
AC-17 e
SC-7 (5)
SC-15 (2)
AC-4
set_ip6tables_default_rule medium Set Default ip6tables Policy for Incoming Packets In ip6tables, the default policy is applied only after all the applicable rules in the table are examined for a match. Setting the default policy to DROP implements proper design for a firewall, i.e. any packets which are not explicitly permitted should not be accepted. 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
CCI-000066
AC-17 e
kernel_module_dccp_disabled medium Disable DCCP Support Disabling DCCP protects the system against exploitation of any flaws in its implementation. 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
SRG-OS-000096-GPOS-00050
CCI-000382
CM-7
kernel_module_sctp_disabled medium Disable SCTP Support Disabling SCTP protects the system against exploitation of any flaws in its implementation. 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
SRG-OS-000096-GPOS-00050
CCI-000382
CM-7
kernel_module_rds_disabled low Disable RDS Support Disabling RDS protects the system against exploitation of any flaws in its implementation. 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
SRG-OS-000096-GPOS-00050
CCI-000382
CM-7
kernel_module_tipc_disabled medium Disable TIPC Support Disabling TIPC protects the system against exploitation of any flaws in its implementation. 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
SRG-OS-000096-GPOS-00050
CCI-000382
CM-7
package_rsyslog_installed medium Ensure rsyslog is Installed The rsyslog package provides the rsyslog daemon, which provides system logging services. Rsyslog is installed by default. The rsyslog package can be installed with the following command:
$ sudo yum install rsyslog
SRG-OS-000205-GPOS-00083
CCI-001311
CCI-001312
SI-11 a
SI-11 b
service_rsyslog_enabled medium Enable rsyslog Service The rsyslog service must be running in order to provide logging services, which are essential to system administration. 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
SRG-OS-000205-GPOS-00083
CCI-001557
CCI-001312
CCI-001311
AC-4 (17) ?
SI-11 b
SI-11 a
rsyslog_files_ownership medium Ensure Log Files Are Owned By Appropriate User The log files generated by rsyslog contain valuable information regarding system configuration, user authentication, and other such information. Log files should be protected from unauthorized access. 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 LOGFILE
If the owner is not root, run the following command to correct this:
$ sudo chown root LOGFILE
SRG-OS-000206-GPOS-00084
CCI-001314
SI-11 c
rsyslog_files_groupownership medium Ensure Log Files Are Owned By Appropriate Group The log files generated by rsyslog contain valuable information regarding system configuration, user authentication, and other such information. Log files should be protected from unauthorized access. The group-owner of all log files written by rsyslog should be root. These log files are determined by the second part of each Rule line in /etc/rsyslog.conf and typically all appear in /var/log. For each log file LOGFILE referenced in /etc/rsyslog.conf, run the following command to inspect the file's group owner:
$ ls -l LOGFILE
If the owner is not root, run the following command to correct this:
$ sudo chgrp root LOGFILE
SRG-OS-000206-GPOS-00084
CCI-001314
SI-11 c
rsyslog_files_permissions medium Ensure System Log Files Have Correct Permissions Log files can contain valuable information regarding system configuration. If the system log files are not protected unauthorized users could change the logged data, eliminating their forensic value. The file permissions for all log files written by rsyslog should be set to 600, or more restrictive. These log files are determined by the second part of each Rule line in /etc/rsyslog.conf and typically all appear in /var/log. For each log file LOGFILE referenced in /etc/rsyslog.conf, run the following command to inspect the file's permissions:
$ ls -l LOGFILE
If the permissions are not 600 or more restrictive, run the following command to correct this:
$ sudo chmod 0600 LOGFILE
SRG-OS-000206-GPOS-00084
CCI-001314
SI-11 c
rsyslog_remote_loghost low Ensure Logs Sent To Remote Host A log server (loghost) receives syslog messages from one or more systems. This data can be used as an additional log source in the event a system is compromised and its local logs are suspect. Forwarding log messages to a remote loghost also provides system administrators with a centralized place to view the status of multiple hosts within the enterprise. 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
CCI-001348
CCI-000136
AU-9 (2)
AU-3 (2)
ensure_logrotate_activated low Ensure Logrotate Runs Periodically Log files that are not properly rotated run the risk of growing so large that they fill up the /var/log partition. Valuable logging information could be lost if the /var/log partition becomes full. 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
SRG-OS-000480-GPOS-00232
SRG-OS-000480-GPOS-00231
SRG-OS-000480-GPOS-00230
SRG-OS-000480-GPOS-00229
SRG-OS-000480-GPOS-00228
SRG-OS-000480-GPOS-00227
SRG-OS-000480-GPOS-00226
SRG-OS-000480-GPOS-00225
SRG-OS-000360-GPOS-00147
CCI-000366
CM-6 b
service_auditd_enabled medium Enable auditd Service Ensuring the auditd service is active ensures audit records generated by the kernel can be written to disk, or that appropriate actions will be taken if other obstacles exist. 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
SRG-OS-000477-GPOS-00222
SRG-OS-000476-GPOS-00221
SRG-OS-000475-GPOS-00220
SRG-OS-000474-GPOS-00219
SRG-OS-000473-GPOS-00218
SRG-OS-000472-GPOS-00217
SRG-OS-000471-GPOS-00216
SRG-OS-000471-GPOS-00215
SRG-OS-000470-GPOS-00214
SRG-OS-000468-GPOS-00212
SRG-OS-000467-GPOS-00211
SRG-OS-000466-GPOS-00210
SRG-OS-000465-GPOS-00209
SRG-OS-000463-GPOS-00207
SRG-OS-000462-GPOS-00206
SRG-OS-000064-GPOS-00033
SRG-OS-000461-GPOS-00205
SRG-OS-000458-GPOS-00203
SRG-OS-000255-GPOS-00096
SRG-OS-000032-GPOS-00013
SRG-OS-000054-GPOS-00025
SRG-OS-000184-GPOS-00078
SRG-OS-000205-GPOS-00083
SRG-OS-000037-GPOS-00015
CCI-000347
CCI-000157
CCI-000172
CCI-000880
CCI-001353
CCI-001462
CCI-001487
CCI-001115
CCI-001454
CCI-000067
CCI-000158
CCI-000831
CCI-001190
CCI-001312
CCI-001263
CCI-000130
CCI-000120
CCI-001589
CM-5 (1)
AU-7
AU-12 c
MA-4 (1)
AU-12 (2)
AU-14 a
AU-3
SC-7 (9)
AC-17 (7)
AC-17 (1)
AU-7 (1)
IR-4 (5)
SC-24
SI-11 b
SI-4 (5)
AU-3
AU-1 b
CM-6 (3)
bootloader_audit_argument low Enable Auditing for Processes Which Start Prior to the Audit Daemon Each process on the system carries an "auditable" flag which indicates whether its activities can be audited. Although auditd takes care of enabling this for all processes which launch after it does, adding the kernel argument ensures it is set for every process during boot. 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
SRG-OS-000062-GPOS-00031
CCI-000169
AU-12 a
auditd_data_retention_num_logs medium Configure auditd Number of Logs Retained The total storage for audit log files must be large enough to retain log information over the period required. This is a function of the maximum log file size and the 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 = NUMLOGS
Set the value to 5 for general-purpose systems. Note that values less than 2 result in no log rotation.
auditd_data_retention_max_log_file medium Configure auditd Max Log File Size The total storage for audit log files must be large enough to retain log information over the period required. This is a function of the maximum log file size and the number of logs retained. 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 = STOREMB
Set the value to 6 (MB) or higher for general-purpose systems. Larger values, of course, support retention of even more audit data.
auditd_data_retention_max_log_file_action medium Configure auditd max_log_file_action Upon Reaching Maximum Log Size Automatically rotating logs (by setting this to rotate) minimizes the chances of the system unexpectedly running out of disk space by being overwhelmed with log data. However, for systems that must never discard log data, or which use external processes to transfer it and reclaim space, keep_logs can be employed. 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 = ACTION
Possible values for ACTION are described in the auditd.conf man page. These include:
  • ignore
  • syslog
  • suspend
  • rotate
  • keep_logs
Set the ACTION to rotate to ensure log rotation occurs. This is the default. The setting is case-insensitive.
auditd_data_retention_admin_space_left_action medium Configure auditd admin_space_left Action on Low Disk Space Administrators should be made aware of an inability to record audit records. If a separate partition or logical volume of adequate size is used, running low on space for audit records should never occur. The auditd service can be configured to take an action when disk space is running low but prior to running out of space completely. Edit the file /etc/audit/auditd.conf. Add or modify the following line, substituting ACTION appropriately:
admin_space_left_action = ACTION
Set 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.
SRG-OS-000047-GPOS-00023
CCI-000140
CCI-001343
AU-5 b
AU-5 (4)
audit_rules_time_adjtimex low Record attempts to alter time through adjtimex Arbitrary changes to the system time can be used to obfuscate nefarious activities in log files, as well as to confuse network services that are highly dependent upon an accurate system time (such as sshd). All changes to the system time should be audited. On a 32-bit system, add the following to /etc/audit/audit.rules:
# audit_time_rules
-a always,exit -F arch=b32 -S adjtimex -k audit_time_rules
On a 64-bit system, add the following to /etc/audit/audit.rules:
# audit_time_rules
-a always,exit -F arch=b64 -S adjtimex -k audit_time_rules
The -k option allows for the specification of a key in string form that can be used for better reporting capability through ausearch and aureport. Multiple system calls can be defined on the same line to save space if desired, but is not required. See an example of multiple combined syscalls:
-a always,exit -F arch=b64 -S adjtimex -S settimeofday -k audit_time_rules
SRG-OS-000255-GPOS-00096
SRG-OS-000062-GPOS-00031
CCI-001487
CCI-000169
AU-3
AU-12 a
audit_rules_time_settimeofday low Record attempts to alter time through settimeofday Arbitrary changes to the system time can be used to obfuscate nefarious activities in log files, as well as to confuse network services that are highly dependent upon an accurate system time (such as sshd). All changes to the system time should be audited. On a 32-bit system, add the following to /etc/audit/audit.rules:
# audit_time_rules
-a always,exit -F arch=b32 -S settimeofday -k audit_time_rules
On a 64-bit system, add the following to /etc/audit/audit.rules:
# audit_time_rules
-a always,exit -F arch=b64 -S settimeofday -k audit_time_rules
The -k option allows for the specification of a key in string form that can be used for better reporting capability through ausearch and aureport. Multiple system calls can be defined on the same line to save space if desired, but is not required. See an example of multiple combined syscalls:
-a always,exit -F arch=b64 -S adjtimex -S settimeofday -k audit_time_rules
SRG-OS-000255-GPOS-00096
SRG-OS-000062-GPOS-00031
CCI-001487
CCI-000169
AU-3
AU-12 a
audit_rules_time_stime low Record Attempts to Alter Time Through stime Arbitrary changes to the system time can be used to obfuscate nefarious activities in log files, as well as to confuse network services that are highly dependent upon an accurate system time (such as sshd). All changes to the system time should be audited. 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_rules
Since 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
SRG-OS-000255-GPOS-00096
SRG-OS-000062-GPOS-00031
CCI-001487
CCI-000169
AU-3
AU-12 a
audit_rules_time_clock_settime low Record Attempts to Alter Time Through clock_settime Arbitrary changes to the system time can be used to obfuscate nefarious activities in log files, as well as to confuse network services that are highly dependent upon an accurate system time (such as sshd). All changes to the system time should be audited. 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-change
On 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-change
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
SRG-OS-000255-GPOS-00096
SRG-OS-000062-GPOS-00031
CCI-001487
CCI-000169
AU-3
AU-12 a
audit_rules_time_watch_localtime low Record Attempts to Alter the localtime File Arbitrary changes to the system time can be used to obfuscate nefarious activities in log files, as well as to confuse network services that are highly dependent upon an accurate system time (such as sshd). All changes to the system time should be audited. Add the following to /etc/audit/audit.rules:
-w /etc/localtime -p wa -k audit_time_rules
The -k option allows for the specification of a key in string form that can be used for better reporting capability through ausearch and aureport and should always be used.
SRG-OS-000255-GPOS-00096
SRG-OS-000062-GPOS-00031
CCI-001487
CCI-000169
AU-3
AU-12 a
audit_rules_usergroup_modification low Record Events that Modify User/Group Information In addition to auditing new user and group accounts, these watches will alert the system administrator(s) to any modifications. Any unexpected users, groups, or modifications should be investigated for legitimacy. 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
SRG-OS-000004-GPOS-00004
SRG-OS-000239-GPOS-00089
SRG-OS-000240-GPOS-00090
SRG-OS-000241-GPOS-00091
SRG-OS-000275-GPOS-00105
SRG-OS-000274-GPOS-00104
SRG-OS-000276-GPOS-00106
SRG-OS-000277-GPOS-00107
CCI-000018
CCI-001403
CCI-001404
CCI-001405
CCI-001684
CCI-001683
CCI-001685
CCI-001686
AC-2 (4)
AC-2 (4)
AC-2 (4)
AC-2 (4)
audit_rules_networkconfig_modification low Record Events that Modify the System's Network Environment The network environment should not be modified by anything other than administrator action. Any change to network parameters should be audited. 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
audit_rules_mac_modification low Record Events that Modify the System's Mandatory Access Controls The system's mandatory access policy (SELinux) should not be arbitrarily changed by anything other than administrator action. All changes to MAC policy should be audited. Add the following to /etc/audit/audit.rules:
-w /etc/selinux/ -p wa -k MAC-policy
audit_rules_dac_modification_chmod low Record Events that Modify the System's Discretionary Access Controls - chmod The changing of file permissions could indicate that a user is attempting to gain access to information that would otherwise be disallowed. Auditing DAC modifications can facilitate the identification of patterns of abuse among both authorized and unauthorized users. At a minimum the audit system should collect file permission changes for all users and root. Add the following to /etc/audit/audit.rules:
-a always,exit -F arch=b32 -S chmod -F auid>=500 -F auid!=4294967295 -k perm_mod
If the system is 64 bit then also add the following:
-a always,exit -F arch=b64 -S chmod  -F auid>=500 -F auid!=4294967295 -k perm_mod
CCI-000126
AU-2 d
audit_rules_dac_modification_chown low Record Events that Modify the System's Discretionary Access Controls - chown The changing of file permissions could indicate that a user is attempting to gain access to information that would otherwise be disallowed. Auditing DAC modifications can facilitate the identification of patterns of abuse among both authorized and unauthorized users. At a minimum the audit system should collect file permission changes for all users and root. Add the following to /etc/audit/audit.rules:
-a always,exit -F arch=b32 -S chown -F auid>=500 -F auid!=4294967295 -k perm_mod
If the system is 64 bit then also add the following:
-a always,exit -F arch=b64 -S chown -F auid>=500 -F auid!=4294967295 -k perm_mod
CCI-000126
AU-2 d
audit_rules_dac_modification_fchmod low Record Events that Modify the System's Discretionary Access Controls - fchmod The changing of file permissions could indicate that a user is attempting to gain access to information that would otherwise be disallowed. Auditing DAC modifications can facilitate the identification of patterns of abuse among both authorized and unauthorized users. At a minimum the audit system should collect file permission changes for all users and root. Add the following to /etc/audit/audit.rules:
-a always,exit -F arch=b32 -S fchmod -F auid>=500 -F auid!=4294967295 -k perm_mod
If the system is 64 bit then also add the following:
-a always,exit -F arch=b64 -S fchmod -F auid>=500 -F auid!=4294967295 -k perm_mod
CCI-000126
AU-2 d
audit_rules_dac_modification_fchmodat low Record Events that Modify the System's Discretionary Access Controls - fchmodat The changing of file permissions could indicate that a user is attempting to gain access to information that would otherwise be disallowed. Auditing DAC modifications can facilitate the identification of patterns of abuse among both authorized and unauthorized users. At a minimum the audit system should collect file permission changes for all users and root. Add the following to /etc/audit/audit.rules:
-a always,exit -F arch=b32 -S fchmodat -F auid>=500 -F auid!=4294967295 -k perm_mod
If the system is 64 bit then also add the following:
-a always,exit -F arch=b64 -S fchmodat -F auid>=500 -F auid!=4294967295 -k perm_mod
CCI-000126
AU-2 d
audit_rules_dac_modification_fchown low Record Events that Modify the System's Discretionary Access Controls - fchown The changing of file permissions could indicate that a user is attempting to gain access to information that would otherwise be disallowed. Auditing DAC modifications can facilitate the identification of patterns of abuse among both authorized and unauthorized users. At a minimum the audit system should collect file permission changes for all users and root. Add the following to /etc/audit/audit.rules:
-a always,exit -F arch=b32 -S fchown -F auid>=500 -F auid!=4294967295 -k perm_mod
If the system is 64 bit then also add the following:
-a always,exit -F arch=b64 -S fchown -F auid>=500 -F auid!=4294967295 -k perm_mod
CCI-000126
AU-2 d
audit_rules_dac_modification_fchownat low Record Events that Modify the System's Discretionary Access Controls - fchownat The changing of file permissions could indicate that a user is attempting to gain access to information that would otherwise be disallowed. Auditing DAC modifications can facilitate the identification of patterns of abuse among both authorized and unauthorized users. At a minimum the audit system should collect file permission changes for all users and root. Add the following to /etc/audit/audit.rules:
-a always,exit -F arch=b32 -S fchownat -F auid>=500 -F auid!=4294967295 -k perm_mod
If the system is 64 bit then also add the following:
-a always,exit -F arch=b64 -S fchownat -F auid>=500 -F auid!=4294967295 -k perm_mod
CCI-000126
AU-2 d
audit_rules_dac_modification_fremovexattr low Record Events that Modify the System's Discretionary Access Controls - fremovexattr The changing of file permissions could indicate that a user is attempting to gain access to information that would otherwise be disallowed. Auditing DAC modifications can facilitate the identification of patterns of abuse among both authorized and unauthorized users. At a minimum the audit system should collect file permission changes for all users and root. Add the following to /etc/audit/audit.rules:
-a always,exit -F arch=b32 -S fremovexattr -F auid>=500 -F auid!=4294967295 -k perm_mod
If the system is 64 bit then also add the following:
-a always,exit -F arch=b64 -S fremovexattr -F auid>=500 -F auid!=4294967295 -k perm_mod
CCI-000126
AU-2 d
audit_rules_dac_modification_fsetxattr low Record Events that Modify the System's Discretionary Access Controls - fsetxattr The changing of file permissions could indicate that a user is attempting to gain access to information that would otherwise be disallowed. Auditing DAC modifications can facilitate the identification of patterns of abuse among both authorized and unauthorized users. At a minimum the audit system should collect file permission changes for all users and root. Add the following to /etc/audit/audit.rules:
-a always,exit -F arch=b32 -S fsetxattr -F auid>=500 -F auid!=4294967295 -k perm_mod
If the system is 64 bit then also add the following:
-a always,exit -F arch=b64 -S fsetxattr -F auid>=500 -F auid!=4294967295 -k perm_mod
CCI-000126
AU-2 d
audit_rules_dac_modification_lchown low Record Events that Modify the System's Discretionary Access Controls - lchown The changing of file permissions could indicate that a user is attempting to gain access to information that would otherwise be disallowed. Auditing DAC modifications can facilitate the identification of patterns of abuse among both authorized and unauthorized users. At a minimum the audit system should collect file permission changes for all users and root. Add the following to /etc/audit/audit.rules:
-a always,exit -F arch=b32 -S lchown -F auid>=500 -F auid!=4294967295 -k perm_mod
If the system is 64 bit then also add the following:
-a always,exit -F arch=b64 -S lchown -F auid>=500 -F auid!=4294967295 -k perm_mod
CCI-000126
AU-2 d
audit_rules_dac_modification_lremovexattr low Record Events that Modify the System's Discretionary Access Controls - lremovexattr The changing of file permissions could indicate that a user is attempting to gain access to information that would otherwise be disallowed. Auditing DAC modifications can facilitate the identification of patterns of abuse among both authorized and unauthorized users. At a minimum the audit system should collect file permission changes for all users and root. Add the following to /etc/audit/audit.rules:
-a always,exit -F arch=b32 -S lremovexattr -F auid>=500 -F auid!=4294967295 -k perm_mod
If the system is 64 bit then also add the following:
-a always,exit -F arch=b64 -S lremovexattr -F auid>=500 -F auid!=4294967295 -k perm_mod
CCI-000126
AU-2 d
audit_rules_dac_modification_lsetxattr low Record Events that Modify the System's Discretionary Access Controls - lsetxattr The changing of file permissions could indicate that a user is attempting to gain access to information that would otherwise be disallowed. Auditing DAC modifications can facilitate the identification of patterns of abuse among both authorized and unauthorized users. At a minimum the audit system should collect file permission changes for all users and root. Add the following to /etc/audit/audit.rules:
-a always,exit -F arch=b32 -S lsetxattr -F auid>=500 -F auid!=4294967295 -k perm_mod
If the system is 64 bit then also add the following:
-a always,exit -F arch=b64 -S lsetxattr -F auid>=500 -F auid!=4294967295 -k perm_mod
CCI-000126
AU-2 d
audit_rules_dac_modification_removexattr low Record Events that Modify the System's Discretionary Access Controls - removexattr The changing of file permissions could indicate that a user is attempting to gain access to information that would otherwise be disallowed. Auditing DAC modifications can facilitate the identification of patterns of abuse among both authorized and unauthorized users. At a minimum the audit system should collect file permission changes for all users and root. Add the following to /etc/audit/audit.rules:
-a always,exit -F arch=b32 -S removexattr -F auid>=500 -F auid!=4294967295 -k perm_mod
If the system is 64 bit then also add the following:
-a always,exit -F arch=b64 -S removexattr -F auid>=500 -F auid!=4294967295 -k perm_mod
CCI-000126
AU-2 d
audit_rules_dac_modification_setxattr low Record Events that Modify the System's Discretionary Access Controls - setxattr The changing of file permissions could indicate that a user is attempting to gain access to information that would otherwise be disallowed. Auditing DAC modifications can facilitate the identification of patterns of abuse among both authorized and unauthorized users. At a minimum the audit system should collect file permission changes for all users and root. Add the following to /etc/audit/audit.rules:
-a always,exit -F arch=b32 -S setxattr -F auid>=500 -F auid!=4294967295 -k perm_mod
If the system is 64 bit then also add the following:
-a always,exit -F arch=b64 -S setxattr -F auid>=500 -F auid!=4294967295 -k perm_mod
CCI-000126
AU-2 d
audit_rules_unsuccessful_file_modification low Ensure auditd Collects Unauthorized Access Attempts to Files (unsuccessful) Unsuccessful attempts to access files could be an indicator of malicious activity on a system. Auditing these events could serve as evidence of potential system compromise. 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 access
If 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
CCI-000126
AU-2 d
audit_rules_privileged_commands low Ensure auditd Collects Information on the Use of Privileged Commands Privileged programs are subject to escalation-of-privilege attacks, which attempt to subvert their normal role of providing some necessary but limited capability. As such, motivation exists to monitor these programs for unusual activity. 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/null
Then, 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
CCI-000040
AC-6 (2)
audit_rules_media_export low Ensure auditd Collects Information on Exporting to Media (successful) The unauthorized exportation of data to external media could result in an information leak where classified information, Privacy Act information, and intellectual property could be lost. An audit trail should be created each time a filesystem is mounted to help identify and guard against information loss. 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
CCI-000126
AU-2 d
audit_rules_file_deletion_events low Ensure auditd Collects File Deletion Events by User Auditing file deletions will create an audit trail for files that are removed from the system. The audit trail could aid in system troubleshooting, as well as, detecting malicious processes that attempt to delete log files to conceal their presence. 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
CCI-000126
AU-2 d
audit_rules_sysadmin_actions low Ensure auditd Collects System Administrator Actions The actions taken by system administrators should be audited to keep a record of what was executed on the system, as well as, for accountability purposes. 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
CCI-000126
AU-2 d
audit_rules_kernel_module_loading low Ensure auditd Collects Information on Kernel Module Loading and Unloading The addition/removal of kernel modules can be used to alter the behavior of the kernel and potentially introduce malicious code into kernel space. It is important to have an audit trail of modules that have been introduced into the kernel. 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
CCI-000126
AU-2 d
service_xinetd_disabled medium Disable xinetd Service The xinetd service provides a dedicated listener service for some programs, which is no longer necessary for commonly-used network services. Disabling it ensures that these uncommon services are not running, and also prevents attacks against xinetd itself. The xinetd service can be disabled with the following command:
$ sudo chkconfig xinetd off
CCI-000305
CM-2 (4) (a)
package_xinetd_removed low Uninstall xinetd Package Removing the xinetd package decreases the risk of the xinetd service's accidental (or intentional) activation. The xinetd package can be uninstalled with the following command:
$ sudo yum erase xinetd
CCI-000305
CM-2 (4) (a)
package_telnet-server_removed high Uninstall telnet-server Package Removing the telnet-server package decreases the risk of the telnet service's accidental (or intentional) activation. The telnet-server package can be uninstalled with the following command:
$ sudo yum erase telnet-server
SRG-OS-000095-GPOS-00049
CCI-000305
CCI-000381
CM-2 (4) (a)
CM-7
service_telnetd_disabled high Disable telnet Service The telnet protocol uses unencrypted network communication, which means that data from the login session, including passwords and all other information transmitted during the session, can be stolen by eavesdroppers on the network. The telnet protocol is also subject to man-in-the-middle attacks. The telnet service can be disabled with the following command:
$ sudo chkconfig telnet off
SRG-OS-000033-GPOS-00014
SRG-OS-000074-GPOS-00042
SRG-OS-000125-GPOS-00065
CCI-000068
CCI-001436
CCI-000197
CCI-000877
CCI-000888
AC-17 (2)
AC-17 (8)
IA-5 (1) (c)
MA-4 c
MA-4 (6)
package_rsh-server_removed high Uninstall rsh-server Package The rsh-server package provides several obsolete and insecure network services. Removing it decreases the risk of those services' accidental (or intentional) activation. The rsh-server package can be uninstalled with the following command:
$ sudo yum erase rsh-server
SRG-OS-000095-GPOS-00049
CCI-000305
CCI-000381
CM-2 (4) (a)
CM-7
service_rsh_disabled high Disable rsh Service The rsh service uses unencrypted network communications, which means that data from the login session, including passwords and all other information transmitted during the session, can be stolen by eavesdroppers on the network. 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
SRG-OS-000033-GPOS-00014
CCI-000068
CCI-001436
AC-17 (2)
AC-17 (8)
service_rexec_disabled high Disable rexec Service The rexec service uses unencrypted network communications, which means that data from the login session, including passwords and all other information transmitted during the session, can be stolen by eavesdroppers on the network. 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
SRG-OS-000033-GPOS-00014
CCI-000068
CCI-001436
AC-17 (2)
AC-17 (8)
service_rlogin_disabled high Disable rlogin Service The rlogin service uses unencrypted network communications, which means that data from the login session, including passwords and all other information transmitted during the session, can be stolen by eavesdroppers on the network. 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
CCI-001436
AC-17 (8)
package_ypserv_removed medium Uninstall ypserv Package Removing the ypserv package decreases the risk of the accidental (or intentional) activation of NIS or NIS+ services. The ypserv package can be uninstalled with the following command:
$ sudo yum erase ypserv
SRG-OS-000095-GPOS-00049
CCI-000305
CCI-000381
CM-2 (4) (a)
CM-7
service_ypbind_disabled medium Disable ypbind Service Disabling the ypbind service ensures the system is not acting as a client in a NIS or NIS+ domain. 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
CCI-000305
CM-2 (4) (a)
package_tftp-server_removed medium Uninstall tftp-server Package Removing the tftp-server package decreases the risk of the accidental (or intentional) activation of tftp services. The tftp-server package can be removed with the following command:
$ sudo yum erase tftp-server
CCI-000305
CM-2 (4) (a)
service_tftp_disabled medium Disable tftp Service Disabling the tftp service ensures the system is not acting as a TFTP server, which does not provide encryption or authentication. The tftp service should be disabled. The tftp service can be disabled with the following command:
$ sudo chkconfig tftp off
CCI-001436
AC-17 (8)
service_crond_enabled medium Enable cron Service Due to its usage for maintenance and security-supporting tasks, enabling the cron daemon is essential. 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
sshd_allow_only_protocol2 high Allow Only SSH Protocol 2 SSH protocol version 1 suffers from design flaws that result in security vulnerabilities and should not be used. 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
CCI-000776
CCI-000774
CCI-001436
IA-2 (9)
IA-2 (8)
AC-17 (8)
sshd_set_idle_timeout low Set SSH Idle Timeout Interval Causing idle users to be automatically logged out guards against compromises one system leading trivially to compromises on another. SSH allows administrators to set an idle timeout interval. After this interval has passed, the idle user will be automatically logged out.

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

If a shorter timeout has already been set for the login shell, that value will preempt any SSH setting made here. Keep in mind that some processes may stop SSH from correctly detecting that the user is idle.
SRG-OS-000126-GPOS-00066
SRG-OS-000163-GPOS-00072
CCI-000879
CCI-001133
MA-4 e
SC-10
sshd_set_keepalive low Set SSH Client Alive Count This ensures a user login will be terminated as soon as the ClientAliveCountMax is reached. To ensure the SSH idle timeout occurs precisely when the ClientAliveCountMax is set, edit /etc/ssh/sshd_config as follows:
ClientAliveCountMax 0
SRG-OS-000126-GPOS-00066
SRG-OS-000163-GPOS-00072
CCI-000879
CCI-001133
MA-4 e
SC-10
sshd_disable_rhosts medium Disable SSH Support for .rhosts Files SSH trust relationships mean a compromise on one host can allow an attacker to move trivially to other hosts. 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
SRG-OS-000105-GPOS-00052
SRG-OS-000106-GPOS-00053
CCI-000765
CCI-000766
IA-2 (1)
IA-2 (2)
disable_host_auth medium Disable Host-Based Authentication SSH trust relationships mean a compromise on one host can allow an attacker to move trivially to other hosts. 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
SRG-OS-000105-GPOS-00052
SRG-OS-000106-GPOS-00053
CCI-000765
CCI-000766
IA-2 (1)
IA-2 (2)
sshd_disable_root_login medium Disable SSH Root Login Permitting direct root login reduces auditable information about who ran privileged commands on the system and also allows direct attack attempts on root's password. 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
SRG-OS-000109-GPOS-00056
CCI-000770
IA-2 (5) (b)
sshd_disable_empty_passwords high Disable SSH Access via Empty Passwords Configuring this setting for the SSH daemon provides additional assurance that remote login via SSH will require a password, even in the event of misconfiguration elsewhere. To explicitly disallow remote login from accounts with empty passwords, add or correct the following line in /etc/ssh/sshd_config:
PermitEmptyPasswords no
Any accounts with empty passwords should be disabled immediately, and PAM configuration should prevent users from being able to assign themselves empty passwords.
SRG-OS-000105-GPOS-00052
SRG-OS-000106-GPOS-00053
CCI-000765
CCI-000766
IA-2 (1)
IA-2 (2)
sshd_enable_warning_banner medium Enable SSH Warning Banner The warning message reinforces policy awareness during the login process and facilitates possible legal action against attackers. Alternatively, systems whose ownership should not be obvious should ensure usage of a banner that does not provide easy attribution. To enable the warning banner and ensure it is consistent across the system, add or correct the following line in /etc/ssh/sshd_config:
Banner /etc/issue
Another section contains information on how to create an appropriate system-wide warning banner.
SRG-OS-000023-GPOS-00006
CCI-000048
AC-8 a
sshd_do_not_permit_user_env low Do Not Allow SSH Environment Options SSH environment options potentially allow users to bypass access restriction in some configurations. 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
CCI-001414
AC-4
sshd_use_approved_ciphers medium Use Only Approved Ciphers Approved algorithms should impart some level of confidence in their implementation. These are also required for compliance. 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-cbc
The man page sshd_config(5) contains a list of supported ciphers.
SRG-OS-000120-GPOS-00061
CCI-000803
CCI-001144
CCI-001145
CCI-001146
IA-7
SC-13
SC-13 (1)
SC-13 (2)
service_avahi-daemon_disabled low Disable Avahi Server Software Because the Avahi daemon service keeps an open network port, it is subject to network attacks. Its functionality is convenient but is only appropriate if the local network can be trusted. The avahi-daemon service can be disabled with the following command:
$ sudo chkconfig avahi-daemon off
SRG-OS-000480-GPOS-00232
SRG-OS-000480-GPOS-00231
SRG-OS-000480-GPOS-00230
SRG-OS-000480-GPOS-00229
SRG-OS-000480-GPOS-00228
SRG-OS-000480-GPOS-00227
SRG-OS-000480-GPOS-00226
SRG-OS-000480-GPOS-00225
SRG-OS-000360-GPOS-00147
CCI-000366
CM-6 b
service_ntpd_enabled medium Enable the NTP Daemon Enabling the ntpd service ensures that the ntpd service will be running and that the system will synchronize its time to any servers specified. This is important whether the system is configured to be a client (and synchronize only its own clock) or it is also acting as an NTP server to other systems. Synchronizing time is essential for authentication services such as Kerberos, but it is also important for maintaining accurate logs and auditing possible security breaches.

The NTP daemon offers all of the functionality of ntpdate, which is now deprecated. Additional information on this is available at http://support.ntp.org/bin/view/Dev/DeprecatingNtpdate
The ntpd service can be enabled with the following command:
$ sudo chkconfig --level 2345 ntpd on
CCI-000160
AU-8 (1)
ntpd_specify_remote_server medium Specify a Remote NTP Server Synchronizing with an NTP server makes it possible to collate system logs from multiple sources or correlate computer events with real time events. To specify a remote NTP server for time synchronization, edit the file /etc/ntp.conf. Add or correct the following lines, substituting the IP or hostname of a remote NTP server for ntpserver:
server ntpserver
This instructs the NTP software to contact that remote server to obtain time data.
CCI-000160
AU-8 (1)
postfix_network_listening_disabled medium Disable Postfix Network Listening This ensures postfix accepts mail messages (such as cron job reports) from the local system only, and not from the network, which protects it from network attack. Edit the file /etc/postfix/main.cf to ensure that only the following inet_interfaces line appears:
inet_interfaces = localhost
SRG-OS-000096-GPOS-00050
CCI-000382
CM-7
package_openldap-servers_removed low Uninstall openldap-servers Package The openldap-servers package is not installed by default on RHEL6 machines. It is needed only by the OpenLDAP server system, not clients which use LDAP for authentication. If the system is not intended for use as an LDAP server, openldap-servers should be removed. 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-servers
The 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.
SRG-OS-000480-GPOS-00232
SRG-OS-000480-GPOS-00231
SRG-OS-000480-GPOS-00230
SRG-OS-000480-GPOS-00229
SRG-OS-000480-GPOS-00228
SRG-OS-000480-GPOS-00227
SRG-OS-000480-GPOS-00226
SRG-OS-000480-GPOS-00225
SRG-OS-000360-GPOS-00147
CCI-000366
CM-6 b
gconf_gnome_screensaver_idle_delay medium Set GNOME Login Inactivity Timeout Setting the idle delay controls when the screensaver will start, and can be combined with screen locking to prevent access from passersby. 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 
SRG-OS-000029-GPOS-00010
CCI-000057
AC-11 a
accounts_tmout low Set Interactive Session Timeout Terminating an idle session within a short time period reduces the window of opportunity for unauthorized personnel to take control of a management session enabled on the console or console port that has been left unattended.
gconf_gnome_screensaver_idle_activation_enabled medium GNOME Desktop Screensaver Mandatory Use Enabling idle activation of the screensaver ensures the screensaver will be activated after the idle delay. Applications requiring continuous, real-time screen display (such as network management products) require the login session does not have administrator rights and the display station is located in a controlled-access area. 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
SRG-OS-000029-GPOS-00010
CCI-000057
AC-11 a
gconf_gnome_screensaver_lock_enabled medium Enable Screen Lock Activation After Idle Period Enabling the activation of the screen lock after an idle period ensures password entry will be required in order to access the system, preventing access by passersby. 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
SRG-OS-000029-GPOS-00010
CCI-000057
AC-11 a
gconf_gnome_screensaver_mode_blank low Implement Blank Screensaver Setting the screensaver mode to blank-only conceals the contents of the display from passersby. 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
SRG-OS-000031-GPOS-00012
CCI-000060
AC-11 (1)
service_abrtd_disabled low Disable Automatic Bug Reporting Tool (abrtd) Mishandling crash data could expose sensitive information about vulnerabilities in software executing on the local machine, as well as sensitive information from within a process's address space or registers. 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
SRG-OS-000095-GPOS-00049
CCI-000381
CM-7
service_autofs_disabled low Disable the Automounter Disabling the automounter permits the administrator to statically control filesystem mounting through /etc/fstab. 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
SRG-OS-000480-GPOS-00232
SRG-OS-000480-GPOS-00231
SRG-OS-000480-GPOS-00230
SRG-OS-000480-GPOS-00229
SRG-OS-000480-GPOS-00228
SRG-OS-000480-GPOS-00227
SRG-OS-000480-GPOS-00226
SRG-OS-000480-GPOS-00225
SRG-OS-000360-GPOS-00147
CCI-000366
CM-6 b
service_ntpdate_disabled low Disable ntpdate Service (ntpdate) The ntpdate service may only be suitable for systems which are rebooted frequently enough that clock drift does not cause problems between reboots. In any event, the functionality of the ntpdate service is now available in the ntpd program and should be considered deprecated. 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
SRG-OS-000096-GPOS-00050
CCI-000382
CM-7
service_oddjobd_disabled low Disable Odd Job Daemon (oddjobd) The oddjobd service may provide necessary functionality in some environments, and can be disabled if it is not needed. Execution of tasks by privileged programs, on behalf of unprivileged ones, has traditionally been a source of privilege escalation security issues. 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
SRG-OS-000095-GPOS-00049
CCI-000381
CM-7
service_qpidd_disabled low Disable Apache Qpid (qpidd) The qpidd service is automatically installed when the "base" package selection is selected during installation. The qpidd service listens for network connections, which increases the attack surface of the system. If the system is not intended to receive AMQP traffic, then the qpidd service is not needed and should be disabled or removed. 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
SRG-OS-000096-GPOS-00050
CCI-000382
CM-7
service_rdisc_disabled low Disable Network Router Discovery Daemon (rdisc) General-purpose systems typically have their network and routing information configured statically by a system administrator. Workstations or some special-purpose systems often use DHCP (instead of IRDP) to retrieve dynamic network configuration information. 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
SRG-OS-000096-GPOS-00050
CCI-000382
CM-7
mount_option_nodev_remote_filesystems medium Mount Remote Filesystems with nodev Legitimate device files should only exist in the /dev directory. NFS mounts should not present device files to users. Add the nodev option to the fourth column of /etc/fstab for the line which controls mounting of any NFS mounts.
mount_option_nosuid_remote_filesystems medium Mount Remote Filesystems with nosuid NFS mounts should not present suid binaries to users. Only vendor-supplied suid executables should be installed to their default location on the local filesystem. Add the nosuid option to the fourth column of /etc/fstab for the line which controls mounting of any NFS mounts.
require_smb_client_signing low Require Client SMB Packet Signing, if using smbclient Packet signing can prevent man-in-the-middle attacks which modify SMB packets in transit. 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 = mandatory
Requiring samba clients such as smbclient to use packet signing ensures they can only communicate with servers that support packet signing.
mount_option_smb_client_signing low Require Client SMB Packet Signing, if using mount.cifs Packet signing can prevent man-in-the-middle attacks which modify SMB packets in transit. 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.
encrypt_partitions low Encrypt Partitions The risk of a system's physical compromise, particularly mobile systems such as laptops, places its data at risk of compromise. Encrypting this data mitigates the risk of its loss if the system is lost. 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=PASSPHRASE
Any 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
SRG-OS-000185-GPOS-00079
CCI-001019
CCI-001199
CCI-001200
MP-4 (1)
SC-28
SC-28 (1)
kernel_disable_entropy_contribution_for_solid_state_drives medium Ensure Solid State Drives Do Not Contribute To Random-Number Entropy Pool In contrast to traditional electromechanical magnetic disks, containing spinning disks and / or movable read / write heads, the solid-state storage devices (SSDs) do not contain moving / mechanical components. Therefore the I/O operation completion times are much more predictable for them. For each solid-state drive on the system, run:
 # echo 0 > /sys/block/DRIVE/queue/add_random
rpm_verify_permissions low Verify and Correct File Permissions with RPM Permissions on system binaries and configuration files that are too generous could allow an unauthorized user to gain privileges that they should not have. The permissions set by the vendor should be maintained. Any deviations from this baseline should be investigated. 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 FILENAME
Next, run the following command to reset its permissions to the correct values:
$ sudo rpm --setperms PACKAGENAME
SRG-OS-000256-GPOS-00097
SRG-OS-000257-GPOS-00098
SRG-OS-000258-GPOS-00099
CCI-001493
CCI-001494
CCI-001495
AU-9
AU-9
AU-9
rpm_verify_hashes low Verify File Hashes with RPM The hashes of important files like system executables should match the information given by the RPM database. Executables with erroneous hashes could be a sign of nefarious activity on the system. 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 FILENAME
The package can be reinstalled from a yum repository using the command:
$ sudo yum reinstall PACKAGENAME
Alternatively, the package can be reinstalled from trusted media using the command:
$ sudo rpm -Uvh PACKAGENAME
SRG-OS-000278-GPOS-00108
CCI-001496
AU-9 (3)
mount_option_nodev_removable_partitions low Add nodev Option to Removable Media Partitions The only legitimate location for device files is the /dev directory located on the root partition. An exception to this is chroot jails, and it is not advised to set nodev on partitions which contain their root filesystems. 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.
mount_option_noexec_removable_partitions low Add noexec Option to Removable Media Partitions Allowing users to execute binaries from removable media such as USB keys exposes the system to potential compromise. 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. CCI-000087
AC-19 e
mount_option_nosuid_removable_partitions low Add nosuid Option to Removable Media Partitions The presence of SUID and SGID executables should be tightly controlled. Allowing users to introduce SUID or SGID binaries from partitions mounted off of removable media would allow them to introduce their own highly-privileged programs. 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.
mount_option_dev_shm_nodev low Add nodev Option to /dev/shm The only legitimate location for device files is the /dev directory located on the root partition. The only exception to this is chroot jails. 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.
mount_option_dev_shm_nosuid low Add nosuid Option to /dev/shm The presence of SUID and SGID executables should be tightly controlled. Users should not be able to execute SUID or SGID binaries from temporary storage partitions. 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.
mount_option_dev_shm_noexec low Add noexec Option to /dev/shm Allowing users to execute binaries from world-writable directories such as /dev/shm can expose the system to potential compromise. 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.
file_permissions_unauthorized_world_writable medium Ensure No World-Writable Files Exist Data in world-writable files can be modified by any user on the system. In almost all circumstances, files can be configured using a combination of user and group permissions to support whatever legitimate access is needed without the risk caused by world-writable files. It is generally a good idea to remove global (other) write access to a file when it is discovered. However, check with documentation for specific applications before making changes. Also, monitor for recurring world-writable files, as these may be symptoms of a misconfigured application or user account.
install_antivirus low Install Virus Scanning Software Virus scanning software can be used to detect if a system has been compromised by computer viruses, as well as to limit their spread to other systems. 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. CCI-001239
CCI-001668
SI-3 a
SI-3 a
install_hids medium Install Intrusion Detection Software Host-based intrusion detection tools provide a system-level defense when an intruder gains access to a system or network. 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.
CCI-001263
SI-4 (5)
disable_ctrlaltdel_reboot high Disable Ctrl-Alt-Del Reboot Activation A locally logged-in user who presses Ctrl-Alt-Del, when at the console, can reboot the system. If accidentally pressed, as could happen in the case of mixed OS environment, this can create the risk of short-term loss of availability of systems due to unintentional reboot. In the GNOME graphical environment, risk of unintentional reboot from the Ctrl-Alt-Del sequence is reduced because the user will be prompted before any action is taken. NOTE: When updating the initscripts package on a Red Hat Enterprise Linux 6 system, custom changes to /etc/init/control-alt-delete.conf may be overwritten. Refer to https://access.redhat.com/site/solutions/70464 for additional information. 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"
service_postfix_enabled low Enable Postfix Service Local mail delivery is essential to some system maintenance and notification tasks. 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
package_sendmail_removed medium Uninstall Sendmail Package The sendmail software was not developed with security in mind and its design prevents it from being effectively contained by SELinux. Postfix should be used instead. 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
service_netconsole_disabled low Disable Network Console (netconsole) The netconsole service is not necessary unless there is a need to debug kernel panics, which is not common. 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
SRG-OS-000095-GPOS-00049
CCI-000381
CM-7
xwindows_runlevel_setting low Disable X Windows Startup By Setting Runlevel Unnecessary services should be disabled to decrease the attack surface of the system. 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:
SRG-OS-000480-GPOS-00232
SRG-OS-000480-GPOS-00231
SRG-OS-000480-GPOS-00230
SRG-OS-000480-GPOS-00229
SRG-OS-000480-GPOS-00228
SRG-OS-000480-GPOS-00227
SRG-OS-000480-GPOS-00226
SRG-OS-000480-GPOS-00225
SRG-OS-000360-GPOS-00147
CCI-000366
CM-6 b
package_xorg-x11-server-common_removed low Remove the X Windows Package Group Unnecessary packages should not be installed to decrease the attack surface of the system. 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"
SRG-OS-000480-GPOS-00232
SRG-OS-000480-GPOS-00231
SRG-OS-000480-GPOS-00230
SRG-OS-000480-GPOS-00229
SRG-OS-000480-GPOS-00228
SRG-OS-000480-GPOS-00227
SRG-OS-000480-GPOS-00226
SRG-OS-000480-GPOS-00225
SRG-OS-000360-GPOS-00147
CCI-000366
CM-6 b
sysconfig_networking_bootproto_ifcfg low Disable DHCP Client DHCP relies on trusting the local network. If the local network is not trusted, then it should not be used. However, the automatic configuration provided by DHCP is commonly used and the alternative, manual configuration, presents an unacceptable burden in many circumstances. For each interface on the system (e.g. eth0), edit /etc/sysconfig/network-scripts/ifcfg-interface and make the following changes:
  • Correct the BOOTPROTO line to read:
    BOOTPROTO=none
  • Add or correct the following lines, substituting the appropriate values based on your site's addressing scheme:
    NETMASK=255.255.255.0
    IPADDR=192.168.1.2
    GATEWAY=192.168.1.1
SRG-OS-000480-GPOS-00232
SRG-OS-000480-GPOS-00231
SRG-OS-000480-GPOS-00230
SRG-OS-000480-GPOS-00229
SRG-OS-000480-GPOS-00228
SRG-OS-000480-GPOS-00227
SRG-OS-000480-GPOS-00226
SRG-OS-000480-GPOS-00225
SRG-OS-000360-GPOS-00147
CCI-000366
CM-6 b
accounts_password_pam_unix_remember medium Limit Password Reuse Preventing re-use of previous passwords helps ensure that a compromised password is not re-used by a user. 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.somodule, as shown below:
  • for the pam_unix.so case:
    password sufficient pam_unix.so existing_options remember=
  • for the pam_pwhistory.so case:
    password requisite pam_pwhistory.so existing_options remember=
The DoD STIG requirement is 5 passwords.
SRG-OS-000077-GPOS-00045
CCI-000200
IA-5 (1) (e)
gid_passwd_group_same low All GIDs referenced in /etc/passwd must be defined in /etc/group Inconsistency in GIDs between /etc/passwd and /etc/group could lead to a user having unintended rights. Add a group to the system for each GID referenced without a corresponding group. SRG-OS-000480-GPOS-00232
SRG-OS-000480-GPOS-00231
SRG-OS-000480-GPOS-00230
SRG-OS-000480-GPOS-00229
SRG-OS-000480-GPOS-00228
SRG-OS-000480-GPOS-00227
SRG-OS-000480-GPOS-00226
SRG-OS-000480-GPOS-00225
SRG-OS-000360-GPOS-00147
CCI-000366
CM-6 b
account_unique_name low Ensure All Accounts on the System Have Unique Names Unique usernames allow for accountability on the system. Change usernames, or delete accounts, so each has a unique name. SRG-OS-000109-GPOS-00056
SRG-OS-000121-GPOS-00062
CCI-000770
CCI-000804
IA-2 (5) (b)
IA-8
account_temp_expire_date low Assign Expiration Date to Temporary Accounts When temporary and emergency accounts are created, there is a risk they may remain in place and active after the need for them no longer exists. Account expiration greatly reduces the risk of accounts being misused or hijacked.
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.
SRG-OS-000002-GPOS-00002
SRG-OS-000123-GPOS-00064
CCI-000016
CCI-001682
AC-2 (2)
accounts_password_pam_maxrepeat low Set Password to Maximum of Three Consecutive Repeating Characters Passwords with excessive repeating characters may be more vulnerable to password-guessing attacks. 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=
SRG-OS-000480-GPOS-00232
SRG-OS-000480-GPOS-00231
SRG-OS-000480-GPOS-00230
SRG-OS-000480-GPOS-00229
SRG-OS-000480-GPOS-00228
SRG-OS-000480-GPOS-00227
SRG-OS-000480-GPOS-00226
SRG-OS-000480-GPOS-00225
SRG-OS-000360-GPOS-00147
CCI-000366
CM-6 b
no_files_unowned_by_user low Ensure All Files Are Owned by a User Unowned files do not directly imply a security problem, but they are generally a sign that something is amiss. They may be caused by an intruder, by incorrect software installation or draft software removal, or by failure to remove all files belonging to a deleted account. The files should be repaired so they will not cause problems when accounts are created in the future, and the cause should be discovered and addressed. 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. CCI-000224
AC-4 (17) (c)
file_permissions_ungroupowned low Ensure All Files Are Owned by a Group Unowned files do not directly imply a security problem, but they are generally a sign that something is amiss. They may be caused by an intruder, by incorrect software installation or draft software removal, or by failure to remove all files belonging to a deleted account. The files should be repaired so they will not cause problems when accounts are created in the future, and the cause should be discovered and addressed. 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. CCI-000224
AC-4 (17) (c)
aide_periodic_cron_checking medium Configure Periodic Execution of AIDE By default, AIDE does not install itself for periodic execution. Periodically running AIDE is necessary to reveal unexpected changes in installed files. To implement a daily execution of AIDE at 4:05am using cron, add the following line to /etc/crontab:
05 4 * * * root /usr/sbin/aide --check
AIDE can be executed periodically through other means; this is merely one example.
CCI-000374
CCI-000416
CCI-001069
CCI-001263
CCI-001297
CCI-001589
CM-6 (2)
CM-8 (3) (a)
RA-5 (7)
SI-4 (5)
SI-7
CM-6 (3)
disable_users_coredumps low Disable Core Dumps for All Users A core dump includes a memory image taken at the time the operating system terminates an application. The memory image could contain sensitive data and is generally useful only for developers trying to debug problems. To disable core dumps for all users, add the following line to /etc/security/limits.conf:
*     hard   core    0
no_insecure_locks_exports high Ensure Insecure File Locking is Not Allowed Allowing insecure file locking could allow for sensitive data to be viewed or edited by an unauthorized user. 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. SRG-OS-000104-GPOS-00051
CCI-000764
IA-2
auditd_data_retention_space_left_action medium Configure auditd space_left Action on Low Disk Space Notifying administrators of an impending disk space problem may allow them to take corrective action prior to any disruption. The auditd service can be configured to take an action when disk space starts to run low. Edit the file /etc/audit/auditd.conf. Modify the following line, substituting ACTION appropriately:
space_left_action = ACTION
Possible values for ACTION are described in the auditd.conf man page. These include:
  • ignore
  • syslog
  • email
  • exec
  • suspend
  • single
  • halt
Set this to email (instead of the default, which is suspend) as it is more likely to get prompt attention. Acceptable values also include suspend, single, and halt.
SRG-OS-000047-GPOS-00023
CCI-000140
CCI-000143
AU-5 b
AU-5 (1)
auditd_data_retention_action_mail_acct medium Configure auditd mail_acct Action on Low Disk Space Email sent to the root account is typically aliased to the administrators of the system, who can take appropriate action. 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 = 
SRG-OS-000046-GPOS-00022
CCI-000139
CCI-000144
AU-5 a
AU-5 (2)
kernel_module_bluetooth_disabled medium Disable Bluetooth Kernel Modules If Bluetooth functionality must be disabled, preventing the kernel from loading the kernel module provides an additional safeguard against its activation. 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
CCI-000085
CCI-001551
AC-19 c
AC-4
kernel_module_usb-storage_disabled low Disable Modprobe Loading of USB Storage Driver USB storage devices such as thumb drives can be used to introduce malicious software. 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/true
This will prevent the modprobe program from loading the usb-storage module, but will not prevent an administrator (or another program) from using the insmod program to load the module manually.
CCI-001250
CCI-000085
SI-3 (5)
AC-19 c
accounts_max_concurrent_login_sessions low Limit the Number of Concurrent Login Sessions Allowed Per User Limiting simultaneous user logins can insulate the system from denial of service problems caused by excessive logins. Automated login processes operating improperly or maliciously may result in an exceptional number of simultaneous login sessions. 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 
SRG-OS-000027-GPOS-00008
CCI-000054
AC-10
set_iptables_default_rule_forward medium Set Default iptables Policy for Forwarded Packets In iptables, the default policy is applied only after all the applicable rules in the table are examined for a match. Setting the default policy to DROP implements proper design for a firewall, i.e. any packets which are not explicitly permitted should not be accepted. 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]
CCI-001109
SC-7 (5)
package_openswan_installed low Install openswan or libreswan Package Providing the ability for remote users or systems to initiate a secure VPN connection protects information when it is transmitted over a wide area network. 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 openswan
The libreswan package can be installed with the following command:
$ sudo yum install libreswan
CCI-001130
CCI-001131
SC-9
SC-9 (1)
gconf_gdm_enable_warning_gui_banner medium Enable GUI Warning Banner An appropriate warning message reinforces policy awareness during the login process and facilitates possible legal action against attackers. 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 true
To display a banner, this setting must be enabled and then banner text must also be set.
SRG-OS-000023-GPOS-00006
SRG-OS-000024-GPOS-00007
CCI-000048
CCI-000050
AC-8 a
AC-8 b
gconf_gdm_set_login_banner_text medium Set GUI Warning Banner Text An appropriate warning message reinforces policy awareness during the login process and facilitates possible legal action against attackers. 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.
SRG-OS-000023-GPOS-00006
SRG-OS-000228-GPOS-00088
SRG-OS-000228-GPOS-00088
SRG-OS-000228-GPOS-00088
SRG-OS-000228-GPOS-00088
SRG-OS-000228-GPOS-00088
CCI-000048
CCI-001384
CCI-001385
CCI-001386
CCI-001387
CCI-001388
AC-8 a
AC-8 c
AC-8 c
AC-8 c
AC-8 c
AC-8 c
service_bluetooth_disabled medium Disable Bluetooth Service Disabling the bluetooth service prevents the system from attempting connections to Bluetooth devices, which entails some security risk. Nevertheless, variation in this risk decision may be expected due to the utility of Bluetooth connectivity and its limited range. The bluetooth service can be disabled with the following command:
$ sudo chkconfig bluetooth off
$ sudo service bluetooth stop
CCI-000085
CCI-001551
AC-19 c
AC-4
account_disable_post_pw_expiration low Set Account Expiration Following Inactivity Disabling inactive accounts ensures that accounts which may not have been responsibly removed are not available to attackers who may have compromised their credentials. 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.
SRG-OS-000002-GPOS-00002
SRG-OS-000118-GPOS-00060
CCI-000016
CCI-000017
CCI-000795
AC-2 (2)
AC-2 (3)
IA-4 e
dir_perms_world_writable_sticky_bits low Verify that All World-Writable Directories Have Sticky Bits Set Failing to set the sticky bit on public directories allows unauthorized users to delete files in the directory structure.

The only authorized public directories are those temporary directories supplied with the system, or those designed to be temporary file repositories. The setting is normally reserved for directories used by the system, by users for temporary file storage (such as /tmp), and for directories requiring global read/write access.
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
dir_perms_world_writable_system_owned low Ensure All World-Writable Directories Are Owned by a System Account Allowing a user account to own a world-writable directory is undesirable because it allows the owner of that directory to remove or replace any files that may be placed in the directory by other users. 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.
tftpd_uses_secure_mode high Ensure tftp Daemon Uses Secure Mode Using the -s option causes the TFTP service to only serve files from the given directory. Serving files from an intentionally-specified directory reduces the risk of sharing files which should remain private. 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
SRG-OS-000480-GPOS-00232
SRG-OS-000480-GPOS-00231
SRG-OS-000480-GPOS-00230
SRG-OS-000480-GPOS-00229
SRG-OS-000480-GPOS-00228
SRG-OS-000480-GPOS-00227
SRG-OS-000480-GPOS-00226
SRG-OS-000480-GPOS-00225
SRG-OS-000360-GPOS-00147
CCI-000366
CM-6 b
ftp_log_transactions low Enable Logging of All FTP Transactions To trace malicious activity facilitated by the FTP service, it must be configured to ensure that all commands sent to the FTP server are logged using the verbose vsftpd log format. The default vsftpd log file is /var/log/vsftpd.log. 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
snmpd_use_newer_protocol medium Configure SNMP Service to Use Only SNMPv3 or Newer Earlier versions of SNMP are considered insecure, as they potentially allow unauthorized access to detailed system management information. Edit /etc/snmp/snmpd.conf, removing any references to rocommunity, rwcommunity, or com2sec. Upon doing that, restart the SNMP service:
$ sudo service snmpd restart
snmpd_not_default_password high Ensure Default Password Is Not Used Presence of the default SNMP password enables querying of different system aspects and could result in unauthorized knowledge of the system. Edit /etc/snmp/snmpd.conf, remove default community string public. Upon doing that, restart the SNMP service:
$ sudo service snmpd restart
accounts_umask_etc_bashrc low Ensure the Default Bash Umask is Set Correctly The umask value influences the permissions assigned to files when they are created. A misconfigured umask value could result in files with excessive permissions that can be read or written to by unauthorized users. 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 
SRG-OS-000480-GPOS-00232
SRG-OS-000480-GPOS-00231
SRG-OS-000480-GPOS-00230
SRG-OS-000480-GPOS-00229
SRG-OS-000480-GPOS-00228
SRG-OS-000480-GPOS-00227
SRG-OS-000480-GPOS-00226
SRG-OS-000480-GPOS-00225
SRG-OS-000360-GPOS-00147
CCI-000366
CM-6 b
accounts_umask_etc_csh_cshrc low Ensure the Default C Shell Umask is Set Correctly The umask value influences the permissions assigned to files when they are created. A misconfigured umask value could result in files with excessive permissions that can be read or written to by unauthorized users. 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 
SRG-OS-000480-GPOS-00232
SRG-OS-000480-GPOS-00231
SRG-OS-000480-GPOS-00230
SRG-OS-000480-GPOS-00229
SRG-OS-000480-GPOS-00228
SRG-OS-000480-GPOS-00227
SRG-OS-000480-GPOS-00226
SRG-OS-000480-GPOS-00225
SRG-OS-000360-GPOS-00147
CCI-000366
CM-6 b
accounts_umask_etc_profile low Ensure the Default Umask is Set Correctly in /etc/profile The umask value influences the permissions assigned to files when they are created. A misconfigured umask value could result in files with excessive permissions that can be read or written to by unauthorized users. 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 
SRG-OS-000480-GPOS-00232
SRG-OS-000480-GPOS-00231
SRG-OS-000480-GPOS-00230
SRG-OS-000480-GPOS-00229
SRG-OS-000480-GPOS-00228
SRG-OS-000480-GPOS-00227
SRG-OS-000480-GPOS-00226
SRG-OS-000480-GPOS-00225
SRG-OS-000360-GPOS-00147
CCI-000366
CM-6 b
accounts_umask_etc_login_defs low Ensure the Default Umask is Set Correctly in login.defs The umask value influences the permissions assigned to files when they are created. A misconfigured umask value could result in files with excessive permissions that can be read and written to by unauthorized users. 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 
SRG-OS-000480-GPOS-00232
SRG-OS-000480-GPOS-00231
SRG-OS-000480-GPOS-00230
SRG-OS-000480-GPOS-00229
SRG-OS-000480-GPOS-00228
SRG-OS-000480-GPOS-00227
SRG-OS-000480-GPOS-00226
SRG-OS-000480-GPOS-00225
SRG-OS-000360-GPOS-00147
CCI-000366
CM-6 b
umask_for_daemons low Set Daemon Umask The umask influences the permissions assigned to files created by a process at run time. An unnecessarily permissive umask could result in files being created with insecure permissions. The file /etc/init.d/functions includes initialization parameters for most or all daemons started at boot time. The default umask of 022 prevents creation of group- or world-writable files. To set the default umask for daemons, edit the following line, inserting 022 or 027 for umask appropriately:
umask 
Setting the umask to too restrictive a setting can cause serious errors at runtime. Many daemons on the system already individually restrict themselves to a umask of 077 in their own init scripts.
no_netrc_files medium Verify No netrc Files Exist Unencrypted passwords for remote FTP servers may be stored in .netrc files. DoD policy requires passwords be encrypted in storage and not used in access scripts. 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. SRG-OS-000073-GPOS-00041
CCI-000196
IA-5 (1) (c)
ftp_present_banner medium Create Warning Banners for All FTP Users This setting will cause the system greeting banner to be used for FTP connections as well. 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
SRG-OS-000023-GPOS-00006
CCI-000048
AC-8 a
smartcard_auth medium Enable Smart Card Login Smart card login provides two-factor authentication stronger than that provided by a username and password combination. Smart cards leverage PKI (public key infrastructure) in order to provide and verify credentials. To enable smart card authentication, consult the documentation at: For guidance on enabling SSH to authenticate against a Common Access Card (CAC), consult documentation at: SRG-OS-000105-GPOS-00052
SRG-OS-000106-GPOS-00053
SRG-OS-000107-GPOS-00054
SRG-OS-000108-GPOS-00055
CCI-000765
CCI-000766
CCI-000767
CCI-000768
CCI-000771
CCI-000772
CCI-000884
IA-2 (1)
IA-2 (2)
IA-2 (3)
IA-2 (4)
IA-2 (6)
IA-2 (7)
MA-4 (4)
display_login_attempts low Set Last Login/Access Notification Users need to be aware of activity that occurs regarding their account. Providing users with information regarding the number of unsuccessful attempts that were made to login to their account allows the user to determine if any unauthorized activity has occurred and gives them an opportunity to notify administrators. 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
SRG-OS-000480-GPOS-00232
SRG-OS-000480-GPOS-00231
SRG-OS-000480-GPOS-00230
SRG-OS-000480-GPOS-00229
SRG-OS-000480-GPOS-00228
SRG-OS-000480-GPOS-00227
SRG-OS-000480-GPOS-00226
SRG-OS-000480-GPOS-00225
SRG-OS-000360-GPOS-00147
CCI-000366
CM-6 b
accounts_passwords_pam_faillock_unlock_time medium Set Lockout Time For Failed Password Attempts Locking out user accounts after a number of incorrect attempts prevents direct password guessing attacks. Ensuring that an administrator is involved in unlocking locked accounts draws appropriate attention to such situations. 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:

  • Add the following line immediately before the pam_unix.so statement in the AUTH section:
    auth required pam_faillock.so preauth silent deny= unlock_time= fail_interval=
  • Add the following line immediately after the pam_unix.so statement in the AUTH section:
    auth [default=die] pam_faillock.so authfail deny= unlock_time= fail_interval=
  • Add the following line immediately before the pam_unix.so statement in the ACCOUNT section:
    account required pam_faillock.so
CCI-000047
AC-7 b
accounts_passwords_pam_faillock_interval medium Set Interval For Counting Failed Password Attempts Locking out user accounts after a number of incorrect attempts within a specific period of time prevents direct password guessing attacks. 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:

  • Add the following line immediately before the pam_unix.so statement in the AUTH section:
    auth required pam_faillock.so preauth silent deny= unlock_time= fail_interval=
  • Add the following line immediately after the pam_unix.so statement in the AUTH section:
    auth [default=die] pam_faillock.so authfail deny= unlock_time= fail_interval=
  • Add the following line immediately before the pam_unix.so statement in the ACCOUNT section:
    account required pam_faillock.so
CCI-001452
AC-7 a