Guide to the Secure Configuration of Red Hat Enterprise Linux 7
with profile Red Hat Corporate Profile for Certified Cloud Providers (RH CCP)This is a *draft* SCAP profile for Red Hat Certified Cloud Providers
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 many operational scenarios. 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 Red Hat Enterprise Linux 7 is one example of a baseline created from this guidance.
Profile Title | Red Hat Corporate Profile for Certified Cloud Providers (RH CCP) |
---|---|
Profile ID | xccdf_org.ssgproject.content_profile_rht-ccp |
Revision History
Current version: 0.1.26
- draft (as of 2015-11-25)
Platforms
- cpe:/o:redhat:enterprise_linux:7
- cpe:/o:redhat:enterprise_linux:7::client
Table of Contents
- System Settings
- Installing and Maintaining Software
- File Permissions and Masks
- SELinux
- Account and Access Control
- Network Configuration and Firewalls
- System Accounting with auditd
- Services
Checklist
contains 67 rules |
System Settingsgroup |
contains 55 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 9 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 4 rules |
Ensure /tmp Located On Separate Partitionrule
The
The identifiers: CCE-27173-4 references: SC-32, Test attestation on 20120928 by MM |
Ensure /var Located On Separate PartitionruleThe
Ensuring that identifiers: CCE-26404-4 references: SC-32, Test attestation on 20120928 by MM |
Ensure /var/log Located On Separate Partitionrule
System logs are stored in the
Placing identifiers: CCE-26967-0 references: AU-9, SC-32, http://iase.disa.mil/stigs/cci/Pages/index.aspx, Test attestation on 20120928 by MM |
Ensure /var/log/audit Located On Separate Partitionrule
Audit logs are stored in the
Placing identifiers: CCE-26971-2 references: AU-4, AU-9, SC-32, http://iase.disa.mil/stigs/cci/Pages/index.aspx, 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: Changes to software components can have significant effects on the overall security of the operating system. This requirement ensures the software has not been tampered with and that it has been provided by a trusted vendor. The Red Hat GPG key is necessary to cryptographically verify packages are from Red Hat. identifiers: CCE-26957-1 references: CM-5(3), SI-7, MA-1(b), 1749, 366, Req-5, Test attestation on 20150407 by sdw
|
Ensure gpgcheck Enabled In Main Yum ConfigurationruleThe gpgcheck=1Rationale: Verifying the authenticity of the software prior to installation validates the integrity of the patch or upgrade received from a vendor. This ensures the software has not been tampered with and that it has been provided by a trusted vendor. Self-signed certificates are disallowed by this requirement. Certificates used to verify the software must be from an approved Certificate Authority (CA). identifiers: CCE-26989-4 references: CM-5(3), SI-7, MA-1(b), 1749, 366, Req-5, Test attestation on 20150407 by sdw
|
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: Verifying the authenticity of the software prior to installation validates the integrity of the patch or upgrade received from a vendor. This ensures the software has not been tampered with and that it has been provided by a trusted vendor. Self-signed certificates are disallowed by this requirement. Certificates used to verify the software must be from an approved Certificate Authority (CA). identifiers: CCE-26876-3 references: CM-5(3), SI-7, MA-1(b), 1749, 366, Req-5, Test attestation on 20150407 by sdw
|
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-26895-3 references: SI-2, MA-1(b), http://iase.disa.mil/stigs/cci/Pages/index.aspx, Req-6, 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 1 rule |
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-27096-7 references: CM-3(d), CM-3(e), CM-6(d), CM-6(3), SC-28, SI-7, http://iase.disa.mil/stigs/cci/Pages/index.aspx, Req-11, Test attestation on 20121024 by DS
|
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 xfs | awk '{print $3}'For any systems that use a different local filesystem type, modify this command as appropriate. |
contains 16 rules |
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 16 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-26795-5 references: AC-6, http://iase.disa.mil/stigs/cci/Pages/index.aspx, Req-8, Test attestation on 20121026 by DS
|
Verify Group Who Owns shadow Filerule
To properly set the group owner of $ sudo chgrp root xsl:value-of select="@file"/>Rationale: The identifiers: CCE-27125-4 references: AC-6, http://iase.disa.mil/stigs/cci/Pages/index.aspx, Req-8, Test attestation on 20121026 by DS
|
Verify Permissions on shadow Filerule
To properly set the permissions of $ sudo chmod 0000 /etc/shadowRationale: The identifiers: CCE-27100-7 references: AC-6, http://iase.disa.mil/stigs/cci/Pages/index.aspx, Req-8, Test attestation on 20121026 by DS
|
Verify User Who Owns group Filerule
To properly set the owner of $ sudo chown root /etc/groupRationale: The identifiers: CCE-26933-2 references: AC-6, Req-8, Test attestation on 20121026 by DS
|
Verify Group Who Owns group Filerule
To properly set the group owner of $ sudo chgrp root xsl:value-of select="@file"/>Rationale: The identifiers: CCE-27037-1 references: AC-6, http://iase.disa.mil/stigs/cci/Pages/index.aspx, Req-8, Test attestation on 20121026 by DS
|
Verify Permissions on group Filerule
To properly set the permissions of $ sudo chmod 644 /etc/groupRationale: The identifiers: CCE-26949-8 references: AC-6, http://iase.disa.mil/stigs/cci/Pages/index.aspx, Req-8, Test attestation on 20121026 by DS
|
Verify User Who Owns gshadow Filerule
To properly set the owner of $ sudo chown root /etc/gshadowRationale: The identifiers: CCE-27161-9 references: AC-6, http://iase.disa.mil/stigs/cci/Pages/index.aspx, Test attestation on 20121026 by DS
|
Verify Group Who Owns gshadow Filerule
To properly set the group owner of $ sudo chgrp root xsl:value-of select="@file"/>Rationale: The identifiers: CCE-26840-9 references: AC-6, http://iase.disa.mil/stigs/cci/Pages/index.aspx, Test attestation on 20121026 by DS
|
Verify Permissions on gshadow Filerule
To properly set the permissions of $ sudo chmod 0000 /etc/gshadowRationale: The identifiers: CCE-27162-7 references: AC-6, http://iase.disa.mil/stigs/cci/Pages/index.aspx, Test attestation on 20121026 by DS
|
Verify User Who Owns passwd Filerule
To properly set the owner of $ sudo chown root /etc/passwdRationale: The identifiers: CCE-27138-7 references: AC-6, http://iase.disa.mil/stigs/cci/Pages/index.aspx, Req-8, Test attestation on 20121026 by DS
|
Verify Group Who Owns passwd Filerule
To properly set the group owner of $ sudo chgrp root xsl:value-of select="@file"/>Rationale: The identifiers: CCE-26639-5 references: AC-6, http://iase.disa.mil/stigs/cci/Pages/index.aspx, Req-8, Test attestation on 20121026 by DS
|
Verify Permissions on passwd Filerule
To properly set the permissions of $ sudo chmod 0644 /etc/passwdRationale: If the identifiers: CCE-26887-0 references: AC-6, http://iase.disa.mil/stigs/cci/Pages/index.aspx, Req-8, Test attestation on 20121026 by DS
|
Verify File Permissions Within Some Important DirectoriesgroupSome directories contain files whose confidentiality or integrity is notably important and may also be susceptible to misconfiguration over time, particularly if unpackaged software is installed. As such, an argument exists to verify that files' permissions within these directories remain configured correctly and restrictively. |
contains 4 rules |
Verify that Shared Library Files Have Restrictive PermissionsruleSystem-wide shared library files, which are linked to executables during process load time or run time, are stored in the following directories by default: /lib /lib64 /usr/lib /usr/lib64Kernel modules, which can be added to the kernel during runtime, are stored in /lib/modules . All files in these directories
should not be group-writable or world-writable. If any file in these
directories is found to be group-writable or world-writable, correct
its permission with the following command:
$ sudo chmod go-w FILERationale: Files from shared library directories are loaded into the address space of processes (including privileged ones) or of the kernel itself at runtime. Restrictive permissions are necessary to protect the integrity of the system. identifiers: CCE-26966-2 references: AC-6, http://iase.disa.mil/stigs/cci/Pages/index.aspx, Test attestation on 20121026 by DS
|
Verify that Shared Library Files Have Root OwnershipruleSystem-wide shared library files, which are linked to executables during process load time or run time, are stored in the following directories by default: /lib /lib64 /usr/lib /usr/lib64Kernel modules, which can be added to the kernel during runtime, are also stored in /lib/modules . All files in these directories should be
owned by the root user. If the directory, or any file in these
directories, is found to be owned by a user other than root correct its
ownership with the following command:
$ sudo chown root FILERationale: Files from shared library directories are loaded into the address space of processes (including privileged ones) or of the kernel itself at runtime. Proper ownership is necessary to protect the integrity of the system. identifiers: CCE-26648-6 references: AC-6, http://iase.disa.mil/stigs/cci/Pages/index.aspx, Test attestation on 20130914 by swells
|
Verify that System Executables Have Restrictive PermissionsruleSystem executables are stored in the following directories by default: /bin /sbin /usr/bin /usr/libexec /usr/local/bin /usr/local/sbin /usr/sbinAll files in these directories should not be group-writable or world-writable. If any file FILE in these directories is found to be group-writable or world-writable, correct its permission with the following command: $ sudo chmod go-w FILERationale: System binaries are executed by privileged users, as well as system services, and restrictive permissions are necessary to ensure execution of these programs cannot be co-opted. identifiers: CCE-27075-1 references: AC-6, http://iase.disa.mil/stigs/cci/Pages/index.aspx
|
Verify that System Executables Have Root OwnershipruleSystem executables are stored in the following directories by default: /bin /sbin /usr/bin /usr/libexec /usr/local/bin /usr/local/sbin /usr/sbinAll files in these directories should be owned by the root user.
If any file FILE in these directories is found
to be owned by a user other than root, correct its ownership with the
following command:
$ sudo chown root FILERationale: System binaries are executed by privileged users as well as system services, and restrictive permissions are necessary to ensure that their execution of these programs cannot be co-opted. identifiers: CCE-27119-7 references: AC-6, http://iase.disa.mil/stigs/cci/Pages/index.aspx
|
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 2 rules |
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-27334-2 references: AC-3, AC-3(3), AC-4, AC-6, AU-9, http://iase.disa.mil/stigs/cci/Pages/index.aspx, Test attestation on 20121024 by DS
|
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-27279-9 references: AC-3, AC-3(3), AC-4, AC-6, AU-9, http://iase.disa.mil/stigs/cci/Pages/index.aspx, 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 Red Hat Enterprise Linux 7. |
contains 23 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 7 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 2 rules |
Ensure that System Accounts Do Not Run a Shell Upon Loginrule
Some accounts are not associated with a human
user of the system, and exist to perform some administrative
function. Should an attacker be able to log into these accounts,
they should not be granted access to a shell.
$ sudo usermod -s /sbin/nologin SYSACCT warning
Do not perform the steps in this
section on the root account. Doing so might cause the system to
become inaccessible.
Ensuring shells are not given to system accounts upon login makes it more difficult for attackers to make use of system accounts. identifiers: CCE-26448-1 references: AC-2, http://iase.disa.mil/stigs/cci/Pages/index.aspx, 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-27175-9 references: AC-6, IA-2(1), http://iase.disa.mil/stigs/cci/Pages/index.aspx, Test attestation on 20121024 by DS
|
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
into 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-27286-4 references: IA-5(b), IA-5(c), IA-5(1)(a), Req-8, Test attestation on 20121024 by DS
|
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-27352-4 references: IA-5(h), http://iase.disa.mil/stigs/cci/Pages/index.aspx, Req-8, 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 14 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_pwquality ) 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-27123-9 references: IA-5(f), IA-5(1)(a), http://iase.disa.mil/stigs/cci/Pages/index.aspx, Test attestation on 20121026 by DS
|
Set Password Minimum AgeruleTo specify password minimum age for new accounts,
edit the file PASS_MIN_DAYS DAYSA value of 1 day is considered for sufficient for many environments. The DoD requirement is 1. Rationale: Setting the minimum password age protects against users cycling back to a favorite password after satisfying the password reuse requirement. identifiers: CCE-27002-5 references: IA-5(f), IA-5(1)(d), 198, 75, Test attestation on 20121026 by DS
|
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 DAYSThe DoD requirement is 7. Rationale: Setting the password warning age enables users to make the change at a practical time. identifiers: CCE-26486-1 references: AC-2(2), IA-5(f), Test attestation on 20121026 by DS
|
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 11 rules |
Set Password Quality RequirementsgroupThe default |
contains 6 rules |
Set Password Quality Requirements with pam_pwqualitygroupThe password requisite pam_pwquality.so try_first_pass local_users_only retry=3 authtok_type=If no such line exists, add one as the first line of the password section in /etc/pam.d/system-auth .
Next, modify the settings in /etc/security/pwquality.conf to match the following:
difok = 4 minlen = 14 dcredit = -1 ucredit = -1 lcredit = -1 ocredit = -1 maxrepeat = 3The 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-27160-1 references: IA-5(c), http://iase.disa.mil/stigs/cci/Pages/index.aspx, Test attestation on 20140925 by swells
|
Set Password Strength Minimum Digit CharactersruleThe pam_pwquality module's Requiring digits makes password guessing attacks more difficult by ensuring a larger search space. identifiers: CCE-27214-6 references: IA-5(b), IA-5(c), 194, 194, 71, Req-8, Test attestation on 20121024 by DS
|
Set Password Strength Minimum Uppercase CharactersruleThe pam_pwquality module's Requiring a minimum number of uppercase characters makes password guessing attacks more difficult by ensuring a larger search space. identifiers: CCE-27200-5 references: IA-5(b), IA-5(c), IA-5(1)(a), 192, 69, Req-8, Test attestation on 20121024 by DS
|
Set Password Strength Minimum Special CharactersruleThe pam_pwquality module's Requiring a minimum number of special characters makes password guessing attacks more difficult by ensuring a larger search space. identifiers: CCE-27360-7 references: IA-5(b), IA-5(c), IA-5(1)(a), 1619, 266, Test attestation on 20121024 by DS
|
Set Password Strength Minimum Lowercase CharactersruleThe pam_pwquality module's Requiring a minimum number of lowercase characters makes password guessing attacks more difficult by ensuring a larger search space. identifiers: CCE-27345-8 references: IA-5(b), IA-5(c), IA-5(1)(a), 193, 70, Req-8, Test attestation on 20121024 by DS
|
Set Password Strength Minimum Different CharactersruleThe pam_pwquality 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-26631-2 references: IA-5(b), IA-5(c), IA-5(1)(b), 195, 72, Test attestation on 20121024 by DS
|
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. Remediation script:
|
Limit Password ReuseruleDo not allow users to reuse recent passwords. This can be
accomplished by using the
Preventing re-use of previous passwords helps ensure that a compromised password is not re-used by a user. identifiers: CCE-26923-3 references: IA-5(f), IA-5(1)(e), 200, 77, Req-8, Test attestation on 20121024 by DS
|
Set Password Hashing AlgorithmgroupThe system's default algorithm for storing password hashes in
|
contains 3 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-27104-9 references: IA-5(b), IA-5(c), IA-5(1)(c), IA-7, http://iase.disa.mil/stigs/cci/Pages/index.aspx, Req-8, Test attestation on 20121024 by DS
|
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-27124-7 references: IA-5(b), IA-5(c), IA-5(1)(c), IA-7, http://iase.disa.mil/stigs/cci/Pages/index.aspx, Req-8, Test attestation on 20121024 by DS
|
Set Password Hashing Algorithm in /etc/libuser.confrule
In crypt_style = sha512Rationale: Using a stronger hashing algorithm makes password cracking attacks more difficult. identifiers: CCE-27053-8 references: IA-5(b), IA-5(c), IA-5(1)(c), IA-7, http://iase.disa.mil/stigs/cci/Pages/index.aspx, Req-8, Test attestation on 20121026 by DS |
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 5 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 Red Hat Enterprise Linux boot loader for x86 systems is called GRUB2. 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 /boot/grub2/grub.cfg User OwnershipruleThe file $ sudo chown root /boot/grub2/grub.cfgRationale: Only root should be able to modify important boot parameters. identifiers: CCE-26860-7 references: AC-6(7), 225, Req-7, Test attestation on 20121026 by DS
|
Verify /boot/grub2/grub.cfg Group OwnershipruleThe file $ sudo chgrp root xsl:value-of select="@file"/>Rationale:
The identifiers: CCE-26812-8 references: AC-6(7), 225, Req-7, Test attestation on 20121026 by DS
|
Verify /boot/grub2/grub.cfg PermissionsruleFile permissions for $ sudo chmod 600 /boot/grub2/grub.cfgRationale: Proper permissions ensure that only the root user can modify important boot parameters. identifiers: CCE-27054-6 references: AC-6(7), 225, Test attestation on 20121026 by DS
|
Set Boot Loader PasswordruleThe grub2 boot loader should have a superuser account and password
protection enabled to protect boot-time settings.
$ grub2-mkpasswd-pbkdf2When prompted, enter the password that was selected and insert the returned password hash into the appropriate grub2 configuration file(s) under /etc/grub.d immediately after the superuser account.
(Use the output from grub2-mkpasswd-pbkdf2 as the value of
password-hash):
password_pbkdf2 superusers-account password-hashNOTE: It is recommended not to use common administrator account names like root, admin, or administrator for the grub2 superuser account. To meet FISMA Moderate, the bootloader superuser account and password MUST differ from the root account and password. Once the superuser account and password have been added, update the grub.cfg file by running:
grub2-mkconfig -o /boot/grub2/grub.cfgNOTE: Do NOT manually add the superuser account and password to the grub.cfg file as the grub2-mkconfig command overwrites this file.
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. For more information on how to configure the grub2 superuser account and password, please refer to
identifiers: CCE-27309-4 references: IA-2(1), IA-5(e), AC-3, http://iase.disa.mil/stigs/cci/Pages/index.aspx, Test attestation on 20121026 by DS |
Require Authentication for Single User ModeruleSingle-user mode is intended as a system recovery
method, providing a single user root access to the system by
providing a boot option at startup. By default, no authentication
is performed if single-user mode is selected.
This prevents attackers with physical access from trivially bypassing security on the machine and gaining root access. Such accesses are further prevented by configuring the bootloader password. identifiers: CCE-27287-2 references: IA-2(1), AC-3, 213, Test attestation on 20121024 by DS
|
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 4 rules |
firewalldgroupThe dynamic firewall daemon |
contains 2 rules |
Inspect and Activate Default firewalld RulesgroupFirewalls can be used to separate networks into different zones
based on the level of trust the user has decided to place on the devices and
traffic within that network.
It is possible to designate one of these zones to be the default zone. When interface connections are added to NetworkManager , they are assigned
to the default zone. On installation, the default zone in firewalld is set to
be the public zone.
To find out all the settings of a zone, for example the public zone,
enter the following command as root:
# firewall-cmd --zone=public --list-allExample output of this command might look like the following: # firewall-cmd --zone=public --list-all public interfaces: services: mdns dhcpv6-client ssh ports: forward-ports: icmp-blocks: source-quenchTo view the network zones currently active, enter the following command as root: # firewall-cmd --get-serviceThe following listing displays the result of this command on common Red Hat Enterprise Linux 7 Server system: # firewall-cmd --get-service amanda-client bacula bacula-client dhcp dhcpv6 dhcpv6-client dns ftp high-availability http https imaps ipp ipp-client ipsec kerberos kpasswd ldap ldaps libvirt libvirt-tls mdns mountd ms-wbt mysql nfs ntp openvpn pmcd pmproxy pmwebapi pmwebapis pop3s postgresql proxy-dhcp radius rpc-bind samba samba-client smtp ssh telnet tftp tftp-client transmission-client vnc-server wbem-httpsFinally to view the network zones that will be active after the next firewalld service reload, enter the following command as root: # firewall-cmd --get-service --permanent |
contains 1 rule |
Verify firewalld Enabledrule
The $ sudo systemctl enable firewalld.serviceRationale:
The dynamic firewall daemon identifiers: CCE-27361-5
|
Strengthen the Default RulesetgroupThe default rules can be strengthened. The system
scripts that activate the firewall rules expect them to be defined
in configuration files under the warning
The program firewall-config
allows additional services to penetrate the default firewall rules
and automatically adjusts the firewalld ruleset(s). |
contains 1 rule |
Set Default firewalld Zone for Incoming PacketsruleTo set the default zone to DefaultZone=dropRationale: In
|
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 2 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-26828-4 references: CM-7, http://iase.disa.mil/stigs/cci/Pages/index.aspx, Test attestation on 20121024 by DS
|
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-27106-4 references: CM-7, http://iase.disa.mil/stigs/cci/Pages/index.aspx, Test attestation on 20121024 by DS
|
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, ExecStartPost=-/sbin/augenrules --loadin the /usr/lib/systemd/system/auditd.service configuration file.
In order to instruct the auditd daemon to use the auditctl
utility to read audit rules, use the following setting:
ExecStartPost=-/sbin/auditctl -R /etc/audit/audit.rulesin the /usr/lib/systemd/system/auditd.service configuration file.
Refer to [Service] section of the /usr/lib/systemd/system/auditd.service
configuration file for further details.
Government networks often have substantial auditing requirements and auditd can be configured to meet these
requirements.
Examining some example audit records demonstrates how the Linux audit system
satisfies common requirements.
The following example from Fedora Documentation available at
https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/SELinux_Users_and_Administrators_Guide/sect-Security-Enhanced_Linux-Troubleshooting-Fixing_Problems.html#sect-Security-Enhanced_Linux-Fixing_Problems-Raw_Audit_Messages
shows the substantial amount of information captured in a
two typical "raw" audit messages, followed by a breakdown of the most important
fields. In this example the message is SELinux-related and reports an AVC
denial (and the associated system call) that occurred when the Apache HTTP
Server attempted to access the /var/www/html/file1 file (labeled with
the samba_share_t type):
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 1 rule |
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 1 rule |
System Audit Logs Must Have Mode 0640 or Less Permissiverule
If $ sudo chmod 0640 audit_file Otherwise, change the mode of the audit log files with the following command: $ sudo chmod 0600 audit_fileRationale: If users can write to audit logs, audit trails can be modified or destroyed. identifiers: CCE-27205-4 references: AC-6, AU-1(b), AU-9, IR-5, http://iase.disa.mil/stigs/cci/Pages/index.aspx, Req-10, Test attestation on 20121024 by DS
|
Servicesgroup
The best protection against vulnerable software is running less software. This section describes how to review
the software which Red Hat Enterprise Linux 7 installs on a system and disable software which is not needed. It
then enumerates the software packages installed on a default Red Hat Enterprise Linux 7 system and provides guidance about which
ones can be safely disabled.
|
contains 12 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 Red Hat Enterprise Linux 7
by default.
|
contains 1 rule |
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 1 rule |
Remove telnet ClientsruleThe telnet client allows users to start connections to other systems via the telnet protocol. Rationale:The identifiers: CCE-27305-2
|
Base ServicesgroupThis section addresses the base services that are installed on a Red Hat Enterprise Linux 7 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 1 rule |
Disable Automatic Bug Reporting Tool (abrtd)ruleThe Automatic Bug Reporting Tool ( $ sudo systemctl disable abrtd.serviceRationale: Mishandling crash data could expose sensitive information about vulnerabilities in software executing on the local machine, as well as sensitive information from within a process's address space or registers. identifiers: CCE-26872-2 references: AC-17(8), CM-7, http://iase.disa.mil/stigs/cci/Pages/index.aspx, Test attestation on 20140921 by JL
|
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-27320-1 references: AC-17(7), IA-5(1)(c), http://iase.disa.mil/stigs/cci/Pages/index.aspx, Test attestation on 20121024 by DS
|
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 intervalThe 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-27433-2 references: AC-2(5), SA-8, http://iase.disa.mil/stigs/cci/Pages/index.aspx, Req-8, Test attestation on 20121024 by DS
|
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-27082-7 references: AC-2(5), SA-8, http://iase.disa.mil/stigs/cci/Pages/index.aspx, Test attestation on 20121024 by DS
|
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-27377-1 references: AC-3, http://iase.disa.mil/stigs/cci/Pages/index.aspx
|
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-27413-4 references: AC-3, http://iase.disa.mil/stigs/cci/Pages/index.aspx, Test attestation on 20121024 by DS
|
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-27445-6 references: AC-3, AC-6(2), IA-2(1), http://iase.disa.mil/stigs/cci/Pages/index.aspx, Test attestation on 20121024 by DS
|
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-27471-2 references: AC-3, http://iase.disa.mil/stigs/cci/Pages/index.aspx, Test attestation on 20121024 by DS
|
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 logon process and facilitates possible legal action against attackers. Alternatively, systems whose ownership should not be obvious should ensure usage of a banner that does not provide easy attribution. identifiers: CCE-27314-4 references: AC-8(a), AC-8(c)(1), AC-8(c)(2), AC-8(c)(3), 1384, 1385, 1386, 1387, 1388, 228, Test attestation on 20121024 by DS
|
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-27363-1 references: http://iase.disa.mil/stigs/cci/Pages/index.aspx, Test attestation on 20121024 by DS
|
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-27295-5 references: AC-3, AC-17(2), AU-10(5), IA-5(1)(c), IA-7, http://iase.disa.mil/stigs/cci/Pages/index.aspx, Test attestation on 20121024 by DS
|