Page 1 of 167
Table of Contents 1. 2. 3. 4. Introduction System Settings Services Documentation to Support DISA OS SRG Mapping
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
Guide to the Secure Configuration of Red Hat Enterprise Linux 6 XCCDF ...Page 2 of 167
1. Introduction
The purpose of this guidance is to provide security configuration recommendations and baselines for the Red Hat Enterprise Linux (RHEL) 6 operating system. The guidance provided here should be applicable to all variants (Desktop, Server, Advanced Platform) of the product. Recommended settings for the basic operating system are provided, as well as for many network services that the system can provide to other systems. The guide is intended for system administrators. Readers are assumed to possess basic system administration skills for Unix-like systems, as well as some familiarity with Red Hat's documentation and administration conventions. Some instructions within this guide are complex. All directions should be followed completely and with understanding of their effects in order to avoid serious adverse effects on the system and its security. Table of Contents 1.1. General Principles 1.1.1. Encrypt Transmitted Data Whenever Possible 1.1.2. Minimize Software to Minimize Vulnerability 1.1.3. Run Different Network Services on Separate Systems 1.1.4. Configure Security Tools to Improve System Robustness 1.1.5. Least Privilege 1.2. How to Use This Guide 1.2.1. Read Sections Completely and in Order 1.2.2. Test in Non-Production Environment 1.2.3. Root Shell Environment Assumed 1.2.4. Formatting Conventions 1.2.5. Reboot Required
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
Guide to the Secure Configuration of Red Hat Enterprise Linux 6 XCCDF ...Page 3 of 167
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
Guide to the Secure Configuration of Red Hat Enterprise Linux 6 XCCDF ...Page 4 of 167
2. System Settings
Table of Contents 2.1. Installing and Maintaining Software 2.1.1. Disk Partitioning 2.1.1.a. Ensure /tmp Located On Separate Partition 2.1.1.b. Ensure /var Located On Separate Partition 2.1.1.c. Ensure /var/log Located On Separate Partition 2.1.1.d. Ensure /var/log/audit Located On Separate Partition 2.1.1.e. Ensure /home Located On Separate Partition 2.1.1.f. Encrypt Partitions 2.1.2. Updating Software 2.1.2.a. Ensure Red Hat GPG Key Installed 2.1.2.b. Ensure gpgcheck Enabled In Main Yum Configuration 2.1.2.c. Ensure gpgcheck Enabled For All Yum Package Repositories 2.1.2.d. Ensure Software Patches Installed 2.1.3. Software Integrity Checking 2.1.3.1. Verify Integrity with AIDE 2.1.3.1.a. Install AIDE 2.1.3.1.b. Disable Prelinking 2.1.3.1.c. Build and Test AIDE Database 2.1.3.1.d. Configure Periodic Execution of AIDE 2.1.3.2. Verify Integrity with RPM 2.1.3.2.a. Verify File Permissions with RPM 2.1.3.2.b. Verify File Hashes with RPM 2.1.3.3. Additional Security Software 2.1.3.3.a. Install Intrusion Detection Software 2.1.3.3.b. Install Virus Scanning Software 2.2. File Permissions and Masks 2.2.1. Restrict Partition Mount Options 2.2.1.a. Add nodev Option to Non-Root Local Partitions 2.2.1.b. Add nodev Option to Removable Media Partitions 2.2.1.c. Add noexec Option to Removable Media Partitions 2.2.1.d. Add nosuid Option to Removable Media Partitions 2.2.1.e. Add nodev Option to /tmp 2.2.1.f. Add noexec Option to /tmp 2.2.1.g. Add nosuid Option to /tmp 2.2.1.h. Add nodev Option to /dev/shm 2.2.1.i. Add noexec Option to /dev/shm 2.2.1.j. Add nosuid Option to /dev/shm 2.2.1.k. Bind Mount /var/tmp To /tmp 2.2.2. Restrict Dynamic Mounting and Unmounting of Filesystems 2.2.2.a. Disable Modprobe Loading of USB Storage Driver 2.2.2.b. Disable Kernel Support for USB via Bootloader Configuration 2.2.2.c. Disable Booting from USB Devices 2.2.2.d. Disable the Automounter 2.2.2.e. Disable GNOME Automounting 2.2.2.f. Disable Mounting of cramfs 2.2.2.g. Disable Mounting of freevxfs 2.2.2.h. Disable Mounting of jffs2 2.2.2.i. Disable Mounting of hfs 2.2.2.j. Disable Mounting of hfsplus 2.2.2.k. Disable Mounting of squashfs 2.2.2.l. Disable Mounting of udf 2.2.2.m. Disable All GNOME Thumbnailers 2.2.3. Verify Permissions on Important Files and Directories 2.2.3.a. Verify that All World-Writable Directories Have Sticky Bits Set 2.2.3.b. Ensure No World-Writable Files Exist 2.2.3.c. Ensure All SGID Executables Are Authorized 2.2.3.d. Ensure All SUID Executables Are Authorized 2.2.3.e. Ensure All Files Are Owned by a User 2.2.3.f. Ensure All Files Are Owned by a Group 2.2.3.g. Ensure All World-Writable Directories Are Owned by a System Account 2.2.3.8. Verify Permissions on Files with Local Account Information and Credentials 2.2.3.8.a. Verify User Who Owns shadow File 2.2.3.8.b. Verify Group Who Owns shadow File 2.2.3.8.c. Verify Permissions on shadow File 2.2.3.8.d. Verify User Who Owns group File 2.2.3.8.e. Verify Group Who Owns group File 2.2.3.8.f. Verify Permissions on group File 2.2.3.8.g. Verify User Who Owns gshadow File 2.2.3.8.h. Verify Group Who Owns gshadow File 2.2.3.8.i. Verify Permissions on gshadow File
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
Guide to the Secure Configuration of Red Hat Enterprise Linux 6 XCCDF ...Page 5 of 167
2.2.3.8.j. Verify User Who Owns passwd File 2.2.3.8.k. Verify Group Who Owns passwd File 2.2.3.8.l. Verify Permissions on passwd File 2.2.3.9. Verify File Permissions Within Some Important Directories 2.2.3.9.a. Verify that Shared Library Files Have Restrictive Permissions 2.2.3.9.b. Verify that Shared Library Files Have Root Ownership 2.2.3.9.c. Verify that System Executables Have Restrictive Permissions 2.2.3.9.d. Verify that System Executables Have Root Ownership 2.2.4. Restrict Programs from Dangerous Execution Patterns 2.2.4.1. Daemon Umask 2.2.4.1.a. Set Daemon Umask 2.2.4.2. Disable Core Dumps 2.2.4.2.a. Disable Core Dumps for All Users 2.2.4.2.b. Disable Core Dumps for SUID programs 2.2.4.3. Enable ExecShield 2.2.4.3.a. Enable ExecShield 2.2.4.3.b. Enable Randomized Layout of Virtual Address Space 2.2.4.4. Enable Execute Disable (XD) or No Execute (NX) Support on x86 Systems 2.2.4.4.a. Install PAE Kernel on Supported 32-bit x86 Systems 2.2.4.4.b. Enable NX or XD Support in the BIOS 2.3. SELinux 2.3.a. Enable the SELinux Context Restoration Service (restorecond) 2.3.b. Ensure No Daemons are Unconfined by SELinux 2.3.c. Ensure No Device Files are Unlabeled by SELinux 2.3.4. Enable SELinux 2.3.4.a. Ensure SELinux Not Disabled in /etc/grub.conf 2.3.4.b. Ensure SELinux State is Enforcing 2.3.4.c. Configure SELinux Policy 2.4. Account and Access Control 2.4.1. Protect Accounts by Restricting Password-Based Login 2.4.1.1. Restrict Root Logins 2.4.1.1.a. Direct root Logins Not Allowed 2.4.1.1.b. Restrict Virtual Console Root Logins 2.4.1.1.c. Restrict Serial Port Root Logins 2.4.1.1.d. Restrict Web Browser Use for Administrative Accounts 2.4.1.1.e. Ensure that System Accounts Do Not Run a Shell Upon Login 2.4.1.1.f. Verify Only Root Has UID 0 2.4.1.1.g. Root Path Must Be Vendor Default 2.4.1.2. Verify Proper Storage and Existence of Password Hashes 2.4.1.2.a. Prevent Log In to Accounts With Empty Password 2.4.1.2.b. Verify All Account Password Hashes are Shadowed 2.4.1.2.c. All GIDs referenced in /etc/passwd must be defined in /etc/group 2.4.1.2.d. Verify No netrc Files Exist 2.4.1.3. Set Password Expiration Parameters 2.4.1.3.a. Set Password Minimum Length in login.defs 2.4.1.3.b. Set Password Minimum Age 2.4.1.3.c. Set Password Maximum Age 2.4.1.3.d. Set Password Warning Age 2.4.1.4. Set Account Expiration Parameters 2.4.1.4.a. Set Account Expiration Following Inactivity 2.4.1.4.b. Ensure All Accounts on the System Have Unique Names 2.4.1.4.c. Assign Expiration Date to Temporary Accounts 2.4.2. Protect Accounts by Configuring PAM 2.4.2.a. Set Last Logon/Access Notification 2.4.2.2. Set Password Quality Requirements 2.4.2.2.1. Set Password Quality Requirements, if using pam_cracklib 2.4.2.2.1.a. Set Password Retry Prompts Permitted Per-Session 2.4.2.2.1.b. Set Password to Maximum of Three Consecutive Repeating Characters 2.4.2.2.1.c. Set Password Strength Minimum Digit Characters 2.4.2.2.1.d. Set Password Strength Minimum Uppercase Characters 2.4.2.2.1.e. Set Password Strength Minimum Special Characters 2.4.2.2.1.f. Set Password Strength Minimum Lowercase Characters 2.4.2.2.1.g. Set Password Strength Minimum Different Characters 2.4.2.3. Set Lockouts for Failed Password Attempts 2.4.2.3.a. Set Deny For Failed Password Attempts 2.4.2.3.b. Set Lockout Time For Failed Password Attempts 2.4.2.3.c. Set Interval For Counting Failed Password Attempts 2.4.2.3.d. Limit Password Reuse 2.4.2.4. Set Password Hashing Algorithm 2.4.2.4.a. Set Password Hashing Algorithm in /etc/pam.d/system-auth 2.4.2.4.b. Set Password Hashing Algorithm in /etc/login.defs 2.4.2.4.c. Set Password Hashing Algorithm in /etc/libuser.conf 2.4.3. Secure Session Configuration Files for Login Accounts 2.4.3.a. Limit the Number of Concurrent Login Sessions Allowed Per User 2.4.3.b. Ensure that User Home Directories are not Group-Writable or World-Readable
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
Guide to the Secure Configuration of Red Hat Enterprise Linux 6 XCCDF ...Page 6 of 167
2.4.3.3. Ensure that No Dangerous Directories Exist in Root's Path 2.4.3.3.a. Ensure that Root's Path Does Not Include Relative Paths or Null Directories 2.4.3.3.b. Ensure that Root's Path Does Not Include World or Group-Writable Directories 2.4.3.4. Ensure that Users Have Sensible Umask Values 2.4.3.4.a. Ensure the Default Bash Umask is Set Correctly 2.4.3.4.b. Ensure the Default C Shell Umask is Set Correctly 2.4.3.4.c. Ensure the Default Umask is Set Correctly in /etc/profile 2.4.3.4.d. Ensure the Default Umask is Set Correctly in login.defs 2.4.4. Protect Physical Console Access 2.4.4.a. Require Authentication for Single User Mode 2.4.4.b. Disable Ctrl-Alt-Del Reboot Activation 2.4.4.c. Disable Interactive Boot 2.4.4.4. Set Boot Loader Password 2.4.4.4.a. Verify /etc/grub.conf User Ownership 2.4.4.4.b. Verify /etc/grub.conf Group Ownership 2.4.4.4.c. Verify /boot/grub/grub.conf Permissions 2.4.4.4.d. Set Boot Loader Password 2.4.4.5. Configure Screen Locking 2.4.4.5.1. Configure GUI Screen Locking 2.4.4.5.1.a. Set GNOME Login Inactivity Timeout 2.4.4.5.1.b. GNOME Desktop Screensaver Mandatory Use 2.4.4.5.1.c. Enable Screen Lock Activation After Idle Period 2.4.4.5.1.d. Implement Blank Screen Saver 2.4.4.5.2. Configure Console Screen Locking 2.4.4.5.2.a. Install the screen Package 2.4.4.5.3. Hardware Tokens for Authentication 2.4.4.5.3.a. Enable Smart Card Login 2.4.5. Warning Banners for System Accesses 2.4.5.a. Modify the System Login Banner 2.4.5.b. Disable the User List 2.4.5.3. Implement a GUI Warning Banner 2.4.5.3.a. Enable GUI Warning Banner 2.4.5.3.b. Set GUI Warning Banner Text 2.5. Network Configuration and Firewalls 2.5.a. Disable Zeroconf Networking 2.5.b. Ensure System is Not Acting as a Network Sniffer 2.5.3. Disable Unused Interfaces 2.5.4. Kernel Parameters Which Affect Networking 2.5.4.1. Network Parameters for Hosts Only 2.5.4.1.a. Disable Kernel Parameter for Sending ICMP Redirects by Default 2.5.4.1.b. Disable Kernel Parameter for Sending ICMP Redirects for All Interfaces 2.5.4.1.c. Disable Kernel Parameter for IP Forwarding 2.5.4.2. Network Related Kernel Runtime Parameters for Hosts and Routers 2.5.4.2.a. Disable Kernel Parameter for Accepting Source-Routed Packets for All Interfaces 2.5.4.2.b. Disable Kernel Parameter for Accepting ICMP Redirects for All Interfaces 2.5.4.2.c. Disable Kernel Parameter for Accepting Secure Redirects for All Interfaces 2.5.4.2.d. Enable Kernel Parameter to Log Martian Packets 2.5.4.2.e. Disable Kernel Parameter for Accepting Source-Routed Packets By Default 2.5.4.2.f. Disable Kernel Parameter for Accepting ICMP Redirects By Default 2.5.4.2.g. Disable Kernel Parameter for Accepting Secure Redirects By Default 2.5.4.2.h. Enable Kernel Parameter to Ignore ICMP Broadcast Echo Requests 2.5.4.2.i. Enable Kernel Parameter to Ignore Bogus ICMP Error Responses 2.5.4.2.j. Enable Kernel Parameter to Use TCP Syncookies 2.5.4.2.k. Enable Kernel Parameter to Use Reverse Path Filtering for All Interfaces 2.5.4.2.l. Enable Kernel Parameter to Use Reverse Path Filtering by Default 2.5.5. Wireless Networking 2.5.5.1. Disable Wireless Through Software Configuration 2.5.5.1.a. Disable WiFi or Bluetooth BIOS 2.5.5.1.b. Deactivate Wireless Network Interfaces 2.5.5.1.c. Disable Bluetooth Service 2.5.5.1.d. Disable Bluetooth Kernel Modules 2.5.6. IPv6 2.5.6.1. Disable Support for IPv6 Unless Needed 2.5.6.1.a. Disable IPv6 Networking Support Automatic Loading 2.5.6.1.b. Disable Interface Usage of IPv6 2.5.6.1.c. Disable Support for RPC IPv6 2.5.6.2. Configure IPv6 Settings if Necessary 2.5.6.2.a. Manually Assign Global IPv6 Address 2.5.6.2.b. Use Privacy Extensions for Address 2.5.6.2.c. Manually Assign IPv6 Router Address 2.5.6.2.4. Disable Automatic Configuration 2.5.6.2.4.a. Disable Accepting IPv6 Router Advertisements 2.5.6.2.4.b. Disable Accepting IPv6 Redirects 2.5.6.2.5. Limit Network-Transmitted Configuration if Using Static IPv6 Addresses 2.5.7. iptables and ip6tables
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
Guide to the Secure Configuration of Red Hat Enterprise Linux 6 XCCDF ...Page 7 of 167
2.5.7.1. Inspect and Activate Default Rules 2.5.7.1.a. Verify ip6tables Enabled if Using IPv6 2.5.7.1.b. Set Default ip6tables Policy for Incoming Packets 2.5.7.1.c. Verify iptables Enabled 2.5.7.2. Strengthen the Default Ruleset 2.5.7.2.a. Set Default iptables Policy for Incoming Packets 2.5.7.2.b. Set Default iptables Policy for Forwarded Packets 2.5.7.2.3. Restrict ICMP Message Types 2.5.7.2.4. Log and Drop Packets with Suspicious Source Addresses 2.5.8. Secure Sockets Layer Support 2.5.8.1. Create a CA to Sign Certificates 2.5.8.2. Create SSL Certificates for Servers 2.5.8.3. Remove Certificate Authorities, if Appropriate 2.5.9. Uncommon Network Protocols 2.5.9.a. Disable DCCP Support 2.5.9.b. Disable SCTP Support 2.5.9.c. Disable RDS Support 2.5.9.d. Disable TIPC Support 2.5.10. IPSec Support 2.5.10.a. Install openswan Package 2.6. Configure Syslog 2.6.a. Ensure rsyslog is Installed 2.6.b. Enable rsyslog Service 2.6.c. Disable Logwatch on Clients if a Logserver Exists 2.6.4. Ensure Proper Configuration of Log Files 2.6.4.a. Ensure Log Files Are Owned By Appropriate User 2.6.4.b. Ensure Log Files Are Owned By Appropriate Group 2.6.4.c. Ensure System Log Files Have Correct Permissions 2.6.5. Rsyslog Logs Sent To Remote Host 2.6.5.a. Ensure Logs Sent To Remote Host 2.6.6. Configure rsyslogd to Accept Remote Messages If Acting as a Log Server 2.6.6.a. Ensure rsyslog Does Not Accept Remote Messages Unless Acting As Log Server 2.6.6.b. Enable rsyslog to Accept Messages via TCP, if Acting As Log Server 2.6.6.c. Enable rsyslog to Accept Messages via UDP, if Acting As Log Server 2.6.7. Ensure All Logs are Rotated by logrotate 2.6.7.a. Ensure Logrotate Runs Periodically 2.6.8. Configure Logwatch on the Central Log Server 2.6.8.a. Configure Logwatch HostLimit Line 2.6.8.b. Configure Logwatch SplitHosts Line 2.7. System Accounting with auditd 2.7.a. Enable auditd Service 2.7.b. Enable Auditing for Processes Which Start Prior to the Audit Daemon 2.7.3. Configure auditd Data Retention 2.7.3.a. Configure auditd Number of Logs Retained 2.7.3.b. Configure auditd Max Log File Size 2.7.3.c. Configure auditd max_log_file_action Upon Reaching Maximum Log Size 2.7.3.d. Configure auditd space_left Action on Low Disk Space 2.7.3.e. Configure auditd admin_space_left Action on Low Disk Space 2.7.3.f. Configure auditd mail_acct Action on Low Disk Space 2.7.3.g. Configure auditd to use audispd plugin 2.7.4. Configure auditd Rules for Comprehensive Auditing 2.7.4.a. Record Events that Modify User/Group Information 2.7.4.b. Record Events that Modify the System's Network Environment 2.7.4.c. System Audit Logs Must Have Mode 0640 or Less Permissive 2.7.4.d. System Audit Logs Must Be Owned By Root 2.7.4.e. Record Events that Modify the System's Mandatory Access Controls 2.7.4.f. Record Attempts to Alter Logon and Logout Events 2.7.4.g. Record Attempts to Alter Process and Session Initiation Information 2.7.4.h. Ensure auditd Collects Unauthorized Access Attempts to Files (unsuccessful) 2.7.4.i. Ensure auditd Collects Information on the Use of Privileged Commands 2.7.4.j. Ensure auditd Collects Information on Exporting to Media (successful) 2.7.4.k. Ensure auditd Collects File Deletion Events by User 2.7.4.l. Ensure auditd Collects System Administrator Actions 2.7.4.m. Ensure auditd Collects Information on Kernel Module Loading and Unloading 2.7.4.n. Make the auditd Configuration Immutable 2.7.4.15. Records Events that Modify Date and Time Information 2.7.4.15.a. Record attempts to alter time through adjtimex 2.7.4.15.b. Record attempts to alter time through settimeofday 2.7.4.15.c. Record Attempts to Alter Time Through stime 2.7.4.15.d. Record Attempts to Alter Time Through clock_settime 2.7.4.15.e. Record Attempts to Alter the localtime File 2.7.4.16. Record Events that Modify the System's Discretionary Access Controls 2.7.4.16.a. Record Events that Modify the System's Discretionary Access Controls - chmod 2.7.4.16.b. Record Events that Modify the System's Discretionary Access Controls - chown 2.7.4.16.c. Record Events that Modify the System's Discretionary Access Controls - fchmod
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
Guide to the Secure Configuration of Red Hat Enterprise Linux 6 XCCDF ...Page 8 of 167
2.7.4.16.d. Record Events that Modify the System's Discretionary Access Controls - fchmodat 2.7.4.16.e. Record Events that Modify the System's Discretionary Access Controls - fchown 2.7.4.16.f. Record Events that Modify the System's Discretionary Access Controls - fchownat 2.7.4.16.g. Record Events that Modify the System's Discretionary Access Controls - fremovexattr 2.7.4.16.h. Record Events that Modify the System's Discretionary Access Controls - fsetxattr 2.7.4.16.i. Record Events that Modify the System's Discretionary Access Controls - lchown 2.7.4.16.j. Record Events that Modify the System's Discretionary Access Controls - lremovexattr 2.7.4.16.k. Record Events that Modify the System's Discretionary Access Controls - lsetxattr 2.7.4.16.l. Record Events that Modify the System's Discretionary Access Controls - removexattr 2.7.4.16.m. Record Events that Modify the System's Discretionary Access Controls - setxattr
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
Guide to the Secure Configuration of Red Hat Enterprise Linux 6 XCCDF ...Page 9 of 167
Placing /var/log in its own partition enables better separation between log files and other files in /var/. Security identifiers CCE-26215-4 References 1. AU-9. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 2. 1208. URL:<http://iase.disa.mil/cci/index.html>.
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 Had Documentation web site: https://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/sect-Security_GuideLUKS_Disk_Encryption.html
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
Guide to the Secure Configuration of Red Hat Enterprise Linux 6 XCCD... Page 10 of 167
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. References 1. 2. 3. 4. 5. SC-13. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. SC-28. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 1019. URL:<http://iase.disa.mil/cci/index.html>. 1199. URL:<http://iase.disa.mil/cci/index.html>. 1200. URL:<http://iase.disa.mil/cci/index.html>.
If the system is not connected to the internet, or a local RHN Satellite, then install the Red Hat GPG key from a secure, static location, such as the Red Hat installation CD-ROM or DVD. Assuming the disc is mounted in /mnt/cdrom, use the following command as the root user to import it into the keyring:
# rpm --import /mnt/cdrom/RPM-GPG-KEY
This key is necessary to cryptographically verify packages are from Red Hat. Security identifiers CCE-26506-6 References 1. SI-7. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 2. MA-1(b). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 3. 351. URL:<http://iase.disa.mil/cci/index.html>.
Ensuring the validity of packages' cryptographic signatures prior to installation ensures the provenance of the software and protects against malicious tampering. Security identifiers CCE-26709-6 References 1. 2. 3. 4. SI-7. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. MA-1(b). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 352. URL:<http://iase.disa.mil/cci/index.html>. 663. URL:<http://iase.disa.mil/cci/index.html>.
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
Guide to the Secure Configuration of Red Hat Enterprise Linux 6 XCCD... Page 11 of 167
gpgcheck=0
Ensuring all packages' cryptographic signatures are valid prior to installation ensures the provenance of the software and protects against malicious tampering. Security identifiers CCE-26647-8 References 1. 2. 3. 4. SI-7. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. MA-1(b). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 352. URL:<http://iase.disa.mil/cci/index.html>. 663. URL:<http://iase.disa.mil/cci/index.html>.
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. Installing software updates is a fundamental mitigation against the exploitation of publicly-known vulnerabilities. References 1. 2. 3. 4. SI-2. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. MA-1(b). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 1227. URL:<http://iase.disa.mil/cci/index.html>. 1233. URL:<http://iase.disa.mil/cci/index.html>.
The AIDE package must be installed if it is to be available for integrity checking. Remediation script
yum -y install aide
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
Guide to the Secure Configuration of Red Hat Enterprise Linux 6 XCCD... Page 12 of 167
2. 3. 4. 5. 6. 7.
CM-3(e). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. CM-6(d). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. CM-6(3). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. SC-28. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. SI-7. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 1069. URL:<http://iase.disa.mil/cci/index.html>.
Next, run the following command to return binaries to a normal, non-prelinked state:
# /usr/sbin/prelink -ua
The prelinking feature can interfere with the operation of AIDE, because it changes binaries. Security identifiers CCE-27221-1 References 1. 2. 3. 4. CM-6(d). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. CM-6(3). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. SC-28. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. SI-7. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>.
By default, the database will be written to the file /var/lib/aide/aide.db.new.gz. Storing the database, the configuration file /etc/aide.conf, and the binary /usr/sbin/aide (or hashes of these files), in a secure location (such as on read-only media) provides additional assurance about their integrity. The newly-generated database can be installed as follows:
# cp /var/lib/aide/aide.db.new.gz /var/lib/aide/aide.db.gz
If this check produces any unexpected output, investigate. For AIDE to be effective, an initial database of "known-good" information about files must be captured and it should be able to be verified against the installed files. References 1. 2. 3. 4. 5. 6. CM-3(d). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. CM-3(e). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. CM-6(d). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. CM-6(3). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. SC-28. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. SI-7. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>.
AIDE can be executed periodically through other means; this is merely one example. By default, AIDE does not install itself for periodic execution. Periodically running AIDE may reveal unexpected changes in installed files.
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
Guide to the Secure Configuration of Red Hat Enterprise Linux 6 XCCD... Page 13 of 167
Security identifiers CCE-27222-9 References 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. CM-3(d). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. CM-3(e). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. CM-6(d). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. CM-6(3). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. SC-28. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. SI-7. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 374. URL:<http://iase.disa.mil/cci/index.html>. 416. URL:<http://iase.disa.mil/cci/index.html>. 1069. URL:<http://iase.disa.mil/cci/index.html>. 1263. URL:<http://iase.disa.mil/cci/index.html>. 1297. URL:<http://iase.disa.mil/cci/index.html>. 1589. URL:<http://iase.disa.mil/cci/index.html>.
See the man page for rpm to see a complete explanation of each column.
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. Security identifiers CCE-26731-0 References 1. 2. 3. 4. 5. 6. AC-6. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. CM-6(d). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. CM-6(3). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 1493. URL:<http://iase.disa.mil/cci/index.html>. 1494. URL:<http://iase.disa.mil/cci/index.html>. 1495. URL:<http://iase.disa.mil/cci/index.html>.
A "c" in the second column indicates that a file is a configuration file, which may appropriately be expected to change. If the file that has changed was not expected to then refresh from distribution media or online repositories.
rpm -Uvh affected_package
OR
yum reinstall affected_package
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
Guide to the Secure Configuration of Red Hat Enterprise Linux 6 XCCD... Page 14 of 167
The hash on 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. Security identifiers CCE-27223-7 References 1. 2. 3. 4. CM-6(d). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. CM-6(3). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. SI-7. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 1496. URL:<http://iase.disa.mil/cci/index.html>.
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
Guide to the Secure Configuration of Red Hat Enterprise Linux 6 XCCD... Page 15 of 167
If your site uses a local filesystem type other than ext4, you will need to modify this command.
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
Guide to the Secure Configuration of Red Hat Enterprise Linux 6 XCCD... Page 16 of 167
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
Guide to the Secure Configuration of Red Hat Enterprise Linux 6 XCCD... Page 17 of 167
See the mount(8) man page for further explanation of bind mounting. Having multiple locations for temporary storage is not required. Unless absolutely necessary to meet requirements, the storage location /var/tmp should be bind mounted to /tmp and thus share the same protections.
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
Guide to the Secure Configuration of Red Hat Enterprise Linux 6 XCCD... Page 18 of 167
If these filesystems are not required then they should be explicitly disabled in the appropriate /etc/modprobe.d configuration file. Use caution when enabling any such facility, and find out whether better configuration management or user education might solve the same problem with less risk.
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. USB storage devices such as thumb drives can be used to introduce unauthorized software and other vulnerabilities. Support for these devices should be disabled and the devices themselves should be tightly controlled. Security identifiers CCE-27016-5 References 1. 2. 3. 4. 5. AC-19(a). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AC-19(d). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AC-19(e). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 1250. URL:<http://iase.disa.mil/cci/index.html>. 85. URL:<http://iase.disa.mil/cci/index.html>.
WARNING: Disabling all kernel support for USB will cause problems for systems with USB-based keyboards, mice, or printers. This guidance is inappropriate for systems which require USB connectivity.
Disabling the USB subsystem within the Linux kernel at system boot will also disable USB storage devices if they are plugged into the system. Support for these devices should be disabled and the devices themselves should be tightly controlled. Security identifiers CCE-27011-6 References
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
Guide to the Secure Configuration of Red Hat Enterprise Linux 6 XCCD... Page 19 of 167
1. 2. 3. 4. 5.
AC-19(a). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AC-19(d). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AC-19(e). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 1250. URL:<http://iase.disa.mil/cci/index.html>. 85. URL:<http://iase.disa.mil/cci/index.html>.
All filesystems that are required for the successful operation of the system should be explicitly listed in /etc/fstab by and administrator. New filesystems should not be arbitrarily introduced via the automounter. Remediation script
# # Disable autofs for all run levels # chkconfig --level 0123456 autofs off # # Stop autofs if currently running # service autofs stop
Security identifiers CCE-26976-1 References 1. 2. 3. 4. 5. AC-19(a). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AC-19(d). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AC-19(e). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 1250. URL:<http://iase.disa.mil/cci/index.html>. 85. URL:<http://iase.disa.mil/cci/index.html>.
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
Guide to the Secure Configuration of Red Hat Enterprise Linux 6 XCCD... Page 20 of 167
The system's default desktop environment, GNOME, will mount devices and removable media (such as DVDs, CDs and USB flash drives) whenever they are inserted into the system. Disable automount and autorun within GNOME by running the following:
# gconftool-2 --direct \ --config-source xml:readwrite:/etc/gconf/gconf.xml.mandatory \ --type bool \ --set /apps/nautilus/preferences/media_automount false # gconftool-2 --direct \ --config-source xml:readwrite:/etc/gconf/gconf.xml.mandatory \ --type bool \ --set /apps/nautilus/preferences/media_autorun_never true
The system's capabilities for automatic mounting should be configured to match whatever is defined by security policy. Disabling USB storage as described in the USB section will prevent the use of USB storage devices, but this step should also be taken as an additional layer of protection to prevent automatic mounting of CDs and DVDs. Security identifiers CCE-27035-5 References 1. 2. 3. 4. 5. AC-19(a). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AC-19(d). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AC-19(e). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 1250. URL:<http://iase.disa.mil/cci/index.html>. 85. URL:<http://iase.disa.mil/cci/index.html>.
This effectively prevents usage of this uncommon filesystem. Linux kernel modules which implement filesystems that are not needed by the local system should be disabled. Security identifiers CCE-26340-0 References 1. CM-7. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>.
This effectively prevents usage of this uncommon filesystem. Linux kernel modules which implement filesystems that are not needed by the local system should be disabled. Security identifiers CCE-26544-7 References 1. CM-7. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>.
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
Guide to the Secure Configuration of Red Hat Enterprise Linux 6 XCCD... Page 21 of 167
This effectively prevents usage of this uncommon filesystem. Linux kernel modules which implement filesystems that are not needed by the local system should be disabled. Security identifiers CCE-26670-0 References 1. CM-7. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>.
This effectively prevents usage of this uncommon filesystem. Linux kernel modules which implement filesystems that are not needed by the local system should be disabled. Security identifiers CCE-26800-3 References 1. CM-7. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>.
This effectively prevents usage of this uncommon filesystem. Linux kernel modules which implement filesystems that are not needed by the local system should be disabled. Security identifiers CCE-26361-6 References 1. CM-7. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>.
This effectively prevents usage of this uncommon filesystem. Linux kernel modules which implement filesystems that are not needed by the local system should be disabled. Security identifiers CCE-26404-4
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
Guide to the Secure Configuration of Red Hat Enterprise Linux 6 XCCD... Page 22 of 167
This effectively prevents usage of this uncommon filesystem. Linux kernel modules which implement filesystems that are not needed by the local system should be disabled. Security identifiers CCE-26677-5 References 1. CM-7. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>.
This effectively prevents an attacker from gaining access to a system through a flaw in GNOME's Nautilus thumbnail creators. An attacker with knowledge of a flaw in a GNOME thumbnailer application could craft a malicious file to exploit this flaw. Assuming the attacker could place the malicious file on the local filesystem (via a web upload for example) and assuming a user browses the same location using Nautilus, the malicious file would exploit the thumbnailer with the potential for malicious code execution. It is best to disable these thumbnailer applications unless they are explicitly required. Security identifiers CCE-27224-5 References 1. CM-7. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>.
2.2.3.a. Verify that All World-Writable Directories Have Sticky Bits Set
When the so-called 'sticky bit' is set on a directory, only the owner of a given file may remove that file from the directory. Without the sticky bit, any user with write access to a directory may remove any file in the directory. Setting the sticky bit prevents users from removing each other's files. In cases where there is no reason for a directory to be world-writable, a better solution is to remove that permission rather than to set the sticky bit. However, if a directory is used by a particular application, consult that application's documentation instead of blindly changing modes. To set the sticky bit on a world-writable directory DIR, run the following command:
# chmod +t DIR
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.
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
Guide to the Secure Configuration of Red Hat Enterprise Linux 6 XCCD... Page 23 of 167
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
Guide to the Secure Configuration of Red Hat Enterprise Linux 6 XCCD... Page 24 of 167
2.2.3.8. Verify Permissions on Files with Local Account Information and Credentials
The default restrictive permissions for files which act as important security databases such as passwd, shadow, group, and gshadow files must be maintained. Many utilities need read access to the passwd file in order to function properly, but read access to the shadow file allows malicious attacks against system passwords, and should never be enabled.
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. Security identifiers CCE-26947-2 References 1. AC-6. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 2. 225. URL:<http://iase.disa.mil/cci/index.html>.
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
Guide to the Secure Configuration of Red Hat Enterprise Linux 6 XCCD... Page 25 of 167
The /etc/shadow file stores password hashes. Protection of this file is critical for system security. Security identifiers CCE-26967-0 References 1. AC-6. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 2. 225. URL:<http://iase.disa.mil/cci/index.html>.
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. Security identifiers CCE-26992-8 References 1. AC-6. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 2. 225. URL:<http://iase.disa.mil/cci/index.html>.
The /etc/group file contains information regarding groups that are configured on the system. Protection of this file is important for system security. Security identifiers CCE-26822-7 References 1. AC-6. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>.
The /etc/group file contains information regarding groups that are configured on the system. Protection of this file is important for system security. Security identifiers CCE-26930-8 References 1. AC-6. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 2. 225. URL:<http://iase.disa.mil/cci/index.html>.
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
Guide to the Secure Configuration of Red Hat Enterprise Linux 6 XCCD... Page 26 of 167
The /etc/group file contains information regarding groups that are configured on the system. Protection of this file is important for system security. Security identifiers CCE-26954-8 References 1. AC-6. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 2. 225. URL:<http://iase.disa.mil/cci/index.html>.
The /etc/gshadow file contains group password hashes. Protection of this file is critical for system security. Security identifiers CCE-27026-4 References 1. AC-6. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 2. 225. URL:<http://iase.disa.mil/cci/index.html>.
The /etc/gshadow file contains group password hashes. Protection of this file is critical for system security. Security identifiers CCE-26975-3 References 1. AC-6. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 2. 225. URL:<http://iase.disa.mil/cci/index.html>.
The /etc/gshadow file contains group password hashes. Protection of this file is critical for system security. Security identifiers CCE-26951-4 References 1. AC-6. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 2. 225. URL:<http://iase.disa.mil/cci/index.html>.
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
Guide to the Secure Configuration of Red Hat Enterprise Linux 6 XCCD... Page 27 of 167
The /etc/passwd file contains information about the users that are configured on the system. Protection of this file is critical for system security. Security identifiers CCE-26953-0 References 1. AC-6. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 2. 225. URL:<http://iase.disa.mil/cci/index.html>.
The /etc/passwd file contains information about the users that are configured on the system. Protection of this file is critical for system security. Security identifiers CCE-26856-5 References 1. AC-6. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 2. 225. URL:<http://iase.disa.mil/cci/index.html>.
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. Security identifiers CCE-26868-0 References 1. AC-6. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 2. 225. URL:<http://iase.disa.mil/cci/index.html>.
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 groupwritable or world-writable, correct its permission with the following command:
# chmod go-w FILE
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.
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
Guide to the Secure Configuration of Red Hat Enterprise Linux 6 XCCD... Page 28 of 167
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 any file in these directories is found to be owned by a user other than root, correct its ownership with the following command:
# chown root FILE
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. References 1. AC-6. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 2. 1499. URL:<http://iase.disa.mil/cci/index.html>.
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:
# chmod go-w FILE
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. References 1. AC-6. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 2. 1499. URL:<http://iase.disa.mil/cci/index.html>.
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:
# chown root FILE
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. References 1. AC-6. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 2. 1499. URL:<http://iase.disa.mil/cci/index.html>.
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
Guide to the Secure Configuration of Red Hat Enterprise Linux 6 XCCD... Page 29 of 167
Setting the umask to too restrictive a setting can cause serious errors at runtime. Many daemons on the system already individually restrict themselves to a umask of 077 in their own init scripts. The 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. Security identifiers CCE-27031-4 References 1. AC-6. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>.
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. Security identifiers CCE-27033-0 References 1. SC-5. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>.
If this is not the system's default value, add the following line to /etc/sysctl.conf:
fs.suid_dumpable = 0
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
Guide to the Secure Configuration of Red Hat Enterprise Linux 6 XCCD... Page 30 of 167
The core dump of a setuid program is more likely to contain sensitive data, as the program itself runs with greater privileges than the user who initiated execution of the program. Disabling the ability for any setuid program to write a core file decreases the risk of unauthorized access of such data. Security identifiers CCE-27044-7 References 1. SI-11. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>.
If this is not the system's default value, add the following line to /etc/sysctl.conf:
kernel.exec-shield = 1
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. Security identifiers CCE-27007-4 References 1. . URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>.
If this is not the system's default value, add the following line to /etc/sysctl.conf:
kernel.randomize_va_space = 2
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. Security identifiers CCE-26999-3 References 1. . URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>.
2.2.4.4. Enable Execute Disable (XD) or No Execute (NX) Support on x86 Systems
Recent processors in the x86 family support the ability to prevent code execution on a per memory page basis. Generically and on AMD processors, this ability is called No Execute (NX), while on Intel processors it is called Execute Disable (XD). This ability can help prevent exploitation of buffer overflow vulnerabilities and should be activated whenever possible. Extra steps must be taken to ensure that this protection is enabled, particularly on 32-bit x86 systems. Other processors, such as Itanium and POWER, have included such support since inception and the standard kernel for those platforms supports the feature.
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
Guide to the Secure Configuration of Red Hat Enterprise Linux 6 XCCD... Page 31 of 167
The installation process should also have configured the bootloader to load the new kernel at boot. Verify this at reboot and modify /etc/grub.conf if necessary. The kernel-PAE package should not be installed on older systems that do not support the XD or NX bit, as this may prevent them from booting. On 32-bit systems that support the XD or NX bit, the vendor-supplied PAE kernel is required to enable either Execute Disable (XD) or No Execute (NX) support. Security identifiers CCE-27010-8 References 1. . URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>.
2.3. SELinux
SELinux is a feature of the Linux kernel which can be used to guard against misconfigured or compromised programs. SELinux enforces the idea that programs should be limited in what files they can access and what actions they can take. The default SELinux policy, as configured on RHEL 6, has been sufficiently developed and debugged that it should be usable on almost any Red Hat machine with minimal configuration and a small amount of system administrator training. This policy prevents system services - including most of the common network-visible services such as mail servers, FTP servers, and DNS servers - from accessing files which those services have no valid reason to access. This action alone prevents a huge amount of possible damage from network attacks against services, from trojaned software, and so forth. This guide recommends that SELinux be enabled using the default (targeted) policy on every Red Hat system, unless that system has requirements which make a stronger policy appropriate.
The restorecond service helps ensure that the default SELinux file context is applied to files. This allows automatic correction of file contexts created by some programs. Remediation script
# # Enable restorecond for all run levels # chkconfig --level 0123456 restorecond on # # Start restorecond if not currently running # service restorecond start
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
Guide to the Secure Configuration of Red Hat Enterprise Linux 6 XCCD... Page 32 of 167
Security identifiers CCE-26991-0 References 1. 2. 3. 4. 5. AC-3. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AC-3(3). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AC-4. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AC-6. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-9. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>.
It should produce no output in a well-configured system. Daemons which run with the initrc_t context may cause AVC denials, or allow privileges that the daemon does not require. References 1. AC-6. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 2. AU-9. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 3. CM-7. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>.
Edit the file /etc/grub.conf. Ensure that the following arguments DO NOT appear on any kernel command line in the file:
selinux=0 enforcing=0
The directive SELINUX=enforcing enables SELinux at boot time. If SELinux is suspected of involvement with boot-time problems (unlikely), it is possible to boot into the warning-only mode SELINUX=permissive for debugging purposes. Make certain to change the mode back to enforcing after debugging, set the filesystems to be relabeled for consistency using the command touch /.autorelabel, and reboot.
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
Guide to the Secure Configuration of Red Hat Enterprise Linux 6 XCCD... Page 33 of 167
However, the RHEL 6 default SELinux configuration should be sufficiently reasonable that most systems will boot without serious problems. Some applications that require deep or unusual system privileges, such as virtual machine software, may not be compatible with SELinux in its default configuration. However, this should be uncommon, and SELinux's application support continues to improve. In other cases, SELinux may reveal unusual or insecure program behavior by design. The directive SELINUXTYPE=targeted configures SELinux to use the default targeted policy. The SELinux boot mode specified in /etc/selinux/config can be overridden by command-line arguments passed to the kernel. It is necessary to check grub.conf to ensure that this has not been done and to protect the boot process.
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. Security identifiers CCE-26969-6 References 1. 2. 3. 4. 5. 6. 7. 8. AC-3. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AC-3(3). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AC-4. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AC-6. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-9. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 22. URL:<http://iase.disa.mil/cci/index.html>. 32. URL:<http://iase.disa.mil/cci/index.html>. 26. URL:<http://iase.disa.mil/cci/index.html>.
Other policies, such as mls, provide additional security labeling and greater confinement but are not compatible with many general-purpose use cases. 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. Security identifiers CCE-26875-5
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
Guide to the Secure Configuration of Red Hat Enterprise Linux 6 XCCD... Page 34 of 167
References 1. 2. 3. 4. 5. 6. 7. AC-3. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AC-3(3). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AC-4. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AC-6. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-9. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 22. URL:<http://iase.disa.mil/cci/index.html>. 32. URL:<http://iase.disa.mil/cci/index.html>.
Disabling direct root logins ensures proper accountability and multifactor authentication to privileged accounts. Users will first login, then escalate to privileged (root) access via su/sudo. This is required for FISMA Low and FISMA Moderate systems. References 1. IA-2(1). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>.
Preventing direct root login to virtual console devices helps ensure accountability for actions taken on the system using the root account. Security identifiers CCE-26855-7
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
Guide to the Secure Configuration of Red Hat Enterprise Linux 6 XCCD... Page 35 of 167
Preventing direct root login to serial port interfaces helps ensure accountability for actions taken on the systems using the root account. Security identifiers CCE-27047-0 References 1. AC-6(2). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 2. 770. URL:<http://iase.disa.mil/cci/index.html>.
2.4.1.1.e. Ensure that System Accounts Do Not Run a Shell Upon Login
Some accounts are not associated with a human user of the system, and exist to perform some administrative function. Should an attacker be able to log into these accounts, they should not be granted access to a shell. The login shell for each local account is stored in the last field of each line in /etc/passwd. System accounts are those user accounts with a user ID less than 500. The user ID is stored in the third field. If any system account SYSACCT (other than root) has a login shell, disable it with the command:
# usermod -s /sbin/nologin SYSACCT
Do not perform the steps in this section on the root account. Doing so might cause the system to become inaccessible. Ensuring shells are not given to system accounts upon login makes it more difficult for attackers to make use of system accounts. Security identifiers CCE-26966-2 References 1. . URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 2. 178. URL:<http://iase.disa.mil/cci/index.html>.
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
Guide to the Secure Configuration of Red Hat Enterprise Linux 6 XCCD... Page 36 of 167
Change any PATH variables to the vendor default for root and remove any empty PATH entries or references to relative paths. The root account's executable search path must be the vendor default, and must contain only absolute paths.
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
Guide to the Secure Configuration of Red Hat Enterprise Linux 6 XCCD... Page 37 of 167
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. 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. Security identifiers CCE-27225-2 References 1. IA-5(h). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 2. 196. URL:<http://iase.disa.mil/cci/index.html>.
The DoD requirement is 14. The FISMA requirement is 12. If a program consults /etc/login.defs and also another PAM module (such as pam_cracklib) during a password change operation, then the most restrictive must be satisfied. See PAM section for more information about enforcing password quality requirements. 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. Security identifiers CCE-27002-5 References 1. IA-5(f). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 2. IA-5(1)(a). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 3. 205. URL:<http://iase.disa.mil/cci/index.html>.
A value of 1 day is considered for sufficient for many environments. The DoD requirement is 1.
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
Guide to the Secure Configuration of Red Hat Enterprise Linux 6 XCCD... Page 38 of 167
Setting the minimum password age protects against users cycling back to a favorite password after satisfying the password reuse requirement. Security identifiers CCE-27013-2 References 1. IA-5(f). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 2. IA-5(1)(d). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 3. 198. URL:<http://iase.disa.mil/cci/index.html>.
A value of 180 days is sufficient for many environments. The DoD requirement is 60. 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. Security identifiers CCE-26985-2 References 1. 2. 3. 4. 5. IA-5(f). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. IA-5(g). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. IA-5(1)(d). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 180. URL:<http://iase.disa.mil/cci/index.html>. 199. URL:<http://iase.disa.mil/cci/index.html>.
The DoD requirement is 7. Setting the password warning age enables users to make the change at a practical time. Security identifiers CCE-26988-6 References 1. IA-5(f). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>.
Accounts, such as temporary accounts, can also be configured to expire on an explicitly-set date with the -E option. The file /etc/default/useradd controls default settings for all newly-created accounts created with the system's normal command line utilities.
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
Guide to the Secure Configuration of Red Hat Enterprise Linux 6 XCCD... Page 39 of 167
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=NUM_DAYS
A value of 35 is recommended. If a password is currently on the verge of expiration, then 35 days remain until the account is automatically disabled. However, if the password will not expire for another 60 days, then 95 days could elapse until the account would be automatically disabled. See the useradd man page for more information. Determining the inactivity timeout must be done with careful consideration of the length of a "normal" period of inactivity for users in the particular environment. Setting the timeout too low incurs support costs and also has the potential to impact availability of the system to legitimate users. Disabling inactive accounts ensures that accounts which may not have been responsibly removed are not available to attackers who may have compromised their credentials. Security identifiers CCE-27283-1 References 1. 2. 3. 4. 5. AC-2(2). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AC-2(3). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 16. URL:<http://iase.disa.mil/cci/index.html>. 17. URL:<http://iase.disa.mil/cci/index.html>. 795. URL:<http://iase.disa.mil/cci/index.html>.
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. References 1. 2. 3. 4. AC-2(2). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AC-2(3). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 16. URL:<http://iase.disa.mil/cci/index.html>. 1682. URL:<http://iase.disa.mil/cci/index.html>.
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
Guide to the Secure Configuration of Red Hat Enterprise Linux 6 XCCD... Page 40 of 167
sshd) or SUID programs (e.g. sudo) already meet this requirement. An SUID root application, userhelper, is provided so that programs which are not SUID or privileged themselves can still take advantage of PAM. PAM looks in the directory /etc/pam.d for application-specific configuration information. For instance, if the program login attempts to authenticate a user, then PAM's libraries follow the instructions in the file /etc/pam.d/login to determine what actions should be taken. One very important file in /etc/pam.d is /etc/pam.d/system-auth. This file, which is included by many other PAM configuration files, defines 'default' system authentication measures. Modifying this file is a good way to make far-reaching authentication changes, for instance when implementing a centralized authentication service. Be careful when making changes to PAM's configuration files. The syntax for these files is complex, and modifications can have unexpected consequences. The default configurations shipped with applications should be sufficient for most users. Running authconfig or system-config-authentication will re-write the PAM configuration files, destroying any manually made changes and replacing them with a series of system defaults. One reference to the configuration file syntax can be found at http://www.kernel.org/pub/linux/libs/pam/Linux-PAM-html/sag-configuration-file.html.
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. Security identifiers CCE-27291-4 References 1. 53. URL:<http://iase.disa.mil/cci/index.html>.
If no such line exists, add one as the first line of the password section in /etc/pam.d/system-auth. The arguments can be modified to ensure compliance with your organization's security policy. Discussion of each parameter follows. Note that the password quality requirements are not enforced for the root account for some reason.
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
Guide to the Secure Configuration of Red Hat Enterprise Linux 6 XCCD... Page 41 of 167
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. Security identifiers CCE-27123-9 References 1. IA-5(c). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 2. 1092. URL:<http://iase.disa.mil/cci/index.html>.
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
Guide to the Secure Configuration of Red Hat Enterprise Linux 6 XCCD... Page 42 of 167
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
Guide to the Secure Configuration of Red Hat Enterprise Linux 6 XCCD... Page 43 of 167
Locking out user accounts after a number of incorrect attempts prevents direct password guessing attacks. Security identifiers CCE-26844-1 References 1. AC-7(a). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 2. 44. URL:<http://iase.disa.mil/cci/index.html>.
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. Security identifiers CCE-27110-6 References 1. AC-7(b). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 2. 47. URL:<http://iase.disa.mil/cci/index.html>.
Locking out user accounts after a number of incorrect attempts within a specific period of time prevents direct password guessing attacks. Security identifiers CCE-27215-3 References 1. AC-7(a). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 2. 1452. URL:<http://iase.disa.mil/cci/index.html>.
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
Guide to the Secure Configuration of Red Hat Enterprise Linux 6 XCCD... Page 44 of 167
The DoD and FISMA requirement is 24 passwords. Preventing re-use of previous passwords helps ensure that a compromised password is not re-used by a user. Security identifiers CCE-26741-9 References 1. IA-5(f). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 2. IA-5(1)(e). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 3. 200. URL:<http://iase.disa.mil/cci/index.html>.
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. Using a stronger hashing algorithm makes password cracking attacks more difficult. Security identifiers CCE-26303-8 References 1. 2. 3. 4. 5. IA-5(b). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. IA-5(c). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. IA-5(1)(c). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. IA-7. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 803. URL:<http://iase.disa.mil/cci/index.html>.
Using a stronger hashing algorithm makes password cracking attacks more difficult. Security identifiers CCE-27228-6 References 1. 2. 3. 4. 5. IA-5(b). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. IA-5(c). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. IA-5(1)(c). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. IA-7. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 803. URL:<http://iase.disa.mil/cci/index.html>.
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
Guide to the Secure Configuration of Red Hat Enterprise Linux 6 XCCD... Page 45 of 167
Using a stronger hashing algorithm makes password cracking attacks more difficult. Security identifiers CCE-27229-4 References 1. 2. 3. 4. 5. IA-5(b). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. IA-5(c). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. IA-5(1)(c). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. IA-7. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 803. URL:<http://iase.disa.mil/cci/index.html>.
2.4.3.a. Limit the Number of Concurrent Login Sessions Allowed Per User
Limiting the number of allowed users and sessions per user can limit risks related to Denial of Service attacks. This addresses concurrent sessions for a single account and does not address concurrent sessions by a single user via multiple accounts. The DoD requirement is 10. To set the number of concurrent sessions per user add the following line in /etc/security/limits.conf:
* hard maxlogins 10
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. Security identifiers CCE-27457-1 References 1. AC-10. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 2. 54. URL:<http://iase.disa.mil/cci/index.html>.
2.4.3.b. Ensure that User Home Directories are not Group-Writable or World-Readable
For each human user of the system, view the permissions of the user's home directory:
# ls -ld /home/USER
Ensure that the directory is not group-writable and that it is not world-readable. If necessary, repair the permissions:
# chmod g-w /home/USER # chmod o-rwx /home/USER
This action may involve modifying user home directories. Notify your user community, and solicit input if appropriate, before making this type of change. User home directories contain many configuration files which affect the behavior of a user's account. No user should ever have write permission to another user's home directory. Group shared directories can be configured in sub-directories or elsewhere in the filesystem if they are needed. Typically, user home directories should not be world-readable, as it would disclose file names to other users. If a subset of users need read access to one another's home directories, this can be provided using groups or ACLs. Security identifiers CCE-26981-1 References 1. . URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>.
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
Guide to the Secure Configuration of Red Hat Enterprise Linux 6 XCCD... Page 46 of 167
This will produce a colon-separated list of directories in the path. Certain path elements could be considered dangerous, as they could lead to root executing unknown or untrusted programs, which could contain malicious code. Since root may sometimes work inside untrusted directories, the . character, which represents the current directory, should never be in the root path, nor should any directory which can be written to by an unprivileged or semi-privileged (system) user. It is a good practice for administrators to always execute privileged commands by typing the full path to the command.
2.4.3.3.a. Ensure that Root's Path Does Not Include Relative Paths or Null Directories
Ensure that none of the directories in root's path is equal to a single . character, or that it contains any instances that lead to relative path traversal, such as .. or beginning a path without the slash (/) character. Also ensure that there are no "empty" elements in the path, such as in these examples:
PATH=:/bin PATH=/bin: PATH=/bin::/sbin
These empty elements have the same effect as a single . character. Including these entries increases the risk that root could execute code from an untrusted location. Security identifiers CCE-26826-8 References 1. . URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>.
2.4.3.3.b. Ensure that Root's Path Does Not Include World or Group-Writable Directories
For each element in root's path, run:
# ls -ld DIR
and ensure that write permissions are disabled for group and other. Such entries increase the risk that root could execute code provided by unprivileged users, and potentially malicious code. Security identifiers CCE-26768-2 References 1. . URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>.
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
Guide to the Secure Configuration of Red Hat Enterprise Linux 6 XCCD... Page 47 of 167
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. Security identifiers CCE-26917-5 References 1. . URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 2. 366. URL:<http://iase.disa.mil/cci/index.html>.
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. Security identifiers CCE-27034-8 References 1. . URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 2. 366. URL:<http://iase.disa.mil/cci/index.html>.
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. Security identifiers CCE-26669-2 References 1. . URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 2. 366. URL:<http://iase.disa.mil/cci/index.html>.
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. Security identifiers CCE-26371-5 References 1. . URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 2. 366. URL:<http://iase.disa.mil/cci/index.html>.
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
Guide to the Secure Configuration of Red Hat Enterprise Linux 6 XCCD... Page 48 of 167
It is impossible to fully protect a system from an attacker with physical access, so securing the space in which the system is located should be considered a necessary step. However, there are some steps which, if taken, make it more difficult for an attacker to quickly or undetectably modify a system from its console.
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. Security identifiers CCE-27040-5 References 1. IA-2(1). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 2. 213. URL:<http://iase.disa.mil/cci/index.html>.
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"
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.
The PROMPT option allows the console user to perform an interactive system startup, in which it is possible to select the set of services which are started on boot. Using interactive boot, the console user could disable auditing, firewalls, or other services, weakening system security. Security identifiers CCE-27043-9 References 1. SC-2. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 2. 213. URL:<http://iase.disa.mil/cci/index.html>.
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
Guide to the Secure Configuration of Red Hat Enterprise Linux 6 XCCD... Page 49 of 167
Only root should be able to modify important boot parameters. Security identifiers CCE-26995-1 References 1. . URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 2. 225. URL:<http://iase.disa.mil/cci/index.html>.
The root group is a highly-privileged group. Furthermore, the group-owner of this file should not have any access privileges anyway. Security identifiers CCE-27022-3 References 1. . URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 2. 225. URL:<http://iase.disa.mil/cci/index.html>.
Proper permissions ensure that only the root user can modify important boot parameters. Security identifiers CCE-26949-8 References 1. . URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 2. 225. URL:<http://iase.disa.mil/cci/index.html>.
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. 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.
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
Guide to the Secure Configuration of Red Hat Enterprise Linux 6 XCCD... Page 50 of 167
Security identifiers CCE-26911-8 References 1. IA-2(1). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 2. IA-5(e). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 3. 213. URL:<http://iase.disa.mil/cci/index.html>.
Setting the idle delay controls when the screensaver will start, and can be combined with screen locking to prevent access from passersby. Security identifiers CCE-26828-4 References 1. AC-11(a). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 2. 57. URL:<http://iase.disa.mil/cci/index.html>.
Enabling idle activation of the screen saver 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. Security identifiers
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
Guide to the Secure Configuration of Red Hat Enterprise Linux 6 XCCD... Page 51 of 167
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. Security identifiers CCE-26235-2 References 1. AC-11(a). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 2. 57. URL:<http://iase.disa.mil/cci/index.html>.
Setting the screensaver mode to blank-only conceals the contents of the display from passersby. Security identifiers CCE-26638-7 References 1. AC-11(b). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 2. 60. URL:<http://iase.disa.mil/cci/index.html>.
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
Installing screen ensures a console locking capability is available for users who may need to suspend console logins. Remediation script
yum -y install screen
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
Guide to the Secure Configuration of Red Hat Enterprise Linux 6 XCCD... Page 52 of 167
OR:
I've read & consent to terms in IS user agreem't.
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
Guide to the Secure Configuration of Red Hat Enterprise Linux 6 XCCD... Page 53 of 167
An appropriate warning message reinforces policy awareness during the logon process and facilitates possible legal action against attackers. Remediation script
login_banner_text="" cat <<EOF >/etc/issue $login_banner_text EOF
Security identifiers CCE-26974-6 References 1. 2. 3. 4. 5. 6. 7. 8. 9. AC-8(a). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AC-8(b). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AC-8(c). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 48. URL:<http://iase.disa.mil/cci/index.html>. 1384. URL:<http://iase.disa.mil/cci/index.html>. 1385. URL:<http://iase.disa.mil/cci/index.html>. 1386. URL:<http://iase.disa.mil/cci/index.html>. 1387. URL:<http://iase.disa.mil/cci/index.html>. 1388. URL:<http://iase.disa.mil/cci/index.html>.
Leaving the user list enabled is a security risk since it allows anyone with physical access to the system to quickly enumerate known user accounts without logging in. Security identifiers CCE-27230-2 References 1. AC-23. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>.
To display a banner, this setting must be enabled and then banner text must also be set. An appropriate warning message reinforces policy awareness during the logon process and facilitates possible legal action against attackers. Security identifiers CCE-27195-7
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
Guide to the Secure Configuration of Red Hat Enterprise Linux 6 XCCD... Page 54 of 167
References 1. 2. 3. 4. 5. AC-8(a). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AC-8(b). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AC-8(c). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 48. URL:<http://iase.disa.mil/cci/index.html>. 50. URL:<http://iase.disa.mil/cci/index.html>.
When entering a warning banner that spans several lines, remember to begin and end the string with ". This command writes directly to the file /var/lib/gdm/.gconf/apps/gdm/simple-greeter/%gconf.xml, and this file can later be edited directly if necessary. An appropriate warning message reinforces policy awareness during the logon process and facilitates possible legal action against attackers. Security identifiers CCE-27017-3 References 1. 2. 3. 4. 5. 6. 7. 8. 9. AC-8(a). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AC-8(b). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AC-8(c). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 48. URL:<http://iase.disa.mil/cci/index.html>. 1384. URL:<http://iase.disa.mil/cci/index.html>. 1385. URL:<http://iase.disa.mil/cci/index.html>. 1386. URL:<http://iase.disa.mil/cci/index.html>. 1387. URL:<http://iase.disa.mil/cci/index.html>. 1388. URL:<http://iase.disa.mil/cci/index.html>.
Zeroconf addresses are in the network 169.254.0.0. The networking scripts add entries to the system's routing table for these addresses. Zeroconf address assignment commonly occurs when the system is configured to use DHCP but fails to receive an address assignment from the DHCP server. Security identifiers CCE-27151-0 References 1. CM-7. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>.
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
Guide to the Secure Configuration of Red Hat Enterprise Linux 6 XCCD... Page 55 of 167
The system should not be acting as a network sniffer, which can capture all traffic on the network to which it is connected. Run the following to determine if any interface is running in promiscuous mode:
$ ip link | grep PROMISC
If any results are returned, then a sniffing process (such as tcpdump or Wireshark) is likely to be using the interface and this should be investigated. Security identifiers CCE-27152-8 References 1. CM-7. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 2. MA-3. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>.
If the system is a standalone machine with no need for network access or even communication over the loopback device, then disable this service. The network service can be disabled with the following command:
# chkconfig network off
If this is not the system's default value, add the following line to /etc/sysctl.conf:
net.ipv4.conf.default.send_redirects = 0
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. Security identifiers CCE-27001-7 References 1. 2. 3. 4. 5. AC-4. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. CM-7. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. SC-5. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. SC-7. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 1551. URL:<http://iase.disa.mil/cci/index.html>.
2.5.4.1.b. Disable Kernel Parameter for Sending ICMP Redirects for All Interfaces
To set the runtime status of the net.ipv4.conf.all.send_redirects kernel parameter, run the following command:
# sysctl -w net.ipv4.conf.all.send_redirects=0
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
Guide to the Secure Configuration of Red Hat Enterprise Linux 6 XCCD... Page 56 of 167
If this is not the system's default value, add the following line to /etc/sysctl.conf:
net.ipv4.conf.all.send_redirects = 0
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. Security identifiers CCE-27004-1 References 1. CM-7. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 2. 1551. URL:<http://iase.disa.mil/cci/index.html>.
If this is not the system's default value, add the following line to /etc/sysctl.conf:
net.ipv4.ip_forward = 0
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. Security identifiers CCE-26866-4 References 1. CM-7. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 2. SC-5. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 3. 366. URL:<http://iase.disa.mil/cci/index.html>.
2.5.4.2. Network Related Kernel Runtime Parameters for Hosts and Routers
Certain kernel parameters should be set for systems which are acting as either hosts or routers to improve the system's ability defend against certain types of IPv4 protocol attacks.
2.5.4.2.a. Disable Kernel Parameter for Accepting Source-Routed Packets for All Interfaces
To set the runtime status of the net.ipv4.conf.all.accept_source_route kernel parameter, run the following command:
# sysctl -w net.ipv4.conf.all.accept_source_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
Accepting source-routed packets in the IPv4 protocol has few legitimate uses. It should be disabled unless it is absolutely required. Remediation script
# # Set runtime for net.ipv4.conf.all.accept_source_route # sysctl -q -n -w net.ipv4.conf.all.accept_source_route=0 # # If net.ipv4.conf.all.accept_source_route present in /etc/sysctl.conf, change value to "0" # else, add "net.ipv4.conf.all.accept_source_route = 0" to /etc/sysctl.conf # if grep --silent ^net.ipv4.conf.all.accept_source_route /etc/sysctl.conf ; then sed -i 's/^net.ipv4.conf.all.accept_source_route.*/net.ipv4.conf.all.accept_source_route = 0/g' /etc/sysctl.conf else echo "" >> /etc/sysctl.conf echo "# Set net.ipv4.conf.all.accept_source_route to 0 per security requirements" >> /etc/sysctl.conf echo "net.ipv4.conf.all.accept_source_route = 0" >> /etc/sysctl.conf fi
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
Guide to the Secure Configuration of Red Hat Enterprise Linux 6 XCCD... Page 57 of 167
2.5.4.2.b. Disable Kernel Parameter for Accepting ICMP Redirects for All Interfaces
To set the runtime status of the net.ipv4.conf.all.accept_redirects kernel parameter, run the following command:
# sysctl -w net.ipv4.conf.all.accept_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
Accepting ICMP redirects has few legitimate uses. It should be disabled unless it is absolutely required. Remediation script
# # Set runtime for net.ipv4.conf.all.accept_redirects # sysctl -q -n -w net.ipv4.conf.all.accept_redirects=0 # # If net.ipv4.conf.all.accept_redirects present in /etc/sysctl.conf, change value to "0" # else, add "net.ipv4.conf.all.accept_redirects = 0" to /etc/sysctl.conf # if grep --silent ^net.ipv4.conf.all.accept_redirects /etc/sysctl.conf ; then sed -i 's/^net.ipv4.conf.all.accept_redirects.*/net.ipv4.conf.all.accept_redirects = 0/g' /etc/sysctl.conf else echo "" >> /etc/sysctl.conf echo "# Set net.ipv4.conf.all.accept_redirects to 0 per security requirements" >> /etc/sysctl.conf echo "net.ipv4.conf.all.accept_redirects = 0" >> /etc/sysctl.conf fi
Security identifiers CCE-27027-2 References 1. CM-7. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 2. 1503. URL:<http://iase.disa.mil/cci/index.html>. 3. 1551. URL:<http://iase.disa.mil/cci/index.html>.
2.5.4.2.c. Disable Kernel Parameter for Accepting Secure Redirects for All Interfaces
To set the runtime status of the net.ipv4.conf.all.secure_redirects kernel parameter, run the following command:
# sysctl -w net.ipv4.conf.all.secure_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
Accepting "secure" ICMP redirects (from those gateways listed as default gateways) has few legitimate uses. It should be disabled unless it is absolutely required. Remediation script
# # Set runtime for net.ipv4.conf.all.secure_redirects # sysctl -q -n -w net.ipv4.conf.all.secure_redirects=0 # # If net.ipv4.conf.all.secure_redirects present in /etc/sysctl.conf, change value to "0" # else, add "net.ipv4.conf.all.secure_redirects = 0" to /etc/sysctl.conf
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
Guide to the Secure Configuration of Red Hat Enterprise Linux 6 XCCD... Page 58 of 167
# if grep --silent ^net.ipv4.conf.all.secure_redirects /etc/sysctl.conf ; then sed -i 's/^net.ipv4.conf.all.secure_redirects.*/net.ipv4.conf.all.secure_redirects = 0/g' /etc/sysctl.conf else echo "" >> /etc/sysctl.conf echo "# Set net.ipv4.conf.all.secure_redirects to 0 per security requirements" >> /etc/sysctl.conf echo "net.ipv4.conf.all.secure_redirects = 0" >> /etc/sysctl.conf fi
Security identifiers CCE-26854-0 References 1. 2. 3. 4. AC-4. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. CM-7. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 1503. URL:<http://iase.disa.mil/cci/index.html>. 1551. URL:<http://iase.disa.mil/cci/index.html>.
If this is not the system's default value, add the following line to /etc/sysctl.conf:
net.ipv4.conf.all.log_martians = 1
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. Remediation script
# # Set runtime for net.ipv4.conf.all.log_martians # sysctl -q -n -w net.ipv4.conf.all.log_martians=1 # # If net.ipv4.conf.all.log_martians present in /etc/sysctl.conf, change value to "1" # else, add "net.ipv4.conf.all.log_martians = 1" to /etc/sysctl.conf # if grep --silent ^net.ipv4.conf.all.log_martians /etc/sysctl.conf ; then sed -i 's/^net.ipv4.conf.all.log_martians.*/net.ipv4.conf.all.log_martians = 1/g' /etc/sysctl.conf else echo "" >> /etc/sysctl.conf echo "# Set net.ipv4.conf.all.log_martians to 1 per security requirements" >> /etc/sysctl.conf echo "net.ipv4.conf.all.log_martians = 1" >> /etc/sysctl.conf fi
Security identifiers CCE-27066-0 References 1. AC-17(7). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 2. CM-7. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 3. 126. URL:<http://iase.disa.mil/cci/index.html>.
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
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
Guide to the Secure Configuration of Red Hat Enterprise Linux 6 XCCD... Page 59 of 167
Accepting source-routed packets in the IPv4 protocol has few legitimate uses. It should be disabled unless it is absolutely required. Remediation script
# # Set runtime for net.ipv4.conf.default.accept_source_route # sysctl -q -n -w net.ipv4.conf.default.accept_source_route=0 # # If net.ipv4.conf.default.accept_source_route present in /etc/sysctl.conf, change value to "0" # else, add "net.ipv4.conf.default.accept_source_route = 0" to /etc/sysctl.conf # if grep --silent ^net.ipv4.conf.default.accept_source_route /etc/sysctl.conf ; then sed -i 's/^net.ipv4.conf.default.accept_source_route.*/net.ipv4.conf.default.accept_source_route = 0/g' /etc/sysctl.conf else echo "" >> /etc/sysctl.conf echo "# Set net.ipv4.conf.default.accept_source_route to 0 per security requirements" >> /etc/sysctl.conf echo "net.ipv4.conf.default.accept_source_route = 0" >> /etc/sysctl.conf fi
Security identifiers CCE-26983-7 References 1. 2. 3. 4. 5. AC-4. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. CM-7. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. SC-5. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. SC-7. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 1551. URL:<http://iase.disa.mil/cci/index.html>.
If this is not the system's default value, add the following line to /etc/sysctl.conf:
net.ipv4.conf.default.accept_redirects = 0
This feature of the IPv4 protocol has few legitimate uses. It should be disabled unless it is absolutely required. Remediation script
# # Set runtime for net.ipv4.conf.default.accept_redirects # sysctl -q -n -w net.ipv4.conf.default.accept_redirects=0 # # If net.ipv4.conf.default.accept_redirects present in /etc/sysctl.conf, change value to "0" # else, add "net.ipv4.conf.default.accept_redirects = 0" to /etc/sysctl.conf # if grep --silent ^net.ipv4.conf.default.accept_redirects /etc/sysctl.conf ; then sed -i 's/^net.ipv4.conf.default.accept_redirects.*/net.ipv4.conf.default.accept_redirects = 0/g' /etc/sysctl.conf else echo "" >> /etc/sysctl.conf echo "# Set net.ipv4.conf.default.accept_redirects to 0 per security requirements" >> /etc/sysctl.conf echo "net.ipv4.conf.default.accept_redirects = 0" >> /etc/sysctl.conf fi
Security identifiers CCE-27015-7 References 1. AC-4. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 2. CM-7. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 3. SC-5. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>.
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
Guide to the Secure Configuration of Red Hat Enterprise Linux 6 XCCD... Page 60 of 167
If this is not the system's default value, add the following line to /etc/sysctl.conf:
net.ipv4.conf.default.secure_redirects = 0
Accepting "secure" ICMP redirects (from those gateways listed as default gateways) has few legitimate uses. It should be disabled unless it is absolutely required. Remediation script
# # Set runtime for net.ipv4.conf.default.secure_redirects # sysctl -q -n -w net.ipv4.conf.default.secure_redirects=0 # # If net.ipv4.conf.default.secure_redirects present in /etc/sysctl.conf, change value to "0" # else, add "net.ipv4.conf.default.secure_redirects = 0" to /etc/sysctl.conf # if grep --silent ^net.ipv4.conf.default.secure_redirects /etc/sysctl.conf ; then sed -i 's/^net.ipv4.conf.default.secure_redirects.*/net.ipv4.conf.default.secure_redirects = 0/g' /etc/sysctl.conf else echo "" >> /etc/sysctl.conf echo "# Set net.ipv4.conf.default.secure_redirects to 0 per security requirements" >> /etc/sysctl.conf echo "net.ipv4.conf.default.secure_redirects = 0" >> /etc/sysctl.conf fi
Security identifiers CCE-26831-8 References 1. 2. 3. 4. 5. AC-4. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. CM-7. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. SC-5. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. SC-7. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 1551. URL:<http://iase.disa.mil/cci/index.html>.
If this is not the system's default value, add the following line to /etc/sysctl.conf:
net.ipv4.icmp_echo_ignore_broadcasts = 1
Ignoring ICMP echo requests (pings) sent to broadcast or multicast addresses makes the system slightly more difficult to enumerate on the network. Remediation script
# # Set runtime for net.ipv4.icmp_echo_ignore_broadcasts # sysctl -q -n -w net.ipv4.icmp_echo_ignore_broadcasts=1 # # If net.ipv4.icmp_echo_ignore_broadcasts present in /etc/sysctl.conf, change value to "1" # else, add "net.ipv4.icmp_echo_ignore_broadcasts = 1" to /etc/sysctl.conf # if grep --silent ^net.ipv4.icmp_echo_ignore_broadcasts /etc/sysctl.conf ; then sed -i 's/^net.ipv4.icmp_echo_ignore_broadcasts.*/net.ipv4.icmp_echo_ignore_broadcasts = 1/g' /etc/sysctl.conf else echo "" >> /etc/sysctl.conf
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
Guide to the Secure Configuration of Red Hat Enterprise Linux 6 XCCD... Page 61 of 167
echo "# Set net.ipv4.icmp_echo_ignore_broadcasts to 1 per security requirements" >> /etc/sysctl.conf echo "net.ipv4.icmp_echo_ignore_broadcasts = 1" >> /etc/sysctl.conf fi
Security identifiers CCE-26883-9 References 1. CM-7. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 2. SC-5. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 3. 1551. URL:<http://iase.disa.mil/cci/index.html>.
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
Ignoring bogus ICMP error responses reduces log size, although some activity would not be logged. Remediation script
# # Set runtime for net.ipv4.icmp_ignore_bogus_error_responses # sysctl -q -n -w net.ipv4.icmp_ignore_bogus_error_responses=1 # # If net.ipv4.icmp_ignore_bogus_error_responses present in /etc/sysctl.conf, change value to "1" # else, add "net.ipv4.icmp_ignore_bogus_error_responses = 1" to /etc/sysctl.conf # if grep --silent ^net.ipv4.icmp_ignore_bogus_error_responses /etc/sysctl.conf ; then sed -i 's/^net.ipv4.icmp_ignore_bogus_error_responses.*/net.ipv4.icmp_ignore_bogus_error_responses = 1/g' /etc/sysctl.conf else echo "" >> /etc/sysctl.conf echo "# Set net.ipv4.icmp_ignore_bogus_error_responses to 1 per security requirements" >> /etc/sysctl.conf echo "net.ipv4.icmp_ignore_bogus_error_responses = 1" >> /etc/sysctl.conf fi
If this is not the system's default value, add the following line to /etc/sysctl.conf:
net.ipv4.tcp_syncookies = 1
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. Remediation script
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
Guide to the Secure Configuration of Red Hat Enterprise Linux 6 XCCD... Page 62 of 167
# # Set runtime for net.ipv4.tcp_syncookies # sysctl -q -n -w net.ipv4.tcp_syncookies=1 # # If net.ipv4.tcp_syncookies present in /etc/sysctl.conf, change value to "1" # else, add "net.ipv4.tcp_syncookies = 1" to /etc/sysctl.conf # if grep --silent ^net.ipv4.tcp_syncookies /etc/sysctl.conf ; then sed -i 's/^net.ipv4.tcp_syncookies.*/net.ipv4.tcp_syncookies = 1/g' /etc/sysctl.conf else echo "" >> /etc/sysctl.conf echo "# Set net.ipv4.tcp_syncookies to 1 per security requirements" >> /etc/sysctl.conf echo "net.ipv4.tcp_syncookies = 1" >> /etc/sysctl.conf fi
Security identifiers CCE-27053-8 References 1. AC-4. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 2. 1092. URL:<http://iase.disa.mil/cci/index.html>. 3. 1095. URL:<http://iase.disa.mil/cci/index.html>.
2.5.4.2.k. Enable Kernel Parameter to Use Reverse Path Filtering for All Interfaces
To set the runtime status of the net.ipv4.conf.all.rp_filter kernel parameter, run the following command:
# sysctl -w net.ipv4.conf.all.rp_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
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. Remediation script
# # Set runtime for net.ipv4.conf.all.rp_filter # sysctl -q -n -w net.ipv4.conf.all.rp_filter=1 # # If net.ipv4.conf.all.rp_filter present in /etc/sysctl.conf, change value to "1" # else, add "net.ipv4.conf.all.rp_filter = 1" to /etc/sysctl.conf # if grep --silent ^net.ipv4.conf.all.rp_filter /etc/sysctl.conf ; then sed -i 's/^net.ipv4.conf.all.rp_filter.*/net.ipv4.conf.all.rp_filter = 1/g' /etc/sysctl.conf else echo "" >> /etc/sysctl.conf echo "# Set net.ipv4.conf.all.rp_filter to 1 per security requirements" >> /etc/sysctl.conf echo "net.ipv4.conf.all.rp_filter = 1" >> /etc/sysctl.conf fi
Security identifiers CCE-26979-5 References 1. 2. 3. 4. AC-4. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. SC-5. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. SC-7. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 1551. URL:<http://iase.disa.mil/cci/index.html>.
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
Guide to the Secure Configuration of Red Hat Enterprise Linux 6 XCCD... Page 63 of 167
# 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
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. Remediation script
# # Set runtime for net.ipv4.conf.default.rp_filter # sysctl -q -n -w net.ipv4.conf.default.rp_filter=1 # # If net.ipv4.conf.default.rp_filter present in /etc/sysctl.conf, change value to "1" # else, add "net.ipv4.conf.default.rp_filter = 1" to /etc/sysctl.conf # if grep --silent ^net.ipv4.conf.default.rp_filter /etc/sysctl.conf ; then sed -i 's/^net.ipv4.conf.default.rp_filter.*/net.ipv4.conf.default.rp_filter = 1/g' /etc/sysctl.conf else echo "" >> /etc/sysctl.conf echo "# Set net.ipv4.conf.default.rp_filter to 1 per security requirements" >> /etc/sysctl.conf echo "net.ipv4.conf.default.rp_filter = 1" >> /etc/sysctl.conf fi
Security identifiers CCE-26915-9 References 1. AC-4. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 2. SC-5. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 3. SC-7. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>.
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
Guide to the Secure Configuration of Red Hat Enterprise Linux 6 XCCD... Page 64 of 167
Additionally,the following command may also be used to determine whether wireless support ('extensions') is included for a particular interface, though this may not always be a clear indicator:
# iwconfig
After identifying any wireless interfaces (which may have names like wlan0, ath0, wifi0, em1 or eth0), deactivate the interface with the command:
# ifdown interface
These changes will only last until the next reboot. To disable the interface for future boots, remove the appropriate interface file from /etc/sysconfig/network-scripts:
# rm /etc/sysconfig/network-scripts/ifcfg-interface
Wireless networking allows attackers within physical proximity to launch network-based attacks against systems, including those against local LAN protocols which were not designed with security in mind. Security identifiers CCE-27057-9 References 1. 2. 3. 4. 5. 6. AC-17(8). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AC-18(a). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AC-18(d). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AC-18(3). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. CM-7. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 85. URL:<http://iase.disa.mil/cci/index.html>.
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. Remediation script
# # Disable bluetooth for all run levels # chkconfig --level 0123456 bluetooth off # # Stop bluetooth if currently running # service bluetooth stop
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
Guide to the Secure Configuration of Red Hat Enterprise Linux 6 XCCD... Page 65 of 167
3. 4. 5. 6. 7.
AC-18(d). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AC-18(3). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. CM-7. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 85. URL:<http://iase.disa.mil/cci/index.html>. 1551. URL:<http://iase.disa.mil/cci/index.html>.
If Bluetooth functionality must be disabled, preventing the kernel from loading the kernel module provides an additional safeguard against its activation. Security identifiers CCE-26763-3 References 1. 2. 3. 4. 5. 6. 7. AC-17(8). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AC-18(a). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AC-18(d). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AC-18(3). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. CM-7. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 85. URL:<http://iase.disa.mil/cci/index.html>. 1551. URL:<http://iase.disa.mil/cci/index.html>.
2.5.6. IPv6
The system includes support for Internet Protocol version 6. A major and often-mentioned improvement over IPv4 is its enormous increase in the number of available addresses. Another important feature is its support for automatic configuration of many network settings.
This permits the IPv6 module to be loaded (and thus satisfy other modules that depend on it), while disabling support for the IPv6 protocol. Any unnecessary network stacks - including IPv6 - should be disabled, to reduce the vulnerability to exploitation. Security identifiers CCE-27153-6 References 1. CM-7. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 2. 1551. URL:<http://iase.disa.mil/cci/index.html>.
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
Guide to the Secure Configuration of Red Hat Enterprise Linux 6 XCCD... Page 66 of 167
RPC services for NFSv4 try to load transport modules for udp6 and tcp6 by default, even if IPv6 has been disabled in /etc/modprobe.d. To prevent RPC services such as rpc.mountd from attempting to start IPv6 network listeners, remove or comment out the following two lines in /etc/netconfig:
udp6 tcp6 tpi_clts tpi_cots_ord v v inet6 inet6 udp tcp -
Manually assigning an IP address is preferable to accepting one from routers or from the network otherwise. The example address here is an IPv6 address reserved for documentation purposes, as defined by RFC3849. Security identifiers CCE-27233-6 References 1. . URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>.
Automatically-generated IPv6 addresses are based on the underlying hardware (e.g. Ethernet) address, and so it becomes possible to track a piece of hardware over its lifetime using its traffic. If it is important for a system's IP address to not trivially reveal its hardware address, this setting should be applied. Security identifiers CCE-27154-4 References 1. . URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>.
Router addresses should be manually set and not accepted via any auto-configuration or router advertisement. Security identifiers CCE-27234-4
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
Guide to the Secure Configuration of Red Hat Enterprise Linux 6 XCCD... Page 67 of 167
References 1. . URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>.
If this is not the system's default value, add the following line to /etc/sysctl.conf:
net.ipv6.conf.default.accept_ra = 0
An illicit router advertisement message could result in a man-in-the-middle attack. Remediation script
# # Set runtime for net.ipv6.conf.default.accept_ra # sysctl -q -n -w net.ipv6.conf.default.accept_ra=0 # # If net.ipv6.conf.default.accept_ra present in /etc/sysctl.conf, change value to "0" # else, add "net.ipv6.conf.default.accept_ra = 0" to /etc/sysctl.conf # if grep --silent ^net.ipv6.conf.default.accept_ra /etc/sysctl.conf ; then sed -i 's/^net.ipv6.conf.default.accept_ra.*/net.ipv6.conf.default.accept_ra = 0/g' /etc/sysctl.conf else echo "" >> /etc/sysctl.conf echo "# Set net.ipv6.conf.default.accept_ra to 0 per security requirements" >> /etc/sysctl.conf echo "net.ipv6.conf.default.accept_ra = 0" >> /etc/sysctl.conf fi
If this is not the system's default value, add the following line to /etc/sysctl.conf:
net.ipv6.conf.default.accept_redirects = 0
An illicit ICMP redirect message could result in a man-in-the-middle attack. Security identifiers CCE-27166-8 References 1. CM-7. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 2. 1551. URL:<http://iase.disa.mil/cci/index.html>.
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
Guide to the Secure Configuration of Red Hat Enterprise Linux 6 XCCD... Page 68 of 167
To limit the configuration information requested from other systems and accepted from the network on a system that uses statically-configured IPv6 addresses, add the following lines to /etc/sysctl.conf:
net.ipv6.conf.default.router_solicitations = 0 net.ipv6.conf.default.accept_ra_rtr_pref = 0 net.ipv6.conf.default.accept_ra_pinfo = 0 net.ipv6.conf.default.accept_ra_defrtr = 0 net.ipv6.conf.default.autoconf = 0 net.ipv6.conf.default.dad_transmits = 0 net.ipv6.conf.default.max_addresses = 1
The router_solicitations setting determines how many router solicitations are sent when bringing up the interface. If addresses are statically assigned, there is no need to send any solicitations. The accept_ra_pinfo setting controls whether the system will accept prefix info from the router. The accept_ra_defrtr setting controls whether the system will accept Hop Limit settings from a router advertisement. Setting it to 0 prevents a router from changing your default IPv6 Hop Limit for outgoing packets. The autoconf setting controls whether router advertisements can cause the system to assign a global unicast address to an interface. The dad_transmits setting determines how many neighbor solicitations to send out per address (global and link-local) when bringing up an interface to ensure the desired address is unique on the network. The max_addresses setting determines how many global unicast IPv6 addresses can be assigned to each interface. The default is 16, but it should be set to exactly the number of statically configured global addresses required.
The command is analogous for the ip6tables program. If the firewall does not appear to be active (i.e., no rules appear), activate it and ensure that it starts at boot by issuing the following commands (and analogously for ip6tables):
# service iptables restart
state RELATED,ESTABLISHED
destination 0.0.0.0/0
reject-with icmp-host-prohibited
destination
The ip6tables service provides the system's host-based firewalling capability for IPv6 and ICMPv6. Remediation script
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
Guide to the Secure Configuration of Red Hat Enterprise Linux 6 XCCD... Page 69 of 167
# # Enable ip6tables for all run levels # chkconfig --level 0123456 ip6tables on # # Start ip6tables if not currently running # service ip6tables start
Security identifiers CCE-27006-6 References 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. AC-4. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. CA-3(c). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. CM-7. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 32. URL:<http://iase.disa.mil/cci/index.html>. 66. URL:<http://iase.disa.mil/cci/index.html>. 1115. URL:<http://iase.disa.mil/cci/index.html>. 1118. URL:<http://iase.disa.mil/cci/index.html>. 1092. URL:<http://iase.disa.mil/cci/index.html>. 1117. URL:<http://iase.disa.mil/cci/index.html>. 1098. URL:<http://iase.disa.mil/cci/index.html>. 1100. URL:<http://iase.disa.mil/cci/index.html>. 1097. URL:<http://iase.disa.mil/cci/index.html>. 1414. URL:<http://iase.disa.mil/cci/index.html>.
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. Security identifiers CCE-27317-7 References 1. 2. 3. 4. 5. CM-7. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 66. URL:<http://iase.disa.mil/cci/index.html>. 1109. URL:<http://iase.disa.mil/cci/index.html>. 1154. URL:<http://iase.disa.mil/cci/index.html>. 1414. URL:<http://iase.disa.mil/cci/index.html>.
The iptables service provides the system's host-based firewalling capability for IPv4 and ICMP. Remediation script
# # Enable iptables for all run levels # chkconfig --level 0123456 iptables on # # Start iptables if not currently running # service iptables start
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
Guide to the Secure Configuration of Red Hat Enterprise Linux 6 XCCD... Page 70 of 167
Security identifiers CCE-27018-1 References 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. AC-4. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. CA-3(c). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. CM-7. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 32. URL:<http://iase.disa.mil/cci/index.html>. 66. URL:<http://iase.disa.mil/cci/index.html>. 1115. URL:<http://iase.disa.mil/cci/index.html>. 1118. URL:<http://iase.disa.mil/cci/index.html>. 1092. URL:<http://iase.disa.mil/cci/index.html>. 1117. URL:<http://iase.disa.mil/cci/index.html>. 1098. URL:<http://iase.disa.mil/cci/index.html>. 1100. URL:<http://iase.disa.mil/cci/index.html>. 1097. URL:<http://iase.disa.mil/cci/index.html>. 1414. URL:<http://iase.disa.mil/cci/index.html>.
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. Security identifiers CCE-26444-0 References 1. 2. 3. 4. 5. CM-7. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 66. URL:<http://iase.disa.mil/cci/index.html>. 1109. URL:<http://iase.disa.mil/cci/index.html>. 1154. URL:<http://iase.disa.mil/cci/index.html>. 1414. URL:<http://iase.disa.mil/cci/index.html>.
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.
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
Guide to the Secure Configuration of Red Hat Enterprise Linux 6 XCCD... Page 71 of 167
To allow the system to respond to pings, also insert the following line:
-A INPUT -p icmp --icmp-type echo-request -j ACCEPT
Ping responses can also be limited to certain networks or hosts by using the -s option in the previous rule. Because IPv6 depends so heavily on ICMPv6, it is preferable to deny the ICMPv6 packets you know you don't need (e.g. ping requests) in /etc/sysconfig/ip6tables, while letting everything else through:
-A INPUT -p icmpv6 --icmpv6-type echo-request -j DROP
If you are going to statically configure the machine's address, it should ignore Router Advertisements which could add another IPv6 address to the interface or alter important network settings:
-A INPUT -p icmpv6 --icmpv6-type router-advertisement -j DROP
Restricting ICMPv6 message types in /etc/sysconfig/ip6tables is not recommended because the operation of IPv6 depends heavily on ICMPv6. Thus, great care must be taken if any other ICMPv6 types are blocked. Restricting ICMP messages may make a system slightly less discoverable to an unsophisticated attacker but is not appropriate for many general-purpose use cases and can also make troubleshooting more difficult.
Similarly, you might wish to log packets containing some IPv6 reserved addresses if they are not expected on your network:
-A -A -A -A -A -A -A -A INPUT INPUT INPUT INPUT INPUT INPUT INPUT INPUT -i -s -s -s -s -s -s -s eth0 -s ::1 -j 2002:E000::/20 2002:7F00::/24 2002:0000::/24 2002:FF00::/24 2002:0A00::/24 2002:AC10::/28 2002:C0A8::/32 LOG --log-prefix "IPv6 DROP LOOPBACK: " -j LOG --log-prefix "IPv6 6to4 TRAFFIC: -j LOG --log-prefix "IPv6 6to4 TRAFFIC: -j LOG --log-prefix "IPv6 6to4 TRAFFIC: -j LOG --log-prefix "IPv6 6to4 TRAFFIC: -j LOG --log-prefix "IPv6 6to4 TRAFFIC: -j LOG --log-prefix "IPv6 6to4 TRAFFIC: -j LOG --log-prefix "IPv6 6to4 TRAFFIC: " " " " " " "
If you are not expecting to see site-local multicast or auto-tunneled traffic, you can log those:
-A INPUT -s FF05::/16 -j LOG --log-prefix "IPv6 SITE-LOCAL MULTICAST: " -A INPUT -s ::0.0.0.0/96 -j LOG --log-prefix "IPv4 COMPATIBLE IPv6 ADDR: "
If you wish to block multicasts to all link-local nodes (e.g. if you are not using router auto-configuration and do not plan to have any services that multicast to the entire local network), you can block the link-local all-nodes multicast address (before accepting incoming ICMPv6):
-A INPUT -d FF02::1 -j LOG --log-prefix "Link-local All-Nodes Multicast: "
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
Guide to the Secure Configuration of Red Hat Enterprise Linux 6 XCCD... Page 72 of 167
However, if you're going to allow IPv4 compatible IPv6 addresses (of the form ::0.0.0.0/96), you should then consider logging the non-routable IPv4-compatible addresses:
-A -A -A -A INPUT INPUT INPUT INPUT -s -s -s -s ::0.0.0.0/104 -j LOG --log-prefix "IP NON-ROUTABLE ADDR: " ::127.0.0.0/104 -j LOG --log-prefix "IP DROP LOOPBACK: " ::224.0.0.0.0/100 -j LOG --log-prefix "IP DROP MULTICAST D: " ::255.0.0.0/104 -j LOG --log-prefix "IP BROADCAST: "
If you are not expecting to see any IPv4 (or IPv4-compatible) traffic on your network, consider logging it before it gets dropped:
-A INPUT -s ::FFFF:0.0.0.0/96 -j LOG --log-prefix "IPv4 MAPPED IPv6 ADDR: " -A INPUT -s 2002::/16 -j LOG --log-prefix "IPv6 6to4 ADDR: "
The following rule will log all traffic originating from a site-local address, which is deprecated address space:
-A INPUT -s FEC0::/10 -j LOG --log-prefix "SITE-LOCAL ADDRESS TRAFFIC: "
When prompted, press enter to create a new CA key with the default name cakey.pem. When prompted, enter a password that will protect the private key, then enter the same password again to verify it. At the prompts, fill out as much of the CA information as is relevant for your site. You must specify a common name, or generation of the CA certificate will fail. Next, you will be prompted for the password, so that the script can re-open the private key in order to write the certificate.
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
Guide to the Secure Configuration of Red Hat Enterprise Linux 6 XCCD... Page 73 of 167
This step performs the following actions: creates the directory /etc/pki/CA (by default), which contains files necessary for the operation of a certificate authority. These are: serial, which contains the current serial number for certificates signed by the CA index.txt, which is a text database file that contains information about certificates signed crl, which is a directory for holding revoked certificates private, a directory which stores the CA's private key creates a public-private key pair for the CA in the file /etc/pki/CA/private/cakey.pem. The private key must be kept private in order to ensure the security of the certificates the CA will later sign. signs the public key (using the corresponding private key, in a process called self-signing) to create the CA certificate, which is then stored in /etc/pki/CA/cacert.pem. When the CA later signs a server certificate using its private key, it means that it is vouching for the authenticity of that server. A client can then use the CA's certificate (which contains its public key) to verify the authenticity of the server certificate.
Disabling DCCP protects the system against exploitation of any flaws in its implementation. Security identifiers CCE-26448-1
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
Guide to the Secure Configuration of Red Hat Enterprise Linux 6 XCCD... Page 74 of 167
Disabling SCTP protects the system against exploitation of any flaws in its implementation. Security identifiers CCE-26410-1 References 1. CM-7. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 2. 382. URL:<http://iase.disa.mil/cci/index.html>.
Disabling RDS protects the system against exploitation of any flaws in its implementation. Security identifiers CCE-26239-4 References 1. CM-7. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 2. 382. URL:<http://iase.disa.mil/cci/index.html>.
Disabling TIPC protects the system against exploitation of any flaws in its implementation. Security identifiers CCE-26696-5 References 1. CM-7. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 2. 382. URL:<http://iase.disa.mil/cci/index.html>.
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
Guide to the Secure Configuration of Red Hat Enterprise Linux 6 XCCD... Page 75 of 167
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. Security identifiers CCE-27626-1 References 1. 2. 3. 4. 5. AC-17. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. MA-4. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. SC-9. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 1130. URL:<http://iase.disa.mil/cci/index.html>. 1131. URL:<http://iase.disa.mil/cci/index.html>.
The rsyslog package provides the rsyslog daemon, which provides system logging services. Security identifiers CCE-26809-4 References 1. AU-9(2). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 2. 1311. URL:<http://iase.disa.mil/cci/index.html>. 3. 1312. URL:<http://iase.disa.mil/cci/index.html>.
The rsyslog service must be running in order to provide logging services, which are essential to system administration. Remediation script
# # Enable rsyslog for all run levels # chkconfig --level 0123456 rsyslog on # # Start rsyslog if not currently running # service rsyslog start
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
Guide to the Secure Configuration of Red Hat Enterprise Linux 6 XCCD... Page 76 of 167
If no logserver exists, it will be necessary for each machine to run Logwatch individually. Using a central logserver provides the security and reliability benefits discussed earlier, and also makes monitoring logs easier and less time-intensive for administrators.
See the man page rsyslog.conf(5) for more information. Note that the rsyslog daemon can be configured to use a timestamp format that some log processing programs may not understand. If this occurs, edit the file /etc/rsyslog.conf and add or edit the following line:
$ ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat
If the owner is not root, run the following command to correct this:
# chown root LOGFILE
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. Security identifiers CCE-26812-8 References 1. AC-6. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 2. 1314. URL:<http://iase.disa.mil/cci/index.html>.
If the owner is not root, run the following command to correct this:
# chgrp root LOGFILE
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
Guide to the Secure Configuration of Red Hat Enterprise Linux 6 XCCD... Page 77 of 167
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. Security identifiers CCE-26821-9 References 1. AC-6. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 2. 1314. URL:<http://iase.disa.mil/cci/index.html>.
If the permissions are not 600 or more restrictive, run the following command to correct this:
# chmod 0600 LOGFILE
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. Security identifiers CCE-27190-8 References 1. . URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 2. 1314. URL:<http://iase.disa.mil/cci/index.html>.
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
Guide to the Secure Configuration of Red Hat Enterprise Linux 6 XCCD... Page 78 of 167
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. Security identifiers CCE-26801-1 References 1. 2. 3. 4. AU-3(2). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-9. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 1348. URL:<http://iase.disa.mil/cci/index.html>. 136. URL:<http://iase.disa.mil/cci/index.html>.
2.6.6.a. Ensure rsyslog Does Not Accept Remote Messages Unless Acting As Log Server
The rsyslog daemon should not accept remote messages unless the system acts as a log server. To ensure that it is not listening on the network, ensure the following lines are not found in /etc/rsyslog.conf:
$ModLoad imtcp.so $InputTCPServerRun port $ModLoad imudp.so $InputUDPServerRun port $ModLoad imrelp.so $InputRELPServerRun port
Any process which receives messages from the network incurs some risk of receiving malicious messages. This risk can be eliminated for rsyslog by configuring it not to listen on the network. Security identifiers CCE-26803-7 References 1. AU-9(2). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>.
2.6.6.b. Enable rsyslog to Accept Messages via TCP, if Acting As Log Server
The rsyslog daemon should not accept remote messages unless the system acts as a log server. If the system needs to act as a central log server, add the following lines to /etc/rsyslog.conf to enable reception of messages over TCP:
$ModLoad imtcp.so $InputTCPServerRun 514
If the system needs to act as a log server, this ensures that it can receive messages over a reliable TCP connection. Security identifiers CCE-27235-1 References 1. AU-9. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>.
2.6.6.c. Enable rsyslog to Accept Messages via UDP, if Acting As Log Server
The rsyslog daemon should not accept remote messages unless the system acts as a log server. If the system needs to act as a central log server, add the following lines to /etc/rsyslog.conf to enable reception of messages over UDP:
$ModLoad imudp.so $InputUDPServerRun 514
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
Guide to the Secure Configuration of Red Hat Enterprise Linux 6 XCCD... Page 79 of 167
Many devices, such as switches, routers, and other Unix-like systems, may only support the traditional syslog transmission over UDP. If the system must act as a log server, this enables it to receive their messages as well. Security identifiers CCE-27236-9 References 1. AU-9. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>.
Edit this line so that it contains a one-space-separated listing of each log file referenced in /etc/rsyslog.conf. All logs in use on a system must be rotated regularly, or the log files will consume disk space over time, eventually interfering with system operation. The file /etc/logrotate.d/syslog is the configuration file used by the logrotate program to maintain all log files written by syslog. By default, it rotates logs weekly and stores four archival copies of each log. These settings can be modified by editing /etc/logrotate.conf, but the defaults are sufficient for purposes of this guide. Note that logrotate is run nightly by the cron job /etc/cron.daily/logrotate. If particularly active logs need to be rotated more often than once a day, some other mechanism must be used.
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
Guide to the Secure Configuration of Red Hat Enterprise Linux 6 XCCD... Page 80 of 167
msg=audit(1226874073.147:96) The number in parentheses is the unformatted time stamp (Epoch time) for the event, which can be converted to standard time by using the date command. { getattr } The item in braces indicates the permission that was denied. getattr indicates the source process was trying to read the target file's status information. This occurs before reading files. This action is denied due to the file being accessed having the wrong label. Commonly seen permissions include getattr, read, and write. comm="httpd" The executable that launched the process. The full path of the executable is found in the exe= section of the system call (SYSCALL) message, which in this case, is exe="/usr/sbin/httpd". path="/var/www/html/file1" The path to the object (target) the process attempted to access. scontext="unconfined_u:system_r:httpd_t:s0" The SELinux context of the process that attempted the denied action. In this case, it is the SELinux context of the Apache HTTP Server, which is running in the httpd_t domain. tcontext="unconfined_u:object_r:samba_share_t:s0" The SELinux context of the object (target) the process attempted to access. In this case, it is the SELinux context of file1. Note: the samba_share_t type is not accessible to processes running in the httpd_t domain. From the system call (SYSCALL) message, two items are of interest: success=no: indicates whether the denial (AVC) was enforced or not. success=no indicates the system call was not successful (SELinux denied access). success=yes indicates the system call was successful - this can be seen for permissive domains or unconfined domains, such as initrc_t and kernel_t. exe="/usr/sbin/httpd": the full path to the executable that launched the process, which in this case, is exe="/usr/sbin/httpd".
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. Remediation script
# # Enable auditd for all run levels #
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
Guide to the Secure Configuration of Red Hat Enterprise Linux 6 XCCD... Page 81 of 167
chkconfig --level 0123456 auditd on # # Start auditd if not currently running # service auditd start
Security identifiers CCE-27058-7 References 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21. 22. 23. 24. AC-17(1). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-1(b). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-10. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-12(a). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-12(c). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. IR-5. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 347. URL:<http://iase.disa.mil/cci/index.html>. 157. URL:<http://iase.disa.mil/cci/index.html>. 172. URL:<http://iase.disa.mil/cci/index.html>. 880. URL:<http://iase.disa.mil/cci/index.html>. 1353. URL:<http://iase.disa.mil/cci/index.html>. 1462. URL:<http://iase.disa.mil/cci/index.html>. 1487. URL:<http://iase.disa.mil/cci/index.html>. 1115. URL:<http://iase.disa.mil/cci/index.html>. 1454. URL:<http://iase.disa.mil/cci/index.html>. 067. URL:<http://iase.disa.mil/cci/index.html>. 158. URL:<http://iase.disa.mil/cci/index.html>. 831. URL:<http://iase.disa.mil/cci/index.html>. 1190. URL:<http://iase.disa.mil/cci/index.html>. 1312. URL:<http://iase.disa.mil/cci/index.html>. 1263. URL:<http://iase.disa.mil/cci/index.html>. 130. URL:<http://iase.disa.mil/cci/index.html>. 120. URL:<http://iase.disa.mil/cci/index.html>. 1589. URL:<http://iase.disa.mil/cci/index.html>.
2.7.b. Enable Auditing for Processes Which Start Prior to the Audit Daemon
To ensure all processes can be audited, even those which start prior to the audit daemon, add the argument audit=1 to the kernel line in /etc/grub.conf, in the manner below:
kernel /vmlinuz-version ro vga=ext root=/dev/VolGroup00/LogVol00 rhgb quiet audit=1
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. Security identifiers CCE-26785-6 References 1. 2. 3. 4. 5. 6. 7. 8. 9. AC-17(1). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-1(b). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-2(a). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-2(c). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-2(d). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-10. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. IR-5. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 1464. URL:<http://iase.disa.mil/cci/index.html>. 130. URL:<http://iase.disa.mil/cci/index.html>.
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
Guide to the Secure Configuration of Red Hat Enterprise Linux 6 XCCD... Page 82 of 167
of events are being audited. First configure auditing to log all the events of interest. Then monitor the log size manually for awhile to determine what file size will allow you to keep the required data for the correct time period. Using a dedicated partition for /var/log/audit prevents the auditd logs from disrupting system functionality if they fill, and, more importantly, prevents other activity in /var from filling the partition and stopping the audit trail. (The audit logs are sizelimited and therefore unlikely to grow without bound unless configured to do so.) Some machines may have requirements that no actions occur which cannot be audited. If this is the case, then auditd can be configured to halt the machine if it runs out of space. Note: Since older logs are rotated, configuring auditd this way does not prevent older logs from being rotated away before they can be viewed. If your system is configured to halt when logging cannot be performed, make sure this can never happen under normal circumstances! Ensure that /var/log/audit is on its own partition, and that this partition is larger than the maximum amount of data auditd will retain normally. References 1. AU-11. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 2. 138. URL:<http://iase.disa.mil/cci/index.html>.
Set the value to 5 for general-purpose systems. Note that values less than 2 result in no log rotation. 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. References 1. AU-1(b). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 2. AU-11. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 3. IR-5. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>.
Set the value to 6 (MB) or higher for general-purpose systems. Larger values, of course, support retention of even more audit data. 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. References 1. AU-1(b). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 2. AU-11. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 3. IR-5. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>.
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.
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
Guide to the Secure Configuration of Red Hat Enterprise Linux 6 XCCD... Page 83 of 167
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. Security identifiers CCE-27237-7 References 1. 2. 3. 4. AU-1(b). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-4. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-11. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. IR-5. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>.
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. Notifying administrators of an impending disk space problem may allow them to take corrective action prior to any disruption. Security identifiers CCE-27238-5 References 1. 2. 3. 4. 5. 6. AU-1(b). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-4. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-5(b). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. IR-5. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 140. URL:<http://iase.disa.mil/cci/index.html>. 143. URL:<http://iase.disa.mil/cci/index.html>.
Possible values for ACTION are described in the auditd.conf man page. These include: ignore syslog email exec
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
Guide to the Secure Configuration of Red Hat Enterprise Linux 6 XCCD... Page 84 of 167
suspend single halt 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. 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. Security identifiers CCE-27239-3 References 1. 2. 3. 4. 5. 6. AU-1(b). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-4. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-5(b). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. IR-5. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 140. URL:<http://iase.disa.mil/cci/index.html>. 1343. URL:<http://iase.disa.mil/cci/index.html>.
Email sent to the root account is typically aliased to the administrators of the system, who can take appropriate action. Security identifiers CCE-27241-9 References 1. 2. 3. 4. 5. 6. AU-1(b). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-4. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-5(a). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. IR-5. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 139. URL:<http://iase.disa.mil/cci/index.html>. 144. URL:<http://iase.disa.mil/cci/index.html>.
The auditd service does not include the ability to send audit records to a centralized server for management directly. It does, however, include an audit event multiplexor plugin (audispd) to pass audit records to the local syslog server References 1. 2. 3. 4. AU-1(b). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-3(2). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. IR-5. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 136. URL:<http://iase.disa.mil/cci/index.html>.
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
Guide to the Secure Configuration of Red Hat Enterprise Linux 6 XCCD... Page 85 of 167
The audit subsystem supports extensive collection of events, including: Tracing of arbitrary system calls (identified by name or number) on entry or exit. Filtering by PID, UID, call success, system call argument (with some limitations), etc. Monitoring of specific files for modifications to the file's contents or metadata. Auditing rules at startup are controlled by the file /etc/audit/audit.rules. Add rules to it to meet the auditing requirements for your organization. Each line in /etc/audit/audit.rules represents a series of arguments that can be passed to auditctl and can be individually tested during runtime. See documentation in /usr/share/doc/audit-VERSION and in the related man pages for more details. If copying any example audit rulesets from /usr/share/doc/audit-VERSION, be sure to comment out the lines containing arch= which are not appropriate for your system's architecture. Then review and understand the following rules, ensuring rules are activated as needed for the appropriate architecture. After reviewing all the rules, reading the following sections, and editing as needed, the new rules can be activated as follows:
# service auditd restart
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. Security identifiers CCE-26664-3 References 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. AC-2(4). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AC-17(7). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-1(b). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-2(a). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-2(c). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-2(d). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. IR-5. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 18. URL:<http://iase.disa.mil/cci/index.html>. 1403. URL:<http://iase.disa.mil/cci/index.html>. 1404. URL:<http://iase.disa.mil/cci/index.html>. 1405. URL:<http://iase.disa.mil/cci/index.html>. 1684. URL:<http://iase.disa.mil/cci/index.html>. 1683. URL:<http://iase.disa.mil/cci/index.html>. 1685. URL:<http://iase.disa.mil/cci/index.html>. 1686. URL:<http://iase.disa.mil/cci/index.html>.
The network environment should not be modified by anything other than administrator action. Any change to network parameters should be audited. Security identifiers CCE-26648-6
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
Guide to the Secure Configuration of Red Hat Enterprise Linux 6 XCCD... Page 86 of 167
References 1. 2. 3. 4. 5. 6. AC-17(7). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-1(b). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-2(a). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-2(c). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-2(d). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. IR-5. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>.
2.7.4.c. System Audit Logs Must Have Mode 0640 or Less Permissive
Change the mode of the audit log files with the following command:
# chmod 0640 audit_file
If users can write to audit logs, audit trails can be modified or destroyed. Security identifiers CCE-27243-5 References 1. 2. 3. 4. 5. AC-6. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-1(b). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-9. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. IR-5. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 166. URL:<http://iase.disa.mil/cci/index.html>.
Failure to give ownership of the audit log files to root allows the designated owner, and unauthorized users, potential access to sensitive information. Security identifiers CCE-27244-3 References 1. 2. 3. 4. 5. AC-6. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-1(b). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-9. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. IR-5. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 166. URL:<http://iase.disa.mil/cci/index.html>.
2.7.4.e. Record Events that Modify the System's Mandatory Access Controls
Add the following to /etc/audit/audit.rules:
-w /etc/selinux/ -p wa -k MAC-policy
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. Security identifiers CCE-26657-7 References 1. 2. 3. 4. 5. 6. AC-17(7). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-1(b). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-2(a). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-2(c). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-2(d). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. IR-5. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>.
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
Guide to the Secure Configuration of Red Hat Enterprise Linux 6 XCCD... Page 87 of 167
Manual editing of these files may indicate nefarious activity, such as an attacker attempting to remove evidence of an intrusion. Security identifiers CCE-26691-6 References 1. AC-17(7). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 2. AU-1(b). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 3. IR-5. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>.
Manual editing of these files may indicate nefarious activity, such as an attacker attempting to remove evidence of an intrusion. Security identifiers CCE-26610-6 References 1. 2. 3. 4. 5. 6. AC-17(7). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-1(b). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-2(a). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-2(c). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-2(d). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. IR-5. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>.
-a always,exit -F arch=ARCH -S creat -S open -S openat -S truncate -S ftruncate -F exit=-EACCES -F auid>=500 -F auid!=4294967295 -k ac -a always,exit -F arch=ARCH -S creat -S open -S openat -S truncate -S ftruncate -F exit=-EPERM -F auid>=500 -F auid!=4294967295 -k acc
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. Security identifiers CCE-26712-0 References 1. 2. 3. 4. 5. 6. 7. AC-17(7). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-1(b). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-2(a). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-2(c). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-2(d). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. IR-5. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 126. URL:<http://iase.disa.mil/cci/index.html>.
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
Guide to the Secure Configuration of Red Hat Enterprise Linux 6 XCCD... Page 88 of 167
At a minimum the audit system should collect the execution of privileged commands for all users and root. To find the relevant setuid programs:
# find / -xdev -type f -perm -4000 -o -perm -2000 2>/dev/null
Then, for each setuid program on the system, add a line of the following form to /etc/audit/audit.rules, where SETUID_PROG_PATH is the full path to each setuid program in the list:
-a always,exit -F path=SETUID_PROG_PATH -F perm=x -F auid>=500 -F auid!=4294967295 -k privileged
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. Security identifiers CCE-26457-2 References 1. 2. 3. 4. 5. 6. 7. 8. AC-17(7). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-1(b). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-2(a). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-2(c). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-2(d). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-2(4). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. IR-5. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 40. URL:<http://iase.disa.mil/cci/index.html>.
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. Security identifiers CCE-26573-6 References 1. 2. 3. 4. 5. 6. 7. AC-17(7). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-1(b). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-2(a). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-2(c). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-2(d). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. IR-5. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 126. URL:<http://iase.disa.mil/cci/index.html>.
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. Security identifiers CCE-26651-0 References 1. AC-17(7). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 2. AU-1(b). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>.
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
Guide to the Secure Configuration of Red Hat Enterprise Linux 6 XCCD... Page 89 of 167
3. 4. 5. 6. 7.
AU-2(a). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-2(c). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-2(d). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. IR-5. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 126. URL:<http://iase.disa.mil/cci/index.html>.
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. Security identifiers CCE-26662-7 References 1. 2. 3. 4. 5. 6. 7. 8. AC-2(7)(b). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AC-17(7). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-1(b). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-2(a). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-2(c). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-2(d). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. IR-5. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 126. URL:<http://iase.disa.mil/cci/index.html>.
2.7.4.m. Ensure auditd Collects Information on Kernel Module Loading and Unloading
Add the following to /etc/audit/audit.rules in order to capture kernel module loading and unloading events, setting ARCH to either b32 or b64 as appropriate for your system:
-w -w -w -a /sbin/insmod -p x -k modules /sbin/rmmod -p x -k modules /sbin/modprobe -p x -k modules always,exit -F arch=ARCH -S init_module -S delete_module -k modules
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. Security identifiers CCE-26611-4 References 1. 2. 3. 4. 5. 6. 7. AC-17(7). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-1(b). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-2(a). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-2(c). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-2(d). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. IR-5. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 126. URL:<http://iase.disa.mil/cci/index.html>.
With this setting, a reboot will be required to change any audit rules. Making the audit configuration immutable prevents accidental as well as malicious modification of the audit rules, although it may be problematic if legitimate changes are needed during system operation Security identifiers CCE-26612-2
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
Guide to the Secure Configuration of Red Hat Enterprise Linux 6 XCCD... Page 90 of 167
References 1. 2. 3. 4. 5. 6. AC-6. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-1(b). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-2(a). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-2(c). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-2(d). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. IR-5. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>.
The -k option allows for the specification of a key in string form that can be used for better reporting capability through ausearch and aureport. Multiple system calls can be defined on the same line to save space if desired, but is not required. See an example of multiple combined syscalls:
-a always,exit -F arch=b64 -S adjtimex -S settimeofday -S clock_settime -k audit_time_rules
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. Security identifiers CCE-26242-8 References 1. 2. 3. 4. 5. 6. 7. 8. AC-17(7). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-1(b). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-2(a). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-2(c). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-2(d). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. IR-5. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 1487. URL:<http://iase.disa.mil/cci/index.html>. 169. URL:<http://iase.disa.mil/cci/index.html>.
The -k option allows for the specification of a key in string form that can be used for better reporting capability through ausearch and aureport. Multiple system calls can be defined on the same line to save space if desired, but is not required. See an example of multiple combined syscalls:
-a always,exit -F arch=b64 -S adjtimex -S settimeofday -S clock_settime -k audit_time_rules
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.
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
Guide to the Secure Configuration of Red Hat Enterprise Linux 6 XCCD... Page 91 of 167
Security identifiers CCE-27203-9 References 1. 2. 3. 4. 5. 6. 7. 8. AC-17(7). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-1(b). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-2(a). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-2(c). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-2(d). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. IR-5. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 1487. URL:<http://iase.disa.mil/cci/index.html>. 169. URL:<http://iase.disa.mil/cci/index.html>.
On a 64-bit system, the "-S time" is not necessary. The -k option allows for the specification of a key in string form that can be used for better reporting capability through ausearch and aureport. Multiple system calls can be defined on the same line to save space if desired, but is not required. See an example of multiple combined syscalls:
-a always,exit -F arch=b64 -S adjtimex -S settimeofday -S clock_settime -k audit_time_rules
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. Security identifiers CCE-27169-2 References 1. 2. 3. 4. 5. 6. 7. 8. AC-17(7). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-1(b). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-2(a). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-2(c). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-2(d). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. IR-5. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 1487. URL:<http://iase.disa.mil/cci/index.html>. 169. URL:<http://iase.disa.mil/cci/index.html>.
The -k option allows for the specification of a key in string form that can be used for better reporting capability through ausearch and aureport. Multiple system calls can be defined on the same line to save space if desired, but is not required. See an example of multiple combined syscalls:
-a always,exit -F arch=b64 -S adjtimex -S settimeofday -S clock_settime -k audit_time_rules
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. Security identifiers CCE-27170-0
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
Guide to the Secure Configuration of Red Hat Enterprise Linux 6 XCCD... Page 92 of 167
References 1. 2. 3. 4. 5. 6. 7. 8. AC-17(7). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-1(b). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-2(a). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-2(c). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-2(d). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. IR-5. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 1487. URL:<http://iase.disa.mil/cci/index.html>. 169. URL:<http://iase.disa.mil/cci/index.html>.
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. 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. Security identifiers CCE-27172-6 References 1. 2. 3. 4. 5. 6. 7. 8. AC-17(7). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-1(b). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-2(a). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-2(c). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-2(d). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. IR-5. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 1487. URL:<http://iase.disa.mil/cci/index.html>. 169. URL:<http://iase.disa.mil/cci/index.html>.
2.7.4.16. Record Events that Modify the System's Discretionary Access Controls
At a minimum the audit system should collect file permission changes for all users and root. Note that the "-F arch=b32" lines should be present even on a 64 bit system. These commands identify system calls for auditing. Even if the system is 64 bit it can still execute 32 bit system calls. Additionally, these rules can be configured in a number of ways while still achieving the desired effect. An example of this is that the "-S" calls could be split up and placed on separate lines, however, this is less efficient. Add the following to /etc/audit/audit.rules:
-a always,exit -F arch=b32 -S chmod -S fchmod -S fchmodat -F auid>=500 -F auid!=4294967295 -k perm_mod -a always,exit -F arch=b32 -S chown -S fchown -S fchownat -S lchown -F auid>=500 -F auid!=4294967295 -k perm_mod -a always,exit -F arch=b32 -S setxattr -S lsetxattr -S fsetxattr -S removexattr -S lremovexattr -S fremovexattr -F auid>=500 -F auid!=429496729
If your system is 64 bit then these lines should be duplicated and the arch=b32 replaced with arch=b64 as follows:
-a always,exit -F arch=b64 -S chmod -S fchmod -S fchmodat -F auid>=500 -F auid!=4294967295 -k perm_mod -a always,exit -F arch=b64 -S chown -S fchown -S fchownat -S lchown -F auid>=500 -F auid!=4294967295 -k perm_mod -a always,exit -F arch=b64 -S setxattr -S lsetxattr -S fsetxattr -S removexattr -S lremovexattr -S fremovexattr -F auid>=500 -F auid!=429496729
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.
2.7.4.16.a. Record Events that Modify the System's Discretionary Access Controls - chmod
At a minimum the audit system should collect file permission changes for all users and root. Add the following to /etc/audit/audit.rules:
-a always,exit -F arch=b32 -S chmod -F auid>=500 -F auid!=4294967295 -k perm_mod
Note that these rules can be configured in a number of ways while still achieving the desired effect. Here the system calls have been placed independent of other system calls. Grouping these system calls with others as identifying earlier in this guide is more efficient.
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
Guide to the Secure Configuration of Red Hat Enterprise Linux 6 XCCD... Page 93 of 167
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. Security identifiers CCE-26280-8 References 1. 2. 3. 4. 5. 6. 7. AC-17(7). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-1(b). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-2(a). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-2(c). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-2(d). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. IR-5. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 126. URL:<http://iase.disa.mil/cci/index.html>.
2.7.4.16.b. Record Events that Modify the System's Discretionary Access Controls - chown
At a minimum the audit system should collect file permission changes for all users and root. Add the following to /etc/audit/audit.rules:
-a always,exit -F arch=b32 -S chown -F auid>=500 -F auid!=4294967295 -k perm_mod
Note that these rules can be configured in a number of ways while still achieving the desired effect. Here the system calls have been placed independent of other system calls. Grouping these system calls with others as identifying earlier in this guide is more efficient. 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. Security identifiers CCE-27173-4 References 1. 2. 3. 4. 5. 6. 7. AC-17(7). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-1(b). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-2(a). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-2(c). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-2(d). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. IR-5. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 126. URL:<http://iase.disa.mil/cci/index.html>.
2.7.4.16.c. Record Events that Modify the System's Discretionary Access Controls - fchmod
At a minimum the audit system should collect file permission changes for all users and root. Add the following to /etc/audit/audit.rules:
-a always,exit -F arch=b32 -S fchmod -F auid>=500 -F auid!=4294967295 -k perm_mod
Note that these rules can be configured in a number of ways while still achieving the desired effect. Here the system calls have been placed independent of other system calls. Grouping these system calls with others as identifying earlier in this guide is more efficient. 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. Security identifiers CCE-27174-2
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
Guide to the Secure Configuration of Red Hat Enterprise Linux 6 XCCD... Page 94 of 167
References 1. 2. 3. 4. 5. 6. 7. AC-17(7). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-1(b). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-2(a). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-2(c). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-2(d). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. IR-5. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 126. URL:<http://iase.disa.mil/cci/index.html>.
2.7.4.16.d. Record Events that Modify the System's Discretionary Access Controls - fchmodat
At a minimum the audit system should collect file permission changes for all users and root. Add the following to /etc/audit/audit.rules:
-a always,exit -F arch=b32 -S fchmodat -F auid>=500 -F auid!=4294967295 -k perm_mod
Note that these rules can be configured in a number of ways while still achieving the desired effect. Here the system calls have been placed independent of other system calls. Grouping these system calls with others as identifying earlier in this guide is more efficient. 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. Security identifiers CCE-27175-9 References 1. 2. 3. 4. 5. 6. 7. AC-17(7). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-1(b). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-2(a). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-2(c). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-2(d). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. IR-5. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 126. URL:<http://iase.disa.mil/cci/index.html>.
2.7.4.16.e. Record Events that Modify the System's Discretionary Access Controls - fchown
At a minimum the audit system should collect file permission changes for all users and root. Add the following to /etc/audit/audit.rules:
-a always,exit -F arch=b32 -S fchown -F auid>=500 -F auid!=4294967295 -k perm_mod
Note that these rules can be configured in a number of ways while still achieving the desired effect. Here the system calls have been placed independent of other system calls. Grouping these system calls with others as identifying earlier in this guide is more efficient. 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. Security identifiers CCE-27177-5 References 1. 2. 3. 4. 5. 6. AC-17(7). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-1(b). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-2(a). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-2(c). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-2(d). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. IR-5. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>.
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
Guide to the Secure Configuration of Red Hat Enterprise Linux 6 XCCD... Page 95 of 167
7. 126. URL:<http://iase.disa.mil/cci/index.html>.
2.7.4.16.f. Record Events that Modify the System's Discretionary Access Controls - fchownat
At a minimum the audit system should collect file permission changes for all users and root. Add the following to /etc/audit/audit.rules:
-a always,exit -F arch=b32 -S fchownat -F auid>=500 -F auid!=4294967295 -k perm_mod
Note that these rules can be configured in a number of ways while still achieving the desired effect. Here the system calls have been placed independent of other system calls. Grouping these system calls with others as identifying earlier in this guide is more efficient. 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. Security identifiers CCE-27178-3 References 1. 2. 3. 4. 5. 6. 7. AC-17(7). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-1(b). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-2(a). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-2(c). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-2(d). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. IR-5. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 126. URL:<http://iase.disa.mil/cci/index.html>.
2.7.4.16.g. Record Events that Modify the System's Discretionary Access Controls fremovexattr
At a minimum the audit system should collect file permission changes for all users and root. Add the following to /etc/audit/audit.rules:
-a always,exit -F arch=b32 -S fremovexattr -F auid>=500 -F auid!=4294967295 -k perm_mod
Note that these rules can be configured in a number of ways while still achieving the desired effect. Here the system calls have been placed independent of other system calls. Grouping these system calls with others as identifying earlier in this guide is more efficient. 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. Security identifiers CCE-27179-1 References 1. 2. 3. 4. 5. 6. 7. AC-17(7). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-1(b). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-2(a). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-2(c). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-2(d). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. IR-5. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 126. URL:<http://iase.disa.mil/cci/index.html>.
2.7.4.16.h. Record Events that Modify the System's Discretionary Access Controls - fsetxattr
At a minimum the audit system should collect file permission changes for all users and root. Add the following to /etc/audit/audit.rules:
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
Guide to the Secure Configuration of Red Hat Enterprise Linux 6 XCCD... Page 96 of 167
Note that these rules can be configured in a number of ways while still achieving the desired effect. Here the system calls have been placed independent of other system calls. Grouping these system calls with others as identifying earlier in this guide is more efficient. 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. Security identifiers CCE-27180-9 References 1. 2. 3. 4. 5. 6. 7. AC-17(7). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-1(b). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-2(a). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-2(c). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-2(d). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. IR-5. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 126. URL:<http://iase.disa.mil/cci/index.html>.
2.7.4.16.i. Record Events that Modify the System's Discretionary Access Controls - lchown
At a minimum the audit system should collect file permission changes for all users and root. Add the following to /etc/audit/audit.rules:
-a always,exit -F arch=b32 -S lchown -F auid>=500 -F auid!=4294967295 -k perm_mod
Note that these rules can be configured in a number of ways while still achieving the desired effect. Here the system calls have been placed independent of other system calls. Grouping these system calls with others as identifying earlier in this guide is more efficient. 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. Security identifiers CCE-27181-7 References 1. 2. 3. 4. 5. 6. 7. AC-17(7). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-1(b). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-2(a). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-2(c). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-2(d). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. IR-5. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 126. URL:<http://iase.disa.mil/cci/index.html>.
2.7.4.16.j. Record Events that Modify the System's Discretionary Access Controls lremovexattr
At a minimum the audit system should collect file permission changes for all users and root. Add the following to /etc/audit/audit.rules:
-a always,exit -F arch=b32 -S lremovexattr -F auid>=500 -F auid!=4294967295 -k perm_mod
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
Guide to the Secure Configuration of Red Hat Enterprise Linux 6 XCCD... Page 97 of 167
Note that these rules can be configured in a number of ways while still achieving the desired effect. Here the system calls have been placed independent of other system calls. Grouping these system calls with others as identifying earlier in this guide is more efficient. 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. Security identifiers CCE-27182-5 References 1. 2. 3. 4. 5. 6. 7. AC-17(7). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-1(b). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-2(a). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-2(c). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-2(d). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. IR-5. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 126. URL:<http://iase.disa.mil/cci/index.html>.
2.7.4.16.k. Record Events that Modify the System's Discretionary Access Controls - lsetxattr
At a minimum the audit system should collect file permission changes for all users and root. Add the following to /etc/audit/audit.rules:
-a always,exit -F arch=b32 -S lsetxattr -F auid>=500 -F auid!=4294967295 -k perm_mod
Note that these rules can be configured in a number of ways while still achieving the desired effect. Here the system calls have been placed independent of other system calls. Grouping these system calls with others as identifying earlier in this guide is more efficient. 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. Security identifiers CCE-27183-3 References 1. 2. 3. 4. 5. 6. 7. AC-17(7). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-1(b). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-2(a). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-2(c). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-2(d). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. IR-5. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 126. URL:<http://iase.disa.mil/cci/index.html>.
2.7.4.16.l. Record Events that Modify the System's Discretionary Access Controls removexattr
At a minimum the audit system should collect file permission changes for all users and root. Add the following to /etc/audit/audit.rules:
-a always,exit -F arch=b32 -S removexattr -F auid>=500 -F auid!=4294967295 -k perm_mod
Note that these rules can be configured in a number of ways while still achieving the desired effect. Here the system calls have been placed independent of other system calls. Grouping these system calls with others as identifying earlier in this guide is more efficient. 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.
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
Guide to the Secure Configuration of Red Hat Enterprise Linux 6 XCCD... Page 98 of 167
Security identifiers CCE-27184-1 References 1. 2. 3. 4. 5. 6. 7. AC-17(7). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-1(b). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-2(a). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-2(c). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-2(d). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. IR-5. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 126. URL:<http://iase.disa.mil/cci/index.html>.
2.7.4.16.m. Record Events that Modify the System's Discretionary Access Controls - setxattr
At a minimum the audit system should collect file permission changes for all users and root. Add the following to /etc/audit/audit.rules:
-a always,exit -F arch=b32 -S setxattr -F auid>=500 -F auid!=4294967295 -k perm_mod
Note that these rules can be configured in a number of ways while still achieving the desired effect. Here the system calls have been placed independent of other system calls. Grouping these system calls with others as identifying earlier in this guide is more efficient. 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. Security identifiers CCE-27185-8 References 1. 2. 3. 4. 5. 6. 7. AC-17(7). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-1(b). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-2(a). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-2(c). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-2(d). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. IR-5. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 126. URL:<http://iase.disa.mil/cci/index.html>.
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
Guide to the Secure Configuration of Red Hat Enterprise Linux 6 XCCD... Page 99 of 167
3. Services
The best protection against vulnerable software is running less software. This section describes how to review the software which Red Hat Enterprise Linux 6 installs on a system and disable software which is not needed. It then enumerates the software packages installed on a default RHEL 6 system and provides guidance about which ones can be safely disabled. RHEL 6 provides a convenient minimal install option that essentially installs the bare necessities for a functional system. When building RHEL 6 servers, it is highly recommended to select the minimal packages and then build up the system from there. Table of Contents 3.1. Obsolete Services 3.1.1. Xinetd 3.1.1.a. Disable xinetd Service 3.1.1.b. Uninstall xinetd Package 3.1.2. Telnet 3.1.2.a. Disable telnet Service 3.1.2.b. Uninstall telnet-server Package 3.1.3. Rlogin, Rsh, and Rexec 3.1.3.a. Uninstall rsh-server Package 3.1.3.b. Disable rexec Service 3.1.3.c. Disable rsh Service 3.1.3.d. Disable rlogin Service 3.1.3.e. Remove Rsh Trust Files 3.1.4. NIS 3.1.4.a. Uninstall ypserv Package 3.1.4.b. Disable ypbind Service 3.1.5. TFTP Server 3.1.5.a. Disable tftp Service 3.1.5.b. Uninstall tftp-server Package 3.1.5.c. Ensure tftp Daemon Uses Secure Mode 3.2. Base Services 3.2.a. Disable Automatic Bug Reporting Tool (abrtd) 3.2.b. Disable Advanced Configuration and Power Interface (acpid) 3.2.c. Disable Certmonger Service (certmonger) 3.2.d. Disable Control Group Config (cgconfig) 3.2.e. Disable Control Group Rules Engine (cgred) 3.2.f. Disable CPU Speed (cpuspeed) 3.2.g. Disable Hardware Abstraction Layer Service (haldaemon) 3.2.h. Enable IRQ Balance (irqbalance) 3.2.i. Disable KDump Kernel Crash Analyzer (kdump) 3.2.j. Disable Software RAID Monitor (mdmonitor) 3.2.k. Disable D-Bus IPC Service (messagebus) 3.2.l. Disable Network Console (netconsole) 3.2.m. Disable ntpdate Service (ntpdate) 3.2.n. Disable Odd Job Daemon (oddjobd) 3.2.o. Disable Portreserve (portreserve) 3.2.p. Enable Process Accounting (psacct) 3.2.q. Disable Apache Qpid (qpidd) 3.2.r. Disable Quota Netlink (quota_nld) 3.2.s. Disable Network Router Discovery Daemon (rdisc) 3.2.t. Disable Red Hat Network Service (rhnsd) 3.2.u. Disable Red Hat Subscription Manager Daemon (rhsmcertd) 3.2.v. Disable Cyrus SASL Authentication Daemon (saslauthd) 3.2.w. Disable SMART Disk Monitoring Service (smartd) 3.2.x. Disable System Statistics Reset Service (sysstat) 3.3. Cron and At Daemons 3.3.a. Enable cron Service 3.3.b. Disable anacron Service 3.3.c. Disable At Service (atd) 3.3.4. Restrict at and cron to Authorized Users if Necessary 3.4. SSH Server 3.4.a. Disable SSH Server If Possible (Unusual) 3.4.b. Remove SSH Server iptables Firewall exception (Unusual) 3.4.3. Configure OpenSSH Server if Necessary 3.4.3.a. Allow Only SSH Protocol 2 3.4.3.b. Limit Users' SSH Access 3.4.3.c. Set SSH Idle Timeout Interval 3.4.3.d. Set SSH Client Alive Count 3.4.3.e. Disable SSH Support for .rhosts Files 3.4.3.f. Disable Host-Based Authentication 3.4.3.g. Disable SSH Root Login 3.4.3.h. Disable SSH Access via Empty Passwords 3.4.3.i. Enable SSH Warning Banner
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
3.4.3.j. Do Not Allow SSH Environment Options 3.4.3.k. Use Only Approved Ciphers 3.4.3.12. Strengthen Firewall Configuration if Possible 3.5. X Window System 3.5.1. Disable X Windows 3.5.1.a. Disable X Windows Startup By Setting Runlevel 3.5.1.b. Remove the X Windows Package Group 3.6. Avahi Server 3.6.1. Disable Avahi Server if Possible 3.6.1.a. Disable Avahi Server Software 3.6.2. Configure Avahi if Necessary 3.6.2.a. Serve Avahi Only via Required Protocol 3.6.2.b. Check Avahi Responses' TTL Field 3.6.2.c. Prevent Other Programs from Using Avahi's Port 3.6.2.d. Disable Avahi Publishing 3.6.2.e. Restrict Information Published by Avahi 3.7. Print Support 3.7.a. Disable the CUPS Service 3.7.2. Configure the CUPS Service if Necessary 3.7.2.a. Disable Printer Browsing Entirely if Possible 3.7.2.b. Disable Print Server Capabilities 3.8. DHCP 3.8.1. Disable DHCP Server 3.8.1.a. Disable DHCP Service 3.8.1.b. Uninstall DHCP Server Package 3.8.2. Disable DHCP Server 3.8.2.a. Do Not Use Dynamic DNS 3.8.2.b. Deny Decline Messages 3.8.2.c. Deny BOOTP Queries 3.8.2.d. Configure Logging 3.8.2.5. Minimize Served Information 3.8.3. Disable DHCP Client 3.8.3.a. Disable DHCP Client 3.8.4. Configure DHCP Client if Necessary 3.8.4.1. Minimize the DHCP-Configured Options 3.9. Network Time Protocol 3.9.a. Enable the NTP Daemon 3.9.b. Specify a Remote NTP Server 3.9.c. Specify Additional Remote NTP Servers 3.10. Mail Server Software 3.10.a. Enable Postfix Service 3.10.b. Uninstall Sendmail Package 3.10.3. Configure SMTP For Mail Clients 3.10.3.a. Disable Postfix Network Listening 3.10.4. Configure Operating System to Protect Mail Server 3.10.4.1. Configure SSL Certificates for Use with SMTP AUTH 3.10.4.1.1. Ensure Security of Postfix SSL Certificate 3.10.4.2. Configure Postfix if Necessary 3.10.4.2.a. Configure SMTP Greeting Banner 3.10.4.2.2. Configure Postfix Resource Usage to Limit Denial of Service Attacks 3.10.4.2.3. Control Mail Relaying 3.10.4.2.3.1. Configure Trusted Networks and Hosts 3.10.4.2.3.2. Enact SMTP Relay Restrictions 3.10.4.2.3.3. Enact SMTP Recipient Restrictions 3.10.4.2.3.4. Require SMTP AUTH Before Relaying from Untrusted Clients 3.10.4.2.3.5. Use TLS for SMTP AUTH 3.11. LDAP 3.11.1. Configure OpenLDAP Clients 3.11.1.a. Configure LDAP Client to Use TLS For All Transactions 3.11.1.b. Configure Certificate Directives for LDAP Use of TLS 3.11.2. Configure OpenLDAP Server 3.11.2.a. Uninstall openldap-servers Package 3.11.2.2. Install and Protect LDAP Certificate Files 3.12. NFS and RPC 3.12.1. Disable All NFS Services if Possible 3.12.1.1. Disable Services Used Only by NFS 3.12.1.1.a. Disable Network File System Lock Service (nfslock) 3.12.1.1.b. Disable Secure RPC Client Service (rpcgssd) 3.12.1.1.c. Disable RPC ID Mapping Service (rpcidmapd) 3.12.1.2. Disable netfs if Possible 3.12.1.2.a. Disable Network File Systems (netfs) 3.12.2. Configure All Machines which Use NFS 3.12.2.1. Make Each Machine a Client or a Server, not Both 3.12.2.2. Configure NFS Services to Use Fixed Ports (NFSv3 and NFSv2) 3.12.2.2.a. Configure lockd to use static TCP port
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
3.12.2.2.b. Configure lockd to use static UDP port 3.12.2.2.c. Configure statd to use static port 3.12.2.2.d. Configure mountd to use static port 3.12.3. Configure NFS Clients 3.12.3.1. Disable NFS Server Daemons 3.12.3.1.a. Specify UID and GID for Anonymous NFS Connections 3.12.3.1.b. Disable Network File System (nfs) 3.12.3.1.c. Disable Secure RPC Server Service (rpcsvcgssd) 3.12.3.2. Mount Remote Filesystems with Restrictive Options 3.12.3.2.a. Mount Remote Filesystems with nodev 3.12.3.2.b. Mount Remote Filesystems with nosuid 3.12.4. Configure NFS Servers 3.12.4.a. Use Root-Squashing on All Exports 3.12.4.b. Restrict NFS Clients to Privileged Ports 3.12.4.c. Ensure Insecure File Locking is Not Allowed 3.12.4.4. Configure the Exports File Restrictively 3.12.4.5. Use Access Lists to Enforce Authorization Restrictions 3.12.4.6. Export Filesystems Read-Only if Possible 3.13. DNS Server 3.13.1. Disable DNS Server 3.13.1.a. Disable DNS Server 3.13.1.b. Uninstall bind Package 3.13.2. Isolate DNS from Other Services 3.13.2.1. Run DNS Software on Dedicated Servers 3.13.2.2. Run DNS Software in a chroot Jail 3.13.3. Protect DNS Data from Tampering or Attack 3.13.3.a. Disable Zone Transfers from the Nameserver 3.13.3.b. Authenticate Zone Transfers 3.13.3.c. Disable Dynamic Updates 3.13.3.4. Run Separate DNS Servers for External and Internal Queries 3.13.3.5. Use Views to Partition External and Internal Information 3.14. FTP Server 3.14.1. Disable vsftpd if Possible 3.14.1.a. Disable vsftpd Service 3.14.1.b. Uninstall vsftpd Package 3.14.2. Use vsftpd to Provide FTP Service if Necessary 3.14.2.a. Install vsftpd Package 3.14.3. Use vsftpd to Provide FTP Service if Necessary 3.14.3.a. Enable Logging of All FTP Transactions 3.14.3.b. Create Warning Banners for All FTP Users 3.14.3.c. Disable FTP Uploads if Possible 3.14.3.d. Place the FTP Home Directory on its Own Partition 3.14.3.5. Restrict the Set of Users Allowed to Access FTP 3.14.3.5.a. Restrict Access to Anonymous Users if Possible 3.14.3.5.2. Limit Users Allowed FTP Access if Necessary 3.14.3.6. Configure Firewalls to Protect the FTP Server 3.15. Web Server 3.15.1. Disable Apache if Possible 3.15.1.a. Disable httpd Service 3.15.1.b. Uninstall httpd Package 3.15.2. Install Apache if Necessary 3.15.2.1. Confirm Minimal Built-in Modules Installed 3.15.3. Secure Apache Configuration 3.15.3.1. Restrict Web Server Information Leakage 3.15.3.1.a. Set httpd ServerTokens Directive to Prod 3.15.3.1.b. Set httpd ServerSignature Directive to Off 3.15.3.2. Minimize Web Server Loadable Modules 3.15.3.2.1. httpd Core Modules 3.15.3.2.1.a. Disable HTTP Digest Authentication 3.15.3.2.1.b. Disable HTTP mod_rewrite 3.15.3.2.1.c. Disable LDAP Support 3.15.3.2.1.d. Disable Server Side Includes 3.15.3.2.1.e. Disable MIME Magic 3.15.3.2.1.f. Disable WebDAV (Distributed Authoring and Versioning) 3.15.3.2.1.g. Disable Server Activity Status 3.15.3.2.1.h. Disable Web Server Configuration Display 3.15.3.2.1.i. Disable URL Correction on Misspelled Entries 3.15.3.2.1.j. Disable Proxy Support 3.15.3.2.1.k. Disable Cache Support 3.15.3.2.1.l. Disable CGI Support 3.15.3.2.1.13. Minimize Modules for HTTP Basic Authentication 3.15.3.2.1.14. Minimize Various Optional Components 3.15.3.2.1.15. Minimize Configuration Files Included 3.15.3.3. Directory Restrictions 3.15.3.3.a. Restrict Root Directory
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
3.15.3.3.b. Restrict Web Directory 3.15.3.3.c. Restrict Other Critical Directories 3.15.3.3.d. Limit Available Methods 3.15.3.4. Use Appropriate Modules to Improve httpd's Security 3.15.3.4.1. Deploy mod_ssl 3.15.3.4.1.a. Install mod_ssl 3.15.3.4.2. Deploy mod_security 3.15.3.4.2.a. Install mod_security 3.15.3.5. Use Denial-of-Service Protection Modules 3.15.3.6. Configure PHP Securely 3.15.3.7. Configure Operating System to Protect Web Server 3.15.3.7.1. Restrict File and Directory Access 3.15.3.7.1.a. Set Permissions on the /var/log/httpd/ Directory 3.15.3.7.1.b. Set Permissions on the /etc/httpd/conf/ Directory 3.15.3.7.1.c. Set Permissions on All Configuration Files Inside /etc/httpd/conf/ 3.15.3.7.2. Configure iptables to Allow Access to the Web Server 3.15.3.7.3. Run httpd in a chroot Jail if Practical 3.16. IMAP and POP3 Server 3.16.1. Disable Dovecot 3.16.1.a. Disable Dovecot Service 3.16.1.b. Uninstall dovecot Package 3.16.2. Configure Dovecot if Necessary 3.16.2.1. Support Only the Necessary Protocols 3.16.2.2. Enable SSL Support 3.16.2.2.a. Enable the SSL flag in /etc/dovecot.conf 3.16.2.2.b. Configure Dovecot to Use the SSL Certificate file 3.16.2.2.c. Configure Dovecot to Use the SSL Key file 3.16.2.2.d. Disable Plaintext Authentication 3.16.2.3. Allow IMAP Clients to Access the Server 3.17. Samba(SMB) Microsoft Windows File Sharing Server 3.17.1. Disable Samba if Possible 3.17.1.a. Disable Samba 3.17.2. Configure Samba if Necessary 3.17.2.a. Disable Root Access to SMB Shares 3.17.2.b. Require Client SMB Packet Signing, if using smbclient 3.17.2.c. Require Client SMB Packet Signing, if using mount.cifs 3.17.2.4. Restrict SMB File Sharing to Configured Networks 3.17.2.5. Restrict Printer Sharing 3.18. Proxy Server 3.18.1. Disable Squid if Possible 3.18.1.a. Disable Squid 3.18.1.b. Uninstall squid Package 3.19. SNMP Server 3.19.1. Disable SNMP Server if Possible 3.19.1.a. Disable snmpd Service 3.19.1.b. Uninstall net-snmp Package 3.19.2. Configure SNMP Server if Necessary 3.19.2.a. Configure SNMP Service to Use Only SNMPv3 or Newer 3.19.2.b. Ensure Default Password Is Not Used
3.1.1. Xinetd
The xinetd service acts as a dedicated listener for some network services (mostly, obsolete ones) and can be used to provide access controls and perform some logging. It has been largely obsoleted by other features, and it is not installed by default. The older Inetd service is not even available as part of RHEL 6.
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
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. Security identifiers CCE-27046-2 References 1. AC-17(8). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 2. CM-7. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 3. 305. URL:<http://iase.disa.mil/cci/index.html>.
Removing the xinetd package decreases the risk of the xinetd service's accidental (or intentional) activation. Remediation script
if rpm -qa | grep -q xinetd; then yum -y remove xinetd fi
Security identifiers CCE-27005-8 References 1. AC-17(8). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 2. CM-7. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 3. 305. URL:<http://iase.disa.mil/cci/index.html>.
3.1.2. Telnet
The telnet protocol does not provide confidentiality or integrity for information transmitted on the network. This includes authentication information such as passwords. Organizations which use telnet should be actively working to migrate to a more secure protocol.
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. Security identifiers CCE-26836-7 References 1. 2. 3. 4. 5. 6. 7. 8. AC-17(8). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. CM-7. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. IA-5(1)(c). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 68. URL:<http://iase.disa.mil/cci/index.html>. 1436. URL:<http://iase.disa.mil/cci/index.html>. 197. URL:<http://iase.disa.mil/cci/index.html>. 877. URL:<http://iase.disa.mil/cci/index.html>. 888. URL:<http://iase.disa.mil/cci/index.html>.
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
Removing the telnet-server package decreases the risk of the telnet service's accidental (or intentional) activation. Remediation script
if rpm -qa | grep -q telnet-server; then yum -y remove telnet-server fi
Security identifiers CCE-27073-6 References 1. 2. 3. 4. AC-17(8). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. CM-7. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 305. URL:<http://iase.disa.mil/cci/index.html>. 381. URL:<http://iase.disa.mil/cci/index.html>.
The rsh-server package provides several obsolete and insecure network services. Removing it decreases the risk of those services' accidental (or intentional) activation. Security identifiers CCE-27062-9 References 1. 2. 3. 4. AC-17(8). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. CM-7. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 305. URL:<http://iase.disa.mil/cci/index.html>. 381. URL:<http://iase.disa.mil/cci/index.html>.
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. Security identifiers CCE-27208-8 References 1. 2. 3. 4. AC-17(8). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. CM-7. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 68. URL:<http://iase.disa.mil/cci/index.html>. 1436. URL:<http://iase.disa.mil/cci/index.html>.
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
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. Security identifiers CCE-26994-4 References 1. 2. 3. 4. 5. AC-17(8). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. CM-7. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. IA-5(1)(c). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 68. URL:<http://iase.disa.mil/cci/index.html>. 1436. URL:<http://iase.disa.mil/cci/index.html>.
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. Security identifiers CCE-26865-6 References 1. 2. 3. 4. AC-17(8). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. CM-7. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. IA-5(1)(c). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 1436. URL:<http://iase.disa.mil/cci/index.html>.
Trust files are convenient, but when used in conjunction with the R-services, they can allow unauthenticated access to a system. Security identifiers CCE-27270-8 References 1. AC-17(8). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 2. CM-7. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 3. 1436. URL:<http://iase.disa.mil/cci/index.html>.
3.1.4. NIS
The Network Information Service (NIS), also known as 'Yellow Pages' (YP), and its successor NIS+ have been made obsolete by Kerberos, LDAP, and other modern centralized authentication services. NIS should not be used because it suffers from security problems inherent in its design, such as inadequate protection of important authentication information.
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
Removing the ypserv package decreases the risk of the accidental (or intentional) activation of NIS or NIS+ services. Remediation script
if rpm -qa | grep -q ypserv; then yum -y remove ypserv fi
Security identifiers CCE-27079-3 References 1. 2. 3. 4. AC-17(8). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. CM-7. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 305. URL:<http://iase.disa.mil/cci/index.html>. 381. URL:<http://iase.disa.mil/cci/index.html>.
Disabling the ypbind service ensures the system is not acting as a client in a NIS or NIS+ domain. Security identifiers CCE-26894-6 References 1. AC-17(8). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 2. CM-7. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 3. 305. URL:<http://iase.disa.mil/cci/index.html>.
Disabling the tftp service ensures the system is not acting as a TFTP server, which does not provide encryption or authentication. Security identifiers CCE-27055-3 References 1. AC-17(8). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 2. CM-7. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 3. 1436. URL:<http://iase.disa.mil/cci/index.html>.
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
Removing the tftp-server package decreases the risk of the accidental (or intentional) activation of tftp services. Security identifiers CCE-26946-4 References 1. AC-17(8). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 2. CM-7. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 3. 305. URL:<http://iase.disa.mil/cci/index.html>.
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. Security identifiers CCE-27272-4 References 1. AC-17(8). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 2. CM-7. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 3. 366. URL:<http://iase.disa.mil/cci/index.html>.
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. Remediation script
# # Disable abrtd for all run levels # chkconfig --level 0123456 abrtd off # # Stop abrtd if currently running # service abrtd stop
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
ACPI support is highly desirable for systems in some network roles, such as laptops or desktops. For other systems, such as servers, it may permit accidental or trivially achievable denial of service situations and disabling it is appropriate. Remediation script
# # Disable acpid for all run levels # chkconfig --level 0123456 acpid off # # Stop acpid if currently running # service acpid stop
The services provided by certmonger may be essential for systems fulfilling some roles a PKI infrastructure, but its functionality is not necessary for many other use cases. Remediation script
# # Disable certmonger for all run levels # chkconfig --level 0123456 certmonger off # # Stop certmonger if currently running # service certmonger stop
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
Control groups allow an administrator to allocate system resources (such as CPU, memory, network bandwidth, etc) among a defined group (or groups) of processes executing on a system. The cgconfig daemon starts at boot and establishes the predefined control groups. The cgconfig service can be disabled with the following command:
# chkconfig cgconfig off
Unless control groups are used to manage system resources, running the cgconfig service is not necessary. Remediation script
# # Disable cgconfig for all run levels # chkconfig --level 0123456 cgconfig off # # Stop cgconfig if currently running # service cgconfig stop
Unless control groups are used to manage system resources, running the cgred service service is not necessary. Remediation script
# # Disable cgred for all run levels # chkconfig --level 0123456 cgred off # # Stop cgred if currently running # service cgred stop
The cpuspeed service is only necessary if adjusting the CPU clock speed provides benefit. Traditionally this has included laptops (to enhance battery life), but may also apply to server or desktop environments where conserving power is highly desirable or necessary. Remediation script
# # Disable cpuspeed for all run levels
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
# chkconfig --level 0123456 cpuspeed off # # Stop cpuspeed if currently running # service cpuspeed stop
The haldaemon provides essential functionality on systems that use removable media or devices, but can be disabled for systems that do not require these. Remediation script
# # Disable haldaemon for all run levels # chkconfig --level 0123456 haldaemon off # # Stop haldaemon if currently running # service haldaemon stop
In an environment with multiple processors (now common), the irqbalance service provides potential speedups for handling interrupt requests. Remediation script
# # Enable irqbalance for all run levels # chkconfig --level 0123456 irqbalance on # # Start irqbalance if not currently running # service irqbalance start
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
Unless the system is used for kernel development or testing, there is little need to run the kdump service. Remediation script
# # Disable kdump for all run levels # chkconfig --level 0123456 kdump off # # Stop kdump if currently running # service kdump stop
If software RAID monitoring is not required, there is no need to run this service. Remediation script
# # Disable mdmonitor for all run levels # chkconfig --level 0123456 mdmonitor off # # Stop mdmonitor if currently running # service mdmonitor stop
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
D-Bus provides an IPC mechanism used by a growing list of programs, such as those used for Gnome, Bluetooth, and Avahi. Due to these dependencies, disabling D-Bus may not be practical for many systems. The messagebus service can be disabled with the following command:
# chkconfig messagebus off
If no services which require D-Bus are needed, then it can be disabled. As a broker for IPC between processes of different privilege levels, it could be a target for attack. However, disabling D-Bus is likely to be impractical for any system which needs to provide a graphical login session. Remediation script
# # Disable messagebus for all run levels # chkconfig --level 0123456 messagebus off # # Stop messagebus if currently running # service messagebus stop
The netconsole service is not necessary unless there is a need to debug kernel panics, which is not common. Remediation script
# # Disable netconsole for all run levels # chkconfig --level 0123456 netconsole off # # Stop netconsole if currently running # service netconsole stop
Security identifiers CCE-27254-2 References 1. AC-17(8). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 2. CM-7. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 3. 381. URL:<http://iase.disa.mil/cci/index.html>.
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
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. Security identifiers CCE-27256-7 References 1. AC-17(8). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 2. CM-7. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 3. 382. URL:<http://iase.disa.mil/cci/index.html>.
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. Remediation script
# # Disable oddjobd for all run levels # chkconfig --level 0123456 oddjobd off # # Stop oddjobd if currently running # service oddjobd stop
The portreserve service provides helpful functionality by preventing conflicting usage of ports in the reserved port range, but it can be disabled if not needed. Remediation script
# # Disable portreserve for all run levels # chkconfig --level 0123456 portreserve off # # Stop portreserve if currently running # service portreserve stop
Security identifiers
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
The psacct service can provide administrators a convenient view into some user activities. However, it should be noted that the auditing system and its audit records provide more authoritative and comprehensive records. Remediation script
# # Enable psacct for all run levels # chkconfig --level 0123456 psacct on # # Start psacct if not currently running # service psacct start
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. Remediation script
# # Disable qpidd for all run levels # chkconfig --level 0123456 qpidd off # # Stop qpidd if currently running # service qpidd stop
Security identifiers CCE-26928-2 References 1. AC-17(8). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 2. CM-7. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 3. 382. URL:<http://iase.disa.mil/cci/index.html>.
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
If disk quotas are enforced on the local system, then the quota_nld service likely provides useful functionality and should remain enabled. However, if disk quotas are not used or user notification of disk quota violation is not desired then there is no need to run this service. Remediation script
# # Disable quota_nld for all run levels # chkconfig --level 0123456 quota_nld off # # Stop quota_nld if currently running # service quota_nld stop
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. Remediation script
# # Disable rdisc for all run levels # chkconfig --level 0123456 rdisc off # # Stop rdisc if currently running # service rdisc stop
Security identifiers CCE-27261-7 References 1. 2. 3. 4. AC-17(8). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AC-4. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. CM-7. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 382. URL:<http://iase.disa.mil/cci/index.html>.
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
The Red Hat Network service automatically queries Red Hat Network servers to determine whether there are any actions that should be executed, such as package updates. This only occurs if the system was registered to an RHN server or satellite and managed as such. The rhnsd service can be disabled with the following command:
# chkconfig rhnsd off
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. Remediation script
# # Disable rhnsd for all run levels # chkconfig --level 0123456 rhnsd off # # Stop rhnsd if currently running # service rhnsd stop
Security identifiers CCE-26846-6 References 1. AC-17(8). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 2. CM-7. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 3. 382. URL:<http://iase.disa.mil/cci/index.html>.
The rhsmcertd service can provide administrators with some additional control over which of their systems are entitled to particular subscriptions. However, for systems that are managed locally or which are not expected to require remote changes to their subscription status, it is unnecessary and can be disabled. Remediation script
# # Disable rhsmcertd for all run levels # chkconfig --level 0123456 rhsmcertd off # # Stop rhsmcertd if currently running # service rhsmcertd stop
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
The saslauthd service provides essential functionality for performing authentication in some directory environments, such as those which use Kerberos and LDAP. For others, however, in which only local files may be consulted, it is not necessary and should be disabled. Remediation script
# # Disable saslauthd for all run levels # chkconfig --level 0123456 saslauthd off # # Stop saslauthd if currently running # service saslauthd stop
SMART can help protect against denial of service due to failing hardware. Nevertheless, if it is not needed or the system's drives are not SMART-capable (such as solid state drives), it can be disabled. Remediation script
# # Disable smartd for all run levels # chkconfig --level 0123456 smartd off # # Stop smartd if currently running # service smartd stop
By default the sysstat service merely runs a program at boot to reset the statistics, which can be retrieved using programs such as sar and sadc. These may provide useful insight into system operation, but unless used this service can be disabled. Remediation script
# # Disable sysstat for all run levels #
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
chkconfig --level 0123456 sysstat off # # Stop sysstat if currently running # service sysstat stop
Due to its usage for maintenance and security-supporting tasks, enabling the cron daemon is essential. Remediation script
# # Enable crond for all run levels # chkconfig --level 0123456 crond on # # Start crond if not currently running # service crond start
The anacron service provides cron functionality for systems such as laptops and workstations that may be shut down during the normal times that cron jobs are scheduled to run. On systems which do not require this additional functionality, anacron could needlessly increase the possible attack surface for an intruder. References 1. CM-7. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>.
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
scheduled via at and batch, and executes them at the specified time. The atd service can be disabled with the following command:
# chkconfig atd off
The atd service could be used by an unsophisticated insider to carry out activities outside of a normal login session, which could complicate accountability. Furthermore, the need to schedule tasks with at or batch is not common. Remediation script
# # Disable atd for all run levels # chkconfig --level 0123456 atd off # # Stop atd if currently running # service atd stop
Edit /etc/cron.allow, adding one line for each user allowed to use the crontab command to create cron jobs. Remove the at.deny file:
# rm /etc/at.deny
Edit /etc/at.allow, adding one line for each user allowed to use the at command to create at jobs.
This is unusual, as SSH is a common method for encrypted and authenticated remote access. Security identifiers CCE-27054-6
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
This is unusual, as SSH is a common method for encrypted and authenticated remote access. If inbound SSH connections are not expected, disallowing access to the SSH port will avoid possible exploitation of the port by an attacker. Security identifiers CCE-27060-3
SSH protocol version 1 suffers from design flaws that result in security vulnerabilities and should not be used. Security identifiers CCE-27072-8 References 1. 2. 3. 4. 5. AC-17(7). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. IA-5(1)(c). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 776. URL:<http://iase.disa.mil/cci/index.html>. 774. URL:<http://iase.disa.mil/cci/index.html>. 1436. URL:<http://iase.disa.mil/cci/index.html>.
Where USER1 and USER2 are valid user names. Specifying which accounts are allowed SSH access into the system reduces the possibility of unauthorized access to the system.
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.
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
Causing idle users to be automatically logged out guards against compromises one system leading trivially to compromises on another. Security identifiers CCE-26919-1 References 1. 879. URL:<http://iase.disa.mil/cci/index.html>. 2. 1133. URL:<http://iase.disa.mil/cci/index.html>.
This ensures a user login will be terminated as soon as the ClientAliveCountMax is reached. Security identifiers CCE-26282-4 References 1. 879. URL:<http://iase.disa.mil/cci/index.html>. 2. 1133. URL:<http://iase.disa.mil/cci/index.html>.
SSH trust relationships mean a compromise on one host can allow an attacker to move trivially to other hosts. Security identifiers CCE-27124-7 References 1. 765. URL:<http://iase.disa.mil/cci/index.html>. 2. 766. URL:<http://iase.disa.mil/cci/index.html>.
SSH trust relationships mean a compromise on one host can allow an attacker to move trivially to other hosts. Security identifiers CCE-27091-8 References 1. 765. URL:<http://iase.disa.mil/cci/index.html>. 2. 766. URL:<http://iase.disa.mil/cci/index.html>.
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
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
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. Security identifiers CCE-27100-7 References 1. AC-6(2). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 2. IA-2(1). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 3. 770. URL:<http://iase.disa.mil/cci/index.html>.
Any accounts with empty passwords should be disabled immediately, and PAM configuration should prevent users from being able to assign themselves 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. Security identifiers CCE-26887-0 References 1. 765. URL:<http://iase.disa.mil/cci/index.html>. 2. 766. URL:<http://iase.disa.mil/cci/index.html>.
Another section contains information on how to create an appropriate system-wide warning banner. The warning message reinforces policy awareness during the logon 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. Security identifiers CCE-27112-2 References 1. 48. URL:<http://iase.disa.mil/cci/index.html>.
SSH environment options potentially allow users to bypass access restriction in some configurations. Security identifiers CCE-27201-3
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
The man page sshd_config(5) contains a list of supported ciphers. Approved algorithms should impart some level of confidence in their implementation. These are also required for compliance. Security identifiers CCE-26555-3 References 1. 2. 3. 4. 5. 6. 7. 8. 9. AC-3. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AC-17(2). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. AU-10(5). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. IA-5(1)(c). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. IA-7. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 803. URL:<http://iase.disa.mil/cci/index.html>. 1144. URL:<http://iase.disa.mil/cci/index.html>. 1145. URL:<http://iase.disa.mil/cci/index.html>. 1146. URL:<http://iase.disa.mil/cci/index.html>.
Restricting SSH access to only trusted network segments reduces exposure of the SSH server to attacks from unauthorized networks.
Unnecessary services should be disabled to decrease the attack surface of the system. Security identifiers
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
Unnecessary packages should not be installed to decrease the attack surface of the system. Security identifiers CCE-27198-1 References 1. 366. URL:<http://iase.disa.mil/cci/index.html>.
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. Security identifiers CCE-27087-6 References 1. CM-7. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 2. 366. URL:<http://iase.disa.mil/cci/index.html>.
Similarly, if you are using only IPv6, disable IPv4 sockets with the line:
use-ipv4=no
References
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
1. CM-7. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>.
This helps to ensure that only mDNS responses from the local network are processed, because the TTL field in a packet is decremented from its initial value of 255 whenever it is routed from one network to another. Although a properly-configured router or firewall should not allow mDNS packets into the local network at all, this option provides another check to ensure they are not permitted. References 1. CM-7. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>.
This helps ensure that only Avahi is responsible for mDNS traffic coming from that port on the system. References 1. CM-7. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>.
This helps ensure that only Avahi is responsible for mDNS traffic coming from that port on the system. References 1. CM-7. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>.
Implement as many of the following lines as possible, to restrict the information published by Avahi.
publish-addresses=no publish-hinfo=no publish-workstation=no publish-domain=no
Inspect the files in the directory /etc/avahi/services/. Unless there is an operational need to publish information about each of these services, delete the corresponding file. These options prevent publishing attempts from succeeding, and can be applied even if publishing is disabled entirely via disable-publishing. Alternatively, these can be used to restrict the types of published information in the event that some information must be published. References 1. CM-7. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>.
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
provides an interface for remote administration through a web browser. The CUPS service is installed and activated by default. The project homepage and more detailed documentation are available at http://www.cups.org.
The CUPS print service can be configured to broadcast a list of available printers to the network. Other machines on the network, also running the CUPS print service, can be configured to listen to these broadcasts and add and configure these printers for immediate use. By disabling this browsing capability, the machine will no longer generate or receive such broadcasts. Security identifiers CCE-27108-0 References 1. CM-7. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>.
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
This will prevent remote users from printing to locally configured printers while still allowing local users on the machine to print normally. By default, locally configured printers will not be shared over the network, but if this functionality has somehow been enabled, these recommendations will disable it again. Be sure to disable outgoing printer list broadcasts, or remote users will still be able to see the locally configured printers, even if they cannot actually print to them. To limit print serving to a particular set of users, use the Policy directive. Security identifiers CCE-27107-2 References 1. CM-7. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>.
3.8. DHCP
The Dynamic Host Configuration Protocol (DHCP) allows systems to request and obtain an IP address and other configuration parameters from a server. This guide recommends configuring networking on clients by manually editing the appropriate files under /etc/sysconfig. Use of DHCP can make client systems vulnerable to compromise by rogue DHCP servers, and should be avoided unless necessary. If using DHCP is necessary, however, there are best practices that should be followed to minimize security risk.
Unmanaged or unintentionally activated DHCP servers may provide faulty information to clients, interfering with the operation of a legitimate site DHCP server if there is one. Security identifiers CCE-27074-4 References 1. CM-7. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 2. 366. URL:<http://iase.disa.mil/cci/index.html>.
Removing the DHCP server ensures that it cannot be easily or accidentally reactivated and disrupt network operation. Security identifiers CCE-27120-5 References 1. CM-7. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 2. 366. URL:<http://iase.disa.mil/cci/index.html>.
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
called /etc/dhcp/dhcpd.conf. The file begins with a number of global configuration options. The remainder of the file is divided into sections, one for each block of addresses offered by dhcpd, each of which contains configuration options specific to that address block.
The ddns-update-style option controls only whether the DHCP server will attempt to act as a Dynamic DNS client. As long as the DNS server itself is correctly configured to reject DDNS attempts, an incorrect ddnsupdate-style setting on the client is harmless (but should be fixed as a best practice). The Dynamic DNS protocol is used to remotely update the data served by a DNS server. DHCP servers can use Dynamic DNS to publish information about their clients. This setup carries security risks, and its use is not recommended. If Dynamic DNS must be used despite the risks it poses, it is critical that Dynamic DNS transactions be protected using TSIG or some other cryptographic authentication mechanism. See dhcpd.conf(5) for more information about protecting the DHCP server from passing along malicious DNS data from its clients. Security identifiers CCE-27049-6 References 1. CM-7. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>.
The DHCPDECLINE message can be sent by a DHCP client to indicate that it does not consider the lease offered by the server to be valid. By issuing many DHCPDECLINE messages, a malicious client can exhaust the DHCP server's pool of IP addresses, causing the DHCP server to forget old address allocations. Security identifiers CCE-27106-4 References 1. CM-7. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>.
The bootp option tells dhcpd to respond to BOOTP queries. If support for this simpler protocol is not needed, it should be disabled to remove attack vectors against the DHCP server. Security identifiers CCE-27077-7 References 1. CM-7. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>.
Configure logwatch or other log monitoring tools to summarize error conditions reported by the dhcpd process.
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
By default, dhcpd logs notices to the daemon facility. Sending all daemon messages to a dedicated log file is part of the syslog configuration outlined in the Logging and Auditing section Security identifiers CCE-26898-7 References 1. . URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>.
By default, the RHEL client installation uses DHCP to request much of the above information from the DHCP server. In particular, domain-name, domain-name-servers, and routers are configured via DHCP. These settings are typically necessary for proper network functionality, but are also usually static across machines at a given site. Because the configuration information provided by the DHCP server could be maliciously provided to clients by a rogue DHCP server, the amount of information provided via DHCP should be minimized. Remove these definitions from the DHCP server configuration to ensure that legitimate clients do not unnecessarily rely on DHCP for this information. References 1. CM-7. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>.
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
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. Security identifiers CCE-27021-5 References 1. CM-7. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 2. 366. URL:<http://iase.disa.mil/cci/index.html>.
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
If DHCP must be used, then certain configuration changes can minimize the amount of information it receives and applies from the network, and thus the amount of incorrect information a rogue DHCP server could successfully distribute. For more information on configuring dhclient, see the dhclient(8) and dhclient.conf(5) man pages.
If the setting should be configured remotely by the DHCP server, add the lines:
request setting; require setting;
For example, suppose the DHCP server should provide only the IP address itself and the subnet mask. Then the entire file should look like:
supersede domain-name "example.com"; supersede domain-name-servers 192.168.1.2; supersede nis-domain ""; supersede nis-servers ""; supersede ntp-servers "ntp.example.com "; supersede routers 192.168.1.1; supersede time-offset -18000; request subnet-mask; require subnet-mask;
In this example, the options nis-servers and nis-domain are set to empty strings, on the assumption that the deprecated NIS protocol is not in use. It is necessary to supersede settings for unused services so that they cannot be set by a hostile DHCP server. If an option is set to an empty string, dhclient will typically not attempt to configure the service. By default, the DHCP client program, dhclient, requests and applies ten configuration options (in addition to the IP address) from the DHCP server. subnet-mask, broadcast-address, time-offset, routers, domain-name, domain-name-servers, hostname, nis-domain, nis-servers, and ntp-servers. Many of the options requested and applied by dhclient may be the same for every system on a network. It is recommended that almost all configuration options be assigned statically, and only options which must vary on a host-by-host basis be assigned via DHCP. This limits the damage which can be done by a rogue DHCP server. If appropriate for your site, it is also possible to supersede the host-name directive in /etc/dhcp/dhclient.conf, establishing a static hostname for the machine. However, dhclient does not use the host name option provided by the DHCP server (instead using the value provided by a reverse DNS lookup).
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.
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
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 Remediation script
# # Enable ntpd for all run levels # chkconfig --level 0123456 ntpd on # # Start ntpd if not currently running # service ntpd start
This instructs the NTP software to contact that remote server to obtain time data. Synchronizing with an NTP server makes it possible to collate system logs from multiple sources or correlate computer events with real time events. Using a trusted NTP server provided by your organization is recommended. Security identifiers CCE-27098-3 References 1. AU-8(1). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 2. 160. URL:<http://iase.disa.mil/cci/index.html>.
Specifying additional NTP servers increases the availability of accurate time data, in the event that one of the specified servers becomes unavailable. This is typical for a system acting as an NTP server for other systems. References 1. AU-8(1). URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>.
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
The alternatives program in RHEL permits selection of other mail server software (such as Sendmail), but Postfix is the default and is preferred. Postfix was coded with security in mind and can also be more effectively contained by SELinux as its modular design has resulted in separate processes performing specific actions. More information is available on its website, http://www.postfix.org.
Local mail delivery is essential to some system maintenance and notification tasks. Remediation script
# # Enable postfix for all run levels # chkconfig --level 0123456 postfix on # # Start postfix if not currently running # service postfix start
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. Security identifiers CCE-27515-6 References 1. CM-7. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>.
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. Security identifiers CCE-26780-7 References 1. CM-7. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 2. 382. URL:<http://iase.disa.mil/cci/index.html>.
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
Using removable media or some other secure transmission format, install the files generated in the previous step onto the mail server:
/etc/pki/tls/mail/serverkey.pem: the private key mailserverkey.pem /etc/pki/tls/mail/servercert.pem: the certificate file mailservercert.pem
Verify that the CA's public certificate file has been installed as /etc/pki/tls/CA/cacert.pem, and has the correct permissions:
# chown root:root /etc/pki/tls/CA/cacert.pem # chmod 644 /etc/pki/tls/CA/cacert.pem
The default greeting banner discloses that the listening mail process is Postfix. When remote mail senders connect to the MTA on port 25, they are greeted by an initial banner as part of the SMTP dialogue. This banner is necessary, but it frequently gives away too much information, including the MTA software which is in use, and sometimes also its version number. Remote mail senders do not need this information in order to send mail, so the banner should be changed to reveal only the hostname (which is already known and may be useful) and the word ESMTP, to indicate that the modern SMTP protocol variant is supported. References 1. AC-22. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 2. AU-13. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>.
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
Note: The values given here are examples, and may need to be modified for any particular site. By default, the Postfix anvil process gathers mail receipt statistics. To get information about about what connection rates are typical at your site, look in /var/log/maillog for lines with the daemon name postfix/anvil. These configuration options serve to make it more difficult for attackers to consume resources on the MTA host. The default_process_limit parameter controls how many smtpd processes can exist at a time, while smtpd_client_connection_count_limit controls the number of those which can be occupied by any one remote sender, and smtpd_client_connection_rate_limit controls the number of connections any one client can make per minute. By default, local hosts (those in mynetworks) are exempted from per-client rate limiting. The queue_minfree parameter establishes a free space threshold, in order to stop e-mail receipt before the queue filesystem is entirely full. The header_size_limit, message_size_limit, and smtpd_recipient_limit parameters place bounds on the legal sizes of messages received via SMTP.
This is also the default setting, and is in effect if all my_networks_style directives are commented. If only the MTA host itself is trusted to relay messages, add or correct the following line:
mynetworks_style = host
If the set of machines which can relay is more complicated, manually specify an entry for each netblock or IP address which is trusted to relay by setting the mynetworks variable directly:
mynetworks = 10.0.0.0/16, 192.168.1.0/24, 127.0.0.1
The mynetworks variable must contain only the set of machines for which this MTA should unconditionally relay mail. This is a trust relationship - if spammers gain access to these machines, your site will effectively become an open relay. It is recommended that only machines which are managed by you or by another trusted organization be placed in mynetworks, and users of all other machines be required to use SMTP AUTH to send mail.
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
3.11. LDAP
LDAP is a popular directory service, that is, a standardized way of looking up information from a central database. RHEL 6 includes software that enables a system to act as both an LDAP client and server.
Then review the LDAP server and ensure TLS has been configured. The ssl directive specifies whether to use ssl or not. If not specified it will default to no. It should be set to start_tls rather than doing LDAP over SSL. Security identifiers CCE-26690-8 References 1. 2. 3. 4. CM-7. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 776. URL:<http://iase.disa.mil/cci/index.html>. 778. URL:<http://iase.disa.mil/cci/index.html>. 1453. URL:<http://iase.disa.mil/cci/index.html>.
or
tls_cacertfile /etc/pki/tls/CA/cacert.pem
Then review the LDAP server and ensure TLS has been configured. The tls_cacertdir or tls_cacertfile directives are required when tls_checkpeer is configured (which is the default for openldap versions 2.1 and up). These directives define the path to the trust certificates signed by the site CA. Security identifiers CCE-27189-0 References 1. 2. 3. 4. CM-7. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 776. URL:<http://iase.disa.mil/cci/index.html>. 778. URL:<http://iase.disa.mil/cci/index.html>. 1453. URL:<http://iase.disa.mil/cci/index.html>.
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
The openldap-servers RPM is not installed by default on RHEL 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. Unnecessary packages should not be installed to decrease the attack surface of the system. While this software is clearly essential on an LDAP server, it is not necessary on typical desktop or workstation systems. Security identifiers CCE-26858-1 References 1. CM-7. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 2. 366. URL:<http://iase.disa.mil/cci/index.html>.
Using removable media or some other secure transmission format, install the certificate files onto the LDAP server: /etc/pki/tls/ldap/serverkey.pem: the private key ldapserverkey.pem /etc/pki/tls/ldap/servercert.pem: the certificate file ldapservercert.pem Verify the ownership and permissions of these files:
# # # # chown chown chmod chmod root:ldap /etc/pki/tls/ldap/serverkey.pem root:ldap /etc/pki/tls/ldap/servercert.pem 640 /etc/pki/tls/ldap/serverkey.pem 640 /etc/pki/tls/ldap/servercert.pem
Verify that the CA's public certificate file has been installed as /etc/pki/tls/CA/cacert.pem, and has the correct permissions:
# mkdir /etc/pki/tls/CA # chown root:root /etc/pki/tls/CA/cacert.pem # chmod 644 /etc/pki/tls/CA/cacert.pem
As a result of these steps, the LDAP server will have access to its own private certificate and the key with which that certificate is encrypted, and to the public certificate file belonging to the CA. Note that it would be possible for the key to be protected further, so that processes running as ldap could not read it. If this were done, the LDAP server process would need to be restarted manually whenever the server rebooted.
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
Remediation script
# # Disable nfslock for all run levels # chkconfig --level 0123456 nfslock off # # Stop nfslock if currently running # service nfslock stop
Remediation script
# # Disable rpcgssd for all run levels # chkconfig --level 0123456 rpcgssd off # # Stop rpcgssd if currently running # service rpcgssd stop
Remediation script
# # Disable rpcidmapd for all run levels # chkconfig --level 0123456 rpcidmapd off # # Stop rpcidmapd if currently running # service rpcidmapd stop
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
If the command did not return any output then disable netfs.
Remediation script
# # Disable netfs for all run levels # chkconfig --level 0123456 netfs off # # Stop netfs if currently running # service netfs stop
3.12.2.2. Configure NFS Services to Use Fixed Ports (NFSv3 and NFSv2)
Firewalling should be done at each host and at the border firewalls to protect the NFS daemons from remote access, since NFS servers should never be accessible from outside the organization. However, by default for NFSv3 and NFSv2, the RPC Bind service assigns each NFS service to a port dynamically at service startup time. Dynamic ports cannot be protected by port filtering firewalls such as iptables. Therefore, restrict each service to always use a given port, so that firewalling can be done effectively. Note that, because of the way RPC is implemented, it is not possible to disable the RPC Bind service even if ports are assigned statically to all RPC services. In NFSv4, the mounting and locking protocols have been incorporated into the protocol, and the server listens on the the wellknown TCP port 2049. As such, NFSv4 does not need to interact with the rpcbind, lockd, and rpc.statd daemons, which can and should be disabled in a pure NFSv4 environment. The rpc.mountd daemon is still required on the NFS server to setup exports, but is not involved in any over-the-wire operations.
Where lockd-port is a port which is not used by any other service on your network. Restrict service to always use a given port, so that firewalling can be done effectively.
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
Where lockd-port is a port which is not used by any other service on your network. Restricting services to always use a given port enables firewalling to be done more effectively. Security identifiers CCE-27063-7
Where statd-port is a port which is not used by any other service on your network. Restricting services to always use a given port enables firewalling to be done more effectively. Security identifiers CCE-26889-6
Where mountd-port is a port which is not used by any other service on your network. Restricting services to always use a given port enables firewalling to be done more effectively. Security identifiers CCE-27114-8
Specifying the anonymous UID and GID as -1 ensures that the remote root user is mapped to a local account which has no permissions on the system.
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
Unnecessary services should be disabled to decrease the attack surface of the system. Remediation script
# # Disable nfs for all run levels # chkconfig --level 0123456 nfs off # # Stop nfs if currently running # service nfs stop
Unnecessary services should be disabled to decrease the attack surface of the system. Remediation script
# # Disable rpcsvcgssd for all run levels # chkconfig --level 0123456 rpcsvcgssd off # # Stop rpcsvcgssd if currently running # service rpcsvcgssd stop
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
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. Security identifiers CCE-26972-0
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
where /DIR is a directory or filesystem to export, hostN is an IP address, netblock, hostname, domain, or netgroup to which to export, and optN is an option.
All network services involve some risk of compromise due to implementation flaws and should be disabled if possible. Security identifiers CCE-26873-0 References 1. CM-7. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 2. 366. URL:<http://iase.disa.mil/cci/index.html>.
If there is no need to make DNS server software available, removing it provides a safeguard against its activation. Security identifiers CCE-27030-6 References 1. CM-7. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 2. 366. URL:<http://iase.disa.mil/cci/index.html>.
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
Create and populate an appropriate zone directory within the jail, based on the options directive. If your named.conf includes:
options { directory "/path/to/DIRNAME "; ... }
then copy that directory and its contents from the original zone directory:
# cp -r /path/to/DIRNAME /var/named/chroot/DIRNAME
If you are running BIND in a chroot jail, then you should use the jailed named.conf as the primary nameserver configuration file. That is, when this guide recommends editing /etc/named.conf, you should instead edit /var/named/chroot/etc/named.conf. Chroot jails are not foolproof. However, they serve to make it more difficult for a compromised program to be used to attack the entire host. They do this by restricting a program's ability to traverse the directory upward, so that files outside the jail are not visible to the chrooted process. Since RHEL supports a standard mechanism for placing BIND in a chroot jail, you should take advantage of this feature.
If both the primary and secondary nameserver are under your control, or if you have only one nameserver, it may be possible to use an external configuration management mechanism to distribute zone updates. In that case, it is not necessary to allow zone transfers within BIND itself, so they should be disabled to avoid the potential for abuse.
This output is the name of a file containing the new key. Read the file to find the base64-encoded key string:
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
# cat Kdns.example.com .+NNN +MMMMM .key dns.example.com IN KEY 512 3 157 base64-key-string
The purpose of the dnssec-keygen command is to create the shared secret string base64-key-string. Once this secret has been obtained and inserted into named.conf on the primary and secondary servers, the key files Kdns.example.com .+NNN +MMMMM .key and Kdns.example.com .+NNN +MMMMM .private are no longer needed, and may safely be deleted. The BIND transaction signature (TSIG) functionality allows primary and secondary nameservers to use a shared secret to verify authorization to perform zone transfers. This method is more secure than using IP-based limiting to restrict nameserver access, since IP addresses can be easily spoofed. However, if you cannot configure TSIG between your servers because, for instance, the secondary nameserver is not under your control and its administrators are unwilling to configure TSIG, you can configure an allow-transfer directive with numerical IP addresses or ACLs as a last resort. References 1. CM-7. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>.
Dynamic updates allow remote servers to add, delete, or modify any entries in your zone file. Therefore, they should be considered highly risky, and disabled unless there is a very good reason for their use. If dynamic updates must be allowed, IP-based ACLs are insufficient protection, since they are easily spoofed. Instead, use TSIG keys (see the previous section for an example), and consider using the update-policy directive to restrict changes to only the precise type of change needed. Security identifiers CCE-27105-6
3.13.3.4. Run Separate DNS Servers for External and Internal Queries
Is it possible to run external and internal nameservers on separate machines? If so, follow the configuration guidance in this section. On the external nameserver, edit /etc/named.conf to add or correct the following directives:
options { allow-query { any; }; recursion no; ... }; zone "example.com " IN { ... };
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
On the internal nameserver, edit /etc/named.conf. Add or correct the following directives, where SUBNET is the numerical IP representation of your organization in the form xxx.xxx.xxx.xxx/xx:
acl internal { SUBNET ; localhost; }; options { allow-query { internal; }; ... }; zone "internal.example.com " IN { ... };
Enterprise nameservers generally serve two functions. One is to provide public information about the machines in a domain for the benefit of outside users who wish to contact those machines, for instance in order to send mail to users in the enterprise, or to visit the enterprise's external web page. The other is to provide nameservice to client machines within the enterprise. Client machines require both private information about enterprise machines (which may be different from the public information served to the rest of the world) and public information about machines outside the enterprise, which is used to send mail or visit websites outside of the organization. In order to provide the public nameservice function, it is necessary to share data with untrusted machines which request it otherwise, the enterprise cannot be conveniently contacted by outside users. However, internal data should be protected from disclosure, and serving irrelevant public name queries for outside domains leaves the DNS server open to cache poisoning and other attacks. Therefore, local network nameservice functions should not be provided to untrusted machines. Separate machines should be used to fill these two functions whenever possible.
As shown in the example, database files which are required for recursion, such as the root hints file, must be available to any clients which are allowed to make recursive queries. Under typical circumstances, this includes only the internal clients which are allowed to use this server as a general-purpose nameserver. The view feature is provided by BIND9 as a way to allow a single nameserver to make different sets of data available to different sets of clients. If possible, it is always better to run external and internal nameservers on separate machines, so that even complete compromise of the external server cannot be used to obtain internal data or confuse internal DNS clients. However, this is not always feasible, and use of a feature like views is preferable to leaving internal DNS data entirely unprotected.
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
Running FTP server software provides a network-based avenue of attack, and should be disabled if not needed. Furthermore, the FTP protocol is unencrypted and creates a risk of compromising sensitive information. Remediation script
if service vsftpd status >/dev/null; then service vsftpd stop fi
Removing the vsftpd package decreases the risk of its accidental activation. Security identifiers CCE-26687-4 References 1. CM-7. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>. 2. 1436. URL:<http://iase.disa.mil/cci/index.html>.
3.14.2. Use vsftpd to Provide FTP Service if Necessary 3.14.2.a. Install vsftpd Package
If this machine must operate as an FTP server, install the vsftpd package via the standard channels.
# yum install vsftpd
After RHEL 2.1, Red Hat switched from distributing wu-ftpd with RHEL to distributing vsftpd. For security and for consistency with future Red Hat releases, the use of vsftpd is recommended. Security identifiers CCE-27187-4 References 1. CM-7. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>.
configuration
options
within
the
vsftpd
configuration
file,
located
If verbose logging to vsftpd.log is done, sparse logging of downloads to /var/log/xferlog will not also occur. However, the information about what files were downloaded is included in the information logged to vsftpd.log
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
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. Security identifiers CCE-27142-9
This setting will cause the system greeting banner to be used for FTP connections as well. Security identifiers CCE-27145-2 References 1. 48. URL:<http://iase.disa.mil/cci/index.html>.
If FTP uploads are necessary, follow the guidance in the remainder of this section to secure these transactions as much as possible. Anonymous FTP can be a convenient way to make files available for universal download. However, it is less common to have a need to allow unauthenticated users to place files on the FTP server. If this must be done, it is necessary to ensure that files cannot be uploaded and downloaded from the same directory. Security identifiers CCE-27117-1
If non-anonymous FTP logins are necessary, follow the guidance in the remainder of this section to secure these logins as much as possible. The use of non-anonymous FTP logins is strongly discouraged. Since SSH clients and servers are widely available, and since SSH provides support for a transfer mode which resembles FTP in user interface, there is no good reason to allow password-based FTP access. Security identifiers
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
CCE-27115-5
Edit the file /etc/vsftp.ftpusers. For each user USERNAME who should be allowed to access the system via FTP, add a line containing that user's name:
USERNAME
If anonymous access is also required, add the anonymous usernames to /etc/vsftp.ftpusers as well.
anonymous ftp
Historically, the file /etc/ftpusers contained a list of users who were not allowed to access the system via FTP. It was used to prevent system users such as the root user from logging in via the insecure FTP protocol. However, when the configuration option userlist deny=NO is set, vsftpd interprets ftpusers as the set of users who are allowed to login via FTP. Since it should be possible for most users to access their accounts via secure protocols, it is recommended that this setting be used, so that non-anonymous FTP access can be limited to legacy users who have been explicitly identified.
Edit the file /etc/sysconfig/iptables-config. Ensure that the space-separated list of modules contains the FTP connection tracking module:
IPTABLES_MODULES="ip_conntrack_ftp"
These settings configure iptables to allow connections to an FTP server. The first line allows initial connections to the FTP server port. FTP is an older protocol which is not very compatible with firewalls. During the initial FTP dialogue, the client and server negotiate an arbitrary port to be used for data transfer. The ip_conntrack_ftp module is used by iptables to listen to that dialogue and allow connections to the data ports which FTP negotiates. This allows an FTP server to operate on a machine which is running a firewall.
The system's default web server software is Apache 2 and is provided in the RPM package httpd.
Running web server software provides a network-based avenue of attack, and should be disabled if not needed.
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
If there is no need to make the web server software available, removing it provides a safeguard against its activation. Security identifiers CCE-27133-8 References 1. CM-7. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>.
This method of installation is recommended over installing the "Web Server" package group during the system installation process. The Web Server package group includes many packages which are likely extraneous, while the command-line method installs only the required httpd package itself.
If the number of compiled-in modules is significantly larger than the aforementioned set, this guide recommends re-installing httpd with a reduced configuration. Minimizing the number of modules that are compiled into the httpd binary, reduces risk by limiting the capabilities allowed by the webserver.
Information disclosed to clients about the configuration of the web server and system could be used to plan an attack on the given system. This information disclosure should be restricted to a minimum. References 1. CM-7. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>.
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
Information disclosed to clients about the configuration of the web server and system could be used to plan an attack on the given system. This information disclosure should be restricted to a minimum. References 1. CM-7. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>.
The purpose of each of the modules loaded by default will now be addressed one at a time. If none of a module's directives are being used, remove it.
Minimizing the number of loadable modules available to the web server reduces risk by limiting the capabilities allowed by the web server.
Minimizing the number of loadable modules available to the web server reduces risk by limiting the capabilities allowed by the web server.
Minimizing the number of loadable modules available to the web server reduces risk by limiting the capabilities allowed by the web server.
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
If LDAP is to be used, SSL encryption should be used as well. Minimizing the number of loadable modules available to the web server reduces risk by limiting the capabilities allowed by the web server.
If there is a critical need for Server Side Includes, they should be enabled with the option IncludesNoExec to prevent arbitrary code execution. Additionally, user supplied data should be encoded to prevent cross-site scripting vulnerabilities. Minimizing the number of loadable modules available to the web server reduces risk by limiting the capabilities allowed by the web server.
Minimizing the number of loadable modules available to the web server reduces risk by limiting the capabilities allowed by the web server.
If there is a critical need for WebDAV, extra care should be taken in its configuration. Since DAV access allows remote clients to manipulate server files, any location on the server that is DAV enabled should be protected by access controls. Minimizing the number of loadable modules available to the web server, reduces risk by limiting the capabilities allowed by the web server.
If there is a critical need for this module, ensure that access to the status page is properly restricted to a limited set of hosts in the status handler configuration. Minimizing the number of loadable modules available to the web server reduces risk by limiting the capabilities allowed by the web server.
If there is a critical need for this module, use the Location directive to provide an access control list to restrict access to the information.
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
Minimizing the number of loadable modules available to the web server reduces risk by limiting the capabilities allowed by the web server.
This functionality weakens server security by making site enumeration easier. Minimizing the number of loadable modules available to the web server reduces risk by limiting the capabilities allowed by the web server.
If proxy support is needed, load mod_proxy and the appropriate proxy protocol handler module (one of mod_proxy_http, mod_proxy_ftp, or mod_proxy_connect). Additionally, make certain that a server is secure before enabling proxying, as open proxy servers are a security risk. mod_proxy_balancer enables load balancing, but requires that mod status be enabled. Minimizing the number of loadable modules available to the web server reduces risk by limiting the capabilities allowed by the web server.
If caching is required, it should not be enabled for any limited-access content. Minimizing the number of loadable modules available to the web server reduces risk by limiting the capabilities allowed by the web server.
If the web server requires the use of CGI, enable mod_cgi. Minimizing the number of loadable modules available to the web server reduces risk by limiting the capabilities allowed by the web server.
allows for authentication based on aliases. authn_anon allows anonymous authentication similar to that of anonymous ftp sites. authz_owner allows authorization based on file ownership. authz_dbm allows for authorization based on group membership if the web server is using DBM authentication.
authn_alias
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
Minimizing the number of loadable modules available to the web server reduces risk by limiting the capabilities allowed by the web server.
If the above change was made, ensure that the SSL encryption remains loaded by explicitly including the corresponding configuration file:
Include conf.d/ssl.conf
Explicitly listing the configuration files to be loaded during web server start-up avoids the possibility of unwanted or malicious configuration files to be automatically included as part of the server's running configuration.
The Web Server's root directory content should be protected from unauthorized access by web clients.
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
The default configuration for the web (/var/www/html) Directory allows directory indexing (Indexes) and the following of symbolic links (FollowSymLinks). Neither of these is recommended. The /var/www/html directory hierarchy should not be viewable via the web, and symlinks should only be followed if the owner of the symlink also owns the linked file. Ensure that this policy is adhered to by altering the related section of the configuration:
<Directory "/var/www/html"> # ... Options SymLinksIfOwnerMatch # ... </Directory>
Access to the web server's directory hierarchy could allow access to unauthorized files by web clients. Following symbolic links could also allow such access.
Minimizing the number of available methods to the web client reduces risk by limiting the capabilities allowed by the web server.
provides encryption capabilities for the httpd Web server. Unencrypted content is transmitted in plain text which could be passively monitored and accessed by unauthorized parties.
mod_ssl
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
The security module provides an application level firewall for httpd. Following its installation with the base ruleset, specific configuration advice can be found at http://www.modsecurity.org/ to design a policy that best matches the security needs of the web applications. Usage of mod_security is highly recommended for some environments, but it should be noted this module does not ship with Red Hat Enterprise Linux itself, and instead is provided via Extra Packages for Enterprise Linux (EPEL). For more information on EPEL please refer to http://fedoraproject.org/wiki/EPEL.
provides an additional level of protection for the web server by enabling the administrator to implement content access policies and filters at the application layer.
mod_security
Denial-of-service prevention should be implemented for a web server if such a threat exists. However, specific configuration details are very dependent on the environment and often best left at the discretion of the administrator.
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
This is its default setting. Access to the web server's log files may allow an unauthorized user or attacker to access information about the web server or alter the server's log files. Security identifiers CCE-27150-2 References 1. CM-7. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>.
Access to the web server's configuration files may allow an unauthorized user or attacker to access information about the web server or alter the server's configuration files.
Access to the web server's configuration files may allow an unauthorized user or attacker to access information about the web server or to alter the server's configuration files. References 1. CM-7. URL:<http://csrc.nist.gov/publications/nistpubs/800-53-Rev3/sp800-53-rev3-final.pdf>.
To configure iptables to allow port 443 traffic one must edit /etc/sysconfig/iptables and /etc/sysconfig/ip6tables (if IPv6 is in use). Add the following line, ensuring that it appears before the final LOG and DROP lines for the INPUT chain:
-A INPUT -m state --state NEW -p tcp --dport 443 -j ACCEPT
This necessitates placing all files required by httpd inside /chroot/apache , including httpd's binaries, modules, configuration files, and served web pages. The details of this configuration are beyond the scope of this guide. This may also require additional SELinux configuration.
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
Running an IMAP or POP3 server provides a network-based avenue of attack, and should be disabled if not needed. Security identifiers CCE-26922-5
If there is no need to make the Dovecot software available, removing it provides a safeguard against its activation. Security identifiers CCE-27039-7
If possible, require SSL protection for all transactions. The SSL protocol variants listen on alternate ports (995 instead of 110 for pop3s, and 993 instead of 143 for imaps), and require SSL-aware clients. An alternate approach is to listen on the standard port and require the client to use the STARTTLS command before authenticating. Configuring Dovecot to only support the protocols the protocols needed by your site reduces the risk of an attacker using one of the unused protocols to base an attack.
SSL encrypt network traffic between the Dovecot server and its clients protecting user credentials, mail as it is downloaded, and clients may use SSL certificates to authenticate the server, preventing another system from impersonating the server. Security identifiers CCE-27571-9
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
Edit /etc/dovecot/conf.d/10-ssl.conf and add or correct the following line (note: the path below is the default path set by the Dovecot installation. If you are using a different path, ensure you reference the appropriate file):
ssl_cert = </etc/pki/dovecot/certs/dovecot.pem
SSL certificates are used by the client to authenticate the identity of the server, as well as to encrypt credentials and message traffic. Not using SSL to encrypt mail server traffic could allow unauthorized access to credentials and mail messages since they are sent in plain text over the network. Security identifiers CCE-27459-7
SSL certificates are used by the client to authenticate the identity of the server, as well as to encrypt credentials and message traffic. Not using SSL to encrypt mail server traffic could allow unauthorized access to credentials and mail messages since they are sent in plain text over the network. Security identifiers CCE-27633-7
Using plain text authentication to the mail server could allow an attacker access to credentials by monitoring network traffic. Security identifiers CCE-27144-5
Running a Samba server provides a network-based avenue of attack, and should be disabled if not needed.
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
If administrator accounts cannot be disabled, ensure that local machine passwords and Samba service passwords do not match. Typically, administrator access is required when Samba must create user and machine accounts and shares. Domain member servers and standalone servers may not need administrator access at all. If that is the case, add the invalid users parameter to [global] instead.
Requiring samba clients such as smbclient to use packet signing ensures they can only communicate with servers that support packet signing. Packet signing can prevent man-in-the-middle attacks which modify SMB packets in transit. Security identifiers CCE-26328-5
It is also possible to limit read and write access to particular users with the read list and write list options, though the permissions set by the system itself will override these settings. Set the read only attribute for each share to ensure that
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
global settings will not accidentally override the individual share settings. Then, as with the valid users directive, separate each user or group of users with a space:
[share] read only = yes write list = userone usertwo @usergroup
The Samba service is only required for sharing files and printers with Microsoft Windows workstations, and even then, other options may exist.
There may be other options present, but these are the only options enabled and uncommented by default. Removing the [printers] share should be enough for most users. If the Samba printer sharing capability is needed, consider disabling the Samba network browsing capability or restricting access to a particular set of users or network addresses. Set the valid users parameter to a small subset of users or restrict it to a particular group of users with the shorthand @. Separate each user or group of users with a space. For example, under the [printers] share:
[printers] valid users = user @printerusers
The Samba service is only required for sharing files and printers with Microsoft Windows workstations, and even then, other options may exist. Do not use the Samba service to share files between Unix or Linux machines.
Running proxy server software provides a network-based avenue of attack, and should be removed if not needed. Security identifiers CCE-27146-0
If there is no need to make the proxy server software available, removing it provides a safeguard against its activation. Security identifiers CCE-26977-9
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
Running SNMP software provides a network-based avenue of attack, and should be disabled if not needed. Security identifiers CCE-26906-8
If there is no need to run SNMP server software, removing the package provides a safeguard against its activation. Security identifiers CCE-26332-7
Earlier versions of SNMP are considered insecure, as they potentially allow unauthorized access to detailed system management information.
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
Presence of the default SNMP password enables querying of different system aspects and could result in unauthorized knowledge of the system.
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
4.d. Guidance Does Not Meet this Requirement Due to Impracticality or Scope
This requirement is NA. No fix is required. The guidance does not meet this requirement. The requirement is impractical or out of scope. References 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 21. URL:<http://iase.disa.mil/cci/index.html>. 25. URL:<http://iase.disa.mil/cci/index.html>. 28. URL:<http://iase.disa.mil/cci/index.html>. 29. URL:<http://iase.disa.mil/cci/index.html>. 30. URL:<http://iase.disa.mil/cci/index.html>. 165. URL:<http://iase.disa.mil/cci/index.html>. 221. URL:<http://iase.disa.mil/cci/index.html>. 354. URL:<http://iase.disa.mil/cci/index.html>. 553. URL:<http://iase.disa.mil/cci/index.html>. 779. URL:<http://iase.disa.mil/cci/index.html>. 780. URL:<http://iase.disa.mil/cci/index.html>. 781. URL:<http://iase.disa.mil/cci/index.html>. 1009. URL:<http://iase.disa.mil/cci/index.html>. 1094. URL:<http://iase.disa.mil/cci/index.html>. 1123. URL:<http://iase.disa.mil/cci/index.html>. 1124. URL:<http://iase.disa.mil/cci/index.html>. 1125. URL:<http://iase.disa.mil/cci/index.html>. 1132. URL:<http://iase.disa.mil/cci/index.html>.
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
19. 20. 21. 22. 23. 24. 25. 26. 27. 28. 29. 30. 31. 32. 33. 34. 35. 36. 37. 38. 39.
1135. 1140. 1141. 1142. 1143. 1145. 1147. 1148. 1166. 1339. 1340. 1341. 1350. 1356. 1373. 1374. 1383. 1391. 1392. 1395. 1662.
URL:<http://iase.disa.mil/cci/index.html>. URL:<http://iase.disa.mil/cci/index.html>. URL:<http://iase.disa.mil/cci/index.html>. URL:<http://iase.disa.mil/cci/index.html>. URL:<http://iase.disa.mil/cci/index.html>. URL:<http://iase.disa.mil/cci/index.html>. URL:<http://iase.disa.mil/cci/index.html>. URL:<http://iase.disa.mil/cci/index.html>. URL:<http://iase.disa.mil/cci/index.html>. URL:<http://iase.disa.mil/cci/index.html>. URL:<http://iase.disa.mil/cci/index.html>. URL:<http://iase.disa.mil/cci/index.html>. URL:<http://iase.disa.mil/cci/index.html>. URL:<http://iase.disa.mil/cci/index.html>. URL:<http://iase.disa.mil/cci/index.html>. URL:<http://iase.disa.mil/cci/index.html>. URL:<http://iase.disa.mil/cci/index.html>. URL:<http://iase.disa.mil/cci/index.html>. URL:<http://iase.disa.mil/cci/index.html>. URL:<http://iase.disa.mil/cci/index.html>. URL:<http://iase.disa.mil/cci/index.html>.
4.f. Guidance Does Not Meet this Requirement Due to Impracticality or Scope
This requirement is NA. No fix is required. The guidance does not meet this requirement. The requirement is impractical or out of scope. References 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21. 22. 23. 24. 25. 26. 15. URL:<http://iase.disa.mil/cci/index.html>. 27. URL:<http://iase.disa.mil/cci/index.html>. 218. URL:<http://iase.disa.mil/cci/index.html>. 219. URL:<http://iase.disa.mil/cci/index.html>. 371. URL:<http://iase.disa.mil/cci/index.html>. 372. URL:<http://iase.disa.mil/cci/index.html>. 535. URL:<http://iase.disa.mil/cci/index.html>. 537. URL:<http://iase.disa.mil/cci/index.html>. 539. URL:<http://iase.disa.mil/cci/index.html>. 1682. URL:<http://iase.disa.mil/cci/index.html>. 370. URL:<http://iase.disa.mil/cci/index.html>. 37. URL:<http://iase.disa.mil/cci/index.html>. 24. URL:<http://iase.disa.mil/cci/index.html>. 1112. URL:<http://iase.disa.mil/cci/index.html>. 1126. URL:<http://iase.disa.mil/cci/index.html>. 1143. URL:<http://iase.disa.mil/cci/index.html>. 1149. URL:<http://iase.disa.mil/cci/index.html>. 1157. URL:<http://iase.disa.mil/cci/index.html>. 1159. URL:<http://iase.disa.mil/cci/index.html>. 1210. URL:<http://iase.disa.mil/cci/index.html>. 1211. URL:<http://iase.disa.mil/cci/index.html>. 1274. URL:<http://iase.disa.mil/cci/index.html>. 1372. URL:<http://iase.disa.mil/cci/index.html>. 1376. URL:<http://iase.disa.mil/cci/index.html>. 1377. URL:<http://iase.disa.mil/cci/index.html>. 1352. URL:<http://iase.disa.mil/cci/index.html>.
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013
Colophon
Red Hat and Red Hat Enterprise Linux are either registered trademarks or trademarks of Red Hat, Inc. in the United States and other countries. All other names are registered trademarks or trademarks of their respective companies.
XCCDF Security Guide. Generated by OpenSCAP on 2013-08-29 23:12.
http://people.redhat.com/swells/scap-security-guide/RHEL6/output/rhel6-guide... 9/5/2013