Guide to the Secure Configuration of Red Hat Enterprise Linux 6
with profile United States Government Configuration Baseline (USGCB)
scap-security-guide
package which is developed at
http://fedorahosted.org/scap-security-guide.
Providing system administrators with such guidance informs them how to securely configure systems under their control in a variety of network roles. Policy makers and baseline creators can use this catalog of settings, with its associated references to higher-level security control catalogs, in order to assist them in security baseline creation. This guide is a catalog, not a checklist, and satisfaction of every item is not likely to be possible or sensible in any operational scenario. However, the XCCDF format enables granular selection and adjustment of settings, and their association with OVAL and OCIL content provides an automated checking capability. Transformations of this document, and its associated automated checking content, are capable of providing baselines that meet a diverse set of policy objectives. Some example XCCDF Profiles, which are selections of items that form checklists and can be used as baselines, are available with this guide. They can be processed, in an automated fashion, with tools that support the Security Content Automation Protocol (SCAP). The DISA STIG for RHEL 6, which provides required settings for US Department of Defense systems, is one example of a baseline created from this guidance.
Profile Title | United States Government Configuration Baseline (USGCB) |
---|---|
Profile ID | xccdf_org.ssgproject.content_profile_usgcb-rhel6-server |
Revision History
Current version: 0.9
- draft (as of 2015-07-30)
Platforms
- cpe:/o:redhat:enterprise_linux:6
- cpe:/o:redhat:enterprise_linux:6::client
Table of Contents
- System Settings
- Installing and Maintaining Software
- File Permissions and Masks
- SELinux
- Account and Access Control
- Network Configuration and Firewalls
- Configure Syslog
- System Accounting with auditd
- Services
Checklist
contains 223 rules |
System Settingsgroup |
contains 167 rules |
Installing and Maintaining SoftwaregroupThe following sections contain information on security-relevant choices during the initial operating system installation process and the setup of software updates. |
contains 12 rules |
Disk PartitioninggroupTo ensure separation and protection of data, there
are top-level system directories which should be placed on their
own physical partition or logical volume. The installer's default
partitioning scheme creates separate logical volumes for
|
contains 5 rules |
Ensure /tmp Located On Separate Partitionrule
The
The identifiers: CCE-26435-8, DISA FSO RHEL-06-000001 references: http://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-53r4.pdf, 1208, Test attestation on 20120928 by MM |
Ensure /var Located On Separate PartitionruleThe
Ensuring that identifiers: CCE-26639-5, DISA FSO RHEL-06-000002 references: http://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-53r4.pdf, 1208, Test attestation on 20120928 by MM |
Ensure /var/log Located On Separate Partitionrule
System logs are stored in the
Placing identifiers: CCE-26215-4, DISA FSO RHEL-06-000003 references: AU-9, 1208, Test attestation on 20120928 by MM |
Ensure /var/log/audit Located On Separate Partitionrule
Audit logs are stored in the
Placing identifiers: CCE-26436-6, DISA FSO RHEL-06-000004 references: AU-4, AU-9, 137, 138, 1208, Test attestation on 20120928 by MM |
Ensure /home Located On Separate Partitionrule
If user home directories will be stored locally, create a separate partition
for
Ensuring that identifiers: CCE-26557-9, DISA FSO RHEL-06-000007 references: http://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-53r4.pdf, 1208, Test attestation on 20120928 by MM |
Updating SoftwaregroupThe |
contains 4 rules |
Ensure Red Hat GPG Key InstalledruleTo ensure the system can cryptographically verify base software packages come from Red Hat (and to connect to the Red Hat Network to receive them), the Red Hat GPG key must properly be installed. To install the Red Hat GPG key, run: $ sudo rhn_registerIf the system is not connected to the Internet or an RHN Satellite, then install the Red Hat GPG key from trusted media such as the Red Hat installation CD-ROM or DVD. Assuming the disc is mounted in /media/cdrom , use the following command as the root user to import
it into the keyring:
$ sudo rpm --import /media/cdrom/RPM-GPG-KEYRationale: The Red Hat GPG key is necessary to cryptographically verify packages are from Red Hat. identifiers: CCE-26506-6, DISA FSO RHEL-06-000008 references: SI-7, MA-1(b), 351, Test attestation on 20120928 by MM Remediation script:
|
Ensure gpgcheck Enabled In Main Yum ConfigurationruleThe gpgcheck=1Rationale: Ensuring the validity of packages' cryptographic signatures prior to installation ensures the authenticity of the software and protects against malicious tampering. identifiers: CCE-26709-6, DISA FSO RHEL-06-000013 references: SI-7, MA-1(b), 352, 663, Test attestation on 20120928 by MM |
Ensure gpgcheck Enabled For All Yum Package RepositoriesruleTo ensure signature checking is not disabled for
any repos, remove any lines from files in gpgcheck=0Rationale: Ensuring all packages' cryptographic signatures are valid prior to installation ensures the authenticity of the software and protects against malicious tampering. identifiers: CCE-26647-8, DISA FSO RHEL-06-000015 references: SI-7, MA-1(b), 352, 663, Test attestation on 20120928 by MM |
Ensure Software Patches InstalledruleIf the system is joined to the Red Hat Network, a Red Hat Satellite Server, or a yum server, run the following command to install updates: $ sudo yum updateIf the system is not configured to use one of these sources, updates (in the form of RPM packages) can be manually downloaded from the Red Hat Network and installed using rpm .
Rationale:Installing software updates is a fundamental mitigation against the exploitation of publicly-known vulnerabilities. identifiers: CCE-27635-2, DISA FSO RHEL-06-000011 references: SI-2, MA-1(b), 1227, 1233, Test attestation on 20120928 by MM |
Software Integrity Checkinggroup
Both the AIDE (Advanced Intrusion Detection Environment)
software and the RPM package management system provide
mechanisms for verifying the integrity of installed software.
AIDE uses snapshots of file metadata (such as hashes) and compares these
to current system files in order to detect changes.
The RPM package management system can conduct integrity
checks by comparing information in its metadata database with
files installed on the system.
|
contains 3 rules |
Verify Integrity with AIDEgroupAIDE conducts integrity checks by comparing information about
files with previously-gathered information. Ideally, the AIDE database is
created immediately after initial system configuration, and then again after any
software update. AIDE is highly configurable, with further configuration
information located in |
contains 1 rule |
Install AIDEruleInstall the AIDE package with the command: $ sudo yum install aideRationale: The AIDE package must be installed if it is to be available for integrity checking. identifiers: CCE-27024-9, DISA FSO RHEL-06-000016 references: CM-3(d), CM-3(e), CM-6(d), SC-28, SI-7, 1069, Test attestation on 20121024 by DS Remediation script:
|
Verify Integrity with RPMgroupThe RPM package management system includes the ability to verify the integrity of installed packages by comparing the installed files with information about the files taken from the package metadata stored in the RPM database. Although an attacker could corrupt the RPM database (analogous to attacking the AIDE database as described above), this check can still reveal modification of important files. To list which files on the system differ from what is expected by the RPM database: $ rpm -qVaSee the man page for rpm to see a complete explanation of each column.
|
contains 2 rules |
Verify and Correct File Permissions with RPMruleThe RPM package management system can check file access permissions of installed software packages, including many that are important to system security. After locating a file with incorrect permissions, run the following command to determine which package owns it: $ rpm -qf FILENAMENext, run the following command to reset its permissions to the correct values: $ sudo rpm --setperms PACKAGENAMERationale: 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. identifiers: CCE-26731-0, DISA FSO RHEL-06-000518 |
Verify File Hashes with RPMruleThe RPM package management system can check the hashes of installed software packages, including many that are important to system security. Run the following command to list which files on the system have hashes that differ from what is expected by the RPM database: $ rpm -Va | grep '^..5'A "c" in the second column indicates that a file is a configuration file, which may appropriately be expected to change. If the file was not expected to change, investigate the cause of the change using audit logs or other means. The package can then be reinstalled to restore the file. Run the following command to determine which package owns the file: $ rpm -qf FILENAMEThe package can be reinstalled from a yum repository using the command: $ sudo yum reinstall PACKAGENAMEAlternatively, the package can be reinstalled from trusted media using the command: $ sudo rpm -Uvh PACKAGENAMERationale: The hashes of important files like system executables should match the information given by the RPM database. Executables with erroneous hashes could be a sign of nefarious activity on the system. identifiers: CCE-27223-7, DISA FSO RHEL-06-000519 |
File Permissions and MasksgroupTraditional Unix security relies heavily on file and
directory permissions to prevent unauthorized users from reading or
modifying files to which they should not have access.
$ mount -t ext4 | awk '{print $3}'For any systems that use a different local filesystem type, modify this command as appropriate. |
contains 44 rules |
Restrict Partition Mount OptionsgroupSystem partitions can be mounted with certain options
that limit what files on those partitions can do. These options
are set in the |
contains 11 rules |
Add nodev Option to Non-Root Local PartitionsruleThe The identifiers: CCE-27045-4 references: CM-7 Remediation script:
|
Add nodev Option to Removable Media PartitionsruleThe The only legitimate location for device files is the identifiers: CCE-26860-7 |
Add noexec Option to Removable Media PartitionsruleThe Allowing users to execute binaries from removable media such as USB keys exposes the system to potential compromise. identifiers: CCE-27196-5, DISA FSO RHEL-06-000271 |
Add nosuid Option to Removable Media PartitionsruleThe The presence of SUID and SGID executables should be tightly controlled. Allowing users to introduce SUID or SGID binaries from partitions mounted off of removable media would allow them to introduce their own highly-privileged programs. identifiers: CCE-27056-1 |
Add nodev Option to /tmprule
The The only legitimate location for device files is the identifiers: CCE-26499-4 |
Add noexec Option to /tmpruleThe Allowing users to execute binaries from world-writable directories
such as identifiers: CCE-26720-3 |
Add nosuid Option to /tmpruleThe The presence of SUID and SGID executables should be tightly controlled. Users should not be able to execute SUID or SGID binaries from temporary storage partitions. identifiers: CCE-26762-5 |
Add nodev Option to /dev/shmruleThe The only legitimate location for device files is the identifiers: CCE-26778-1 Remediation script:
|
Add noexec Option to /dev/shmruleThe Allowing users to execute binaries from world-writable directories
such as identifiers: CCE-26622-1 Remediation script:
|
Add nosuid Option to /dev/shmruleThe The presence of SUID and SGID executables should be tightly controlled. Users should not be able to execute SUID or SGID binaries from temporary storage partitions. identifiers: CCE-26486-1 Remediation script:
|
Bind Mount /var/tmp To /tmpruleThe /tmp /var/tmp none rw,nodev,noexec,nosuid,bind 0 0See the mount(8) man page for further explanation of bind mounting.
Rationale:Having multiple locations for temporary storage is not required. Unless absolutely
necessary to meet requirements, the storage location identifiers: CCE-26582-7 references: CM-7 Remediation script:
|
Restrict Dynamic Mounting and Unmounting of FilesystemsgroupLinux includes a number of facilities for the automated addition
and removal of filesystems on a running system. These facilities may be
necessary in many environments, but this capability also carries some risk -- whether direct
risk from allowing users to introduce arbitrary filesystems,
or risk that software flaws in the automated mount facility itself could
allow an attacker to compromise the system.
$ find /lib/modules/`uname -r`/kernel/fs -type f -name '*.ko'If these filesystems are not required then they can be explicitly disabled in a configuratio file in /etc/modprobe.d .
|
contains 8 rules |
Disable the AutomounterruleThe $ sudo chkconfig autofs offRationale: Disabling the automounter permits the administrator to
statically control filesystem mounting through identifiers: CCE-26976-1, DISA FSO RHEL-06-000526 references: AC-19(a), AC-19(d), AC-19(e), 1250, 85 Remediation script:
|
Disable Mounting of cramfsrule
To configure the system to prevent the install cramfs /bin/trueThis effectively prevents usage of this uncommon filesystem. Rationale: Linux kernel modules which implement filesystems that are not needed by the local system should be disabled. identifiers: CCE-26340-0 references: CM-7 Remediation script:
|
Disable Mounting of freevxfsrule
To configure the system to prevent the install freevxfs /bin/trueThis effectively prevents usage of this uncommon filesystem. Rationale: Linux kernel modules which implement filesystems that are not needed by the local system should be disabled. identifiers: CCE-26544-7 references: CM-7 Remediation script:
|
Disable Mounting of jffs2rule
To configure the system to prevent the install jffs2 /bin/trueThis effectively prevents usage of this uncommon filesystem. Rationale: Linux kernel modules which implement filesystems that are not needed by the local system should be disabled. identifiers: CCE-26670-0 references: CM-7 Remediation script:
|
Disable Mounting of hfsrule
To configure the system to prevent the install hfs /bin/trueThis effectively prevents usage of this uncommon filesystem. Rationale: Linux kernel modules which implement filesystems that are not needed by the local system should be disabled. identifiers: CCE-26800-3 references: CM-7 Remediation script:
|
Disable Mounting of hfsplusrule
To configure the system to prevent the install hfsplus /bin/trueThis effectively prevents usage of this uncommon filesystem. Rationale: Linux kernel modules which implement filesystems that are not needed by the local system should be disabled. identifiers: CCE-26361-6 references: CM-7 Remediation script:
|
Disable Mounting of squashfsrule
To configure the system to prevent the install squashfs /bin/trueThis effectively prevents usage of this uncommon filesystem. Rationale: Linux kernel modules which implement filesystems that are not needed by the local system should be disabled. identifiers: CCE-26404-4 references: CM-7 Remediation script:
|
Disable Mounting of udfrule
To configure the system to prevent the install udf /bin/trueThis effectively prevents usage of this uncommon filesystem. Rationale: Linux kernel modules which implement filesystems that are not needed by the local system should be disabled. identifiers: CCE-26677-5 references: CM-7 Remediation script:
|
Verify Permissions on Important Files and DirectoriesgroupPermissions for many files on a system must be set restrictively to ensure sensitive information is properly protected. This section discusses important permission restrictions which can be verified to ensure that no harmful discrepancies have arisen. |
contains 19 rules |
Verify Permissions on Files with Local Account Information and CredentialsgroupThe default restrictive permissions for files which act as
important security databases such as |
contains 12 rules |
Verify User Who Owns shadow Filerule
To properly set the owner of $ sudo chown root /etc/shadowRationale: The identifiers: CCE-26947-2, DISA FSO RHEL-06-000033 references: AC-6, 225, Test attestation on 20121026 by DS Remediation script:
|
Verify Group Who Owns shadow Filerule
To properly set the group owner of $ sudo chgrp root /etc/shadowRationale: The identifiers: CCE-26967-0, DISA FSO RHEL-06-000034 references: AC-6, 225, Test attestation on 20121026 by DS Remediation script:
|
Verify Permissions on shadow Filerule
To properly set the permissions of $ sudo chmod 0000 /etc/shadowRationale: The identifiers: CCE-26992-8, DISA FSO RHEL-06-000035 references: AC-6, 225, Test attestation on 20121026 by DS Remediation script:
|
Verify User Who Owns group Filerule
To properly set the owner of $ sudo chown root /etc/groupRationale: The identifiers: CCE-26822-7, DISA FSO RHEL-06-000042 references: AC-6, Test attestation on 20121026 by DS Remediation script:
|
Verify Group Who Owns group Filerule
To properly set the group owner of $ sudo chgrp root /etc/groupRationale: The identifiers: CCE-26930-8, DISA FSO RHEL-06-000043 references: AC-6, 225, Test attestation on 20121026 by DS Remediation script:
|
Verify Permissions on group Filerule
To properly set the permissions of $ sudo chmod 644 /etc/groupRationale: The identifiers: CCE-26954-8, DISA FSO RHEL-06-000044 references: AC-6, 225, Test attestation on 20121026 by DS Remediation script:
|
Verify User Who Owns gshadow Filerule
To properly set the owner of $ sudo chown root /etc/gshadowRationale: The identifiers: CCE-27026-4, DISA FSO RHEL-06-000036 references: AC-6, 225, Test attestation on 20121026 by DS Remediation script:
|
Verify Group Who Owns gshadow Filerule
To properly set the group owner of $ sudo chgrp root /etc/gshadowRationale: The identifiers: CCE-26975-3, DISA FSO RHEL-06-000037 references: AC-6, 225, Test attestation on 20121026 by DS Remediation script:
|
Verify Permissions on gshadow Filerule
To properly set the permissions of $ sudo chmod 0000 /etc/gshadowRationale: The identifiers: CCE-26951-4, DISA FSO RHEL-06-000038 references: AC-6, 225, Test attestation on 20121026 by DS Remediation script:
|
Verify User Who Owns passwd Filerule
To properly set the owner of $ sudo chown root /etc/passwdRationale: The identifiers: CCE-26953-0, DISA FSO RHEL-06-000039 references: AC-6, 225, Test attestation on 20121026 by DS Remediation script:
|
Verify Group Who Owns passwd Filerule
To properly set the group owner of $ sudo chgrp root /etc/passwdRationale: The identifiers: CCE-26856-5, DISA FSO RHEL-06-000040 references: AC-6, 225, Test attestation on 20121026 by DS Remediation script:
|
Verify Permissions on passwd Filerule
To properly set the permissions of $ sudo chmod 0644 /etc/passwdRationale: If the identifiers: CCE-26868-0, DISA FSO RHEL-06-000041 references: AC-6, 225, Test attestation on 20121026 by DS Remediation script:
|
Verify that All World-Writable Directories Have Sticky Bits SetruleWhen 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.
$ sudo chmod +t DIRRationale:
Failing to set the sticky bit on public directories allows unauthorized users to delete files in the directory structure.
identifiers: CCE-26840-9, DISA FSO RHEL-06-000336 references: AC-6, Test attestation on 20120929 by swells Remediation script:
|
Ensure No World-Writable Files ExistruleIt is generally a good idea to remove global (other) write access to a file when it is discovered. However, check with documentation for specific applications before making changes. Also, monitor for recurring world-writable files, as these may be symptoms of a misconfigured application or user account. Rationale:Data in world-writable files can be modified by any user on the system. In almost all circumstances, files can be configured using a combination of user and group permissions to support whatever legitimate access is needed without the risk caused by world-writable files. identifiers: CCE-26910-0, DISA FSO RHEL-06-000282 references: AC-6 |
Ensure All SGID Executables Are AuthorizedruleThe SGID (set group id) bit should be set only on files that were installed via authorized means. A straightforward means of identifying unauthorized SGID files is determine if any were not installed as part of an RPM package, which is cryptographically verified. Investigate the origin of any unpackaged SGID files. Rationale:Executable files with the SGID permission run with the privileges of the owner of the file. SGID files of uncertain provenance could allow for unprivileged users to elevate privileges. The presence of these files should be strictly controlled on the system. identifiers: CCE-26769-0 references: http://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-53r4.pdf |
Ensure All SUID Executables Are AuthorizedruleThe SUID (set user id) bit should be set only on files that were installed via authorized means. A straightforward means of identifying unauthorized SGID files is determine if any were not installed as part of an RPM package, which is cryptographically verified. Investigate the origin of any unpackaged SUID files. Rationale:Executable files with the SUID permission run with the privileges of the owner of the file. SUID files of uncertain provenance could allow for unprivileged users to elevate privileges. The presence of these files should be strictly controlled on the system. identifiers: CCE-26497-8 references: AC-6(1) |
Ensure All Files Are Owned by a UserruleIf any files are not owned by a user, then the cause of their lack of ownership should be investigated. Following this, the files should be deleted or assigned to an appropriate user. Rationale:Unowned files do not directly imply a security problem, but they are generally a sign that something is amiss. They may be caused by an intruder, by incorrect software installation or draft software removal, or by failure to remove all files belonging to a deleted account. The files should be repaired so they will not cause problems when accounts are created in the future, and the cause should be discovered and addressed. identifiers: CCE-27032-2 |
Ensure All Files Are Owned by a GroupruleIf any files are not owned by a group, then the cause of their lack of group-ownership should be investigated. Following this, the files should be deleted or assigned to an appropriate group. Rationale:Unowned files do not directly imply a security problem, but they are generally a sign that something is amiss. They may be caused by an intruder, by incorrect software installation or draft software removal, or by failure to remove all files belonging to a deleted account. The files should be repaired so they will not cause problems when accounts are created in the future, and the cause should be discovered and addressed. identifiers: CCE-26872-2 |
Ensure All World-Writable Directories Are Owned by a System AccountruleAll directories in local partitions which are world-writable should be owned by root or another system account. If any world-writable directories are not owned by a system account, this should be investigated. Following this, the files should be deleted or assigned to an appropriate group. Rationale:Allowing a user account to own a world-writable directory is undesirable because it allows the owner of that directory to remove or replace any files that may be placed in the directory by other users. identifiers: CCE-26642-9, DISA FSO RHEL-06-000337 references: AC-6, Test attestation on 20120929 by swells |
Restrict Programs from Dangerous Execution PatternsgroupThe recommendations in this section are designed to ensure that the system's features to protect against potentially dangerous program execution are activated. These protections are applied at the system initialization or kernel level, and defend against certain types of badly-configured or compromised programs. |
contains 6 rules |
Daemon UmaskgroupThe umask is a per-process setting which limits the default permissions for creation of new files and directories. The system includes initialization scripts which set the default umask for system daemons. |
contains 1 rule |
Set Daemon UmaskruleThe file umask 027Setting 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. Rationale: 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. identifiers: CCE-27031-4, DISA FSO RHEL-06-000346 references: AC-6, Test attestation on 20140912 by JL Remediation script:
|
Disable Core DumpsgroupA core dump file is the memory image of an executable
program when it was terminated by the operating system due to
errant behavior. In most cases, only software developers
legitimately need to access these files. The core dump files may
also contain sensitive information, or unnecessarily occupy large
amounts of disk space.
|
contains 2 rules |
Disable Core Dumps for All UsersruleTo disable core dumps for all users, add the following line to
* hard core 0Rationale: 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. identifiers: CCE-27033-0, DISA FSO RHEL-06-000308 references: SC-5 Remediation script:
|
Disable Core Dumps for SUID programsrule
To set the runtime status of the $ sudo sysctl -w fs.suid_dumpable=0If this is not the system's default value, add the following line to /etc/sysctl.conf :
fs.suid_dumpable = 0Rationale: 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. identifiers: CCE-27044-7 references: SI-11 Remediation script:
|
Enable ExecShieldgroupExecShield describes kernel features that provide
protection against exploitation of memory corruption errors such as buffer
overflows. These features include random placement of the stack and other
memory regions, prevention of execution in memory that should only hold data,
and special handling of text buffers. These protections are enabled by default and
controlled through |
contains 2 rules |
Enable ExecShieldrule
To set the runtime status of the $ sudo sysctl -w kernel.exec-shield=1If this is not the system's default value, add the following line to /etc/sysctl.conf :
kernel.exec-shield = 1Rationale: 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. identifiers: CCE-27007-4, DISA FSO RHEL-06-000079 references: http://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-53r4.pdf, Test attestation on 20121024 by DS Remediation script:
|
Enable Randomized Layout of Virtual Address Spacerule
To set the runtime status of the $ sudo sysctl -w kernel.randomize_va_space=2If this is not the system's default value, add the following line to /etc/sysctl.conf :
kernel.randomize_va_space = 2Rationale: 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. identifiers: CCE-26999-3, DISA FSO RHEL-06-000078 references: http://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-53r4.pdf, Test attestation on 20121024 by DS Remediation script:
|
Enable Execute Disable (XD) or No Execute (NX) Support on x86 SystemsgroupRecent 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. |
contains 1 rule |
Install PAE Kernel on Supported 32-bit x86 SystemsruleSystems that are using the 64-bit x86 kernel package do not need to install the kernel-PAE package because the 64-bit x86 kernel already includes this support. However, if the system is 32-bit and also supports the PAE and NX features as determined in the previous section, the kernel-PAE package should be installed to enable XD or NX support: $ sudo yum install kernel-PAEThe installation process should also have configured the bootloader to load the new kernel at boot. Verify this at reboot and modify /etc/grub.conf if necessary.warning
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. identifiers: CCE-27010-8 references: http://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-53r4.pdf |
SELinuxgroupSELinux 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.
|
contains 5 rules |
Ensure SELinux Not Disabled in /etc/grub.confruleSELinux can be disabled at boot time by an argument in
Disabling a major host protection feature, such as SELinux, at boot time prevents it from confining system services at boot time. Further, it increases the chances that it will remain off during system operation. identifiers: CCE-26956-3, DISA FSO RHEL-06-000017 references: AC-3, AC-3(3), AC-6, AU-9, 22, 32, Test attestation on 20121024 by DS Remediation script:
|
Ensure SELinux State is EnforcingruleThe SELinux state should be set to SELINUX=enforcingRationale: 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. identifiers: CCE-26969-6, DISA FSO RHEL-06-000020 references: AC-3, AC-3(3), AC-4, AC-6, AU-9, 22, 32, 26, Test attestation on 20121024 by DS Remediation script:
|
Configure SELinux PolicyruleThe SELinux SELINUXTYPE=targetedOther policies, such as mls , provide additional security labeling
and greater confinement but are not compatible with many general-purpose
use cases.
Rationale:
Setting the SELinux policy to identifiers: CCE-26875-5, DISA FSO RHEL-06-000023 references: AC-3, AC-3(3), AC-4, AC-6, AU-9, 22, 32, Test attestation on 20121024 by DS Remediation script:
|
Ensure No Daemons are Unconfined by SELinuxrule
Daemons for which the SELinux policy does not contain rules will inherit the
context of the parent process. Because daemons are launched during
startup and descend from the $ sudo ps -eZ | egrep "initrc" | egrep -vw "tr|ps|egrep|bash|awk" | tr ':' ' ' | awk '{ print $NF }'It should produce no output in a well-configured system. Rationale:
Daemons which run with the identifiers: CCE-27111-4 |
Ensure No Device Files are Unlabeled by SELinuxruleDevice files, which are used for communication with important
system resources, should be labeled with proper SELinux types. If any device
files carry the SELinux type
If a device file carries the SELinux type identifiers: CCE-26774-0, DISA FSO RHEL-06-000025 references: AC-6, AU-9, CM-7, 22, 32, Test attestation on 20121024 by DS |
Account and Access ControlgroupIn traditional Unix security, if an attacker gains shell access to a certain login account, they can perform any action or access any file to which that account has access. Therefore, making it more difficult for unauthorized people to gain shell access to accounts, particularly to privileged accounts, is a necessary part of securing a system. This section introduces mechanisms for restricting access to accounts under RHEL 6. |
contains 37 rules |
Protect Accounts by Restricting Password-Based LogingroupConventionally, Unix shell accounts are accessed by
providing a username and password to a login program, which tests
these values for correctness using the |
contains 9 rules |
Restrict Root Loginsgroup
Direct root logins should be allowed only for emergency use.
In normal situations, the administrator should access the system
via a unique unprivileged account, and then use |
contains 3 rules |
Restrict Virtual Console Root Loginsrule
To restrict root logins through the (deprecated) virtual console devices,
ensure lines of this form do not appear in vc/1 vc/2 vc/3 vc/4Rationale: Preventing direct root login to virtual console devices helps ensure accountability for actions taken on the system using the root account. identifiers: CCE-26855-7, DISA FSO RHEL-06-000027 references: AC-6(2), 770, Test attestation on 20121024 by DS Remediation script:
|
Restrict Serial Port Root LoginsruleTo restrict root logins on serial ports,
ensure lines of this form do not appear in ttyS0 ttyS1Rationale: Preventing direct root login to serial port interfaces helps ensure accountability for actions taken on the systems using the root account. identifiers: CCE-27047-0, DISA FSO RHEL-06-000028 references: AC-6(2), 770, Test attestation on 20121024 by DS |
Verify Only Root Has UID 0ruleIf any account other than root has a UID of 0, this misconfiguration should be investigated and the accounts other than root should be removed or have their UID changed. Rationale:An account has root authority if it has a UID of 0. Multiple accounts with a UID of 0 afford more opportunity for potential intruders to guess a password for a privileged account. Proper configuration of sudo is recommended to afford multiple system administrators access to root privileges in an accountable manner. identifiers: CCE-26971-2, DISA FSO RHEL-06-000032 references: AC-6, IA-2(1), 366, Test attestation on 20121024 by DS Remediation script:
|
Verify Proper Storage and Existence of Password Hashesgroup
By default, password hashes for local accounts are stored
in the second field (colon-separated) in
|
contains 2 rules |
Prevent Log In to Accounts With Empty PasswordruleIf an account is configured for password authentication
but does not have an assigned password, it may be possible to log
onto the account without authentication. Remove any instances of the If an account has an empty password, anyone could log in and run commands with the privileges of that account. Accounts with empty passwords should never be used in operational environments. identifiers: CCE-27038-9, DISA FSO RHEL-06-000030 references: IA-5(b), IA-5(c), IA-5(1)(a), Test attestation on 20121024 by DS Remediation script:
|
Verify All Account Password Hashes are Shadowedrule
If any password hashes are stored in
The hashes for all user account passwords should be stored in
the file identifiers: CCE-26476-2, DISA FSO RHEL-06-000031 references: IA-5(h), 201, Test attestation on 20121024 by DS |
Set Password Expiration ParametersgroupThe file $ sudo chage -M 180 -m 7 -W 7 USER |
contains 3 rules |
Set Password Minimum Length in login.defsruleTo specify password length requirements for new accounts,
edit the file PASS_MIN_LEN 12 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.
Rationale: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. identifiers: CCE-27002-5, DISA FSO RHEL-06-000050 references: IA-5(f), IA-5(1)(a), 205, Test attestation on 20121026 by DS Remediation script:
|
Set Password Maximum AgeruleTo specify password maximum age for new accounts,
edit the file PASS_MAX_DAYS 60A value of 180 days is sufficient for many environments. The DoD requirement is 60. Rationale: 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. identifiers: CCE-26985-2, DISA FSO RHEL-06-000053 references: IA-5(f), IA-5(g), IA-5(1)(d), 180, 199, 76, Test attestation on 20121026 by DS Remediation script:
|
Set Password Warning AgeruleTo specify how many days prior to password
expiration that a warning will be issued to users,
edit the file PASS_WARN_AGE 14The DoD requirement is 7. Rationale: Setting the password warning age enables users to make the change at a practical time. identifiers: CCE-26988-6, DISA FSO RHEL-06-000054 references: AC-2(2), IA-5(f), Test attestation on 20121026 by DS Remediation script:
|
Set Account Expiration ParametersgroupAccounts can be configured to be automatically disabled
after a certain time period,
meaning that they will require administrator interaction to become usable again.
Expiration of accounts after inactivity can be set for all accounts by default
and also on a per-account basis, such as for accounts that are known to be temporary.
To configure automatic expiration of an account following
the expiration of its password (that is, after the password has expired and not been changed),
run the following command, substituting $ sudo chage -I NUM_DAYS USERAccounts, 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.
|
contains 1 rule |
Set Account Expiration Following InactivityruleTo 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 INACTIVE=NUM_DAYSA 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.
Rationale:Disabling inactive accounts ensures that accounts which may not have been responsibly removed are not available to attackers who may have compromised their credentials. identifiers: CCE-27283-1, DISA FSO RHEL-06-000334 references: AC-2(2), AC-2(3), 16, 17, 795 Remediation script:
|
Protect Accounts by Configuring PAMgroupPAM, or Pluggable Authentication Modules, is a system
which implements modular authentication for Linux programs. PAM provides
a flexible and configurable architecture for authentication, and it should be configured
to minimize exposure to unnecessary risk. This section contains
guidance on how to accomplish that.
warning
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. warning
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. |
contains 10 rules |
Set Password Quality RequirementsgroupThe default |
contains 6 rules |
Set Password Quality Requirements, if using pam_cracklibgroupThe password requisite pam_cracklib.so try_first_pass retry=3and then alter it to read: password required pam_cracklib.so try_first_pass retry=3 maxrepeat=3 minlen=14 dcredit=-1 ucredit=-1 ocredit=-1 lcredit=-1 difok=4If 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.
warning
Note that the password quality
requirements are not enforced for the root account for some
reason. |
contains 6 rules |
Set Password Retry Prompts Permitted Per-SessionruleTo configure the number of retry prompts that are permitted per-session:
Setting the password retry prompts that are permitted on a per-session basis to a low value requires some software, such as SSH, to re-connect. This can slow down and draw additional attention to some types of password-guessing attacks. Note that this is different from account lockout, which is provided by the pam_faillock module. identifiers: CCE-27123-9 references: IA-5(c), 1092, Test attestation on 20121024 by DS |
Set Password Strength Minimum Digit CharactersruleThe pam_cracklib module's Requiring digits makes password guessing attacks more difficult by ensuring a larger search space. identifiers: CCE-26374-9, DISA FSO RHEL-06-000056 references: IA-5(b), IA-5(c), 194, 194, Test attestation on 20121024 by DS Remediation script:
|
Set Password Strength Minimum Uppercase CharactersruleThe pam_cracklib module's Requiring a minimum number of uppercase characters makes password guessing attacks more difficult by ensuring a larger search space. identifiers: CCE-26601-5, DISA FSO RHEL-06-000057 references: IA-5(b), IA-5(c), IA-5(1)(a), 192, Test attestation on 20121024 by DS Remediation script:
|
Set Password Strength Minimum Special CharactersruleThe pam_cracklib module's Requiring a minimum number of special characters makes password guessing attacks more difficult by ensuring a larger search space. identifiers: CCE-26409-3, DISA FSO RHEL-06-000058 references: IA-5(b), IA-5(c), IA-5(1)(a), 1619, 266, Test attestation on 20121024 by DS Remediation script:
|
Set Password Strength Minimum Lowercase CharactersruleThe pam_cracklib module's Requiring a minimum number of lowercase characters makes password guessing attacks more difficult by ensuring a larger search space. identifiers: CCE-26631-2, DISA FSO RHEL-06-000059 references: IA-5(b), IA-5(c), IA-5(1)(a), 193, Test attestation on 20121024 by DS Remediation script:
|
Set Password Strength Minimum Different CharactersruleThe pam_cracklib module's Requiring a minimum number of different characters during password changes ensures that newly changed passwords should not resemble previously compromised ones. Note that passwords which are changed on compromised systems will still be compromised, however. identifiers: CCE-26615-5, DISA FSO RHEL-06-000060 references: IA-5(b), IA-5(c), IA-5(1)(b), 195, Test attestation on 20121024 by DS Remediation script:
|
Set Lockouts for Failed Password AttemptsgroupThe warning
Locking out user accounts presents the
risk of a denial-of-service attack. The lockout policy
must weigh whether the risk of such a
denial-of-service attack outweighs the benefits of thwarting
password guessing attacks. |
contains 2 rules |
Set Deny For Failed Password Attemptsrule
To configure the system to lock out accounts after a number of incorrect login
attempts using
Locking out user accounts after a number of incorrect attempts prevents direct password guessing attacks. identifiers: CCE-26844-1, DISA FSO RHEL-06-000061 Remediation script:
|
Limit Password ReuseruleDo not allow users to reuse recent passwords. This can
be accomplished by using the password sufficient pam_unix.so existing_options remember=24The DoD STIG requirement is 5 passwords.Rationale: Preventing re-use of previous passwords helps ensure that a compromised password is not re-used by a user. identifiers: CCE-26741-9, DISA FSO RHEL-06-000274 references: IA-5(f), IA-5(1)(e), 200, Test attestation on 20121024 by DS Remediation script:
|
Set Password Hashing AlgorithmgroupThe system's default algorithm for storing password hashes in
|
contains 2 rules |
Set Password Hashing Algorithm in /etc/pam.d/system-authrule
In password sufficient pam_unix.so sha512 other arguments...This will help ensure when local users change their passwords, hashes for the new passwords will be generated using the SHA-512 algorithm. This is the default. Rationale: Using a stronger hashing algorithm makes password cracking attacks more difficult. identifiers: CCE-26303-8, DISA FSO RHEL-06-000062 references: IA-5(b), IA-5(c), IA-5(1)(c), IA-7, 803, Test attestation on 20121024 by DS Remediation script:
|
Set Password Hashing Algorithm in /etc/login.defsrule
In ENCRYPT_METHOD SHA512Rationale: Using a stronger hashing algorithm makes password cracking attacks more difficult. identifiers: CCE-27228-6, DISA FSO RHEL-06-000063 references: IA-5(b), IA-5(c), IA-5(1)(c), IA-7, 803, Test attestation on 20121024 by DS Remediation script:
|
Secure Session Configuration Files for Login AccountsgroupWhen a user logs into a Unix account, the system configures the user's session by reading a number of files. Many of these files are located in the user's home directory, and may have weak permissions as a result of user error or misconfiguration. If an attacker can modify or even read certain types of account configuration information, they can often gain full access to the affected user's account. Therefore, it is important to test and correct configuration file permissions for interactive accounts, particularly those of privileged users such as root or system administrators. |
contains 7 rules |
Ensure that No Dangerous Directories Exist in Root's PathgroupThe active path of the root account can be obtained by starting a new root shell and running: $ sudo echo $PATHThis 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. |
contains 2 rules |
Ensure that Root's Path Does Not Include Relative Paths or Null Directoriesrule
Ensure that none of the directories in root's path is equal to a single
PATH=:/bin PATH=/bin: PATH=/bin::/sbinThese empty elements have the same effect as a single . character.
Rationale:Including these entries increases the risk that root could execute code from an untrusted location. identifiers: CCE-26826-8 references: http://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-53r4.pdf |
Ensure that Root's Path Does Not Include World or Group-Writable DirectoriesruleFor each element in root's path, run: $ sudo ls -ld DIRand ensure that write permissions are disabled for group and other. Rationale: Such entries increase the risk that root could execute code provided by unprivileged users, and potentially malicious code. identifiers: CCE-26768-2 references: http://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-53r4.pdf |
Ensure that Users Have Sensible Umask Valuesgroup
The umask setting controls the default permissions
for the creation of new files.
With a default |
contains 4 rules |
Ensure the Default Bash Umask is Set Correctlyrule
To ensure the default umask for users of the Bash shell is set properly,
add or correct the umask 077Rationale: 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. identifiers: CCE-26917-5, DISA FSO RHEL-06-000342 references: SA-8, 366, Test attestation on 20140912 by JL Remediation script:
|
Ensure the Default C Shell Umask is Set Correctlyrule
To ensure the default umask for users of the C shell is set properly,
add or correct the umask 077Rationale: 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. identifiers: CCE-27034-8, DISA FSO RHEL-06-000343 references: SA-8, 366, Test attestation on 20140912 by JL Remediation script:
|
Ensure the Default Umask is Set Correctly in /etc/profilerule
To ensure the default umask controlled by umask 077Rationale: 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. identifiers: CCE-26669-2, DISA FSO RHEL-06-000344 references: SA-8, 366, Test attestation on 20120929 by swells Remediation script:
|
Ensure the Default Umask is Set Correctly in login.defsrule
To ensure the default umask controlled by UMASK 077Rationale: 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. identifiers: CCE-26371-5, DISA FSO RHEL-06-000345 references: SA-8, 366, Test attestation on 20140912 by JL Remediation script:
|
Ensure that User Home Directories are not Group-Writable or World-ReadableruleFor each human user of the system, view the permissions of the user's home directory: $ sudo ls -ld /home/USEREnsure that the directory is not group-writable and that it is not world-readable. If necessary, repair the permissions: $ sudo chmod g-w /home/USER $ sudo chmod o-rwx /home/USER warning
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. identifiers: CCE-26981-1 references: AC-6 |
Protect Physical Console AccessgroupIt 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. |
contains 9 rules |
Set Boot Loader PasswordgroupDuring the boot process, the boot loader is responsible for starting the execution of the kernel and passing options to it. The boot loader allows for the selection of different kernels - possibly on different partitions or media. The default RHEL boot loader for x86 systems is called GRUB. Options it can pass to the kernel include single-user mode, which provides root access without any authentication, and the ability to disable SELinux. To prevent local users from modifying the boot parameters and endangering security, protect the boot loader configuration with a password and ensure its configuration file's permissions are set properly. |
contains 4 rules |
Verify /etc/grub.conf User OwnershipruleThe file $ sudo chown root /etc/grub.confRationale: Only root should be able to modify important boot parameters. identifiers: CCE-26995-1, DISA FSO RHEL-06-000065 references: http://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-53r4.pdf, 225, Test attestation on 20121026 by DS Remediation script:
|
Verify /etc/grub.conf Group OwnershipruleThe file $ sudo chgrp root /etc/grub.confRationale:
The identifiers: CCE-27022-3, DISA FSO RHEL-06-000066 references: http://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-53r4.pdf, 225, Test attestation on 20121026 by DS Remediation script:
|
Verify /boot/grub/grub.conf PermissionsruleFile permissions for $ sudo chmod 600 /boot/grub/grub.confRationale: Proper permissions ensure that only the root user can modify important boot parameters. identifiers: CCE-26949-8, DISA FSO RHEL-06-000067 references: http://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-53r4.pdf, 225, Test attestation on 20121026 by DS Remediation script:
|
Set Boot Loader PasswordruleThe grub boot loader should have password protection enabled to protect boot-time settings. To do so, select a password and then generate a hash from it by running the following command: $ grub-crypt --sha-512When prompted to enter a password, insert the following line into /etc/grub.conf
immediately after the header comments. (Use the output from grub-crypt as the
value of password-hash):
password --encrypted password-hashNOTE: To meet FISMA Moderate, the bootloader password MUST differ from the root password. Rationale: 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. identifiers: CCE-26911-8, DISA FSO RHEL-06-000068 references: IA-2(1), IA-5(e) AC-3, 213, Test attestation on 20121026 by DS |
Configure Screen LockinggroupWhen a user must temporarily leave an account
logged-in, screen locking should be employed to prevent passersby
from abusing the account. User education and training is
particularly important for screen locking to be effective, and policies
can be implemented to reinforce this.
|
contains 4 rules |
Configure GUI Screen LockinggroupIn the default GNOME desktop, the screen can be locked
by choosing Lock Screen from the System menu.
|
contains 4 rules |
Set GNOME Login Inactivity TimeoutruleRun the following command to set the idle time-out value for inactivity in the GNOME desktop to 15 minutes: $ sudo gconftool-2 \ --direct \ --config-source xml:readwrite:/etc/gconf/gconf.xml.mandatory \ --type int \ --set /desktop/gnome/session/idle_delay 15Rationale: Setting the idle delay controls when the screensaver will start, and can be combined with screen locking to prevent access from passersby. identifiers: CCE-26828-4, DISA FSO RHEL-06-000257 Remediation script:
|
GNOME Desktop Screensaver Mandatory UseruleRun the following command to activate the screensaver in the GNOME desktop after a period of inactivity: $ sudo gconftool-2 --direct \ --config-source xml:readwrite:/etc/gconf/gconf.xml.mandatory \ --type bool \ --set /apps/gnome-screensaver/idle_activation_enabled trueRationale: Enabling idle activation of the screensaver ensures the screensaver will be activated after the idle delay. Applications requiring continuous, real-time screen display (such as network management products) require the login session does not have administrator rights and the display station is located in a controlled-access area. identifiers: CCE-26600-7, DISA FSO RHEL-06-000258 Remediation script:
|
Enable Screen Lock Activation After Idle PeriodruleRun the following command to activate locking of the screensaver in the GNOME desktop when it is activated: $ sudo gconftool-2 --direct \ --config-source xml:readwrite:/etc/gconf/gconf.xml.mandatory \ --type bool \ --set /apps/gnome-screensaver/lock_enabled trueRationale: 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. identifiers: CCE-26235-2, DISA FSO RHEL-06-000259 Remediation script:
|
Implement Blank ScreensaverruleRun the following command to set the screensaver mode in the GNOME desktop to a blank screen: $ sudo gconftool-2 --direct \ --config-source xml:readwrite:/etc/gconf/gconf.xml.mandatory \ --type string \ --set /apps/gnome-screensaver/mode blank-onlyRationale: Setting the screensaver mode to blank-only conceals the contents of the display from passersby. identifiers: CCE-26638-7, DISA FSO RHEL-06-000260 Remediation script:
|
Disable Interactive Bootrule
To disable the ability for users to perform interactive startups,
edit the file PROMPT=noThe 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.
Rationale:Using interactive boot, the console user could disable auditing, firewalls, or other services, weakening system security. identifiers: CCE-27043-9, DISA FSO RHEL-06-000070 references: SC-2, AC-3, 213, Test attestation on 20121024 by DS Remediation script:
|
Warning Banners for System AccessesgroupEach system should expose as little information about
itself as possible.
|
contains 2 rules |
Implement a GUI Warning BannergroupIn the default graphical environment, users logging directly into the system are greeted with a login screen provided by the GNOME Display Manager (GDM). The warning banner should be displayed in this graphical environment for these users. The following sections describe how to configure the GDM login banner. |
contains 1 rule |
Enable GUI Warning BannerruleTo enable displaying a login warning banner in the GNOME Display Manager's login screen, run the following command: $ sudo gconftool-2 --direct \ --config-source xml:readwrite:/etc/gconf/gconf.xml.mandatory \ --type bool \ --set /apps/gdm/simple-greeter/banner_message_enable trueTo display a banner, this setting must be enabled and then banner text must also be set. Rationale: An appropriate warning message reinforces policy awareness during the login process and facilitates possible legal action against attackers. identifiers: CCE-27195-7, DISA FSO RHEL-06-000324 references: AC-8(a), AC-8(b), AC-8(c), 48, 50 Remediation script:
|
Modify the System Login Bannerrule
To configure the system login banner:
An appropriate warning message reinforces policy awareness during the login process and facilitates possible legal action against attackers. identifiers: CCE-26974-6, DISA FSO RHEL-06-000073 references: AC-8(a), AC-8(b), AC-8(c), 48, 1384, 1385, 1386, 1387, 1388, Test attestation on 20121026 by DS Remediation script:
|
Network Configuration and FirewallsgroupMost machines must be connected to a network of some
sort, and this brings with it the substantial risk of network
attack. This section discusses the security impact of decisions
about networking which must be made when configuring a system.
|
contains 31 rules |
Kernel Parameters Which Affect NetworkinggroupThe |
contains 14 rules |
Network Parameters for Hosts OnlygroupIf the system is not going to be used as a router, then setting certain kernel parameters ensure that the host will not perform routing of network traffic. |
contains 3 rules |
Disable Kernel Parameter for Sending ICMP Redirects by Defaultrule
To set the runtime status of the $ sudo sysctl -w net.ipv4.conf.default.send_redirects=0If this is not the system's default value, add the following line to /etc/sysctl.conf :
net.ipv4.conf.default.send_redirects = 0Rationale: 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. identifiers: CCE-27001-7, DISA FSO RHEL-06-000080 references: AC-4, CM-7, SC-5, SC-7, 1551, Test attestation on 20121024 by DS Remediation script:
|
Disable Kernel Parameter for Sending ICMP Redirects for All Interfacesrule
To set the runtime status of the $ sudo sysctl -w net.ipv4.conf.all.send_redirects=0If this is not the system's default value, add the following line to /etc/sysctl.conf :
net.ipv4.conf.all.send_redirects = 0Rationale: 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. identifiers: CCE-27004-1, DISA FSO RHEL-06-000081 references: CM-7, SC-5(1), 1551, Test attestation on 20121024 by DS Remediation script:
|
Disable Kernel Parameter for IP Forwardingrule
To set the runtime status of the $ sudo sysctl -w net.ipv4.ip_forward=0If this is not the system's default value, add the following line to /etc/sysctl.conf :
net.ipv4.ip_forward = 0Rationale: 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. identifiers: CCE-26866-4, DISA FSO RHEL-06-000082 references: CM-7, SC-5, 366, Test attestation on 20121024 by DS |
Network Related Kernel Runtime Parameters for Hosts and RoutersgroupCertain 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. |
contains 11 rules |
Disable Kernel Parameter for Accepting ICMP Redirects for All Interfacesrule
To set the runtime status of the $ sudo sysctl -w net.ipv4.conf.all.accept_redirects=0If this is not the system's default value, add the following line to /etc/sysctl.conf :
net.ipv4.conf.all.accept_redirects = 0Rationale: Accepting ICMP redirects has few legitimate uses. It should be disabled unless it is absolutely required. identifiers: CCE-27027-2, DISA FSO RHEL-06-000084 references: CM-7, SC-5, 1503, 1551, Test attestation on 20121024 by DS Remediation script:
|
Disable Kernel Parameter for Accepting Secure Redirects for All Interfacesrule
To set the runtime status of the $ sudo sysctl -w net.ipv4.conf.all.secure_redirects=0If this is not the system's default value, add the following line to /etc/sysctl.conf :
net.ipv4.conf.all.secure_redirects = 0Rationale: Accepting "secure" ICMP redirects (from those gateways listed as default gateways) has few legitimate uses. It should be disabled unless it is absolutely required. identifiers: CCE-26854-0, DISA FSO RHEL-06-000086 references: AC-4, CM-7, SC-5, 1503, 1551, Test attestation on 20121024 by DS Remediation script:
|
Enable Kernel Parameter to Log Martian Packetsrule
To set the runtime status of the $ sudo sysctl -w net.ipv4.conf.all.log_martians=1If this is not the system's default value, add the following line to /etc/sysctl.conf :
net.ipv4.conf.all.log_martians = 1Rationale: 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. identifiers: CCE-27066-0, DISA FSO RHEL-06-000088 references: AC-3(10), CM-7, SC-5(3), 126, Test attestation on 20121024 by DS Remediation script:
|
Disable Kernel Parameter for Accepting Source-Routed Packets By Defaultrule
To set the runtime status of the $ sudo sysctl -w net.ipv4.conf.default.accept_source_route=0If this is not the system's default value, add the following line to /etc/sysctl.conf :
net.ipv4.conf.default.accept_source_route = 0Rationale: Accepting source-routed packets in the IPv4 protocol has few legitimate uses. It should be disabled unless it is absolutely required. identifiers: CCE-26983-7, DISA FSO RHEL-06-000089 references: AC-4, CM-7, SC-5, SC-7, 1551, Test attestation on 20121024 by DS Remediation script:
|
Disable Kernel Parameter for Accepting ICMP Redirects By Defaultrule
To set the runtime status of the $ sudo sysctl -w net.ipv4.conf.default.accept_redirects=0If this is not the system's default value, add the following line to /etc/sysctl.conf :
net.ipv4.conf.default.accept_redirects = 0Rationale: This feature of the IPv4 protocol has few legitimate uses. It should be disabled unless it is absolutely required. identifiers: CCE-27015-7, DISA FSO RHEL-06-000091 references: AC-4, CM-7, SC-5, SC-7, 1551, Test attestation on 20121024 by DS Remediation script:
|
Disable Kernel Parameter for Accepting Secure Redirects By Defaultrule
To set the runtime status of the $ sudo sysctl -w net.ipv4.conf.default.secure_redirects=0If this is not the system's default value, add the following line to /etc/sysctl.conf :
net.ipv4.conf.default.secure_redirects = 0Rationale: Accepting "secure" ICMP redirects (from those gateways listed as default gateways) has few legitimate uses. It should be disabled unless it is absolutely required. identifiers: CCE-26831-8, DISA FSO RHEL-06-000090 references: AC-4, CM-7, SC-5, SC-7, 1551, Test attestation on 20121024 by DS Remediation script:
|
Enable Kernel Parameter to Ignore ICMP Broadcast Echo Requestsrule
To set the runtime status of the $ sudo sysctl -w net.ipv4.icmp_echo_ignore_broadcasts=1If this is not the system's default value, add the following line to /etc/sysctl.conf :
net.ipv4.icmp_echo_ignore_broadcasts = 1Rationale: Ignoring ICMP echo requests (pings) sent to broadcast or multicast addresses makes the system slightly more difficult to enumerate on the network. identifiers: CCE-26883-9, DISA FSO RHEL-06-000092 references: CM-7, SC-5, 1551, Test attestation on 20121024 by DS Remediation script:
|
Enable Kernel Parameter to Ignore Bogus ICMP Error Responsesrule
To set the runtime status of the $ sudo sysctl -w net.ipv4.icmp_ignore_bogus_error_responses=1If this is not the system's default value, add the following line to /etc/sysctl.conf :
net.ipv4.icmp_ignore_bogus_error_responses = 1Rationale: Ignoring bogus ICMP error responses reduces log size, although some activity would not be logged. identifiers: CCE-26993-6, DISA FSO RHEL-06-000093 references: CM-7, SC-5, Test attestation on 20121024 by DS Remediation script:
|
Enable Kernel Parameter to Use TCP Syncookiesrule
To set the runtime status of the $ sudo sysctl -w net.ipv4.tcp_syncookies=1If this is not the system's default value, add the following line to /etc/sysctl.conf :
net.ipv4.tcp_syncookies = 1Rationale: 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. identifiers: CCE-27053-8, DISA FSO RHEL-06-000095 references: AC-4, SC-5(2), SC-5(3), 1092, 1095, Test attestation on 20121024 by DS Remediation script:
|
Enable Kernel Parameter to Use Reverse Path Filtering for All Interfacesrule
To set the runtime status of the $ sudo sysctl -w net.ipv4.conf.all.rp_filter=1If this is not the system's default value, add the following line to /etc/sysctl.conf :
net.ipv4.conf.all.rp_filter = 1Rationale: 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. identifiers: CCE-26979-5, DISA FSO RHEL-06-000096 references: AC-4, SC-5, SC-7, 1551, Test attestation on 20121024 by DS Remediation script:
|
Enable Kernel Parameter to Use Reverse Path Filtering by Defaultrule
To set the runtime status of the $ sudo sysctl -w net.ipv4.conf.default.rp_filter=1If this is not the system's default value, add the following line to /etc/sysctl.conf :
net.ipv4.conf.default.rp_filter = 1Rationale: 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. identifiers: CCE-26915-9, DISA FSO RHEL-06-000097 references: AC-4, SC-5, SC-7, Test attestation on 20121024 by DS Remediation script:
|
Wireless NetworkinggroupWireless networking, such as 802.11
(WiFi) and Bluetooth, can present a security risk to sensitive or
classified systems and networks. Wireless networking hardware is
much more likely to be included in laptop or portable systems than
in desktops or servers.
|
contains 4 rules |
Disable Wireless Through Software ConfigurationgroupIf it is impossible to remove the wireless hardware from the device in question, disable as much of it as possible through software. The following methods can disable software support for wireless networking, but note that these methods do not prevent malicious software or careless users from re-activating the devices. |
contains 4 rules |
Disable WiFi or Bluetooth in BIOSruleSome systems that include built-in wireless support offer the ability to disable the device through the BIOS. This is system-specific; consult your hardware manual or explore the BIOS setup during boot. Rationale:Disabling wireless support in the BIOS prevents easy activation of the wireless interface, generally requiring administrators to reboot the system first. identifiers: CCE-26878-9 |
Deactivate Wireless Network InterfacesruleDeactivating wireless network interfaces should prevent
normal usage of the wireless capability.
$ ifconfig -aAdditionally, the following command may be used to determine whether wireless support is included for a particular interface, though this may not always be a clear indicator: $ iwconfigAfter identifying any wireless interfaces (which may have names like wlan0 , ath0 , wifi0 , em1 or
eth0 ), deactivate the interface with the command:
$ sudo ifdown interfaceThese changes will only last until the next reboot. To disable the interface for future boots, remove the appropriate interface file from /etc/sysconfig/network-scripts :
$ sudo rm /etc/sysconfig/network-scripts/ifcfg-interfaceRationale: 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. identifiers: CCE-27057-9 references: AC-18(a), AC-18(d), AC-18(3), CM-7, 85, Test attestation on 20121025 by DS |
Disable Bluetooth Servicerule
The $ sudo chkconfig bluetooth off $ sudo service bluetooth stopRationale: Disabling the identifiers: CCE-27081-9, DISA FSO RHEL-06-000331 references: AC-18(a), AC-18(d), AC-18(3), CM-7, 85, 1551, Test attestation on 20121025 by DS Remediation script:
|
Disable Bluetooth Kernel ModulesruleThe kernel's module loading system can be configured to prevent
loading of the Bluetooth module. Add the following to
the appropriate install bluetooth /bin/trueRationale: If Bluetooth functionality must be disabled, preventing the kernel from loading the kernel module provides an additional safeguard against its activation. identifiers: CCE-26763-3, DISA FSO RHEL-06-000315 references: AC-18(a), AC-18(d), AC-18(3), CM-7, 85, 1551, Test attestation on 20141031 by JL Remediation script:
|
IPv6groupThe 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. |
contains 4 rules |
Disable Support for IPv6 Unless NeededgroupDespite configuration that suggests support for IPv6 has been disabled, link-local IPv6 address auto-configuration occurs even when only an IPv4 address is assigned. The only way to effectively prevent execution of the IPv6 networking stack is to instruct the system not to activate the IPv6 kernel module. |
contains 2 rules |
Disable IPv6 Networking Support Automatic LoadingruleTo prevent the IPv6 kernel module ( options ipv6 disable=1This permits the IPv6 module to be loaded (and thus satisfy other modules that depend on it), while disabling support for the IPv6 protocol. Rationale: Any unnecessary network stacks - including IPv6 - should be disabled, to reduce the vulnerability to exploitation. identifiers: CCE-27153-6, DISA FSO RHEL-06-000098 references: CM-7, 1551, Test attestation on 20121024 by DS Remediation script:
|
Disable Support for RPC IPv6ruleRPC services for NFSv4 try to load transport modules for
udp6 tpi_clts v inet6 udp - - tcp6 tpi_cots_ord v inet6 tcp - - identifiers: CCE-27232-8 references: CM-7 Remediation script:
|
Configure IPv6 Settings if NecessarygroupA major feature of IPv6 is the extent to which systems implementing it can automatically configure their networking devices using information from the network. From a security perspective, manually configuring important configuration information is preferable to accepting it from the network in an unauthenticated fashion. |
contains 2 rules |
Disable Automatic ConfigurationgroupDisable the system's acceptance of router
advertisements and redirects by adding or correcting the following
line in IPV6_AUTOCONF=no |
contains 2 rules |
Disable Accepting IPv6 Router Advertisementsrule
To set the runtime status of the $ sudo sysctl -w net.ipv6.conf.default.accept_ra=0If this is not the system's default value, add the following line to /etc/sysctl.conf :
net.ipv6.conf.default.accept_ra = 0Rationale: An illicit router advertisement message could result in a man-in-the-middle attack. identifiers: CCE-27164-3 references: CM-7 Remediation script:
|
Disable Accepting IPv6 Redirectsrule
To set the runtime status of the $ sudo sysctl -w net.ipv6.conf.default.accept_redirects=0If this is not the system's default value, add the following line to /etc/sysctl.conf :
net.ipv6.conf.default.accept_redirects = 0Rationale: An illicit ICMP redirect message could result in a man-in-the-middle attack. identifiers: CCE-27166-8, DISA FSO RHEL-06-000099 Remediation script:
|
iptables and ip6tablesgroupA host-based firewall called |
contains 4 rules |
Inspect and Activate Default RulesgroupView the currently-enforced $ sudo iptables -nL --line-numbersThe command is analogous for ip6tables .
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 ):
$ sudo service iptables restartThe default iptables rules are: Chain INPUT (policy ACCEPT) num target prot opt source destination 1 ACCEPT all -- 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED 2 ACCEPT icmp -- 0.0.0.0/0 0.0.0.0/0 3 ACCEPT all -- 0.0.0.0/0 0.0.0.0/0 4 ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 state NEW tcp dpt:22 5 REJECT all -- 0.0.0.0/0 0.0.0.0/0 reject-with icmp-host-prohibited Chain FORWARD (policy ACCEPT) num target prot opt source destination 1 REJECT all -- 0.0.0.0/0 0.0.0.0/0 reject-with icmp-host-prohibited Chain OUTPUT (policy ACCEPT) num target prot opt source destinationThe ip6tables default rules are essentially the same. |
contains 2 rules |
Verify ip6tables Enabled if Using IPv6rule
The $ sudo chkconfig --level 2345 ip6tables onRationale: The identifiers: CCE-27006-6, DISA FSO RHEL-06-000103 references: AC-4, CA-3(c), CM-7, 32, 66, 1115, 1118, 1092, 1117, 1098, 1100, 1097, 1414, Test attestation on 20121024 by DS Remediation script:
|
Verify iptables Enabledrule
The $ sudo chkconfig --level 2345 iptables onRationale:
The identifiers: CCE-27018-1, DISA FSO RHEL-06-000117 references: AC-4, CA-3(c), CM-7, 32, 66, 1115, 1118, 1092, 1117, 1098, 1100, 1097, 1414, Test attestation on 20121024 by DS Remediation script:
|
Strengthen the Default RulesetgroupThe default rules can be strengthened. The system
scripts that activate the firewall rules expect them to be defined
in the configuration files warning
The program system-config-securitylevel
allows additional services to penetrate the default firewall rules
and automatically adjusts /etc/sysconfig/iptables . This program
is only useful if the default ruleset meets your security
requirements. Otherwise, this program should not be used to make
changes to the firewall configuration because it re-writes the
saved configuration file. |
contains 2 rules |
Set Default iptables Policy for Incoming PacketsruleTo set the default policy to DROP (instead of ACCEPT) for
the built-in INPUT chain which processes incoming packets,
add or correct the following line in
:INPUT DROP [0:0]Rationale: In identifiers: CCE-26444-0, DISA FSO RHEL-06-000120 references: CM-7, 66, 1109, 1154, 1414 Remediation script:
|
Set Default iptables Policy for Forwarded PacketsruleTo set the default policy to DROP (instead of ACCEPT) for
the built-in FORWARD chain which processes packets that will be forwarded from
one interface to another,
add or correct the following line in
:FORWARD DROP [0:0]Rationale: In identifiers: CCE-27186-6, DISA FSO RHEL-06-000320 Remediation script:
|
Uncommon Network ProtocolsgroupThe system includes support for several network protocols which are not commonly used. Although security vulnerabilities in kernel networking code are not frequently discovered, the consequences can be dramatic. Ensuring uncommon network protocols are disabled reduces the system's risk to attacks targeted at its implementation of those protocols. warning
Although these protocols are not commonly used, avoid disruption
in your network environment by ensuring they are not needed
prior to disabling them.
|
contains 4 rules |
Disable DCCP Supportrule
The Datagram Congestion Control Protocol (DCCP) is a
relatively new transport layer protocol, designed to support
streaming media and telephony.
To configure the system to prevent the install dccp /bin/trueRationale: Disabling DCCP protects the system against exploitation of any flaws in its implementation. identifiers: CCE-26448-1, DISA FSO RHEL-06-000124 references: CM-7, 382, Test attestation on 20121024 by DS Remediation script:
|
Disable SCTP Supportrule
The Stream Control Transmission Protocol (SCTP) is a
transport layer protocol, designed to support the idea of
message-oriented communication, with several streams of messages
within one connection.
To configure the system to prevent the install sctp /bin/trueRationale: Disabling SCTP protects the system against exploitation of any flaws in its implementation. identifiers: CCE-26410-1, DISA FSO RHEL-06-000125 references: CM-7, 382, Test attestation on 20121024 by DS Remediation script:
|
Disable RDS Supportrule
The Reliable Datagram Sockets (RDS) protocol is a transport
layer protocol designed to provide reliable high- bandwidth,
low-latency communications between nodes in a cluster.
To configure the system to prevent the install rds /bin/trueRationale: Disabling RDS protects the system against exploitation of any flaws in its implementation. identifiers: CCE-26239-4, DISA FSO RHEL-06-000126 references: CM-7, 382, Test attestation on 20121024 by DS Remediation script:
|
Disable TIPC Supportrule
The Transparent Inter-Process Communication (TIPC) protocol
is designed to provide communications between nodes in a
cluster.
To configure the system to prevent the install tipc /bin/trueRationale: Disabling TIPC protects the system against exploitation of any flaws in its implementation. identifiers: CCE-26696-5, DISA FSO RHEL-06-000127 references: CM-7, 382, Test attestation on 20121024 by DS Remediation script:
|
Disable Zeroconf NetworkingruleZeroconf networking allows the system to assign itself an IP
address and engage in IP communication without a statically-assigned address or
even a DHCP server. Automatic address assignment via Zeroconf (or DHCP) is not
recommended. To disable Zeroconf automatic route assignment in the 169.254.0.0
subnet, add or correct the following line in NOZEROCONF=yesRationale: 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. identifiers: CCE-27151-0 references: CM-7 Remediation script:
|
Configure SysloggroupThe syslog service has been the default Unix logging mechanism for
many years. It has a number of downsides, including inconsistent log format,
lack of authentication for received messages, and lack of authentication,
encryption, or reliable transport for messages sent over a network. However,
due to its long history, syslog is a de facto standard which is supported by
almost all Unix applications.
|
contains 8 rules |
Ensure Proper Configuration of Log Filesgroup
The file *.info;mail.none;authpriv.none;cron.none /var/log/messages authpriv.* /var/log/secure mail.* -/var/log/maillog cron.* /var/log/cron *.emerg * uucp,news.crit /var/log/spooler local7.* /var/log/boot.logSee 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 |
contains 3 rules |
Ensure Log Files Are Owned By Appropriate UserruleThe owner of all log files written by
$ ls -l LOGFILEIf the owner is not root , run the following command to
correct this:
$ sudo chown root LOGFILERationale: 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. identifiers: CCE-26812-8, DISA FSO RHEL-06-000133 references: AC-6, 1314, Test attestation on 20121024 by DS |
Ensure Log Files Are Owned By Appropriate GroupruleThe group-owner of all log files written by
$ ls -l LOGFILEIf the owner is not root , run the following command to
correct this:
$ sudo chgrp root LOGFILERationale: 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. identifiers: CCE-26821-9, DISA FSO RHEL-06-000134 references: AC-6, 1314, Test attestation on 20121024 by DS |
Ensure System Log Files Have Correct PermissionsruleThe file permissions for all log files written by
$ ls -l LOGFILEIf the permissions are not 600 or more restrictive, run the following command to correct this: $ sudo chmod 0600 LOGFILERationale: 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. identifiers: CCE-27190-8, DISA FSO RHEL-06-000135 references: http://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-53r4.pdf, 1314, Test attestation on 20121024 by DS |
contains 1 rule |
contains 1 rule |
Ensure All Logs are Rotated by logrotategroupEdit the file /var/log/messages /var/log/secure /var/log/maillog /var/log/spooler \ /var/log/boot.log /var/log/cron {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. |
contains 1 rule |
Ensure Logrotate Runs PeriodicallyruleThe # rotate log files frequency dailyRationale: Log files that are not properly rotated run the risk of growing so large that they fill up the /var/log partition. Valuable logging information could be lost if the /var/log partition becomes full. identifiers: CCE-27014-0, DISA FSO RHEL-06-000138 |
Ensure rsyslog is Installedrule
Rsyslog is installed by default.
The $ sudo yum install rsyslogRationale: The rsyslog package provides the rsyslog daemon, which provides system logging services. identifiers: CCE-26809-4 references: AU-9(2), 1311, 1312, Test attestation on 20121024 by DS Remediation script:
|
Enable rsyslog ServiceruleThe $ sudo chkconfig --level 2345 rsyslog onRationale: The identifiers: CCE-26807-8 references: AU-12, 1557, 1312, 1311, Test attestation on 20121024 by DS Remediation script:
|
System Accounting with auditdgroupThe audit service provides substantial capabilities
for recording system activities. By default, the service audits about
SELinux AVC denials and certain types of security-relevant events
such as system logins, account modifications, and authentication
events performed by programs such as sudo.
Under its default configuration, type=AVC msg=audit(1226874073.147:96): avc: denied { getattr } for pid=2465 comm="httpd" path="/var/www/html/file1" dev=dm-0 ino=284133 scontext=unconfined_u:system_r:httpd_t:s0 tcontext=unconfined_u:object_r:samba_share_t:s0 tclass=file type=SYSCALL msg=audit(1226874073.147:96): arch=40000003 syscall=196 success=no exit=-13 a0=b98df198 a1=bfec85dc a2=54dff4 a3=2008171 items=0 ppid=2463 pid=2465 auid=502 uid=48 gid=48 euid=48 suid=48 fsuid=48 egid=48 sgid=48 fsgid=48 tty=(none) ses=6 comm="httpd" exe="/usr/sbin/httpd" subj=unconfined_u:system_r:httpd_t:s0 key=(null)
|
contains 30 rules |
Configure auditd Rules for Comprehensive AuditinggroupThe
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: $ sudo service auditd restart |
contains 28 rules |
Records Events that Modify Date and Time InformationgroupArbitrary 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. All changes to the system time should be audited. |
contains 5 rules |
Record attempts to alter time through adjtimexruleOn a 32-bit system, add the following to # audit_time_rules -a always,exit -F arch=b32 -S adjtimex -k audit_time_rulesOn a 64-bit system, add the following to /etc/audit/audit.rules :
# audit_time_rules -a always,exit -F arch=b64 -S adjtimex -k audit_time_rulesThe -k option allows for the specification of a key in string form that can be used for better reporting capability through ausearch and aureport. Multiple system calls can be defined on the same line to save space if desired, but is not required. See an example of multiple combined syscalls: -a always,exit -F arch=b64 -S adjtimex -S settimeofday -S clock_settime -k audit_time_rulesRationale: 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. identifiers: CCE-26242-8, DISA FSO RHEL-06-000165 references: AC-3(10), AU-1(b), AU-2(a), AU-2(c), AU-2(d), AU-12(a), AU-12(c), IR-5, 1487, 169 Remediation script:
|
Record attempts to alter time through settimeofdayruleOn a 32-bit system, add the following to # audit_time_rules -a always,exit -F arch=b32 -S settimeofday -k audit_time_rulesOn a 64-bit system, add the following to /etc/audit/audit.rules :
# audit_time_rules -a always,exit -F arch=b64 -S settimeofday -k audit_time_rulesThe -k option allows for the specification of a key in string form that can be used for better reporting capability through ausearch and aureport. Multiple system calls can be defined on the same line to save space if desired, but is not required. See an example of multiple combined syscalls: -a always,exit -F arch=b64 -S adjtimex -S settimeofday -S clock_settime -k audit_time_rulesRationale: 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. identifiers: CCE-27203-9, DISA FSO RHEL-06-000167 references: AC-3(10), AU-1(b), AU-2(a), AU-2(c), AU-2(d), AU-12(a), AU-12(c), IR-5, 1487, 169 Remediation script:
|
Record Attempts to Alter Time Through stimeruleOn a 32-bit system, add the following to # audit_time_rules -a always,exit -F arch=b32 -S stime -k audit_time_rulesOn a 64-bit system, the "-S stime" 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_rulesRationale: 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. identifiers: CCE-27169-2, DISA FSO RHEL-06-000169 references: AC-3(10), AU-1(b), AU-2(a), AU-2(c), AU-2(d), AU-12(a), AU-12(c), IR-5, 1487, 169 Remediation script:
|
Record Attempts to Alter Time Through clock_settimeruleOn a 32-bit system, add the following to # audit_time_rules -a always,exit -F arch=b32 -S clock_settime -k audit_time_rulesOn a 64-bit system, add the following to /etc/audit/audit.rules :
# audit_time_rules -a always,exit -F arch=b64 -S clock_settime -k audit_time_rulesThe -k option allows for the specification of a key in string form that can be used for better reporting capability through ausearch and aureport. Multiple system calls can be defined on the same line to save space if desired, but is not required. See an example of multiple combined syscalls: -a always,exit -F arch=b64 -S adjtimex -S settimeofday -S clock_settime -k audit_time_rulesRationale: 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. identifiers: CCE-27170-0, DISA FSO RHEL-06-000171 references: AC-3(10), AU-1(b), AU-2(a), AU-2(c), AU-2(d), AU-12(a), AU-12(c), IR-5, 1487, 169 Remediation script:
|
Record Attempts to Alter the localtime FileruleAdd the following to -w /etc/localtime -p wa -k audit_time_rulesThe -k option allows for the specification of a key in string form that can be used for better reporting capability through ausearch and aureport and should always be used. Rationale: 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. identifiers: CCE-27172-6, DISA FSO RHEL-06-000173 references: AC-3(10), AU-1(b), AU-2(a), AU-2(c), AU-2(d), AU-12(a), AU-12(c), IR-5, 1487, 169 Remediation script:
|
Record Events that Modify the System's Discretionary Access ControlsgroupAt 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 -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!=4294967295 -k perm_modIf 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!=4294967295 -k perm_mod |
contains 13 rules |
Record Events that Modify the System's Discretionary Access Controls - chmodruleAt a minimum the audit system should collect file
permission changes for all users and root. Add the following to
-a always,exit -F arch=b32 -S chmod -F auid>=500 -F auid!=4294967295 -k perm_modIf the system is 64 bit then also add the following: -a always,exit -F arch=b64 -S chmod -F auid>=500 -F auid!=4294967295 -k perm_mod warning
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. identifiers: CCE-26280-8, DISA FSO RHEL-06-000184 references: AC-3(10), AU-1(b), AU-2(a), AU-2(c), AU-2(d), AU-12(a), AU-12(c), IR-5, 126 Remediation script:
|
Record Events that Modify the System's Discretionary Access Controls - chownruleAt a minimum the audit system should collect file
permission changes for all users and root. Add the following to
-a always,exit -F arch=b32 -S chown -F auid>=500 -F auid!=4294967295 -k perm_modIf the system is 64 bit then also add the following: -a always,exit -F arch=b64 -S chown -F auid>=500 -F auid!=4294967295 -k perm_mod warning
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. identifiers: CCE-27173-4, DISA FSO RHEL-06-000185 references: AC-3(10), AU-1(b), AU-2(a), AU-2(c), AU-2(d), AU-12(a), AU-12(c), IR-5, 126 Remediation script:
|
Record Events that Modify the System's Discretionary Access Controls - fchmodruleAt a minimum the audit system should collect file
permission changes for all users and root. Add the following to
-a always,exit -F arch=b32 -S fchmod -F auid>=500 -F auid!=4294967295 -k perm_modIf the system is 64 bit then also add the following: -a always,exit -F arch=b64 -S fchmod -F auid>=500 -F auid!=4294967295 -k perm_mod warning
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. identifiers: CCE-27174-2, DISA FSO RHEL-06-000186 references: AC-3(10), AU-1(b), AU-2(a), AU-2(c), AU-2(d), AU-12(a), AU-12(c), IR-5, 126 Remediation script:
|
Record Events that Modify the System's Discretionary Access Controls - fchmodatruleAt a minimum the audit system should collect file
permission changes for all users and root. Add the following to
-a always,exit -F arch=b32 -S fchmodat -F auid>=500 -F auid!=4294967295 -k perm_modIf the system is 64 bit then also add the following: -a always,exit -F arch=b64 -S fchmodat -F auid>=500 -F auid!=4294967295 -k perm_mod warning
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. identifiers: CCE-27175-9, DISA FSO RHEL-06-000187 references: AC-3(10), AU-1(b), AU-2(a), AU-2(c), AU-2(d), AU-12(a), AU-12(c), IR-5, 126 Remediation script:
|
Record Events that Modify the System's Discretionary Access Controls - fchownruleAt a minimum the audit system should collect file
permission changes for all users and root. Add the following to
-a always,exit -F arch=b32 -S fchown -F auid>=500 -F auid!=4294967295 -k perm_modIf the system is 64 bit then also add the following: -a always,exit -F arch=b64 -S fchown -F auid>=500 -F auid!=4294967295 -k perm_mod warning
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. identifiers: CCE-27177-5, DISA FSO RHEL-06-000188 references: AC-3(10), AU-1(b), AU-2(a), AU-2(c), AU-2(d), AU-12(a), AU-12(c), IR-5, 126 Remediation script:
|
Record Events that Modify the System's Discretionary Access Controls - fchownatruleAt a minimum the audit system should collect file
permission changes for all users and root. Add the following to
-a always,exit -F arch=b32 -S fchownat -F auid>=500 -F auid!=4294967295 -k perm_modIf the system is 64 bit then also add the following: -a always,exit -F arch=b64 -S fchownat -F auid>=500 -F auid!=4294967295 -k perm_mod warning
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. identifiers: CCE-27178-3, DISA FSO RHEL-06-000189 references: AC-3(10), AU-1(b), AU-2(a), AU-2(c), AU-2(d), AU-12(a), AU-12(c), IR-5, 126 Remediation script:
|
Record Events that Modify the System's Discretionary Access Controls - fremovexattrruleAt a minimum the audit system should collect file
permission changes for all users and root. Add the following to
-a always,exit -F arch=b32 -S fremovexattr -F auid>=500 -F auid!=4294967295 -k perm_modIf the system is 64 bit then also add the following: -a always,exit -F arch=b64 -S fremovexattr -F auid>=500 -F auid!=4294967295 -k perm_mod warning
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. identifiers: CCE-27179-1, DISA FSO RHEL-06-000190 references: AC-3(10), AU-1(b), AU-2(a), AU-2(c), AU-2(d), AU-12(a), AU-12(c), IR-5, 126 Remediation script:
|
Record Events that Modify the System's Discretionary Access Controls - fsetxattrruleAt a minimum the audit system should collect file
permission changes for all users and root. Add the following to
-a always,exit -F arch=b32 -S fsetxattr -F auid>=500 -F auid!=4294967295 -k perm_modIf the system is 64 bit then also add the following: -a always,exit -F arch=b64 -S fsetxattr -F auid>=500 -F auid!=4294967295 -k perm_mod warning
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. identifiers: CCE-27180-9, DISA FSO RHEL-06-000191 references: AC-3(10), AU-1(b), AU-2(a), AU-2(c), AU-2(d), AU-12(a), AU-12(c), IR-5, 126 Remediation script:
|
Record Events that Modify the System's Discretionary Access Controls - lchownruleAt a minimum the audit system should collect file
permission changes for all users and root. Add the following to
-a always,exit -F arch=b32 -S lchown -F auid>=500 -F auid!=4294967295 -k perm_modIf the system is 64 bit then also add the following: -a always,exit -F arch=b64 -S lchown -F auid>=500 -F auid!=4294967295 -k perm_mod warning
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. identifiers: CCE-27181-7, DISA FSO RHEL-06-000192 references: AC-3(10), AU-1(b), AU-2(a), AU-2(c), AU-2(d), AU-12(a), AU-12(c), IR-5, 126 Remediation script:
|
Record Events that Modify the System's Discretionary Access Controls - lremovexattrruleAt a minimum the audit system should collect file
permission changes for all users and root. Add the following to
-a always,exit -F arch=b32 -S lremovexattr -F auid>=500 -F auid!=4294967295 -k perm_modIf the system is 64 bit then also add the following: -a always,exit -F arch=b64 -S lremovexattr -F auid>=500 -F auid!=4294967295 -k perm_mod warning
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. identifiers: CCE-27182-5, DISA FSO RHEL-06-000193 references: AC-3(10), AU-1(b), AU-2(a), AU-2(c), AU-2(d), AU-12(a), AU-12(c), IR-5, 126 Remediation script:
|
Record Events that Modify the System's Discretionary Access Controls - lsetxattrruleAt a minimum the audit system should collect file
permission changes for all users and root. Add the following to
-a always,exit -F arch=b32 -S lsetxattr -F auid>=500 -F auid!=4294967295 -k perm_modIf the system is 64 bit then also add the following: -a always,exit -F arch=b64 -S lsetxattr -F auid>=500 -F auid!=4294967295 -k perm_mod warning
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. identifiers: CCE-27183-3, DISA FSO RHEL-06-000194 references: AC-3(10), AU-1(b), AU-2(a), AU-2(c), AU-2(d), AU-12(a), AU-12(c), IR-5, 126 Remediation script:
|
Record Events that Modify the System's Discretionary Access Controls - removexattrruleAt a minimum the audit system should collect file
permission changes for all users and root. Add the following to
-a always,exit -F arch=b32 -S removexattr -F auid>=500 -F auid!=4294967295 -k perm_modIf the system is 64 bit then also add the following: -a always,exit -F arch=b64 -S removexattr -F auid>=500 -F auid!=4294967295 -k perm_mod warning
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. identifiers: CCE-27184-1, DISA FSO RHEL-06-000195 references: AC-3(10), AU-1(b), AU-2(a), AU-2(c), AU-2(d), AU-12(a), AU-12(c), IR-5, 126 Remediation script:
|
Record Events that Modify the System's Discretionary Access Controls - setxattrruleAt a minimum the audit system should collect file
permission changes for all users and root. Add the following to
-a always,exit -F arch=b32 -S setxattr -F auid>=500 -F auid!=4294967295 -k perm_modIf the system is 64 bit then also add the following: -a always,exit -F arch=b64 -S setxattr -F auid>=500 -F auid!=4294967295 -k perm_mod warning
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. identifiers: CCE-27185-8, DISA FSO RHEL-06-000196 references: AC-3(10), AU-1(b), AU-2(a), AU-2(c), AU-2(d), AU-12(a), AU-12(c), IR-5, 126 Remediation script:
|
Record Events that Modify User/Group InformationruleAdd the following to # audit_rules_usergroup_modification -w /etc/group -p wa -k audit_rules_usergroup_modification -w /etc/passwd -p wa -k audit_rules_usergroup_modification -w /etc/gshadow -p wa -k audit_rules_usergroup_modification -w /etc/shadow -p wa -k audit_rules_usergroup_modification -w /etc/security/opasswd -p wa -k audit_rules_usergroup_modificationRationale: 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. identifiers: CCE-26664-3, DISA FSO RHEL-06-000174 references: AC-2(4), AC-3(10), AU-1(b), AU-2(a), AU-2(c), AU-2(d), AU-12(a), AU-12(c), IR-5, 18, 1403, 1404, 1405, 1684, 1683, 1685, 1686 Remediation script:
|
Record Events that Modify the System's Network EnvironmentruleAdd the following to # audit_rules_networkconfig_modification -a always,exit -F arch=ARCH -S sethostname -S setdomainname -k audit_rules_networkconfig_modification -w /etc/issue -p wa -k audit_rules_networkconfig_modification -w /etc/issue.net -p wa -k audit_rules_networkconfig_modification -w /etc/hosts -p wa -k audit_rules_networkconfig_modification -w /etc/sysconfig/network -p wa -k audit_rules_networkconfig_modificationRationale: The network environment should not be modified by anything other than administrator action. Any change to network parameters should be audited. identifiers: CCE-26648-6, DISA FSO RHEL-06-000182 references: AC-3(10), AU-1(b), AU-2(a), AU-2(c), AU-2(d), AU-12(a), AU-12(c), IR-5 Remediation script:
|
Record Events that Modify the System's Mandatory Access ControlsruleAdd the following to -w /etc/selinux/ -p wa -k MAC-policyRationale: 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. identifiers: CCE-26657-7, DISA FSO RHEL-06-000183 references: AC-3(10), AU-1(b), AU-2(a), AU-2(c), AU-2(d), AU-12(a), AU-12(c), IR-5 Remediation script:
|
Ensure auditd Collects Unauthorized Access Attempts to Files (unsuccessful)ruleAt a minimum the audit system should collect
unauthorized file accesses for all users and root. Add the following
to -a always,exit -F arch=b32 -S creat -S open -S openat -S open_by_handle_at -S truncate -S ftruncate -F exit=-EACCES -F auid>=500 -F auid!=4294967295 -k access -a always,exit -F arch=b32 -S creat -S open -S openat -S open_by_handle_at -S truncate -S ftruncate -F exit=-EPERM -F auid>=500 -F auid!=4294967295 -k accessIf the system is 64 bit then also add the following: -a always,exit -F arch=b64 -S creat -S open -S openat -S open_by_handle_at -S truncate -S ftruncate -F exit=-EACCES -F auid>=500 -F auid!=4294967295 -k access -a always,exit -F arch=b64 -S creat -S open -S openat -S open_by_handle_at -S truncate -S ftruncate -F exit=-EPERM -F auid>=500 -F auid!=4294967295 -k accessRationale: 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. identifiers: CCE-26712-0, DISA FSO RHEL-06-000197 references: AC-3(10), AU-1(b), AU-2(a), AU-2(c), AU-2(d), AU-12(a), AU-12(c), IR-5, 126 Remediation script:
|
Ensure auditd Collects Information on the Use of Privileged CommandsruleAt a minimum the audit system should collect the execution of privileged commands for all users and root. To find the relevant setuid / setgid programs, run the following command for each local partition PART: $ sudo find PART -xdev -type f -perm -4000 -o -type f -perm -2000 2>/dev/nullThen, for each setuid / setgid program on the system, add a line of the following form to /etc/audit/audit.rules , where
SETUID_PROG_PATH is the full path to each setuid / setgid program
in the list:
-a always,exit -F path=SETUID_PROG_PATH -F perm=x -F auid>=500 -F auid!=4294967295 -k privilegedRationale: 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. identifiers: CCE-26457-2, DISA FSO RHEL-06-000198 references: AC-3(10)), AU-1(b), AU-2(a), AU-2(c), AU-2(d), AC-6(9), AU-12(a), AU-12(c), IR-5, 40, Test attestation on 20140703 by JL Remediation script:
|
Ensure auditd Collects Information on Exporting to Media (successful)ruleAt a minimum the audit system should collect media
exportation events for all users and root. Add the following to
-a always,exit -F arch=ARCH -S mount -F auid>=500 -F auid!=4294967295 -k exportRationale: 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. identifiers: CCE-26573-6, DISA FSO RHEL-06-000199 references: AC-3(10), AU-1(b), AU-2(a), AU-2(c), AU-2(d), AU-12(a), AU-12(c), IR-5, 126, Test attestation on 20121024 by DS Remediation script:
|
Ensure auditd Collects File Deletion Events by UserruleAt a minimum the audit system should collect file
deletion events for all users and root. Add the following to
-a always,exit -F arch=ARCH -S rmdir -S unlink -S unlinkat -S rename -S renameat -F auid>=500 -F auid!=4294967295 -k deleteRationale: 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. identifiers: CCE-26651-0, DISA FSO RHEL-06-000200 references: AC-3(10), AU-1(b), AU-2(a), AU-2(c), AU-2(d), AU-12(a), AU-12(c), IR-5, 126 Remediation script:
|
Ensure auditd Collects System Administrator ActionsruleAt a minimum the audit system should collect
administrator actions for all users and root. Add the following to
-w /etc/sudoers -p wa -k actionsRationale: 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. identifiers: CCE-26662-7, DISA FSO RHEL-06-000201 references: AC-2(7)(b), AC-3(10), AU-1(b), AU-2(a), AU-2(c), AU-2(d), AU-12(a), AU-12(c), IR-5, 126, Test attestation on 20121024 by DS Remediation script:
|
Ensure auditd Collects Information on Kernel Module Loading and UnloadingruleAdd the following to -w /sbin/insmod -p x -k modules -w /sbin/rmmod -p x -k modules -w /sbin/modprobe -p x -k modules -a always,exit -F arch=ARCH -S init_module -S delete_module -k modulesRationale: 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. identifiers: CCE-26611-4, DISA FSO RHEL-06-000202 references: AC-3(10), AU-1(b), AU-2(a), AU-2(c), AU-2(d), AU-12(a), AU-12(c), IR-5, 126 Remediation script:
|
Make the auditd Configuration ImmutableruleAdd the following to -e 2With this setting, a reboot will be required to change any audit rules.Rationale: 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 identifiers: CCE-26612-2 references: AC-6, AU-1(b), AU-2(a), AU-2(c), AU-2(d), IR-5 Remediation script:
|
Enable auditd ServiceruleThe $ sudo chkconfig --level 2345 auditd onRationale: Ensuring the identifiers: CCE-27058-7, DISA FSO RHEL-06-000145 references: AC-17(1), AU-1(b), AU-10, AU-12(a), AU-12(c), IR-5, 347, 157, 172, 880, 1353, 1462, 1487, 1115, 1454, 067, 158, 831, 1190, 1312, 1263, 130, 120, 1589, Test attestation on 20121024 by DS Remediation script:
|
Enable Auditing for Processes Which Start Prior to the Audit DaemonruleTo ensure all processes can be audited, even
those which start prior to the audit daemon, add the argument
kernel /vmlinuz-version ro vga=ext root=/dev/VolGroup00/LogVol00 rhgb quiet audit=1Rationale:
Each process on the system carries an "auditable" flag which
indicates whether its activities can be audited. Although identifiers: CCE-26785-6, DISA FSO RHEL-06-000525 references: AC-17(1), AU-14(1), AU-1(b), AU-2(a), AU-2(c), AU-2(d), AU-10, IR-5, 1464, 130 Remediation script:
|
Servicesgroup
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.
|
contains 56 rules |
Obsolete ServicesgroupThis section discusses a number of network-visible
services which have historically caused problems for system
security, and for which disabling or severely limiting the service
has been the best available guidance for some time. As a result of
this, many of these services are not installed as part of RHEL 6
by default.
|
contains 9 rules |
XinetdgroupThe |
contains 2 rules |
Disable xinetd Servicerule
The $ sudo chkconfig xinetd offRationale: 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. identifiers: CCE-27046-2, DISA FSO RHEL-06-000203 references: CM-7, 305, Test attestation on 20121026 by DS |
Uninstall xinetd PackageruleThe $ sudo yum erase xinetdRationale:
Removing the identifiers: CCE-27005-8, DISA FSO RHEL-06-000204 references: CM-7, 305, Test attestation on 20121026 by DS Remediation script:
|
TelnetgroupThe 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. |
contains 2 rules |
Disable telnet Servicerule
The $ sudo chkconfig telnet offRationale: 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. identifiers: CCE-26836-7, DISA FSO RHEL-06-000211 references: CM-7, IA-5(1)(c), 68, 1436, 197, 877, 888, Test attestation on 20121026 by DS |
Uninstall telnet-server PackageruleThe $ sudo yum erase telnet-serverRationale:
Removing the identifiers: CCE-27073-6, DISA FSO RHEL-06-000206 references: CM-7, 305, 381, Test attestation on 20121026 by DS Remediation script:
|
Rlogin, Rsh, and RexecgroupThe Berkeley r-commands are legacy services which allow cleartext remote access and have an insecure trust model. |
contains 1 rule |
Uninstall rsh-server PackageruleThe $ sudo yum erase rsh-serverRationale: The identifiers: CCE-27062-9, DISA FSO RHEL-06-000213 references: CM-7, 305, 381, Test attestation on 20121026 by DS Remediation script:
|
NISgroupThe 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. |
contains 2 rules |
Uninstall ypserv PackageruleThe $ sudo yum erase ypservRationale: Removing the identifiers: CCE-27079-3, DISA FSO RHEL-06-000220 references: CM-7, 305, 381, Test attestation on 20121026 by DS Remediation script:
|
Disable ypbind ServiceruleThe $ sudo chkconfig ypbind offRationale:
Disabling the identifiers: CCE-26894-6, DISA FSO RHEL-06-000221 references: CM-7, 305, Test attestation on 20121026 by DS |
TFTP ServergroupTFTP is a lightweight version of the FTP protocol which has traditionally been used to configure networking equipment. However, TFTP provides little security, and modern versions of networking operating systems frequently support configuration via SSH or other more secure protocols. A TFTP server should be run only if no more secure method of supporting existing equipment can be found. |
contains 2 rules |
Disable tftp ServiceruleThe $ sudo chkconfig tftp offRationale:
Disabling the identifiers: CCE-27055-3, DISA FSO RHEL-06-000223 references: CM-7, 1436, Test attestation on 20121026 by DS Remediation script:
|
Uninstall tftp-server Packagerule
The $ sudo yum erase tftp-serverRationale:
Removing the identifiers: CCE-26946-4, DISA FSO RHEL-06-000222 references: CM-7, 305, Test attestation on 20121026 by DS |
Base ServicesgroupThis section addresses the base services that are installed on a RHEL 6 default installation which are not covered in other sections. Some of these services listen on the network and should be treated with particular discretion. Other services are local system utilities that may or may not be extraneous. In general, system services should be disabled if not required. |
contains 3 rules |
Disable KDump Kernel Crash Analyzer (kdump)ruleThe $ sudo chkconfig kdump offRationale: Unless the system is used for kernel development or testing, there is little need to run the kdump service. identifiers: CCE-26850-8 references: CM-7 Remediation script:
|
Disable Portreserve (portreserve)ruleThe $ sudo chkconfig portreserve offRationale: The identifiers: CCE-27258-3 references: CM-7, Test attestation on 20121024 by DS Remediation script:
|
Disable Red Hat Network Service (rhnsd)ruleThe 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 $ sudo chkconfig rhnsd offRationale: 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 identifiers: CCE-26846-6, DISA FSO RHEL-06-000009 references: CM-7, 382, Test attestation on 20121024 by DS Remediation script:
|
Cron and At DaemonsgroupThe cron and at services are used to allow commands to be executed at a later time. The cron service is required by almost all systems to perform necessary maintenance tasks, while at may or may not be required on a given system. Both daemons should be configured defensively. |
contains 2 rules |
Enable cron ServiceruleThe $ sudo chkconfig --level 2345 crond onRationale: Due to its usage for maintenance and security-supporting tasks, enabling the cron daemon is essential. identifiers: CCE-27070-2, DISA FSO RHEL-06-000224 references: CM-7, Test attestation on 20121024 by DS Remediation script:
|
Disable At Service (atd)ruleThe $ sudo chkconfig atd offRationale:
The identifiers: CCE-27249-2, DISA FSO RHEL-06-000262 Remediation script:
|
SSH ServergroupThe SSH protocol is recommended for remote login and
remote file transfer. SSH provides confidentiality and integrity
for data exchanged between two systems, as well as server
authentication, through the use of public key cryptography. The
implementation included with the system is called OpenSSH, and more
detailed documentation is available from its website,
http://www.openssh.org. Its server program is called |
contains 10 rules |
Configure OpenSSH Server if NecessarygroupIf the system needs to act as an SSH server, then
certain changes should be made to the OpenSSH daemon configuration
file |
contains 10 rules |
Allow Only SSH Protocol 2ruleOnly SSH protocol version 2 connections should be
permitted. The default setting in
Protocol 2Rationale: SSH protocol version 1 suffers from design flaws that result in security vulnerabilities and should not be used. identifiers: CCE-27072-8, DISA FSO RHEL-06-000227 references: AC-3(10), IA-5(1)(c), 776, 774, 1436, Test attestation on 20121024 by DS Remediation script:
|
Set SSH Idle Timeout IntervalruleSSH allows administrators to set an idle timeout
interval.
After this interval has passed, the idle user will be
automatically logged out.
ClientAliveInterval 300The 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. Rationale: Causing idle users to be automatically logged out guards against compromises one system leading trivially to compromises on another. identifiers: CCE-26919-1, DISA FSO RHEL-06-000230 references: AC-2(5), SA-8, 879, 1133, Test attestation on 20121024 by DS Remediation script:
|
Set SSH Client Alive CountruleTo ensure the SSH idle timeout occurs precisely when the ClientAliveCountMax 0Rationale:
This ensures a user login will be terminated as soon as the identifiers: CCE-26282-4, DISA FSO RHEL-06-000231 references: AC-2(5), SA-8, 879, 1133, Test attestation on 20121024 by DS Remediation script:
|
Disable SSH Support for .rhosts FilesruleSSH can emulate the behavior of the obsolete rsh
command in allowing users to enable insecure access to their
accounts via IgnoreRhosts yesRationale: SSH trust relationships mean a compromise on one host can allow an attacker to move trivially to other hosts. identifiers: CCE-27124-7, DISA FSO RHEL-06-000234 Remediation script:
|
Disable Host-Based AuthenticationruleSSH's cryptographic host-based authentication is
more secure than HostbasedAuthentication noRationale: SSH trust relationships mean a compromise on one host can allow an attacker to move trivially to other hosts. identifiers: CCE-27091-8, DISA FSO RHEL-06-000236 references: AC-3, 765, 766, Test attestation on 20121024 by DS Remediation script:
|
Disable SSH Root LoginruleThe 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 PermitRootLogin noRationale: 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. identifiers: CCE-27100-7, DISA FSO RHEL-06-000237 references: AC-3, AC-6(2), IA-2(1), 770, Test attestation on 20121024 by DS Remediation script:
|
Disable SSH Access via Empty PasswordsruleTo explicitly disallow remote login from accounts with
empty passwords, add or correct the following line in
PermitEmptyPasswords noAny accounts with empty passwords should be disabled immediately, and PAM configuration should prevent users from being able to assign themselves empty passwords. Rationale: 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. identifiers: CCE-26887-0, DISA FSO RHEL-06-000239 references: AC-3, 765, 766, Test attestation on 20121024 by DS Remediation script:
|
Enable SSH Warning Bannerrule
To enable the warning banner and ensure it is consistent
across the system, add or correct the following line in Banner /etc/issueAnother section contains information on how to create an appropriate system-wide warning banner. Rationale: The warning message reinforces policy awareness during the login process and facilitates possible legal action against attackers. Alternatively, systems whose ownership should not be obvious should ensure usage of a banner that does not provide easy attribution. identifiers: CCE-27112-2, DISA FSO RHEL-06-000240 references: AC-8(a), 48, Test attestation on 20121024 by DS Remediation script:
|
Do Not Allow SSH Environment OptionsruleTo ensure users are not able to present
environment options to the SSH daemon, add or correct the following line
in PermitUserEnvironment noRationale: SSH environment options potentially allow users to bypass access restriction in some configurations. identifiers: CCE-27201-3, DISA FSO RHEL-06-000241 references: 1414, Test attestation on 20121024 by DS Remediation script:
|
Use Only Approved CiphersruleLimit the ciphers to those algorithms which are FIPS-approved.
Counter (CTR) mode is also preferred over cipher-block chaining (CBC) mode.
The following line in Ciphers aes128-ctr,aes192-ctr,aes256-ctr,aes128-cbc,3des-cbc,aes192-cbc,aes256-cbcThe man page sshd_config(5) contains a list of supported ciphers.
Rationale:Approved algorithms should impart some level of confidence in their implementation. These are also required for compliance. identifiers: CCE-26555-3, DISA FSO RHEL-06-000243 references: AC-3, AC-17(2), SI-7, IA-5(1)(c), IA-7, 803, 1144, 1145, 1146, Test attestation on 20121024 by DS Remediation script:
|
Avahi ServergroupThe Avahi daemon implements the DNS Service Discovery and Multicast DNS protocols, which provide service and host discovery on a network. It allows a system to automatically identify resources on the network, such as printers or web servers. This capability is also known as mDNSresponder and is a major part of Zeroconf networking. |
contains 1 rule |
Disable Avahi Server if PossiblegroupBecause the Avahi daemon service keeps an open network port, it is subject to network attacks. Disabling it can reduce the system's vulnerability to such attacks. |
contains 1 rule |
Disable Avahi Server Softwarerule
The $ sudo chkconfig avahi-daemon offRationale: 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. identifiers: CCE-27087-6, DISA FSO RHEL-06-000246 |
DHCPgroupThe Dynamic Host Configuration Protocol (DHCP) allows
systems to request and obtain an IP address and other configuration
parameters from a server.
|
contains 2 rules |
Disable DHCP Servergroup
The DHCP server |
contains 2 rules |
Disable DHCP ServiceruleThe $ sudo chkconfig dhcpd offRationale: 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. identifiers: CCE-27074-4 references: CM-7, 366, Test attestation on 20121024 by DS |
Uninstall DHCP Server PackageruleIf the system does not need to act as a DHCP server,
the dhcp package can be uninstalled.
The $ sudo yum erase dhcpRationale: Removing the DHCP server ensures that it cannot be easily or accidentally reactivated and disrupt network operation. identifiers: CCE-27120-5 references: CM-7, 366, Test attestation on 20121024 by DS |
Network Time ProtocolgroupThe Network Time Protocol is used to manage the system
clock over a network. Computer clocks are not very accurate, so
time will drift unpredictably on unmanaged systems. Central time
protocols can be used both to ensure that time is consistent among
a network of machines, and that their time is consistent with the
outside world.
|
contains 2 rules |
Enable the NTP Daemonrule
The $ sudo chkconfig --level 2345 ntpd onRationale: Enabling the identifiers: CCE-27093-4, DISA FSO RHEL-06-000247 references: AU-8(1), 160, Test attestation on 20121024 by DS Remediation script:
|
Specify a Remote NTP ServerruleTo specify a remote NTP server for time synchronization, edit
the file server ntpserverThis instructs the NTP software to contact that remote server to obtain time data. Rationale: Synchronizing with an NTP server makes it possible to collate system logs from multiple sources or correlate computer events with real time events. identifiers: CCE-27098-3, DISA FSO RHEL-06-000248 references: AU-8(1), 160, Test attestation on 20121024 by DS |
Mail Server Softwaregroup
Mail servers are used to send and receive email over the network.
Mail is a very common service, and Mail Transfer Agents (MTAs) are obvious
targets of network attack.
Ensure that machines are not running MTAs unnecessarily,
and configure needed MTAs as defensively as possible.
|
contains 2 rules |
Configure SMTP For Mail ClientsgroupThis section discusses settings for Postfix in a submission-only e-mail configuration. |
contains 1 rule |
Disable Postfix Network Listeningrule
Edit the file inet_interfaces = localhostRationale:
This ensures identifiers: CCE-26780-7, DISA FSO RHEL-06-000249 references: CM-7, 382, Test attestation on 20121024 by DS |
Uninstall Sendmail PackageruleSendmail is not the default mail transfer agent and is
not installed by default.
The $ sudo yum erase sendmailRationale: 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. identifiers: CCE-27515-6, DISA FSO RHEL-06-000288 references: CM-7, Test attestation on 20121024 by DS |
LDAPgroupLDAP 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. |
contains 3 rules |
Configure OpenLDAP ClientsgroupThis section provides information on which security settings are
important to configure in OpenLDAP clients by manually editing the appropriate
configuration files. RHEL 6 provides an automated configuration tool called
authconfig and a graphical wrapper for authconfig called
warning
Before configuring any system to be an
LDAP client, ensure that a working LDAP server is present on the
network. |
contains 2 rules |
Configure LDAP Client to Use TLS For All TransactionsruleConfigure LDAP to enforce TLS use. First, edit the file
ssl start_tlsThen review the LDAP server and ensure TLS has been configured. Rationale: 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. identifiers: CCE-26690-8, DISA FSO RHEL-06-000252 references: CM-7, 776, 778, 1453, Test attestation on 20121024 by DS |
Configure Certificate Directives for LDAP Use of TLSruleEnsure a copy of a trusted CA certificate has been placed in
the file tls_cacertdir /etc/pki/tls/CAor tls_cacertfile /etc/pki/tls/CA/cacert.pemThen review the LDAP server and ensure TLS has been configured. Rationale: 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. identifiers: CCE-27189-0, DISA FSO RHEL-06-000253 references: CM-7, 776, 778, 1453, Test attestation on 20121024 by DS |
Configure OpenLDAP ServergroupThis section details some security-relevant settings for an OpenLDAP server. Installation and configuration of OpenLDAP on RHEL 6 is available at: https://access.redhat.com/site/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Deployment_Guide/ch-Directory_Servers.html. |
contains 1 rule |
Uninstall openldap-servers PackageruleThe $ sudo yum erase openldap-serversThe 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. Rationale: 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. identifiers: CCE-26858-1, DISA FSO RHEL-06-000256 references: CM-7, 366, Test attestation on 20121024 by DS |
NFS and RPCgroupThe Network File System is a popular distributed filesystem for the Unix environment, and is very widely deployed. This section discusses the circumstances under which it is possible to disable NFS and its dependencies, and then details steps which should be taken to secure NFS's configuration. This section is relevant to machines operating as NFS clients, as well as to those operating as NFS servers. |
contains 7 rules |
Disable All NFS Services if PossiblegroupIf there is not a reason for the system to operate as either an NFS client or an NFS server, follow all instructions in this section to disable subsystems required by NFS. warning
The steps in this section will prevent a machine
from operating as either an NFS client or an NFS server. Only perform these
steps on machines which do not need NFS at all. |
contains 4 rules |
Disable Services Used Only by NFSgroupIf NFS is not needed, disable the NFS client daemons nfslock, rpcgssd, and rpcidmapd.
|
contains 3 rules |
Disable Network File System Lock Service (nfslock)ruleThe Network File System Lock (nfslock) service starts the required
remote procedure call (RPC) processes which allow clients to lock files on the
server. If the local machine is not configured to mount NFS filesystems then
this service should be disabled.
The $ sudo chkconfig nfslock off identifiers: CCE-27104-9 Remediation script:
|
Disable Secure RPC Client Service (rpcgssd)rule
The rpcgssd service manages RPCSEC GSS contexts required to secure protocols
that use RPC (most often Kerberos and NFS). The rpcgssd service is the
client-side of RPCSEC GSS. If the system does not require secure RPC then this
service should be disabled.
The $ sudo chkconfig rpcgssd off identifiers: CCE-26864-9 Remediation script:
|
Disable RPC ID Mapping Service (rpcidmapd)ruleThe rpcidmapd service is used to map user names and groups to UID
and GID numbers on NFSv4 mounts. If NFS is not in use on the local system then
this service should be disabled.
The $ sudo chkconfig rpcidmapd off identifiers: CCE-26870-6 Remediation script:
|
Disable netfs if PossiblegroupTo determine if any network filesystems handled by netfs are currently mounted on the system execute the following command: $ mount -t nfs,nfs4,smbfs,cifs,ncpfsIf the command did not return any output then disable netfs. |
contains 1 rule |
Disable Network File Systems (netfs)ruleThe netfs script manages the boot-time mounting of several types
of networked filesystems, of which NFS and Samba are the most common. If these
filesystem types are not in use, the script can be disabled, protecting the
system somewhat against accidental or malicious changes to $ sudo chkconfig netfs off identifiers: CCE-27137-9 Remediation script:
|
Configure NFS ClientsgroupThe steps in this section are appropriate for machines which operate as NFS clients. |
contains 3 rules |
Disable NFS Server Daemonsgroup
There is no need to run the NFS server daemons |
contains 1 rule |
Disable Secure RPC Server Service (rpcsvcgssd)ruleThe rpcsvcgssd service manages RPCSEC GSS contexts required to
secure protocols that use RPC (most often Kerberos and NFS). The rpcsvcgssd
service is the server-side of RPCSEC GSS. If the system does not require secure
RPC then this service should be disabled.
The $ sudo chkconfig rpcsvcgssd offRationale: Unnecessary services should be disabled to decrease the attack surface of the system. identifiers: CCE-27122-1 references: Test attestation on 20121025 by DS Remediation script:
|
Mount Remote Filesystems with Restrictive OptionsgroupEdit the file |
contains 2 rules |
Mount Remote Filesystems with nodevrule
Add the Legitimate device files should only exist in the /dev directory. NFS mounts should not present device files to users. identifiers: CCE-27090-0, DISA FSO RHEL-06-000269 references: CM-7, MP-2, Test attestation on 20121025 by DS |
Mount Remote Filesystems with nosuidrule
Add the 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. identifiers: CCE-26972-0, DISA FSO RHEL-06-000270 references: Test attestation on 20121025 by DS |
DNS ServergroupMost organizations have an operational need to run at least one nameserver. However, there are many common attacks involving DNS server software, and this server software should be disabled on any system on which it is not needed. |
contains 2 rules |
Disable DNS ServergroupDNS software should be disabled on any machine which does not need to be a nameserver. Note that the BIND DNS server software is not installed on RHEL 6 by default. The remainder of this section discusses secure configuration of machines which must be nameservers. |
contains 2 rules |
Disable DNS Serverrule
The $ sudo chkconfig named offRationale: All network services involve some risk of compromise due to implementation flaws and should be disabled if possible. identifiers: CCE-26873-0 |
Uninstall bind PackageruleTo remove the $ sudo yum erase bindRationale: If there is no need to make DNS server software available, removing it provides a safeguard against its activation. identifiers: CCE-27030-6 |
FTP ServergroupFTP is a common method for allowing remote access to
files. Like telnet, the FTP protocol is unencrypted, which means
that passwords and other data transmitted during the session can be
captured and that the session is vulnerable to hijacking.
Therefore, running the FTP server software is not recommended.
|
contains 2 rules |
Disable vsftpd if Possiblegroup |
contains 2 rules |
Disable vsftpd Servicerule
The $ sudo chkconfig vsftpd offRationale: 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. identifiers: CCE-26948-0 Remediation script:
|
Uninstall vsftpd Packagerule
The $ sudo yum erase vsftpdRationale: Removing the vsftpd package decreases the risk of its accidental activation. identifiers: CCE-26687-4 |
Web ServergroupThe web server is responsible for providing access to
content via the HTTP protocol. Web servers represent a significant
security risk because:
The system's default web server software is Apache 2 and is provided in the RPM package httpd . |
contains 2 rules |
Disable Apache if PossiblegroupIf Apache was installed and activated, but the system does not need to act as a web server, then it should be disabled and removed from the system. |
contains 2 rules |
Disable httpd Servicerule
The $ sudo chkconfig httpd offRationale: Running web server software provides a network-based avenue of attack, and should be disabled if not needed. identifiers: CCE-27075-1 references: CM-7 |
Uninstall httpd Packagerule
The $ sudo yum erase httpdRationale: If there is no need to make the web server software available, removing it provides a safeguard against its activation. identifiers: CCE-27133-8 references: CM-7 Remediation script:
|
IMAP and POP3 ServergroupDovecot provides IMAP and POP3 services. It is not installed by default. The project page at http://www.dovecot.org contains more detailed information about Dovecot configuration. |
contains 2 rules |
Disable DovecotgroupIf the system does not need to operate as an IMAP or POP3 server, the dovecot software should be disabled and removed. |
contains 2 rules |
Disable Dovecot Servicerule
The $ sudo chkconfig dovecot offRationale: Running an IMAP or POP3 server provides a network-based avenue of attack, and should be disabled if not needed. identifiers: CCE-26922-5 |
Uninstall dovecot PackageruleThe $ sudo yum erase dovecotRationale: If there is no need to make the Dovecot software available, removing it provides a safeguard against its activation. identifiers: CCE-27039-7 Remediation script:
|
Samba(SMB) Microsoft Windows File Sharing ServergroupWhen properly configured, the Samba service allows
Linux machines to provide file and print sharing to Microsoft
Windows machines. There are two software packages that provide
Samba support. The first, |
contains 3 rules |
Disable Samba if PossiblegroupEven after the Samba server package has been installed, it will remain disabled. Do not enable this service unless it is absolutely necessary to provide Microsoft Windows file and print sharing functionality. |
contains 1 rule |
Disable Sambarule
The $ sudo chkconfig smb offRationale: Running a Samba server provides a network-based avenue of attack, and should be disabled if not needed. identifiers: CCE-27143-7 references: 1436 |
Configure Samba if NecessarygroupAll settings for the Samba daemon can be found in
|
contains 2 rules |
Require Client SMB Packet Signing, if using smbclientrule
To require samba clients running client signing = mandatoryRequiring samba clients such as smbclient to use packet
signing ensures they can
only communicate with servers that support packet signing.
Rationale:Packet signing can prevent man-in-the-middle attacks which modify SMB packets in transit. identifiers: CCE-26328-5, DISA FSO RHEL-06-000272 Remediation script:
|
Require Client SMB Packet Signing, if using mount.cifsruleRequire packet signing of clients who mount Samba
shares using the Packet signing can prevent man-in-the-middle attacks which modify SMB packets in transit. identifiers: CCE-26792-2, DISA FSO RHEL-06-000273 |
Proxy ServergroupA proxy server is a very desirable target for a potential adversary because much (or all) sensitive data for a given infrastructure may flow through it. Therefore, if one is required, the machine acting as a proxy server should be dedicated to that purpose alone and be stored in a physically secure location. The system's default proxy server software is Squid, and provided in an RPM package of the same name. |
contains 2 rules |
Disable Squid if PossiblegroupIf Squid was installed and activated, but the system does not need to act as a proxy server, then it should be disabled and removed. |
contains 2 rules |
Disable Squidrule
The $ sudo chkconfig squid offRationale: Running proxy server software provides a network-based avenue of attack, and should be removed if not needed. identifiers: CCE-27146-0 |
Uninstall squid Packagerule
The $ sudo yum erase squidRationale: If there is no need to make the proxy server software available, removing it provides a safeguard against its activation. identifiers: CCE-26977-9 |
SNMP ServergroupThe Simple Network Management Protocol allows administrators to monitor the state of network devices, including computers. Older versions of SNMP were well-known for weak security, such as plaintext transmission of the community string (used for authentication) and usage of easily-guessable choices for the community string. |
contains 2 rules |
Disable SNMP Server if PossiblegroupThe system includes an SNMP daemon that allows for its remote monitoring, though it not installed by default. If it was installed and activated but is not needed, the software should be disabled and removed. |
contains 2 rules |
Disable snmpd Servicerule
The $ sudo chkconfig snmpd offRationale: Running SNMP software provides a network-based avenue of attack, and should be disabled if not needed. identifiers: CCE-26906-8 |
Uninstall net-snmp PackageruleThe $ sudo yum erase net-snmpRationale: If there is no need to run SNMP server software, removing the package provides a safeguard against its activation. identifiers: CCE-26332-7 Remediation script:
|