Rules in Oracle Linux 9 Security Technical Implementation Guide


Total Missing Implemented Coverage STIG ids missing rule
456 0 456 100.00%
V-ID CCI CAT Title SRG Description Check Procedures Fixtext Version Mapped Rule
V-271431 CCI-004910 medium The OL 9 operating system must implement cryptographic mechanisms to prevent unauthorized modification of all information at rest. SRG-OS-000780-GPOS-00240
Operating systems handling data requiring "data at rest" protections must employ cryptographic mechanisms to prevent unauthorized disclosure and modification of the information at rest. 
 
Selection of a cryptographic mechanism is based on the need to protect the integrity of organizational information. The strength of the mechanism is commensurate with the security category and/or classification of the information. Organizations have the flexibility to either encrypt all information on storage devices (i.e., full disk encryption) or encrypt specific data structures (e.g., files, records, or fields).
Note: If there is a documented and approved reason for not having data at rest encryption, this requirement is Not Applicable.

Verify that OL 9 prevents unauthorized disclosure or modification of all information requiring at rest protection by using disk encryption.

Determine the partition layout for the system with the following command: 
 
$ sudo fdisk -l 
(..) 
Disk /dev/vda: 15 GiB, 16106127360 bytes, 31457280 sectors 
Units: sectors of 1 * 512 = 512 bytes 
Sector size (logical/physical): 512 bytes / 512 bytes 
I/O size (minimum/optimal): 512 bytes / 512 bytes 
Disklabel type: gpt 
Disk identifier: 83298450-B4E3-4B19-A9E4-7DF147A5FEFB 
 
Device       Start      End  Sectors Size Type 
/dev/vda1     2048     4095     2048   1M BIOS boot 
/dev/vda2     4096  2101247  2097152   1G Linux filesystem 
/dev/vda3  2101248 31455231 29353984  14G Linux filesystem 
(...) 
 
Verify that the system partitions are all encrypted with the following command: 
 
$ sudo more /etc/crypttab 
 
Every persistent disk partition present must have an entry in the file. 
 
If any partitions other than the boot partition or pseudo file systems (such as /proc or /sys) are not listed, this is a finding.
Configure the OL 9 operating system to implement cryptographic mechanisms to prevent unauthorized modification of all information at rest.

To encrypt an entire partition, dedicate a partition for encryption in the partition layout. 
 
Note: Encrypting a partition in an already-installed system is more difficult because it will need to be resized and existing partitions changed.
OL09-00-000001 SV-271431r1092616_rule
V-271432 CCI-001849 low OL 9 must use a separate file system for the system audit data path. SRG-OS-000341-GPOS-00132
Placing "/var/log/audit" in its own partition enables better separation between audit files and other system files and helps ensure that auditing cannot be halted due to the partition running out of space.
Verify that OL 9 uses a separate file system for the system audit data path with the following command:

Note: /var/log/audit is used as the example as it is a common location.

$ mount | grep /var/log/audit 
UUID=2efb2979-45ac-82d7-0ae632d11f51 on /var/log/home type xfs  (rw,realtime,seclabel,attr2,inode64)

If no line is returned, this is a finding.
Migrate the system audit data path onto a separate file system.
OL09-00-000002 SV-271432r1091008_rule
V-271433 CCI-000366 medium OL 9 must be configured so that a separate file system must be used for user home directories (such as /home or an equivalent). SRG-OS-000480-GPOS-00227
Ensuring that "/home" is mounted on its own partition enables the setting of more restrictive mount options, and also helps ensure that users cannot trivially fill partitions used for log or audit data storage.
Verify that OL 9 uses a separate file system for user home directories (such as /home or an equivalent) with the following command:

$ mount | grep /home
UUID=fba5000f-2ffa-4417-90eb-8c54ae74a32f on /home type ext4 (rw,nodev,nosuid,noexec,seclabel)

If a separate entry for "/home" is not in use, this is a finding.
Migrate the "/home" directory onto a separate file system/partition.
OL09-00-000003 SV-271433r1091011_rule
V-271434 CCI-000366 medium OL 9 must use a separate file system for /tmp. SRG-OS-000480-GPOS-00227
The "/tmp" partition is used as temporary storage by many programs. Placing "/tmp" in its own partition enables the setting of more restrictive mount options, which can help protect programs that use it.
Verify that OL 9 uses a separate file system/partition for "/tmp" with the following command:

$ mount | grep /tmp 
tmpfs /tmp tmpfs noatime,mode=1777 0 0

If a separate entry for "/tmp" is not in use, this is a finding.
Migrate the "/tmp" path onto a separate file system.
OL09-00-000004 SV-271434r1091014_rule
V-271435 CCI-000366 low OL 9 must use a separate file system for /var. SRG-OS-000480-GPOS-00227
Ensuring that "/var" is mounted on its own partition enables the setting of more restrictive mount options. This helps protect system services such as daemons or other programs which use it. It is not uncommon for the "/var" directory to contain world-writable directories installed by other software packages.
Verify that OL 9 uses a separate file system/partition for "/var" with the following command:

$ mount | grep /var
UUID=c274f65f-c5b5-4481-b007-bee96feb8b05 /var xfs noatime 1 2

If a separate entry for "/var" is not in use, this is a finding.
Migrate the "/var" path onto a separate file system.
OL09-00-000005 SV-271435r1091017_rule
V-271436 CCI-000366 low OL 9 must use a separate file system for /var/log. SRG-OS-000480-GPOS-00227
Placing "/var/log" in its own partition enables better separation between log files and other files in "/var/".
Verify that OL 9 uses a separate file system/partition for "/var/log" with the following command:

$ mount | grep /var/log
UUID=c274f65f-c5b5-4486-b021-bee96feb8b21 /var/log xfs noatime 1 2

If a separate entry for "/var/log" is not in use, this is a finding.
Migrate the "/var/log" path onto a separate file system.
OL09-00-000006 SV-271436r1091020_rule
V-271437 CCI-000366 medium OL 9 must use a separate file system for /var/tmp. SRG-OS-000480-GPOS-00227
The "/var/tmp" partition is used as temporary storage by many programs. Placing "/var/tmp" in its own partition enables the setting of more restrictive mount options, which can help protect programs that use it.
Verify that OL 9 uses a separate file system/partition for "/var/tmp" with the following command:

$ mount | grep /var/tmp
UUID=c274f65f-c5b5-4379-b017-bee96feb7a34 /var/log xfs noatime 1 2

If a separate entry for "/var/tmp" is not in use, this is a finding.
Migrate the "/var/tmp" path onto a separate file system.
OL09-00-000007 SV-271437r1091023_rule
V-271438 CCI-002605 high OL 9 must be a vendor supported release. SRG-OS-000439-GPOS-00195
An operating system release is considered "supported" if the vendor continues to provide security patches for the product. With an unsupported release, it will not be possible to resolve security issues discovered in the system software.

Oracle offers Oracle Linux Premier Support, for a fee, for those customers who wish to standardize on a specific minor release for an extended period.
Verify that OL 9 is vendor supported with the following command:

$ cat /etc/oracle-release 
Oracle Linux Server release 9.5

If the installed version of OL 9 is not supported, this is a finding.
Upgrade OL 9 to a supported version.
OL09-00-000010 SV-271438r1091026_rule
V-271439 CCI-000366 medium OL 9 vendor packaged system security patches and updates must be installed and up to date. SRG-OS-000480-GPOS-00227
Installing software updates is a fundamental mitigation against the exploitation of publicly known vulnerabilities. If the most recent security patches and updates are not installed, unauthorized users may take advantage of weaknesses in the unpatched software. The lack of prompt attention to patching could result in a system compromise.
Verify that OL 9 security patches and updates are installed and up to date. Updates are required to be applied with a frequency determined by organizational policy.

Obtain the list of available package security updates from Oracle. The URL for updates is https://linux.oracle.com/errata/. It is important to note that updates provided by Oracle may not be present on the system if the underlying packages are not installed.

Check that the available package security updates have been installed on the system with the following command:

$ dnf history list | more

    ID | Command line | Date and time | Action(s) | Altered    
-------------------------------------------------------------------------------    
   70 | install aide | 2023-03-05 10:58 | Install | 1    
   69 | update -y | 2023-03-04 14:34 | Update | 18 EE    
   68 | install vlc | 2023-02-21 17:12 | Install | 21   
   67 | update -y | 2023-02-21 17:04 | Update | 7 EE 

Typical update frequency may be overridden by Information Assurance Vulnerability Alert (IAVA) notifications from CYBERCOM.

If the system is in noncompliance with the organizational patching policy, this is a finding.
Install OL 9 security patches and updates at the organizationally defined frequency. If system updates are installed via a centralized repository that is configured on the system, all updates can be installed with the following command:

$ sudo dnf update -y
OL09-00-000015 SV-271439r1091029_rule
V-271440 CCI-000366 medium OL 9 must be configured so that the graphical display manager is not the default target unless approved. SRG-OS-000480-GPOS-00227
Unnecessary service packages must not be installed to decrease the attack surface of the system. Graphical display managers have a long history of security vulnerabilities and must not be used unless approved and documented.
Verify that OL 9 is configured to boot to the command line:

$ systemctl get-default
multi-user.target

If the system default target is not set to "multi-user.target" and the information system security officer (ISSO) lacks a documented requirement for a graphical user interface, this is a finding.
Configure OL 9 to boot to the command line.

Set the default target to multi-user with the following command:
$ sudo systemctl set-default multi-user.target

If there is an operational requirement for a graphical user interface, document it with the ISSO. 
OL09-00-000020 SV-271440r1092462_rule
V-271441 CCI-000213 medium OL 9 must require authentication to access emergency mode. SRG-OS-000080-GPOS-00048
To mitigate the risk of unauthorized access to sensitive information by entities that have been issued certificates by DOD-approved PKIs, all DOD systems (e.g., web servers and web portals) must be properly configured to incorporate access control methods that do not rely solely on the possession of a certificate for access. Successful authentication must not automatically give an entity access to an asset or security boundary. Authorization procedures and controls must be implemented to ensure each authenticated entity also has a validated and current authorization. Authorization is the process of determining whether an entity, once authenticated, is permitted to access a specific asset. Information systems use access control policies and enforcement mechanisms to implement this requirement.

This requirement 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.
Verify that OL 9 requires authentication for emergency mode with the following command:

$ grep sulogin-shell /usr/lib/systemd/system/emergency.service 
ExecStart=-/usr/lib/systemd/systemd-sulogin-shell emergency

If this line is not returned, or is commented out, this is a finding. If the output is different, this is a finding.
Configure OL 9 to require authentication for emergency mode.

Add or modify the following line in the "/usr/lib/systemd/system/emergency.service" file:

ExecStart=-/usr/lib/systemd/systemd-sulogin-shell emergency
OL09-00-000025 SV-271441r1091035_rule
V-271442 CCI-000213 medium OL 9 must require authentication to access single-user mode. SRG-OS-000080-GPOS-00048
To mitigate the risk of unauthorized access to sensitive information by entities that have been issued certificates by DOD-approved PKIs, all DOD systems (e.g., web servers and web portals) must be properly configured to incorporate access control methods that do not rely solely on the possession of a certificate for access. Successful authentication must not automatically give an entity access to an asset or security boundary. Authorization procedures and controls must be implemented to ensure each authenticated entity also has a validated and current authorization. Authorization is the process of determining whether an entity, once authenticated, is permitted to access a specific asset. Information systems use access control policies and enforcement mechanisms to implement this requirement.

This requirement 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.
Verify that OL 9 requires authentication for single-user mode with the following command:

$ grep sulogin /usr/lib/systemd/system/rescue.service 
ExecStart=-/usr/lib/systemd/systemd-sulogin-shell rescue

If this line is not returned, or is commented out, this is a finding.
Configure OL 9 to require authentication for single-user mode.

Add or modify the following line in the "/usr/lib/systemd/system/rescue.service" file:

ExecStart=-/usr/lib/systemd/systemd-sulogin-shell rescue
OL09-00-000030 SV-271442r1091038_rule
V-271443 CCI-000381 medium OL 9 must be configured to disable the Asynchronous Transfer Mode (ATM) kernel module. SRG-OS-000095-GPOS-00049
Disabling ATM protects the system against exploitation of any flaws in its implementation.
Verify that OL 9 disables the ability to load the ATM kernel module with the following command:

$ grep -r atm /etc/modprobe.conf /etc/modprobe.d/* 
install atm /bin/false
blacklist atm

If the command does not return any output, or the line is commented out, and use of ATM is not documented with the information system security officer (ISSO) as an operational requirement, this is a finding.
Configure OL 9 to prevent the atm kernel module from being loaded.

Add the following line to the file /etc/modprobe.d/atm.conf (or create atm.conf if it does not exist):

install atm /bin/false
blacklist atm
OL09-00-000040 SV-271443r1092463_rule
V-271444 CCI-000381 medium OL 9 must be configured to disable the Controller Area Network (CAN) kernel module. SRG-OS-000095-GPOS-00049
Disabling CAN protects the system against exploitation of any flaws in its implementation.
Verify that OL 9 disables the ability to load the CAN kernel module with the following command:

$ grep -r can /etc/modprobe.conf /etc/modprobe.d/* 
install can /bin/false
blacklist can

If the command does not return any output, or the line is commented out, and use of CAN is not documented with the information system security officer (ISSO) as an operational requirement, this is a finding.
Configure OL 9 to prevent the can kernel module from being loaded.

Add the following line to the file /etc/modprobe.d/can.conf (or create atm.conf if it does not exist):

install can /bin/false
blacklist can
OL09-00-000041 SV-271444r1091044_rule
V-271445 CCI-000381 medium OL 9 must be configured to disable the FireWire kernel module. SRG-OS-000095-GPOS-00049
Disabling firewire protects the system against exploitation of any flaws in its implementation.
Verify that OL 9 disables the ability to load the firewire-core kernel module with the following command:

$ grep -r firewire-core /etc/modprobe.conf /etc/modprobe.d/* 
install firewire-core /bin/true
blacklist firewire-core

If the command does not return any output, or the line is commented out, and use of firewire-core is not documented with the information system security officer (ISSO) as an operational requirement, this is a finding.
Configure OL 9 to prevent the firewire-core kernel module from being loaded.

Add the following line to the file /etc/modprobe.d/firewire-core.conf (or create firewire-core.conf if it does not exist):

install firewire-core /bin/true
blacklist firewire-core
OL09-00-000042 SV-271445r1091047_rule
V-271446 CCI-000381 medium OL 9 must disable the Stream Control Transmission Protocol (SCTP) kernel module. SRG-OS-000095-GPOS-00049
It is detrimental for operating systems to provide, or install by default, functionality exceeding requirements or mission objectives. These unnecessary capabilities or services are often overlooked and therefore may remain unsecured. They increase the risk to the platform by providing additional attack vectors.

Failing to disconnect unused protocols can result in a system compromise.

The SCTP is a transport layer protocol, designed to support the idea of message-oriented communication, with several streams of messages within one connection. Disabling SCTP protects the system against exploitation of any flaws in its implementation.
Verify that OL 9 disables the ability to load the sctp kernel module with the following command:

$ grep -r sctp /etc/modprobe.conf /etc/modprobe.d/* 
blacklist sctp

If the command does not return any output, or the line is commented out, and use of sctp is not documented with the information system security officer (ISSO) as an operational requirement, this is a finding.
Configure OL 9 to prevent the sctp kernel module from being loaded.

Add the following line to the file /etc/modprobe.d/sctp.conf (or create sctp.conf if it does not exist):

install sctp/bin/false
blacklist sctp
OL09-00-000043 SV-271446r1091050_rule
V-271447 CCI-000381 medium OL 9 must disable the Transparent Inter Process Communication (TIPC) kernel module. SRG-OS-000095-GPOS-00049
It is detrimental for operating systems to provide, or install by default, functionality exceeding requirements or mission objectives. These unnecessary capabilities or services are often overlooked and therefore may remain unsecured. They increase the risk to the platform by providing additional attack vectors.

Failing to disconnect unused protocols can result in a system compromise.

The TIPC is a protocol that is specially designed for intra-cluster communication. It can be configured to transmit messages either on UDP or directly across Ethernet. Message delivery is sequence guaranteed, loss free, and flow controlled. Disabling TIPC protects the system against exploitation of any flaws in its implementation.
Verify that OL 9 disables the ability to load the tipc kernel module with the following command:

$ grep -r tipc /etc/modprobe.conf /etc/modprobe.d/* 
blacklist tipc

If the command does not return any output, or the line is commented out, and use of TIPC is not documented with the information system security officer (ISSO) as an operational requirement, this is a finding.
Configure OL 9 to prevent the tipc kernel module from being loaded.

Add the following line to the file /etc/modprobe.d/tipc.conf (or create tipc.conf if it does not exist):

install tipc /bin/false
blacklist tipc
OL09-00-000044 SV-271447r1092464_rule
V-271448 CCI-000381 low OL 9 must disable mounting of cramfs. SRG-OS-000095-GPOS-00049
It is detrimental for operating systems to provide, or install by default, functionality exceeding requirements or mission objectives. These unnecessary capabilities or services are often overlooked and therefore may remain unsecured. They increase the risk to the platform by providing additional attack vectors.

Removing support for unneeded filesystem types reduces the local attack surface of the server.

Compressed ROM/RAM file system (or cramfs) is a read-only file system designed for simplicity and space-efficiency. It is mainly used in embedded and small-footprint systems.
Verify that OL 9 disables the ability to load the cramfs kernel module with the following command:

$ grep -ri cramfs /etc/modprobe.d/* | grep -i "/bin/false"
install cramfs /bin/false

If the command does not return any output, or the line is commented out, and use of the cramfs protocol is not documented with the information system security officer (ISSO) as an operational requirement, this is a finding.

Verify the operating system disables the ability to use the cramfs kernel module.

Determine if the cramfs kernel module is disabled with the following command:

$ grep -ri cramfs /etc/modprobe.d/* | grep -i "blacklist"
blacklist cramfs

If the command does not return any output or the output is not "blacklist cramfs", and use of the cramfs kernel module is not documented with the ISSO as an operational requirement, this is a finding.
Configure OL 9 to prevent the cramfs kernel module from being loaded. 

Add the following line to the file /etc/modprobe.d/cramfs.conf (or create blacklist.conf if it does not exist):

install cramfs /bin/false
blacklist cramfs

Reboot the system for the settings to take effect.
OL09-00-000045 SV-271448r1091056_rule
V-271449 CCI-000381 medium OL 9 Bluetooth must be disabled. SRG-OS-000095-GPOS-00049
This requirement applies to wireless peripheral technologies (e.g., wireless mice, keyboards, displays, etc.) used with OL 9 systems. Wireless peripherals (e.g., Wi-Fi/Bluetooth/IR keyboards, mice and pointing devices, and near field communications [NFC]) present a unique challenge by creating an open, unsecured port on a computer. Wireless peripherals must meet DOD requirements for wireless data transmission and be approved for use by the authorizing official (AO). Even though some wireless peripherals, such as mice and pointing devices, do not ordinarily carry information that need to be protected, modification of communications with these wireless peripherals may be used to compromise the OL 9 operating system.

Satisfies: SRG-OS-000095-GPOS-00049, SRG-OS-000300-GPOS-00118
Verify that OL 9 disables the ability to load the Bluetooth kernel module with the following command:

$ grep -r bluetooth /etc/modprobe.conf /etc/modprobe.d/* 
install bluetooth /bin/false
blacklist bluetooth

If the command does not return any output, or the line is commented out, and use of Bluetooth is not documented with the information system security officer (ISSO) as an operational requirement, this is a finding.
Configure OL 9 to disable the Bluetooth adapter when not in use.

Create or modify the "/etc/modprobe.d/bluetooth.conf" file with the following line:

install bluetooth /bin/false
blacklist bluetooth

Reboot the system for the settings to take effect.
OL09-00-000046 SV-271449r1091059_rule
V-271450 CCI-000778 medium OL 9 must be configured to disable USB mass storage. SRG-OS-000114-GPOS-00059
USB mass storage permits easy introduction of unknown devices, thereby facilitating malicious activity.

Satisfies: SRG-OS-000114-GPOS-00059, SRG-OS-000378-GPOS-00163
Verify that OL 9 disables the ability to load the USB Storage kernel module with the following command:

$ grep -r usb-storage /etc/modprobe.conf /etc/modprobe.d/* 
install usb-storage /bin/false
blacklist usb-storage

If the command does not return any output, or the line is commented out, and use of USB Storage is not documented with the information system security officer (ISSO) as an operational requirement, this is a finding.
Configure OL 9 to prevent the usb-storage kernel module from being loaded.

Add the following line to the file /etc/modprobe.d/usb-storage.conf (or create usb-storage.conf if it does not exist):

install usb-storage /bin/false
blacklist usb-storage
OL09-00-000047 SV-271450r1092466_rule
V-271451 CCI-000213 high OL 9 must require a unique superuser's name upon booting into single-user and maintenance modes. SRG-OS-000080-GPOS-00048
Having a nondefault grub superuser username makes password-guessing attacks less effective.
Verify that OL 9 requires a unique username for the grub superuser account.

Verify the boot loader superuser account has been set with the following command:

$ sudo grep -A1 "superusers" /etc/grub2.cfg 
    set superusers=""
    export superusers
    password_pbkdf2 root ${GRUB2_PASSWORD}
 
The  is the actual account name different from common names like root, admin, or administrator.

If superusers contains easily guessable usernames, this is a finding.
Configure OL 9 to have a unique username for the grub superuser account.

Edit the "/etc/grub.d/01_users" file and add or modify the following lines in the "### BEGIN /etc/grub.d/01_users ###" section:

set superusers="superusers-account"
export superusers

Once the superuser account has been added, update the grub.cfg file by running:

$ sudo grubby --update-kernel=ALL'
OL09-00-000050 SV-271451r1091065_rule
V-271452 CCI-002696 high OL 9 must use a Linux Security Module configured to enforce limits on system services. SRG-OS-000445-GPOS-00199
Without verification of the security functions, security functions may not operate correctly and the failure may go unnoticed. Security function is defined as the hardware, software, and/or firmware of the information system responsible for enforcing the system security policy and supporting the isolation of code and data on which the protection is based. Security functionality includes, but is not limited to, establishing system accounts, configuring access authorizations (i.e., permissions, privileges), setting events to be audited, and setting intrusion detection parameters.

This requirement applies to operating systems performing security function verification/testing and/or systems and environments that require this functionality.

Satisfies: SRG-OS-000445-GPOS-00199, SRG-OS-000134-GPOS-00068
Verify that OL 9 enforces the correct operation of security functions through the use of SELinux with the following command:

$ getenforce
Enforcing

If SELINUX is not set to "Enforcing", this is a finding.

Verify that SELinux is configured to be enforcing at boot.

$ grep "SELINUX=" /etc/selinux/config
# SELINUX= can take one of these three values:
# NOTE: In earlier Fedora kernel builds, SELINUX=disabled would also
SELINUX=enforcing

If SELINUX line is missing, commented out, or not set to "enforcing", this is a finding.
Configure OL 9 to verify correct operation of security functions.

Edit the file "/etc/selinux/config" and add or modify the following line:

 SELINUX=enforcing 

A reboot is required for the changes to take effect.
OL09-00-000060 SV-271452r1091068_rule
V-271453 CCI-002696 medium OL 9 must enable the SELinux targeted policy. SRG-OS-000445-GPOS-00199
Setting the SELinux policy to "targeted" or a more specialized policy ensures the system will confine processes that are likely to be targeted for exploitation, such as network or system services.

Note: During the development or debugging of SELinux modules, it is common to temporarily place nonproduction systems in "permissive" mode. In such temporary cases, SELinux policies should be developed, and once work is completed, the system should be reconfigured to "targeted".
Verify that OL 9 enables the SELinux targeted policy with the following command:

$ sestatus | grep policy
Loaded policy name:             targeted

If the loaded policy name is not "targeted", this is a finding.
Configure OL 9 to use the targetd SELINUX policy.

Edit the file "/etc/selinux/config" and add or modify the following line:

 SELINUXTYPE=targeted 

A reboot is required for the changes to take effect.
OL09-00-000065 SV-271453r1091071_rule
V-271454 CCI-000068 high OL 9 must enable FIPS mode. SRG-OS-000033-GPOS-00014
Use of weak or untested encryption algorithms undermines the purposes of using encryption to protect data. The operating system must implement cryptographic modules adhering to the higher standards approved by the federal government since this provides assurance they have been tested and validated. This includes NIST FIPS-validated cryptography for the following: Provisioning digital signatures, generating cryptographic hashes, and to protect data requiring data-at-rest protections in accordance with applicable federal laws, Executive Orders, directives, policies, regulations, and standards.

Satisfies: SRG-OS-000033-GPOS-00014, SRG-OS-000125-GPOS-00065, SRG-OS-000396-GPOS-00176, SRG-OS-000423-GPOS-00187, SRG-OS-000478-GPOS-00223
Verify that OL 9 is in FIPS mode with the following command:

$ fips-mode-setup --check
FIPS mode is enabled.

If FIPS mode is not enabled, this is a finding.
Configure OL 9 to implement FIPS mode with the following command:

$ sudo fips-mode-setup --enable

Reboot the system for the changes to take effect.
OL09-00-000070 SV-271454r1092458_rule
V-271455 CCI-000048 medium OL 9 must display the Standard Mandatory DOD Notice and Consent Banner before granting local or remote access to the system via a command line user logon. SRG-OS-000023-GPOS-00006
Display of a standardized and approved use notification before granting access to the operating system ensures privacy and security notification verbiage used is consistent with applicable federal laws, Executive Orders, directives, policies, regulations, standards, and guidance.

System use notifications are required only for access via login interfaces with human users and are not required when such human interfaces do not exist.

Satisfies: SRG-OS-000023-GPOS-00006, SRG-OS-000228-GPOS-00088
Verify that OL 9 displays the Standard Mandatory DOD Notice and Consent Banner before granting access to the operating system via a command line user logon.

Check that a banner is displayed at the command line login screen with the following command:

$ cat /etc/issue

If the banner is set correctly it will return the following text:

"You are accessing a U.S. Government (USG) Information System (IS) that is provided for USG-authorized use only.

By using this IS (which includes any device attached to this IS), you consent to the following conditions:

-The USG routinely intercepts and monitors communications on this IS for purposes including, but not limited to, penetration testing, COMSEC monitoring, network operations and defense, personnel misconduct (PM), law enforcement (LE), and counterintelligence (CI) investigations.

-At any time, the USG may inspect and seize data stored on this IS.

-Communications using, or data stored on, this IS are not private, are subject to routine monitoring, interception, and search, and may be disclosed or used for any USG-authorized purpose.

-This IS includes security measures (e.g., authentication and access controls) to protect USG interests--not for your personal benefit or privacy.

-Notwithstanding the above, using this IS does not constitute consent to PM, LE or CI investigative searching or monitoring of the content of privileged communications, or work product, related to personal representation or services by attorneys, psychotherapists, or clergy, and their assistants. Such communications and work product are private and confidential. See User Agreement for details."

If the banner text does not match the Standard Mandatory DOD Notice and Consent Banner exactly, or the line is commented out, this is a finding.
Configure OL 9 to display the Standard Mandatory DOD Notice and Consent Banner before granting access to the system via command line logon.

Edit the "/etc/issue" file to replace the default text with the Standard Mandatory DOD Notice and Consent Banner. The DOD-required text is:

"You are accessing a U.S. Government (USG) Information System (IS) that is provided for USG-authorized use only.

By using this IS (which includes any device attached to this IS), you consent to the following conditions:

-The USG routinely intercepts and monitors communications on this IS for purposes including, but not limited to, penetration testing, COMSEC monitoring, network operations and defense, personnel misconduct (PM), law enforcement (LE), and counterintelligence (CI) investigations.

-At any time, the USG may inspect and seize data stored on this IS.

-Communications using, or data stored on, this IS are not private, are subject to routine monitoring, interception, and search, and may be disclosed or used for any USG-authorized purpose.

-This IS includes security measures (e.g., authentication and access controls) to protect USG interests -- not for your personal benefit or privacy.

-Notwithstanding the above, using this IS does not constitute consent to PM, LE or CI investigative searching or monitoring of the content of privileged communications, or work product, related to personal representation or services by attorneys, psychotherapists, or clergy, and their assistants. Such communications and work product are private and confidential. See User Agreement for details."
OL09-00-000090 SV-271455r1091077_rule
V-271456 CCI-000381 medium OL 9 must not have the nfs-utils package installed. SRG-OS-000095-GPOS-00049
"nfs-utils" provides a daemon for the kernel NFS server and related tools. This package also contains the "showmount" program. "showmount" queries the mount daemon on a remote host for information about the Network File System (NFS) server on the remote host. For example, "showmount" can display the clients that are mounted on that host.
Verify that OL 9 does not have the nfs-utils package installed with the following command:

$ dnf list --installed nfs-utils
Error: No matching Packages to list

If the "nfs-utils" package is installed, this is a finding.
Remove the nfs-utils package with the following command:

$ sudo dnf remove nfs-utils
OL09-00-000100 SV-271456r1091080_rule
V-271457 CCI-000381 medium OL 9 must not have the rsh-server package installed. SRG-OS-000095-GPOS-00049
The "rsh-server" service provides unencrypted remote access service, which does not provide for the confidentiality and integrity of user passwords or the remote session and has very weak authentication. If a privileged user were to login using this service, the privileged user password could be compromised. The "rsh-server" package provides several obsolete and insecure network services. Removing it decreases the risk of accidental (or intentional) activation of those services.
Verify that OL 9 does not have the rsh-server package installed with the following command:

$ dnf list --installed rsh-server
Error: No matching Packages to list

If the "rsh-server" package is installed, this is a finding.
Remove the rsh-server package with the following command:

$ sudo dnf remove rsh-server
OL09-00-000105 SV-271457r1091083_rule
V-271458 CCI-000381 medium OL 9 must not have the telnet-server package installed. SRG-OS-000095-GPOS-00049
It is detrimental for operating systems to provide, or install by default, functionality exceeding requirements or mission objectives. These unnecessary capabilities are often overlooked and therefore, may remain unsecure. They increase the risk to the platform by providing additional attack vectors.

The telnet service provides an unencrypted remote access service, which does not provide for the confidentiality and integrity of user passwords or the remote session. If a privileged user were to login using this service, the privileged user password could be compromised.

Removing the "telnet-server" package decreases the risk of accidental (or intentional) activation of the telnet service.
Verify that OL 9 does not have the telnet-server package installed with the following command:

$ dnf list --installed telnet-server
Error: No matching Packages to list

If the "telnet-server" package is installed, this is a finding.
Remove the telnet-server package with the following command:

$ sudo dnf remove telnet-server
OL09-00-000110 SV-271458r1091086_rule
V-271459 CCI-000381 medium OL 9 must not have the gssproxy package installed. SRG-OS-000095-GPOS-00049
It is detrimental for operating systems to provide, or install by default, functionality exceeding requirements or mission objectives. These unnecessary capabilities or services are often overlooked and therefore, may remain unsecured. They increase the risk to the platform by providing additional attack vectors.

Operating systems are capable of providing a wide variety of functions and services. Some of the functions and services provided by default may not be necessary to support essential organizational operations (e.g., key missions, functions).

The gssproxy package is a proxy for GSS API credential handling and could expose secrets on some networks. It is not needed for normal function of the OS.
Verify that OL 9 does not have the gssproxy package installed with the following command:

$ dnf list --installed gssproxy
Error: No matching Packages to list

If the "gssproxy" package is installed and is not documented with the information system security officer (ISSO) as an operational requirement, this is a finding.
Remove the gssproxy package with the following command:

$ sudo dnf remove gssproxy
OL09-00-000115 SV-271459r1091089_rule
V-271460 CCI-000381 medium OL 9 must not have the iprutils package installed. SRG-OS-000095-GPOS-00049
It is detrimental for operating systems to provide, or install by default, functionality exceeding requirements or mission objectives. These unnecessary capabilities or services are often overlooked and therefore may remain unsecured. They increase the risk to the platform by providing additional attack vectors.

Operating systems are capable of providing a wide variety of functions and services. Some of the functions and services, provided by default, may not be necessary to support essential organizational operations (e.g., key missions, functions).

The iprutils package provides a suite of utilities to manage and configure SCSI devices supported by the ipr SCSI storage device driver.
Verify that OL 9 does not have the iprutils package installed with the following command:

$ dnf list --installed iprutils
Error: No matching Packages to list

If the "iprutils" package is installed and is not documented with the information system security officer (ISSO) as an operational requirement, this is a finding.
Remove the iprutils package with the following command:

$ sudo dnf remove iprutils
OL09-00-000120 SV-271460r1091092_rule
V-271461 CCI-000381 medium OL 9 must not have the tuned package installed. SRG-OS-000095-GPOS-00049
It is detrimental for operating systems to provide, or install by default, functionality exceeding requirements or mission objectives. These unnecessary capabilities or services are often overlooked and therefore may remain unsecured. They increase the risk to the platform by providing additional attack vectors.

Operating systems are capable of providing a wide variety of functions and services. Some of the functions and services, provided by default, may not be necessary to support essential organizational operations (e.g., key missions, functions).

The tuned package contains a daemon that tunes the system settings dynamically. It does so by monitoring the usage of several system components periodically. Based on that information, components will then be put into lower or higher power savings modes to adapt to the current usage. The tuned package is not needed for normal OS operations.
Verify that OL 9 does not have the tuned package installed with the following command:

$ dnf list --installed tuned
Error: No matching Packages to list

If the "tuned" package is installed and is not documented with the information system security officer (ISSO) as an operational requirement, this is a finding.
Remove the tuned package with the following command:

$ sudo dnf remove tuned
OL09-00-000125 SV-271461r1091095_rule
V-271462 CCI-000197 high OL 9 must not have a File Transfer Protocol (FTP) server package installed. SRG-OS-000074-GPOS-00042
The FTP service provides an unencrypted remote access that does not provide for the confidentiality and integrity of user passwords or the remote session. If a privileged user were to log on using this service, the privileged user password could be compromised. SSH or other encrypted file transfer methods must be used in place of this service.

Removing the "vsftpd" package decreases the risk of accidental activation.

Satisfies: SRG-OS-000074-GPOS-00042, SRG-OS-000095-GPOS-00049
Verify that OL 9 does not have an FTP server package installed with the following command:

$ dnf list --installed | grep ftp 

If the "ftp" package is installed, this is a finding.
Remove the ftp package can be removed with the following command (using vsftpd as an example):

$ sudo dnf remove vsftpd
OL09-00-000130 SV-271462r1091098_rule
V-271463 CCI-000366 high OL 9 must not have a Trivial File Transfer Protocol (TFTP) server package installed. SRG-OS-000480-GPOS-00227
Removing the "tftp-server" package decreases the risk of the accidental (or intentional) activation of tftp services.

If TFTP is required for operational support (such as transmission of router configurations), its use must be documented with the information systems security manager (ISSM), restricted to only authorized personnel, and have access control rules established.
Verify that OL 9 does not have a tftp server package installed with the following command:

$ dnf list --installed | grep tftp 

If the "tftp" package is installed, this is a finding.
Remove the tftp package can be removed with the following command:

$ sudo dnf remove tftp
OL09-00-000135 SV-271463r1091101_rule
V-271464 CCI-000366 medium OL 9 must not have the quagga package installed. SRG-OS-000480-GPOS-00227
Quagga is a network routing software suite providing implementations of Open Shortest Path First (OSPF), Routing Information Protocol (RIP), Border Gateway Protocol (BGP) for Unix and Linux platforms.

If there is no need to make the router software available, removing it provides a safeguard against its activation.
Verify that OL 9 does not have the quagga package installed with the following command:

$ dnf list --installed quagga
Error: No matching Packages to list

If the quagga package is installed and is not documented with the information system security officer (ISSO) as an operational requirement, this is a finding.
Remove the quagga package with the following command:

$ sudo dnf remove quagga
OL09-00-000140 SV-271464r1092459_rule
V-271465 CCI-000382 medium OL 9 must not have a graphical display manager installed unless approved. SRG-OS-000480-GPOS-00227
Unnecessary service packages must not be installed to decrease the attack surface of the system. Graphical display managers have a long history of security vulnerabilities and must not be used, unless approved and documented.
Verify that OL 9 does not have a graphical user interface installed with the following command:

$ dnf list --installed "xorg*common"
Error: No matching Packages to list

If the "x11-server-common" package is installed, and the use of a graphical user interface has not been documented with the information system security officer (ISSO) as an operational requirement, this is a finding.
Remove all xorg packages with the following command:

Warning: If accessing the system through the graphical user interface, change to the multi-user.target with the following command:

$ sudo systemctl isolate multi-user.target

Warning: Removal of the graphical user interface will immediately render it useless. The following commands must not be run from a virtual terminal emulator in the graphical interface.

$ sudo dnf remove "xorg*"
$ sudo systemctl set-default multi-user.target

If there is an operational requirement for a graphical user interface it must be documented with the ISSO.
OL09-00-000145 SV-271465r1091107_rule
V-271466 CCI-000381 medium OL 9 must not have the sendmail package installed. SRG-OS-000095-GPOS-00049
The sendmail software was not developed with security in mind, and its design prevents it from being effectively contained by SELinux. Postfix must be used instead.
Verify that OL 9 does not have the sendmail package installed with the following command:

$ dnf list --installed sendmail
Error: No matching Packages to list

If the "sendmail" package is installed, this is a finding.
Remove the sendmail package with the following command:

$ sudo dnf remove sendmail
OL09-00-000150 SV-271466r1091110_rule
V-271467 CCI-001084 medium OL 9 must have policycoreutils package installed. SRG-OS-000134-GPOS-00068
Without verification of the security functions, security functions may not operate correctly and the failure may go unnoticed. Security function is defined as the hardware, software, and/or firmware of the information system responsible for enforcing the system security policy and supporting the isolation of code and data on which the protection is based. Security functionality includes, but is not limited to, establishing system accounts, configuring access authorizations (i.e., permissions, privileges), setting events to be audited, and setting intrusion detection parameters.

Policycoreutils contains the policy core utilities that are required for basic operation of an SELinux-enabled system. These utilities include load_policy to load SELinux policies, setfile to label filesystems, newrole to switch roles, and run_init to run /etc/init.d scripts in the proper context.
Verify that OL 9 has the policycoreutils package installed with the following command:

$ dnf list --installed policycoreutils
Installed Packages
policycoreutils.x86_64                                       3.6-2.1.el9                                       @anaconda                                               

If the "policycoreutils" package is not installed, this is a finding.
Install the policycoreutils package with the following command:
 
$ sudo dnf install -y policycoreutils
OL09-00-000200 SV-271467r1091113_rule
V-271468 CCI-000366 medium OL 9 policycoreutils-python-utils package must be installed. SRG-OS-000480-GPOS-00227
The policycoreutils-python-utils package is required to operate and manage an SELinux environment and its policies. It provides utilities such as semanage, audit2allow, audit2why, chcat, and sandbox.
Verify that OL 9 policycoreutils-python-utils service package is installed with the following command:

$ dnf list --installed policycoreutils-python-utils
Installed Packages
policycoreutils-python-utils.noarch                                3.6-2.1.el9                                @AppStream

If the "policycoreutils-python-utils" package is not installed, this is a finding.
Install the policycoreutils-python-utils service package (if the policycoreutils-python-utils service is not already installed) with the following command:

$ sudo dnf install -y policycoreutils-python-utils
OL09-00-000210 SV-271468r1091116_rule
V-271469 CCI-000382 medium OL 9 must have the firewalld package installed. SRG-OS-000096-GPOS-00050
Firewalld provides an easy and effective way to block/limit remote access to the system via ports, services, and protocols.

Remote access services, such as those providing remote access to network devices and information systems, which lack automated control capabilities, increase risk and make remote user access management difficult at best.

Remote access is access to DOD nonpublic information systems by an authorized user (or an information system) communicating through an external, nonorganization-controlled network. Remote access methods include, for example, dial-up, broadband, and wireless.

OL 9 functionality (e.g., SSH) must be capable of taking enforcement action if the audit reveals unauthorized activity. Automated control of remote access sessions allows organizations to ensure ongoing compliance with remote access policies by enforcing connection rules of remote access applications on a variety of information system components (e.g., servers, workstations, notebook computers, smartphones, and tablets).

Satisfies: SRG-OS-000096-GPOS-00050, SRG-OS-000297-GPOS-00115, SRG-OS-000298-GPOS-00116, SRG-OS-000480-GPOS-00232
Verify that OL 9 has the firewalld package installed with the following command:

$ dnf list --installed firewalld 
Installed Packages
firewalld.noarch                                        1.3.4-1.0.1.el9                                        @anaconda

If the "firewall" package is not installed, this is a finding.
Install the firewalld package with the following command:

$ sudo dnf install -y firewalld
OL09-00-000220 SV-271469r1091119_rule
V-271470 CCI-000382 medium OL 9 must be configured so that the firewalld service is active. SRG-OS-000096-GPOS-00050
Firewalld provides an easy and effective way to block/limit remote access to the system via ports, services, and protocols.

Remote access services, such as those providing remote access to network devices and information systems, which lack automated control capabilities, increase risk and make remote user access management difficult at best.

Remote access is access to DOD nonpublic information systems by an authorized user (or an information system) communicating through an external, nonorganization-controlled network. Remote access methods include, for example, dial-up, broadband, and wireless.

OL 9 functionality (e.g., RDP) must be capable of taking enforcement action if the audit reveals unauthorized activity. Automated control of remote access sessions allows organizations to ensure ongoing compliance with remote access policies by enforcing connection rules of remote access applications on a variety of information system components (e.g., servers, workstations, notebook computers, smartphones, and tablets).

Satisfies: SRG-OS-000096-GPOS-00050, SRG-OS-000297-GPOS-00115
Verify that OL 9 firewalld is active with the following command:

$ systemctl is-active firewalld 
active

If the firewalld service is not active, this is a finding.
Enable the firewalld service with the following command:

$ sudo systemctl enable --now firewalld

Note: If firewalld is masked, run following command:

sudo systemctl unmask firewalld
OL09-00-000221 SV-271470r1092618_rule
V-271471 CCI-000382 medium OL 9 must be configured to prohibit or restrict the use of functions, ports, protocols, and/or services, as defined in the Ports, Protocols, and Services Management (PPSM) Category Assignments List (CAL) and vulnerability assessments. SRG-OS-000096-GPOS-00050
To prevent unauthorized connection of devices, unauthorized transfer of information, or unauthorized tunneling (i.e., embedding of data types within data types), organizations must disable or restrict unused or unnecessary ports, protocols, and services on information systems.
Verify OL 9 is configured to prohibit or restrict the use of functions, ports, protocols, and/or services that are unnecessary or prohibited. 

Inspect the firewall configuration and running services to verify which services are currently active with the following command:

$ sudo firewall-cmd --list-all-zones
custom (active)
target: DROP
icmp-block-inversion: no
interfaces: ens33
sources: 
services: dhcpv6-client dns http https ldaps rpc-bind ssh
ports: 
masquerade: no
forward-ports: 
icmp-blocks: 
rich rules: 

Ask the system administrator for the site or program PPSM Component Local Service Assessment (CLSA). Verify the services allowed by the firewall match the PPSM CLSA. 

If there are additional ports, protocols, or services that are not in the PPSM CLSA, or there are ports, protocols, or services that are prohibited by the PPSM CAL, this is a finding.
Update the firewall settings and/or running services to comply with the PPSM CLSA for the site or program and the PPSM CAL.

Then run the following command to load the newly created rule(s):

$ sudo firewall-cmd --reload
OL09-00-000222 SV-271471r1091125_rule
V-271472 CCI-000382 medium OL 9 must control remote access methods. SRG-OS-000096-GPOS-00050
To prevent unauthorized connection of devices, unauthorized transfer of information, or unauthorized tunneling (i.e., embedding of data types within data types), organizations must disable or restrict unused or unnecessary physical and logical ports/protocols on information systems.

Operating systems are capable of providing a wide variety of functions and services. Some of the functions and services provided by default may not be necessary to support essential organizational operations. Additionally, it is sometimes convenient to provide multiple services from a single component (e.g., VPN and IPS); however, doing so increases risk over limiting the services provided by one component.

To support the requirements and principles of least functionality, the operating system must support the organizational requirements, providing only essential capabilities and limiting the use of ports, protocols, and/or services to only those required, authorized, and approved to conduct official business.

Satisfies: SRG-OS-000096-GPOS-00050, SRG-OS-000297-GPOS-00115
Verify that OL 9 controls remote access methods.

Inspect the list of enabled firewall ports and verify they are configured correctly by running the following command:

$ sudo firewall-cmd --list-all 

Ask the system administrator for the site or program Ports, Protocols, and Services Management Component Local Service Assessment (PPSM CLSA). Verify the services allowed by the firewall match the PPSM CLSA. 

If there are additional ports, protocols, or services that are not in the PPSM CLSA, or there are ports, protocols, or services that are prohibited by the PPSM Category Assurance List (CAL), or there are no firewall rules configured, this is a finding.
Configure OL 9 to allow approved settings and/or running services to comply with the PPSM CLSA for the site or program and the PPSM CAL.

To open a port for a service, configure firewalld using the following command:

$ sudo firewall-cmd --permanent --add-port=port_number/tcp
or
$ sudo firewall-cmd --permanent --add-service=service_name
OL09-00-000223 SV-271472r1091128_rule
V-271473 CCI-000366 medium OL 9 must be configured so that the firewall employs a deny-all, allow-by-exception policy for allowing connections to other systems. SRG-OS-000480-GPOS-00227
Failure to restrict network connectivity only to authorized systems permits inbound connections from malicious systems. It also permits outbound connections that may facilitate exfiltration of DOD data.

OL 9 incorporates the "firewalld" daemon, which allows for many different configurations. One of these configurations is zones. Zones can be used to a deny-all, allow-by-exception approach. The default "drop" zone will drop all incoming network packets unless it is explicitly allowed by the configuration file or is related to an outgoing network connection.
Verify that OL 9 is configured to employ a deny-all, allow-by-exception policy for allowing connections to other systems with the following commands:

$ sudo  firewall-cmd --state
running

$ sudo firewall-cmd --get-active-zones
public
   interfaces: ens33

$ sudo firewall-cmd --info-zone=public | grep target
   target: DROP

$ sudo firewall-cmd --permanent --info-zone=public | grep target
   target: DROP

If no zones are active on the OL 9 interfaces or if runtime and permanent targets are set to a different option other than "DROP", this is a finding.
Configure the firewalld daemon to employ a deny-all, allow-by-exception with the following commands:

Start by adding the exceptions that are required for mission functionality to the "drop" zone. If SSH access on port 22 is needed, for example, run the following: "sudo firewall-cmd --permanent --add-service=ssh --zone=drop"

Reload the firewall rules to update the runtime configuration from the "--permanent" changes made above:
$ sudo firewall-cmd --reload

Set the default zone to the drop zone:
$ sudo firewall-cmd --set-default-zone=drop
Note: This is a runtime and permanent change.

Add any interfaces to the newly modified "drop" zone:
$ sudo firewall-cmd --permanent --zone=drop --change-interface=ens33

Reload the firewall rules for changes to take effect:
$ sudo firewall-cmd --reload
OL09-00-000224 SV-271473r1091131_rule
V-271474 CCI-002235 medium OL 9 must have the sudo package installed. SRG-OS-000324-GPOS-00125
sudo is a program designed to allow a system administrator to give limited root privileges to users and log root activity. The basic philosophy is to give as few privileges as possible but still allow system users to complete their work.
Verify that OL 9 has the sudo package installed with the following command:

$ dnf list --installed sudo
Installed Packages
sudo.x86_64                                          1.9.5p2-10.el9_3                                          @anaconda

If the sudo package is not installed, this is a finding.
The sudo package can be installed with the following command:

# dnf install -y sudo
OL09-00-000230 SV-271474r1091134_rule
V-271475 CCI-000366 medium OL 9 must use the invoking user's password for privilege escalation when using sudo. SRG-OS-000480-GPOS-00227
If the rootpw, targetpw, or runaspw flags are defined and not disabled, by default the operating system will prompt the invoking user for the "root" user password.
Verify that OL 9 is configured to enforce the sudoers security policy to use the invoking user's password for privilege escalation with the following command:

$ sudo egrep -i '(!rootpw|!targetpw|!runaspw)' /etc/sudoers /etc/sudoers.d/* | grep -v '#'
/etc/sudoers:Defaults !targetpw
/etc/sudoers:Defaults !rootpw
/etc/sudoers:Defaults !runaspw

If no results are returned, this is a finding.

If results are returned from more than one file location, this is a finding.

If "Defaults !targetpw" is not defined, this is a finding.

If "Defaults !rootpw" is not defined, this is a finding.

If "Defaults !runaspw" is not defined, this is a finding.
Configure OL 9 to use the invoking user's password for privilege escalation when using sudo. 

Define the following in the Defaults section of the /etc/sudoers file or a single configuration file in the /etc/sudoers.d/ directory:

Defaults !targetpw
Defaults !rootpw
Defaults !runaspw
OL09-00-000231 SV-271475r1091137_rule
V-271476 CCI-000366 medium OL 9 must restrict privilege elevation to authorized personnel. SRG-OS-000480-GPOS-00227
If the sudoers file is not configured correctly, any user defined on the system can initiate privileged actions on the target system.
Verify that OL 9 restricts privilege elevation to authorized personnel with the following command:

$ sudo sh -c 'grep -iw ALL /etc/sudoers /etc/sudoers.d/*'

If the either of the following entries are returned, this is a finding:
ALL     ALL=(ALL) ALL
ALL     ALL=(ALL:ALL) ALL
Remove the following entries from the /etc/sudoers file or configuration file under /etc/sudoers.d/:

ALL     ALL=(ALL) ALL
ALL     ALL=(ALL:ALL) ALL
OL09-00-000232 SV-271476r1091140_rule
V-271477 CCI-002450 medium OL 9 must have the crypto-policies package installed. SRG-OS-000396-GPOS-00176
Centralized cryptographic policies simplify applying secure ciphers across an operating system and the applications that run on that operating system. Use of weak or untested encryption algorithms undermines the purposes of using encryption to protect data.

Satisfies: SRG-OS-000396-GPOS-00176, SRG-OS-000393-GPOS-00173, SRG-OS-000394-GPOS-00174
Verify that OL 9 crypto-policies package is installed with the following command:

$ dnf list --installed crypto-policies
Installed Packages
crypto-policies.noarch                           20240202-1.git283706d.el9                            @ol9_baseos_latest

If the crypto-policies package is not installed, this is a finding.
Install the crypto-policies package (if not already installed) with the following command:

$ sudo dnf install -y crypto-policies
OL09-00-000240 SV-271477r1091143_rule
V-271478 CCI-002450 medium OL 9 must implement a FIPS 140-3 compliant system-wide cryptographic policy. SRG-OS-000396-GPOS-00176
Centralized cryptographic policies simplify applying secure ciphers across an operating system and the applications that run on that operating system. Use of weak or untested encryption algorithms undermines the purposes of using encryption to protect data.

Satisfies: SRG-OS-000396-GPOS-00176, SRG-OS-000393-GPOS-00173, SRG-OS-000394-GPOS-00174
Verify that OL 9 is set to use a modified FIPS compliant systemwide crypto-policy.
 
$ update-crypto-policies --show
FIPS
 
If the system wide crypto policy is not set to "FIPS", this is a finding.

Note: If subpolicies have been configured, they will be listed in a colon-separated list starting with FIPS as follows:

FIPS::.

Verify the current minimum crypto-policy configuration with the following commands:
 
$ grep -E 'rsa_size|hash' /etc/crypto-policies/state/CURRENT.pol
hash = SHA2-256 SHA2-384 SHA2-512 SHA2-224 SHA3-256 SHA3-384 SHA3-512 SHAKE-256
min_rsa_size = 2048
 
If the "hash" values do not include at least the following FIPS 140-3 compliant algorithms "SHA2-256 SHA2-384 SHA2-512 SHA2-224 SHA3-256 SHA3-384 SHA3-512 SHAKE-256", this is a finding.

If there are algorithms that include "SHA1" or a hash value less than "256" this is a finding.

If the "min_rsa_size" is not set to a value of at least 2048, this is a finding.
 
If these commands do not return any output, this is a finding.
Configure OL 9 to use a modified FIPS compliant systemwide crypto-policy.
 
Create subpolicies for enhancements to the systemwide crypto-policy with the following commands:
 
Create or edit the SCOPES-AND-WILDCARDS policy module in a text editor and insert options that modify the system-wide cryptographic policy as follows:

$ sudo vi /etc/crypto-policies/policies/modules/SCOPES-AND-WILDCARDS.pmod
 
Add the following lines to the policy:

# Disable CHACHA20-POLY1305 for the TLS protocol (OpenSSL, GnuTLS, NSS, and OpenJDK)
cipher@TLS = -CHACHA20-POLY1305
 
# Disable all CBC mode ciphers for the SSH protocol (libssh and OpenSSH):

cipher@SSH = -*-CBC
 
Create or edit the OPENSSH-SUBPOLICY module in a text editor and insert options that modify the system-wide crypto-policy as follows:

$ sudo vi /etc/crypto-policies/policies/modules/OPENSSH-SUBPOLICY.pmod
 
Add the following lines to the policy:

# Define ciphers for OpenSSH
cipher@SSH=AES-256-GCM AES-128-GCM AES-256-CTR AES-128-CTR
 
# Define MACs for OpenSSH
mac@SSH=HMAC-SHA2-512 HMAC-SHA2-256
 
Create or edit the REQUIRE.pmod file and add the following lines to include the subpolicies in the FIPS configuration with the following command:

$ sudo vi /etc/crypto-policies/policies/modules/REQUIRE.pmod
 
Add the following lines to REQUIRE.pmod:

@OPENSSH-SUBPOLICY
@SCOPES-AND-WILDCARDS
 
Apply the policy enhancements to the FIPS system-wide cryptographic policy level with the following command:
 
$ sudo update-crypto-policies --set FIPS

Note: If additional subpolicies are being employed, they must be added to the REQUIRE.pmod as well. REQUIRE.pmod is included in the systemwide crypto-policy when it is set.
 
To make the cryptographic settings effective for already running services and applications, restart the system:

$ sudo reboot
OL09-00-000241 SV-271478r1092620_rule
V-271479 CCI-002450 medium OL 9 must not allow the cryptographic policy to be overridden. SRG-OS-000396-GPOS-00176
Centralized cryptographic policies simplify applying secure ciphers across an operating system and the applications that run on that operating system. Use of weak or untested encryption algorithms undermines the purposes of using encryption to protect data.

Satisfies: SRG-OS-000396-GPOS-00176, SRG-OS-000393-GPOS-00173, SRG-OS-000394-GPOS-00174
Verify that OL 9 cryptographic policies are not overridden.

Verify that the configured policy matches the generated policy with the following command:

$ sudo update-crypto-policies --check && echo PASS
The configured policy matches the generated policy
PASS

If the last line is not "PASS", this is a finding.

List all of the crypto backends configured on the system with the following command:

$ ls -l /etc/crypto-policies/back-ends/ 
lrwxrwxrwx. 1 root root  40 Nov 13 16:29 bind.config -> /usr/share/crypto-policies/FIPS/bind.txt
lrwxrwxrwx. 1 root root  42 Nov 13 16:29 gnutls.config -> /usr/share/crypto-policies/FIPS/gnutls.txt
lrwxrwxrwx. 1 root root  40 Nov 13 16:29 java.config -> /usr/share/crypto-policies/FIPS/java.txt
lrwxrwxrwx. 1 root root  46 Nov 13 16:29 javasystem.config -> /usr/share/crypto-policies/FIPS/javasystem.txt
lrwxrwxrwx. 1 root root  40 Nov 13 16:29 krb5.config -> /usr/share/crypto-policies/FIPS/krb5.txt
lrwxrwxrwx. 1 root root  45 Nov 13 16:29 libreswan.config -> /usr/share/crypto-policies/FIPS/libreswan.txt
lrwxrwxrwx. 1 root root  42 Nov 13 16:29 libssh.config -> /usr/share/crypto-policies/FIPS/libssh.txt
-rw-r--r--. 1 root root 398 Nov 13 16:29 nss.config
lrwxrwxrwx. 1 root root  43 Nov 13 16:29 openssh.config -> /usr/share/crypto-policies/FIPS/openssh.txt
lrwxrwxrwx. 1 root root  49 Nov 13 16:29 opensshserver.config -> /usr/share/crypto-policies/FIPS/opensshserver.txt
lrwxrwxrwx. 1 root root  46 Nov 13 16:29 opensslcnf.config -> /usr/share/crypto-policies/FIPS/opensslcnf.txt
lrwxrwxrwx. 1 root root  43 Nov 13 16:29 openssl.config -> /usr/share/crypto-policies/FIPS/openssl.txt
lrwxrwxrwx. 1 root root  48 Nov 13 16:29 openssl_fips.config -> /usr/share/crypto-policies/FIPS/openssl_fips.txt

If the paths do not point to the respective files under /usr/share/crypto-policies/FIPS path, this is a finding.

Note: nss.config should not be hyperlinked.
Configure OL 9 to correctly implement the systemwide cryptographic policies by reinstalling the crypto-policies package contents.

Reinstall crypto-policies with the following command:

$ sudo dnf -y reinstall crypto-policies

Set the crypto-policy to FIPS with the following command:

$ sudo update-crypto-policies --set FIPS

Setting system policy to FIPS

Note: Systemwide crypto policies are applied on application startup. It is recommended to restart the system for the change of policies to fully take place.
OL09-00-000242 SV-271479r1092621_rule
V-271480 CCI-000366 medium OL 9 must be configured so that the cryptographic hashes of system files match vendor values. SRG-OS-000480-GPOS-00227
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.
Verify that OL 9 is configured so that the cryptographic hashes of system files match vendor values.
 
List files on the system that have file hashes different from what is expected by the RPM database with the following command:

$ sudo rpm -Va --noconfig | awk '$1 ~ /..5/ && $2 != "c"' 

If there is output, this is a finding.
Configure OL 9 so that the cryptographic hashes of system files match vendor values.

Given output from the check command, identify the package that provides the output and reinstall it. The following trimmed example output shows a package that has failed verification, been identified, and been reinstalled:

$ sudo rpm -Va --noconfig | awk '$1 ~ /..5/ && $2 != "c"'
S.5....T.    /usr/bin/znew

$ sudo dnf provides /usr/bin/znew
[...]
gzip-1.10-8.el9.x86_64 : The GNU data compression program
[...]

$ sudo dnf -y reinstall gzip
[...]

$ sudo rpm -Va --noconfig | awk '$1 ~ /..5/ && $2 != "c"'
[no output]
OL09-00-000243 SV-271480r1091152_rule
V-271481 CCI-002450 high OL 9 cryptographic policy files must match files shipped with the operating system. SRG-OS-000478-GPOS-00223
The OL 9 package crypto-policies defines the cryptography policies for the system.

If the files are changed from those shipped with the operating system, it may be possible for OL 9 to use cryptographic functions that are not FIPS 140-3 approved.

Satisfies: SRG-OS-000478-GPOS-00223, SRG-OS-000396-GPOS-00176
Verify that OL 9 crypto-policies package has not been modified with the following command:

$ rpm -V crypto-policies

If the command has any output, this is a finding.
Reinstall the crypto-policies package to remove any modifications.

$ sudo dnf reinstall -y crypto-policies
OL09-00-000244 SV-271481r1091155_rule
V-271482 CCI-002418 medium OL 9 networked systems must have SSH installed. SRG-OS-000423-GPOS-00187
Without protection of the transmitted information, confidentiality and integrity may be compromised because unprotected communications can be intercepted and either read or altered. 

This requirement applies to both internal and external networks and all types of information system components from which information can be transmitted (e.g., servers, mobile devices, notebook computers, printers, copiers, scanners, and facsimile machines). Communication paths outside the physical protection of a controlled boundary are exposed to the possibility of interception and modification. 

Protecting the confidentiality and integrity of organizational information can be accomplished by physical means (e.g., employing physical distribution systems) or by logical means (e.g., employing cryptographic techniques). If physical means of protection are employed, then logical means (cryptography) do not have to be employed, and vice versa.

Satisfies: SRG-OS-000423-GPOS-00187, SRG-OS-000424-GPOS-00188, SRG-OS-000425-GPOS-00189, SRG-OS-000426-GPOS-00190
Verify that OL 9 has the openssh-server package installed with the following command:

$ dnf list --installed openssh-server
Installed Packages
openssh-server.x86_64                              8.7p1-38.0.2.el9_4.4                               @ol9_baseos_latest

If the "openssh-server" package is not installed, this is a finding.
The openssh-server package can be installed with the following command:
 
$ sudo dnf install -y openssh-server
OL09-00-000250 SV-271482r1091158_rule
V-271483 CCI-002418 medium OL 9 networked systems must have and implement SSH to protect the confidentiality and integrity of transmitted and received information, as well as information during preparation for transmission. SRG-OS-000423-GPOS-00187
Without protection of the transmitted information, confidentiality and integrity may be compromised because unprotected communications can be intercepted and either read or altered. 

This requirement applies to both internal and external networks and all types of information system components from which information can be transmitted (e.g., servers, mobile devices, notebook computers, printers, copiers, scanners, and facsimile machines). Communication paths outside the physical protection of a controlled boundary are exposed to the possibility of interception and modification. 

Protecting the confidentiality and integrity of organizational information can be accomplished by physical means (e.g., employing physical distribution systems) or by logical means (e.g., employing cryptographic techniques). If physical means of protection are employed, then logical means (cryptography) do not have to be employed, and vice versa.

Satisfies: SRG-OS-000423-GPOS-00187, SRG-OS-000424-GPOS-00188, SRG-OS-000425-GPOS-00189, SRG-OS-000426-GPOS-00190
Verify that OL 9 networked systems implement SSH to protect the confidentiality and integrity of transmitted and received information, as well as information during preparation for transmission.

Verify that "sshd" is active with the following command:

$ systemctl is-active sshd
active

If the "sshd" service is not active, this is a finding.
Enable the sshd service with the following command:

$ systemctl enable --now sshd
OL09-00-000251 SV-271483r1091161_rule
V-271484 CCI-001453 medium The OL 9 SSH daemon must be configured to use systemwide cryptographic policies. SRG-OS-000250-GPOS-00093
Without cryptographic integrity protections, information can be altered by unauthorized users without detection.

Remote access (e.g., RDP) is access to DOD nonpublic information systems by an authorized user (or an information system) communicating through an external, nonorganization-controlled network. Remote access methods include, for example, dial-up, broadband, and wireless.

Cryptographic mechanisms used for protecting the integrity of information include, for example, signed hash functions using asymmetric cryptography enabling distribution of the public key to verify the hash information while maintaining the confidentiality of the secret key used to generate the hash.

OL 9 incorporates systemwide crypto policies by default. The SSH configuration file has no effect on the ciphers, MACs, or algorithms unless specifically defined in the /etc/sysconfig/sshd file. The employed algorithms can be viewed in the /etc/crypto-policies/back-ends/ directory.
Verify that OL 9 is configured to implement systemwide cryptographic policies when the SSH daemon is invoked.

Verify that systemwide cryptographic policies are in effect with the following command:

$ sudo /usr/sbin/sshd -dd 2>&1 | awk '/filename/ {print $4}' | tr -d '\r' | tr '\n' ' ' | xargs sudo grep -iH '^\s*include'
/etc/ssh/sshd_config:Include /etc/ssh/sshd_config.d/*.conf
/etc/ssh/sshd_config.d/50-redhat.conf:Include /etc/crypto-policies/back-ends/opensshserver.config

If "Include /etc/ssh/sshd_config.d/*.conf" or "Include /etc/crypto-policies/back-ends/opensshserver.config" are not included in the system sshd config this is a finding. 

Additionally, if the file /etc/ssh/sshd_config.d/50-redhat.conf is missing, this is a finding.
Configure the OL 9 SSH daemon to use systemwide cryptographic policies by running the following commands:

$ sudo dnf reinstall -y openssh-server
OL09-00-000252 SV-271484r1092624_rule
V-271485 CCI-001453 medium OL 9 SSH server must be configured to use only ciphers employing FIPS 140-3 validated cryptographic hash algorithms to protect the confidentiality of SSH server connections. SRG-OS-000250-GPOS-00093
Without cryptographic integrity protections, information can be altered by unauthorized users without detection.

Remote access (e.g., RDP) is access to DOD nonpublic information systems by an authorized user (or an information system) communicating through an external, nonorganization-controlled network. Remote access methods include, for example, dial-up, broadband, and wireless.

Cryptographic mechanisms used for protecting the integrity of information include, for example, signed hash functions using asymmetric cryptography enabling distribution of the public key to verify the hash information while maintaining the confidentiality of the secret key used to generate the hash.

OL 9 incorporates systemwide crypto policies by default. The SSH configuration file has no effect on the ciphers, MACs, or algorithms unless specifically defined in the /etc/sysconfig/sshd file. The employed algorithms can be viewed in the /etc/crypto-policies/back-ends/opensshserver.config file.
Verify that OL 9 SSH server is configured to use only ciphers employing FIPS 140-3 approved algorithms.

To verify the ciphers in the systemwide SSH configuration file, use the following command:

$ sudo grep -i Ciphers /etc/crypto-policies/back-ends/opensshserver.config 
Ciphers aes256-gcm@openssh.com,aes256-ctr,aes128-gcm@openssh.com,aes128-ctr

If the cipher entries in the "opensshserver.config" file have any ciphers other than "aes256-gcm@openssh.com,aes256-ctr,aes128-gcm@openssh.com,aes128-ctr", or they are missing or commented out, this is a finding.
Configure the OL 9 SSH server to use only ciphers employing FIPS 140-3 approved algorithms.

Reinstall crypto-policies with the following command:

$ sudo dnf -y reinstall crypto-policies

Set the crypto-policy to FIPS with the following command:

$ sudo update-crypto-policies --set FIPS

Setting system policy to FIPS

Note: Systemwide crypto policies are applied on application startup. It is recommended to restart the system for the change of policies to fully take place.
OL09-00-000254 SV-271485r1092625_rule
V-271486 CCI-001453 medium OL 9 SSH server must be configured to use only Message Authentication Codes (MACs) employing FIPS 140-3 validated cryptographic hash algorithms to protect the confidentiality of SSH server connections. SRG-OS-000250-GPOS-00093
Without cryptographic integrity protections, information can be altered by unauthorized users without detection.

Remote access (e.g., RDP) is access to DOD nonpublic information systems by an authorized user (or an information system) communicating through an external, nonorganization-controlled network. Remote access methods include, for example, dial-up, broadband, and wireless.

Cryptographic mechanisms used for protecting the integrity of information include, for example, signed hash functions using asymmetric cryptography enabling distribution of the public key to verify the hash information while maintaining the confidentiality of the secret key used to generate the hash.

OL 9 incorporates systemwide crypto policies by default. The SSH configuration file has no effect on the ciphers, MACs, or algorithms unless specifically defined in the /etc/sysconfig/sshd file. The employed algorithms can be viewed in the /etc/crypto-policies/back-ends/opensshserver.config file.
Verify that OL 9 SSH server is configured to use only MACs employing FIPS 140-3 approved algorithms.

To verify the MACs in the systemwide SSH configuration file, use the following command:

$ sudo grep -i MACs /etc/crypto-policies/back-ends/opensshserver.config
MACs hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha2-256,hmac-sha2-512

If the MACs entries in the "opensshserver.config" file have any hashes other than "hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha2-256,hmac-sha2-512", or they are missing or commented out, this is a finding.
Configure the OL 9 SSH server to use only MACs employing FIPS 140-3 approved algorithms.

Reinstall crypto-policies with the following command:

$ sudo dnf -y reinstall crypto-policies

Set the crypto-policy to FIPS with the following command:

$ sudo update-crypto-policies --set FIPS

Setting system policy to FIPS

Note: Systemwide crypto policies are applied on application startup. It is recommended to restart the system for the change of policies to fully take place.
OL09-00-000255 SV-271486r1092626_rule
V-271487 CCI-000048 medium OL 9 must display the Standard Mandatory DOD Notice and Consent Banner before granting local or remote access to the system via a SSH logon. SRG-OS-000023-GPOS-00006
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.

Satisfies: SRG-OS-000023-GPOS-00006, SRG-OS-000228-GPOS-00088
Verify that OL 9 displays the Standard Mandatory DOD Notice and Consent Banner before granting access to the system via SSH connections.

Check for the location of the banner file currently being used with the following command:

$ sudo /usr/sbin/sshd -dd 2>&1 | awk '/filename/ {print $4}' | tr -d '\r' | tr '\n' ' ' | xargs sudo grep -iH '^\s*banner'
banner /etc/issue

If the line is commented out or if the file is missing, this is a finding.
Configure OL 9 to display the Standard Mandatory DOD Notice and Consent Banner before granting access to the system via ssh.

Edit the "etc/ssh/sshd_config" file or a file in "/etc/ssh/sshd_config.d" to uncomment the banner keyword and configure it to point to a file that will contain the logon banner (this file may be named differently or be in a different location if using a version of SSH that is provided by a third-party vendor).

An example configuration line is:

Banner /etc/issue
OL09-00-000256 SV-271487r1091173_rule
V-271488 CCI-000366 medium OL 9 must have the openssh-clients package installed. SRG-OS-000480-GPOS-00227
This package includes utilities to make encrypted connections and transfer files securely to SSH servers.
Verify that OL 9 has the openssh-clients package installed with the following command:

$ dnf list --installed openssh-clients
Installed Packages
openssh-clients.x86_64                          8.7p1-38.0.2.el9_4.4                          @ol9_baseos_latest

If the openssh-clients package is not installed, this is a finding.
Install the openssh-clients package with the following command:
 
$ sudo dnf install -y openssh-clients
OL09-00-000260 SV-271488r1091176_rule
V-271489 CCI-001453 medium OL 9 SSH client must be configured to use only DOD-approved encryption ciphers employing FIPS 140-3 validated cryptographic hash algorithms to protect the confidentiality of SSH client connections. SRG-OS-000250-GPOS-00093
Without cryptographic integrity protections, information can be altered by unauthorized users without detection.

Remote access (e.g., RDP) is access to DOD nonpublic information systems by an authorized user (or an information system) communicating through an external, nonorganization-controlled network. Remote access methods include, for example, dial-up, broadband, and wireless.

Cryptographic mechanisms used for protecting the integrity of information include, for example, signed hash functions using asymmetric cryptography enabling distribution of the public key to verify the hash information while maintaining the confidentiality of the secret key used to generate the hash.

OL 9 incorporates systemwide crypto policies by default. The SSH configuration file has no effect on the ciphers, MACs, or algorithms unless specifically defined in the /etc/sysconfig/sshd file. The employed algorithms can be viewed in the /etc/crypto-policies/back-ends/opensshserver.config file.
Verify that OL 9 is configured so that the SSH client uses only ciphers employing FIPS 140-3 approved algorithms.

To verify the ciphers in the systemwide SSH configuration file, use the following command:

$ grep -i Ciphers /etc/crypto-policies/back-ends/openssh.config 
Ciphers aes256-gcm@openssh.com,aes256-ctr,aes128-gcm@openssh.com,aes128-ctr

If the cipher entries in the "openssh.config" file have any ciphers other than "aes256-gcm@openssh.com,aes256-ctr,aes128-gcm@openssh.com,aes128-ctr", or they are missing or commented out, this is a finding.
Configure the SSH client to use only ciphers employing FIPS 140-3 approved algorithms.

Reinstall crypto-policies with the following command:

$ sudo dnf -y reinstall crypto-policies

Set the crypto-policy to FIPS with the following command:

$ sudo update-crypto-policies --set FIPS

Setting system policy to FIPS

Note: Systemwide crypto policies are applied on application startup. It is recommended to restart the system for the change of policies to fully take place.
OL09-00-000261 SV-271489r1092627_rule
V-271490 CCI-001453 medium OL 9 SSH client must be configured to use only DOD-approved Message Authentication Codes (MACs) employing FIPS 140-3 validated cryptographic hash algorithms to protect the confidentiality of SSH client connections. SRG-OS-000250-GPOS-00093
Without cryptographic integrity protections, information can be altered by unauthorized users without detection.

Remote access (e.g., RDP) is access to DOD nonpublic information systems by an authorized user (or an information system) communicating through an external, nonorganization-controlled network. Remote access methods include, for example, dial-up, broadband, and wireless.

Cryptographic mechanisms used for protecting the integrity of information include, for example, signed hash functions using asymmetric cryptography enabling distribution of the public key to verify the hash information while maintaining the confidentiality of the secret key used to generate the hash.

OL 9 incorporates systemwide crypto policies by default. The SSH configuration file has no effect on the ciphers, MACs, or algorithms unless specifically defined in the /etc/sysconfig/sshd file. The employed algorithms can be viewed in the /etc/crypto-policies/back-ends/opensshserver.config file.
Verify that OL 9 is configured so that the SSH client uses only MACs employing FIPS 140-3 approved algorithms.

To verify the MACs in the systemwide SSH configuration file, use the following command:

$ grep -i MACs /etc/crypto-policies/back-ends/openssh.config
MACs hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha2-256,hmac-sha2-512

If the MACs entries in the "openssh.config" file have any hashes other than "hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha2-256,hmac-sha2-512", or they are missing or commented out, this is a finding.
Configure the SSH client to use only MACs employing FIPS 140-3 approved algorithms.

Reinstall crypto-policies with the following command:

$ sudo dnf -y reinstall crypto-policies

Set the crypto-policy to FIPS with the following command:

$ sudo update-crypto-policies --set FIPS

Setting system policy to FIPS

Note: Systemwide crypto policies are applied on application startup. It is recommended to restart the system for the change of policies to fully take place.
OL09-00-000262 SV-271490r1092628_rule
V-271491 CCI-000765 medium OL 9 must have the openssl-pkcs11 package installed. SRG-OS-000105-GPOS-00052
Without the use of multifactor authentication, the ease of access to privileged functions is greatly increased. Multifactor authentication requires using two or more factors to achieve authentication. A privileged account is defined as an information system account with authorizations of a privileged user. The DOD CAC with DOD-approved PKI is an example of multifactor authentication.

Satisfies: SRG-OS-000105-GPOS-00052, SRG-OS-000375-GPOS-00160, SRG-OS-000376-GPOS-00161, SRG-OS-000377-GPOS-00162
Verify that OL 9 has the openssl-pkcs11 package installed with the following command:

$ dnf list --installed openssl-pkcs11
Installed Packages
openssl-pkcs11.x86_64                                  0.4.11-9.el9                                   @ol9_baseos_latest

If the "openssl-pkcs11" package is not installed, this is a finding.
Install the openssl-pkcs11 package with the following command:
 
$ sudo dnf install -y openssl-pkcs11
OL09-00-000270 SV-271491r1091185_rule
V-271492 CCI-004047 medium OL 9 must implement multifactor authentication for remote access to privileged accounts in such a way that one of the factors is provided by a device separate from the system gaining access. SRG-OS-000705-GPOS-00150
Using an authentication device, such as a CAC or token that is separate from the information system, ensures that even if the information system is compromised, that compromise will not affect credentials stored on the authentication device. 
 
Multifactor solutions that require devices separate from information systems gaining access include, for example, hardware tokens providing time-based or challenge-response authenticators and smart cards such as the U.S. Government Personal Identity Verification card and the DOD Common Access Card. 
 
A privileged account is defined as an information system account with authorizations of a privileged user. 
 
Remote access is access to DOD nonpublic information systems by an authorized user (or an information system) communicating through an external, nonorganization-controlled network. Remote access methods include, for example, dial-up, broadband, and wireless. 
 
This requirement only applies to components where this is specific to the function of the device or has the concept of an organizational user (e.g., VPN, proxy capability). This does not apply to authentication for the purpose of configuring the device itself (management).
Verify that OL 9 has the packages required for multifactor authentication installed with the following command: 
 
$ dnf list --installed libpam-pkcs11 
 
ii  libpam-pkcs11    0.6.12-2build3   amd64    Fully featured PAM module for using PKCS#11 smart cards 
 
If the "libpam-pkcs11" package is not installed, this is a finding.
Configure OL 9 to implement multifactor authentication by installing the required packages. 
 
Install the "libpam-pkcs11" package on the system with the following command: 
 
$ sudo dnf install -y libpam-pkcs11
OL09-00-000280 SV-271492r1091188_rule
V-271493 CCI-004046 medium OL 9 must have the SSSD package installed. SRG-OS-000705-GPOS-00150
Using an authentication device, such as a CAC or token that is separate from the information system, ensures that even if the information system is compromised, that compromise will not affect credentials stored on the authentication device. 
 
Multifactor solutions that require devices separate from information systems gaining access include, for example, hardware tokens providing time-based or challenge-response authenticators and smart cards such as the U.S. Government Personal Identity Verification card and the DOD Common Access Card. 
 
A privileged account is defined as an information system account with authorizations of a privileged user. 
 
Remote access is access to DOD nonpublic information systems by an authorized user (or an information system) communicating through an external, nonorganization-controlled network. Remote access methods include, for example, dial-up, broadband, and wireless. 
 
This requirement only applies to components where this is specific to the function of the device or has the concept of an organizational user (e.g., VPN, proxy capability). This does not apply to authentication for the purpose of configuring the device itself (management).

Satisfies: SRG-OS-000705-GPOS-00150, SRG-OS-000105-GPOS-00052, SRG-OS-000106-GPOS-00053, SRG-OS-000107-GPOS-00054, SRG-OS-000108-GPOS-00055, SRG-OS-000375-GPOS-00160
Verify that OL 9 has the SSSD package installed with the following command:

$ dnf list --installed sssd
Installed Packages
sssd.x86_64                                    2.9.5-4.0.1.el9_5.1                                    @ol9_baseos_latest

If the SSSD package is not installed, this is a finding.
Install the SSSD package with the following command:

$ sudo dnf install -y sssd
OL09-00-000285 SV-271493r1091191_rule
V-271494 CCI-004046 medium OL 9 must use the SSSD package for multifactor authentication services. SRG-OS-000705-GPOS-00150
Using an authentication device, such as a CAC or token that is separate from the information system, ensures that even if the information system is compromised, that compromise will not affect credentials stored on the authentication device. 
 
Multifactor solutions that require devices separate from information systems gaining access include, for example, hardware tokens providing time-based or challenge-response authenticators and smart cards such as the U.S. Government Personal Identity Verification card and the DOD Common Access Card. 
 
A privileged account is defined as an information system account with authorizations of a privileged user. 
 
Without the use of multifactor authentication, the ease of access to privileged functions is greatly increased. 
 
Multifactor authentication requires using two or more factors to achieve authentication. 
 
Factors include:  
1) Something a user knows (e.g., password/PIN); 
2) Something a user has (e.g., cryptographic identification device, token); and 
3) Something a user is (e.g., biometric). 
 
A privileged account is defined as an information system account with authorizations of a privileged user. 
 
Network access is defined as access to an information system by a user (or a process acting on behalf of a user) communicating through a network (e.g., local area network, wide area network, or the internet). 
 
The DOD common access card (CAC) with DOD-approved PKI is an example of multifactor authentication.

Satisfies: SRG-OS-000705-GPOS-00150, SRG-OS-000105-GPOS-00052, SRG-OS-000106-GPOS-00053, SRG-OS-000107-GPOS-00054, SRG-OS-000108-GPOS-00055, SRG-OS-000375-GPOS-00161
Verify that OL 9 is configured so that the sssd.service is enabled and active with the following commands: 
 
$ sudo systemctl is-enabled sssd
enabled

$ sudo systemctl is-active sssd
active

If sssd.service is not active or enabled, this is a finding.
Configure the sssd.service to start automatically on reboot with the following command: 
 
$ sudo systemctl enable sssd.service 
 
Ensure the sssd service is running: 
 
$ sudo systemctl start sssd.service
OL09-00-000286 SV-271494r1091194_rule
V-271495 CCI-001744 medium OL 9 must have the s-nail package installed. SRG-OS-000363-GPOS-00150
The s-nail package provides the mail command required to allow sending email notifications of unauthorized configuration changes to designated personnel.
Verify that OL 9 has the s-nail package installed on the system with the following command:

$ dnf list --installed s-nail
Installed Packages
s-nail.x86_64                                        14.9.22-6.el9                                        @ol9_appstream

If the s-nail package is not installed, this is a finding.
Install the s-nail package with the following command:

$ sudo dnf install -y s-nail
OL09-00-000290 SV-271495r1091197_rule
V-271496 CCI-001744 medium OL 9 must have the Advanced Intrusion Detection Environment (AIDE) package installed. SRG-OS-000363-GPOS-00150
Without verification of the security functions, security functions may not operate correctly, and the failure may go unnoticed. Security function is defined as the hardware, software, and/or firmware of the information system responsible for enforcing the system security policy and supporting the isolation of code and data on which the protection is based. Security functionality includes, but is not limited to, establishing system accounts, configuring access authorizations (i.e., permissions, privileges), setting events to be audited, and setting intrusion detection parameters.

Satisfies: SRG-OS-000363-GPOS-00150, SRG-OS-000445-GPOS-00199
Verify that OL 9 has the package installed with the following command:

$ dnf list --installed aide
Installed Packages
aide.x86_64                                         0.16-100.el9                                          @ol9_appstream

If AIDE is not installed, ask the system administrator (SA) how file integrity checks are performed on the system. 

If there is no application installed to perform integrity checks, this is a finding.

If AIDE is installed, check if it has been initialized with the following command:

$ sudo /usr/sbin/aide --check

If the output is "Couldn't open file /var/lib/aide/aide.db.gz for reading", this is a finding.
Install AIDE, initialize it, and perform a manual check.

Install AIDE:

$ sudo dnf install -y aide

Initialize AIDE:
     
$ sudo /usr/sbin/aide --init

Example output:

Start timestamp: 2023-06-05 10:09:04 -0600 (AIDE 0.16)
AIDE initialized database at /var/lib/aide/aide.db.new.gz

Number of entries:      86833

---------------------------------------------------
The attributes of the (uncompressed) database(s):
---------------------------------------------------

/var/lib/aide/aide.db.new.gz
  MD5      : coZUtPHhoFoeD7+k54fUvQ==
  SHA1     : DVpOEMWJwo0uPgrKZAygIUgSxeM=
  SHA256   : EQiZH0XNEk001tcDmJa+5STFEjDb4MPE
             TGdBJ/uvZKc=
  SHA512   : 86KUqw++PZhoPK0SZvT3zuFq9yu9nnPP
             toei0nENVELJ1LPurjoMlRig6q69VR8l
             +44EwO9eYyy9nnbzQsfG1g==

End timestamp: 2023-06-05 10:09:57 -0600 (run time: 0m 53s)

The new database will need to be renamed to be read by AIDE:

$ sudo mv /var/lib/aide/aide.db.new.gz /var/lib/aide/aide.db.gz

Perform a manual check:

$ sudo /usr/sbin/aide --check

Example output:

2023-06-05 10:16:08 -0600 (AIDE 0.16)
AIDE found NO differences between database and filesystem. Looks okay!!
OL09-00-000300 SV-271496r1091200_rule
V-271497 CCI-001744 medium OL 9 must routinely check the baseline configuration for unauthorized changes and notify the system administrator (SA) when anomalies in the operation of any security functions are discovered. SRG-OS-000363-GPOS-00150
Unauthorized changes to the baseline configuration could make the system vulnerable to various attacks or allow unauthorized access to the operating system. Changes to operating system configurations can have unintended side effects, some of which may be relevant to security.

Detecting such changes and providing an automated response can help avoid unintended, negative consequences that could ultimately affect the security state of the operating system. The operating system's information management officer (IMO)/information system security officer (ISSO) and SAs must be notified via email and/or monitoring system trap when there is an unauthorized modification of a configuration item.

Notifications provided by information systems include messages to local computer consoles, and/or hardware indications, such as lights.

This capability must take into account operational requirements for availability for selecting an appropriate response. The organization may choose to shut down or restart the information system upon security function anomaly detection.

Satisfies: SRG-OS-000363-GPOS-00150, SRG-OS-000446-GPOS-00200, SRG-OS-000447-GPOS-00201
Verify that OL 9 routinely executes a file integrity scan for changes to the system baseline. The command used in the example will use a daily occurrence.

Check the cron directories for scripts controlling the execution and notification of results of the file integrity application. For example, if Advanced Intrusion Detection Environment (AIDE) is installed on the system, use the following commands:

$ ls -al /etc/cron.* | grep aide
-rwxr-xr-x 1 root root 29 Nov 22 2015 aide

$ sudo grep aide /etc/crontab /var/spool/cron/root
/etc/crontab: 30 04 * * * root usr/sbin/aide
/var/spool/cron/root: 30 04 * * * root usr/sbin/aide

$ more /etc/cron.daily/aide
#!/bin/bash
/usr/sbin/aide --check | /bin/mail -s "$HOSTNAME - Daily aide integrity check run" root@sysname.mil

If the file integrity application does not exist, or a script file controlling the execution of the file integrity application does not exist, or the file integrity application does not notify designated personnel of changes, this is a finding.
Configure the file integrity tool to run automatically on the system at least weekly and to notify designated personnel if baseline configurations are changed in an unauthorized manner. The AIDE tool can be configured to email designated personnel with the use of the cron system.
 
The following example output is generic. It will set cron to run AIDE daily and to send email at the completion of the analysis.

$ sudo more /etc/cron.daily/aide
 
#!/bin/bash
/usr/sbin/aide --check | /bin/mail -s "$HOSTNAME - Daily aide integrity check run" root@sysname.mil

$ sudo chmod 755  /etc/cron.daily/aide

$ sudo crontab -e 
30 04 * * * root usr/sbin/aide
OL09-00-000301 SV-271497r1092471_rule
V-271498 CCI-000366 medium OL 9 must use a file integrity tool that is configured to use FIPS 140-3-approved cryptographic hashes for validating file contents and directories. SRG-OS-000480-GPOS-00227
OL 9 installation media ships with an optional file integrity tool called Advanced Intrusion Detection Environment (AIDE). AIDE is highly configurable at install time. This requirement assumes the "aide.conf" file is under the "/etc" directory.

File integrity tools use cryptographic hashes for verifying file contents and directories have not been altered. These hashes must be FIPS 140-3-approved cryptographic hashes.
Verify that OL 9 uses a file integrity tool that is configured to use FIPS 140-3-approved cryptographic hashes for validating file contents and directories.

Verify that AIDE is configured to use FIPS 140-3 file hashing with the following command:

$ sudo grep sha512 /etc/aide.conf 
All=p+i+n+u+g+s+m+S+sha512+acl+xattrs+selinux

If the "sha512" rule is not being used on all uncommented selection lines in the "/etc/aide.conf" file, or another file integrity tool is not using FIPS 140-3-approved cryptographic hashes for validating file contents and directories, this is a finding.
Configure the file integrity tool to use FIPS 140-3 cryptographic hashes for validating file and directory contents. 

If AIDE is installed, ensure the "sha512" rule is present on all uncommented file and directory selection lists. Exclude any log files, or files expected to change frequently, to reduce unnecessary notifications.
OL09-00-000302 SV-271498r1091206_rule
V-271499 CCI-000366 low OL 9 must be configured so that the file integrity tool verifies Access Control Lists (ACLs). SRG-OS-000480-GPOS-00227
OL 9 installation media ships with an optional file integrity tool called Advanced Intrusion Detection Environment (AIDE). AIDE is highly configurable at install time. This requirement assumes the "aide.conf" file is under the "/etc" directory.

ACLs can provide permissions beyond those permitted through the file mode and must be verified by the file integrity tools.
Verify that OL 9 is configured so that AIDE is verifying ACLs with the following command:

$ sudo grep acl /etc/aide.conf 
All= p+i+n+u+g+s+m+S+sha512+acl+xattrs+selinux

If the "acl" rule is not being used on all uncommented selection lines in the "/etc/aide.conf" file, or ACLs are not being checked by another file integrity tool, this is a finding.
Configure the file integrity tool to check file and directory ACLs. 

If AIDE is installed, ensure the "acl" rule is present on all uncommented file and directory selection lists.
OL09-00-000303 SV-271499r1091209_rule
V-271500 CCI-000366 low OL 9 must be configured so that the file integrity tool verifies extended attributes. SRG-OS-000480-GPOS-00227
OL 9 installation media ships with an optional file integrity tool called Advanced Intrusion Detection Environment (AIDE). AIDE is highly configurable at install time. This requirement assumes the "aide.conf" file is under the "/etc" directory.

Extended attributes in file systems are used to contain arbitrary data and file metadata with security implications.
Verify that OL 9 is configured so that AIDE is configured to verify extended attributes with the following command:

$ sudo grep xattrs /etc/aide.conf 
All= p+i+n+u+g+s+m+S+sha512+acl+xattrs+selinux

If the "xattrs" rule is not being used on all uncommented selection lines in the "/etc/aide.conf" file, or extended attributes are not being checked by another file integrity tool, this is a finding.
Configure the file integrity tool to check file and directory extended attributes. 

If AIDE is installed, ensure the "xattrs" rule is present on all uncommented file and directory selection lists.
OL09-00-000304 SV-271500r1091212_rule
V-271501 CCI-004923 medium OL 9 must have the chrony package installed. SRG-OS-000355-GPOS-00143
Inaccurate time stamps make it more difficult to correlate events and can lead to an inaccurate analysis. Determining the correct time a particular event occurred on a system is critical when conducting forensic analysis and investigating system events. Sources outside the configured acceptable allowance (drift) may be inaccurate.
Verify that OL 9 has the chrony package installed with the following command:

$ dnf list --installed chrony
Installed Packages
chrony.x86_64                                      4.5-1.0.2.el9                                      @ol9_baseos_latest        

If the chrony package is not installed, this is a finding.
Install the chrony package with the following command:
 
$ sudo dnf install -y chrony
OL09-00-000310 SV-271501r1091215_rule
V-271502 CCI-004923 medium OL 9 must enable the chronyd service. SRG-OS-000355-GPOS-00143
Inaccurate time stamps make it more difficult to correlate events and can lead to an inaccurate analysis. Determining the correct time a particular event occurred on a system is critical when conducting forensic analysis and investigating system events. Sources outside the configured acceptable allowance (drift) may be inaccurate.

Synchronizing internal information system clocks provides uniformity of time stamps for information systems with multiple system clocks and systems connected over a network.
Verify that OL 9 chronyd service is set to active with the following command:

$ systemctl is-active chronyd
active 

If the chronyd service is not active, this is a finding.
Enable the chronyd service with the following command:

$ sudo systemctl enable --now chronyd
OL09-00-000311 SV-271502r1091218_rule
V-271503 CCI-001958 medium OL 9 must have the USBGuard package installed. SRG-OS-000378-GPOS-00163
The USBguard-daemon is the main component of the USBGuard software framework. It runs as a service in the background and enforces the USB device authorization policy for all USB devices. The policy is defined by a set of rules using a rule language described in the usbguard-rules.conf file. The policy and the authorization state of USB devices can be modified during runtime using the usbguard tool.

The system administrator (SA) must work with the site information system security officer (ISSO) to determine a list of authorized peripherals and establish rules within the USBGuard software framework to allow only authorized devices.
Verify that OL 9 has USBGuard installed on the operating system with the following command:

$ dnf list --installed usbguard
Installed Packages
usbguard.x86_64                                       1.0.0-15.el9                                        @ol9_appstream

If the USBGuard package is not installed, ask the SA to indicate how unauthorized peripherals are being blocked.

If there is no evidence that unauthorized peripherals are being blocked before establishing a connection, this is a finding.
Install the usbguard package with the following command:

$ sudo dnf install -y usbguard
OL09-00-000320 SV-271503r1091221_rule
V-271504 CCI-001958 medium OL 9 must enable the USBGuard package. SRG-OS-000378-GPOS-00163
The USBguard-daemon is the main component of the USBGuard software framework. It runs as a service in the background and enforces the USB device authorization policy for all USB devices. The policy is defined by a set of rules using a rule language described in the usbguard-rules.conf file. The policy and the authorization state of USB devices can be modified during runtime using the usbguard tool.

The system administrator (SA) must work with the site information system security officer (ISSO) to determine a list of authorized peripherals and establish rules within the USBGuard software framework to allow only authorized devices.
Verify that OL 9 USBGuard is enabled with the following command:

$ systemctl is-active usbguard
active

If usbguard is not active, ask the SA to indicate how unauthorized peripherals are being blocked.

If there is no evidence that unauthorized peripherals are being blocked before establishing a connection, this is a finding.
Enable the USBGuard service with the following command:

$ sudo systemctl enable --now usbguard
OL09-00-000321 SV-271504r1091224_rule
V-271505 CCI-003992 medium OL 9 must have the subscription-manager package installed. SRG-OS-000366-GPOS-00153
Oracle Linux Manager, based on the Spacewalk open source software, helps automate Oracle Linux systems management. This enables users to control the system software life cycle from initial installation through maintenance, software configuration, upgrades, and eventual decommissioning. Oracle Linux Manager also helps automate a kickstart installation, system configuration, and maintenance tasks, which enables rapid deployment of proven and consistent software configurations for Oracle Linux systems.
Verify that OL 9 oracle-linux-manager package is installed with the following command:

$ dnf list installed oracle-linux-manager-client-release-el9
Installed Packages
oracle-linux-manager-client-release-el9.noarch                       1.0-2.el9                        @ol9_baseos_latest

If the "oracle-linux-manager" package is not installed, this is a finding.
Install the oracle-linux-manager package with the following command:
 
$ sudo dnf install -y oracle-linux-manager-client-release-el9
OL09-00-000330 SV-271505r1092629_rule
V-271506 CCI-001774 medium OL 9 must have the fapolicy module installed. SRG-OS-000370-GPOS-00155
The organization must identify authorized software programs and permit execution of authorized software. The process used to identify software programs that are authorized to execute on organizational information systems is commonly referred to as allowlisting.

Using an allowlist provides a configuration management method for allowing the execution of only authorized software. Using only authorized software decreases risk by limiting the number of potential vulnerabilities. Verification of allowlisted software occurs prior to execution or at system startup.

User home directories/folders may contain information of a sensitive nature. Nonprivileged users should coordinate any sharing of information with a system administrator (SA) through shared resources.

OL 9 ships with many optional packages. One such package is a file access policy daemon called "fapolicyd". "fapolicyd" is a userspace daemon that determines access rights to files based on attributes of the process and file. It can be used to either blocklist or allowlist processes or file access.

Proceed with caution with enforcing the use of this daemon. Improper configuration may render the system nonfunctional. The "fapolicyd" API is not namespace aware and can cause issues when launching or running containers.

Satisfies: SRG-OS-000370-GPOS-00155, SRG-OS-000368-GPOS-00154
Verify that OL 9 fapolicyd package is installed with the following command:

$ dnf list --installed fapolicyd
Installed Packages
fapolicyd.x86_64                                    1.3.2-100.0.1.el9                                     @ol9_appstream

If the fapolicyd package is not installed, this is a finding.
Install the fapolicyd package with the following command:
 
$ sudo dnf install -y fapolicyd
OL09-00-000340 SV-271506r1091230_rule
V-271507 CCI-001774 medium OL 9 must enable the fapolicy module. SRG-OS-000370-GPOS-00155
The organization must identify authorized software programs and permit execution of authorized software. The process used to identify software programs that are authorized to execute on organizational information systems is commonly referred to as allowlisting.

Using an allowlist provides a configuration management method for allowing the execution of only authorized software. Using only authorized software decreases risk by limiting the number of potential vulnerabilities. Verification of allowlisted software occurs prior to execution or at system startup.

User home directories/folders may contain information of a sensitive nature. Nonprivileged users should coordinate any sharing of information with a system administrator (SA) through shared resources.

OL 9 ships with many optional packages. One such package is a file access policy daemon called "fapolicyd". "fapolicyd" is a userspace daemon that determines access rights to files based on attributes of the process and file. It can be used to either blocklist or allowlist processes or file access.

Proceed with caution with enforcing the use of this daemon. Improper configuration may render the system nonfunctional. The "fapolicyd" API is not namespace aware and can cause issues when launching or running containers.

Satisfies: SRG-OS-000370-GPOS-00155, SRG-OS-000368-GPOS-00154
Verify that OL 9 fapolicyd is active with the following command:

$ systemctl is-active fapolicyd
active

If fapolicyd module is not active, this is a finding.
Enable the fapolicyd service with the following command:

$ sudo systemctl enable --now fapolicyd
OL09-00-000341 SV-271507r1091233_rule
V-271508 CCI-001851 medium OL 9 must have the rsyslog package installed. SRG-OS-000479-GPOS-00224
rsyslogd is a system utility providing support for message logging. Support for both internet and Unix domain sockets enables this utility to support both local and remote logging. Couple this utility with "gnutls" (which is a secure communications library implementing the SSL, TLS, and DTLS protocols), to create a method to securely encrypt and offload auditing.

Satisfies: SRG-OS-000479-GPOS-00224, SRG-OS-000051-GPOS-00024
Verify that OL 9 has the rsyslogd package installed with the following command:

$ dnf list --installed rsyslog
Installed Packages
rsyslog.x86_64                                         8.2310.0-4.el9                                         @AppStream

If the rsyslogd package is not installed, this is a finding.
The rsyslogd package can be installed with the following command:
 
$ sudo dnf install -y rsyslogd
OL09-00-000350 SV-271508r1091236_rule
V-271509 CCI-000366 medium OL 9 must be configured so that the rsyslog service is active. SRG-OS-000480-GPOS-00227
The rsyslog service must be running to provide logging services, which are essential to system administration.
Verify that OL 9 rsyslog is active with the following command:

$ systemctl is-active rsyslog 
active

If the rsyslog service is not active, this is a finding.
Enable the rsyslog service with the following command:

$ sudo systemctl enable --now rsyslog
OL09-00-000351 SV-271509r1091239_rule
V-271510 CCI-000803 medium OL 9 must have the packages required for encrypting offloaded audit logs installed. SRG-OS-000120-GPOS-00061
The rsyslog-gnutls package provides Transport Layer Security (TLS) support for the rsyslog daemon, which enables secure remote logging.
Verify that OL 9 has the rsyslog-gnutls package installed with the following command:

$ dnf list --installed rsyslog-gnutls
Installed Packages
rsyslog-gnutls.x86_64                                     8.2310.0-4.el9                                      @AppStream

If the rsyslog-gnutls package is not installed, this is a finding.
Install the rsyslog-gnutls package with the following command:
 
$ sudo dnf install -y rsyslog-gnutls
OL09-00-000355 SV-271510r1091242_rule
V-271511 CCI-000366 low OL 9 must enable the hardware random number generator entropy gatherer service. SRG-OS-000480-GPOS-00227
The most important characteristic of a random number generator is its randomness, namely its ability to deliver random numbers that are impossible to predict. Entropy in computer security is associated with the unpredictability of a source of randomness. The random source with high entropy tends to achieve a uniform distribution of random values. Random number generators are one of the most important building blocks of cryptosystems.

The rngd service feeds random data from hardware device to kernel random device. Quality (nonpredictable) random number generation is important for several security functions (i.e., ciphers).
Verify that OL 9 has enabled the hardware random number generator entropy gatherer service with the following command:

$ systemctl is-active rngd
active

If the rngd service is not active, this is a finding.
Install the rng-tools package with the following command:

$ sudo dnf install -y rng-tools

Enable the rngd service run the following command:

$ sudo systemctl enable --now rngd
OL09-00-000360 SV-271511r1091245_rule
V-271512 CCI-000366 medium OL 9 must have the rng-tools package installed. SRG-OS-000480-GPOS-00227
rng-tools provides hardware random number generator tools, such as those used in the formation of x509/PKI certificates.
Verify that OL 9 has the rng-tools package installed with the following command:

$ dnf list --installed rng-tools
Installed Packages
rng-tools.x86_64                                      6.16-1.el9                                      @ol9_baseos_latest

If the rng-tools package is not installed, this is a finding.
Install the rng-tools package with the following command:
 
$ sudo dnf install -y rng-tools
OL09-00-000370 SV-271512r1091248_rule
V-271513 CCI-000366 medium OL 9 must have the nss-tools package installed. SRG-OS-000480-GPOS-00227
Network Security Services (NSS) is a set of libraries designed to support cross-platform development of security-enabled client and server applications. Install the "nss-tools" package to install command-line tools to manipulate the NSS certificate and key database.
Verify that OL 9 has the nss-tools package installed with the following command:

$ dnf list --installed nss-tools
Installed Packages
nss-tools.x86_64                                     3.101.0-7.el9_2                                      @ol9_appstream

If the nss-tools package is not installed, this is a finding.
Install the nss-tools package with the following command:
 
$ sudo dnf install -y nss-tools
OL09-00-000380 SV-271513r1091251_rule
V-271514 CCI-004046 medium OL 9 must have the pcsc-lite package installed. SRG-OS-000375-GPOS-00160
The pcsc-lite package must be installed if it is to be available for multifactor authentication using smart cards.
Verify that OL 9 has the pcsc-lite package installed with the following command:

$ dnf list --installed pcsc-lite
Installed Packages
pcsc-lite.x86_64                                     1.9.4-1.el9                                      @ol9_baseos_latest

If the pcsc-lite package is not installed, this is a finding.
Install the pcsc-lite package with the following command:
 
$ sudo dnf install -y pcsc-lite
OL09-00-000390 SV-271514r1091254_rule
V-271515 CCI-004046 medium OL 9 must have the opensc package installed. SRG-OS-000375-GPOS-00160
The use of PIV credentials facilitates standardization and reduces the risk of unauthorized access.

The DOD has mandated the use of the Common Access Card (CAC) to support identity management and personal authentication for systems covered under Homeland Security Presidential Directive (HSPD) 12, as well as making the CAC a primary component of layered protection for national security systems.

Satisfies: SRG-OS-000375-GPOS-00160, SRG-OS-000376-GPOS-00161
Verify that OL 9 has the opensc package installed with the following command:

$ dnf list --installed opensc
Installed Packages
opensc.x86_64                                     0.23.0-4.el9_3                                      @ol9_baseos_latest

If the opensc package is not installed, this is a finding.
Install the opensc package with the following command:
 
$ sudo dnf install -y opensc
OL09-00-000400 SV-271515r1091257_rule
V-271516 CCI-004046 medium OL 9 must be configured so that the pcscd service is active. SRG-OS-000375-GPOS-00160
The information system ensures that even if the information system is compromised, that compromise will not affect credentials stored on the authentication device.

The daemon program for pcsc-lite and the MuscleCard framework is pcscd. It is a resource manager that coordinates communications with smart card readers and smart cards and cryptographic tokens that are connected to the system.
Verify that OL 9 pcscd service is active with the following command:

$ systemctl is-active pcscd
active

If the pcscdservice is not active, this is a finding.
Enable the pcscd service with the following command:

$ sudo systemctl enable --now pcscd
OL09-00-000401 SV-271516r1091260_rule
V-271517 CCI-000803 medium OL 9 must have the libreswan package installed. SRG-OS-000120-GPOS-00061
Providing the ability for remote users or systems to initiate a secure VPN connection protects information when it is transmitted over a wide area network.
Verify that OL 9 libreswan service package is installed.

Check that the libreswan service package is installed with the following command:

$ dnf list --installed libreswan
Installed Packages
libreswan.x86_64                                    4.12-2.0.1.el9_4.1                                    @ol9_appstream

If the libreswan package is not installed, this is a finding.
Install the libreswan service (if it is not already installed) with the following command:

$ sudo dnf install -y libreswan
OL09-00-000410 SV-271517r1091263_rule
V-271518 CCI-000366 medium OL 9 must have the gnutls-utils package installed. SRG-OS-000480-GPOS-00227
GnuTLS is a secure communications library implementing the SSL, TLS, and DTLS protocols and technologies around them. It provides a simple C language application programming interface (API) to access the secure communications protocols as well as APIs to parse and write X.509, PKCS #12, OpenPGP and other required structures. This package contains command line TLS client and server and certificate manipulation tools.
Verify that OL 9 has the gnutls-utils package installed with the following command:

$ dnf list --installed gnutls-utils
Installed Packages
gnutls-utils.x86_64                                     3.8.3-4.el9_4                                     @ol9_appstream

If the gnutls-utils package is not installed, this is a finding.
Install the gnutls-utils package with the following command:
 
$ sudo dnf install -y gnutls-utils
OL09-00-000430 SV-271518r1091266_rule
V-271519 CCI-000169 medium OL 9 must have the audit package installed. SRG-OS-000062-GPOS-00031
Without establishing what type of events occurred, the source of events, where events occurred, and the outcome of events, it would be difficult to establish, correlate, and investigate the events leading up to an outage or attack.

Audit record content that may be necessary to satisfy this requirement includes, for example, time stamps, source and destination addresses, user/process identifiers, event descriptions, success/fail indications, filenames involved, and access control or flow control rules invoked.

Associating event types with detected events in audit logs provides a means of investigating an attack, recognizing resource utilization or capacity thresholds, or identifying an improperly configured OL 9 system.

Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000038-GPOS-00016, SRG-OS-000039-GPOS-00017, SRG-OS-000040-GPOS-00018, SRG-OS-000041-GPOS-00019, SRG-OS-000042-GPOS-00021, SRG-OS-000051-GPOS-00024, SRG-OS-000054-GPOS-00025, SRG-OS-000122-GPOS-00063, SRG-OS-000254-GPOS-00095, SRG-OS-000255-GPOS-00096, SRG-OS-000337-GPOS-00129, SRG-OS-000348-GPOS-00136, SRG-OS-000349-GPOS-00137, SRG-OS-000350-GPOS-00138, SRG-OS-000351-GPOS-00139, SRG-OS-000352-GPOS-00140, SRG-OS-000353-GPOS-00141, SRG-OS-000354-GPOS-00142, SRG-OS-000358-GPOS-00145, SRG-OS-000365-GPOS-00152, SRG-OS-000392-GPOS-00172, SRG-OS-000475-GPOS-00220, SRG-OS-000055-GPOS-00026
Verify that OL 9 audit service package is installed.

Check that the audit service package is installed with the following command:

$ dnf list --installed audit
Installed Packages
audit.x86_64                                     3.1.2-2.0.1.el9                                      @ol9_baseos_latest

If the audit package is not installed, this is a finding.
Install the audit service package (if the audit service is not already installed) with the following command:

$ sudo dnf install -y audit
OL09-00-000440 SV-271519r1091269_rule
V-271520 CCI-000169 medium OL 9 audit service must be enabled. SRG-OS-000062-GPOS-00031
Without establishing what type of events occurred, it would be difficult to establish, correlate, and investigate the events leading up to an outage or attack. Ensuring the "auditd" service is active ensures audit records generated by the kernel are appropriately recorded.

Additionally, a properly configured audit subsystem ensures that actions of individual system users can be uniquely traced to those users so they can be held accountable for their actions.

Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000037-GPOS-00015, SRG-OS-000038-GPOS-00016, SRG-OS-000039-GPOS-00017, SRG-OS-000040-GPOS-00018, SRG-OS-000041-GPOS-00019, SRG-OS-000042-GPOS-00021, SRG-OS-000051-GPOS-00024, SRG-OS-000054-GPOS-00025, SRG-OS-000122-GPOS-00063, SRG-OS-000254-GPOS-00095, SRG-OS-000255-GPOS-00096, SRG-OS-000337-GPOS-00129, SRG-OS-000348-GPOS-00136, SRG-OS-000349-GPOS-00137, SRG-OS-000350-GPOS-00138, SRG-OS-000351-GPOS-00139, SRG-OS-000352-GPOS-00140, SRG-OS-000353-GPOS-00141, SRG-OS-000354-GPOS-00142, SRG-OS-000358-GPOS-00145, SRG-OS-000365-GPOS-00152, SRG-OS-000392-GPOS-00172, SRG-OS-000475-GPOS-00220
Verify that OL 9 audit service is configured to produce audit records with the following command:

$ systemctl status auditd.service
auditd.service - Security Auditing Service
Loaded:loaded (/usr/lib/systemd/system/auditd.service; enabled; vendor preset: enabled)
Active: active (running) since Tues 2022-05-24 12:56:56 EST; 4 weeks 0 days ago

If the audit service is not "active" and "running", this is a finding.
Enable the auditd service with the following command:

$ sudo systemctl enable --now auditd
OL09-00-000441 SV-271520r1091272_rule
V-271521 CCI-001851 medium OL 9 must have the audispd-plugins package installed. SRG-OS-000342-GPOS-00133
audispd-plugins provides plug-ins for the real-time interface to the audit subsystem, audispd. These plug-ins can do things like relay events to remote machines or analyze events for suspicious behavior.
Verify that OL 9 has the audispd-plugins package for installed with the following command:

$ dnf list --installed audispd-plugins

Example output:
Installed Packages
audispd-plugins.x86_64                                3.1.2-2.0.1.el9                                 @ol9_baseos_latest

If the audispd-plugins package is not installed, this is a finding.
The audispd-plugins package can be installed with the following command:
 
$ sudo dnf install -y audispd-plugins
OL09-00-000450 SV-271521r1091275_rule
V-271522 CCI-002617 low OL 9 must remove all software components after updated versions have been installed. SRG-OS-000437-GPOS-00194
Previous versions of software components that are not removed from the information system after updates have been installed may be exploited by some adversaries.
Verify that OL 9 removes all software components after updated versions have been installed with the following command:

$ grep clean /etc/dnf/dnf.conf 
clean_requirements_on_remove=True 

If clean_requirements_on_remove is not set to "True", this is a finding.
Configure OL 9 to remove all software components after updated versions have been installed.

Edit the file /etc/dnf/dnf.conf by adding or editing the following line:

 clean_requirements_on_remove=1
OL09-00-000495 SV-271522r1091278_rule
V-271523 CCI-003992 high OL 9 must check the GPG signature of locally installed software packages before installation. SRG-OS-000366-GPOS-00153
Changes to any 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.

All software packages must be signed with a cryptographic key recognized and approved by the organization.

Verifying the authenticity of software prior to installation validates the integrity of the software package received from a vendor. This verifies the software has not been tampered with and that it has been provided by a trusted vendor.
Verify that OL 9 dnf package manager always checks the GPG signature of locally installed software packages before installation:

$ grep localpkg_gpgcheck /etc/dnf/dnf.conf 
localpkg_gpgcheck=1 

If "localpkg_gpgcheck" is not set to "1", or if the option is missing or commented out, ask the system administrator how the GPG signatures of local software packages are being verified.

If there is no process to verify GPG signatures that is approved by the organization, this is a finding.
Configure dnf to always check the GPG signature of local software packages before installation.

Add or update the following line in the [main] section of the /etc/dnf/dnf.conf file:

localpkg_gpgcheck=1
OL09-00-000496 SV-271523r1091281_rule
V-271524 CCI-003992 high OL 9 must check the GPG signature of software packages originating from external software repositories before installation. SRG-OS-000366-GPOS-00153
Changes to any 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.

All software packages must be signed with a cryptographic key recognized and approved by the organization.

Verifying the authenticity of software prior to installation validates the integrity of the software package received from a vendor. This verifies the software has not been tampered with and that it has been provided by a trusted vendor.
Verify that OL 9 dnf package manager always checks the GPG signature of software packages originating from external software repositories before installation:

$ grep gpgcheck /etc/dnf/dnf.conf
gpgcheck=1

If "gpgcheck" is not set to "1", or if the option is missing or commented out, ask the system administrator how the GPG signatures of software packages are being verified.

If there is no process to verify GPG signatures that is approved by the organization, this is a finding.
Configure dnf to always check the GPG signature of software packages originating from external software repositories before installation.

Add or update the following line in the [main] section of the /etc/dnf/dnf.conf file:

gpgcheck=1
OL09-00-000497 SV-271524r1091284_rule
V-271525 CCI-003992 high OL 9 must have GPG signature verification enabled for all software repositories. SRG-OS-000366-GPOS-00153
Changes to any 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.

All software packages must be signed with a cryptographic key recognized and approved by the organization.

Verifying the authenticity of software prior to installation validates the integrity of the software package received from a vendor. This verifies the software has not been tampered with and that it has been provided by a trusted vendor.
Verify that OL 9 software repositories defined in "/etc/yum.repos.d/" have been configured with "gpgcheck" enabled:

$ grep gpgcheck /etc/yum.repos.d/*.repo | more
gpgcheck = 1

If "gpgcheck" is not set to "1" for all returned lines, this is a finding.
Configure all software repositories defined in "/etc/yum.repos.d/" to have "gpgcheck" enabled:

$ sudo sed -i 's/gpgcheck\s*=.*/gpgcheck=1/g' /etc/yum.repos.d/*
OL09-00-000498 SV-271525r1091287_rule
V-271526 CCI-003992 medium OL 9 must ensure cryptographic verification of vendor software packages. SRG-OS-000366-GPOS-00153
Cryptographic verification of vendor software packages ensures that all software packages are obtained from a valid source and protects against spoofing that could lead to installation of malware on the system. Oracle cryptographically signs all software packages, which includes updates, with a GPG key to verify that they are valid.
Verify that OL 9 ensures cryptographic verification of vendor software packages by confirming that Oracle package-signing keys are installed on the system, and verify their fingerprints match vendor values.

Note: For OL 9 software packages, Oracle uses GPG keys labeled "release key 1" and "auxiliary key 1". The keys are defined in key file "/etc/pki/rpm-gpg/RPM-GPG-KEY-oracle" by default.

List Oracle GPG keys installed on the system:

$ sudo rpm -q --queryformat "%{SUMMARY}\n" gpg-pubkey | grep -i "oracle"

Oracle Linux (release key 1)  public key
Oracle Linux (backup key 1)  public key

If Oracle GPG keys "release key 1" and "backup key 1" are not installed, this is a finding.

List key fingerprints of installed Oracle GPG keys:

$ sudo gpg -q --keyid-format short --with-fingerprint /etc/pki/rpm-gpg/RPM-GPG-KEY-oracle

If key file "/etc/pki/rpm-gpg/RPM-GPG-KEY-oracle" is missing, this is a finding.

pub   rsa4096/8D8B756F 2022-01-19 [SC] [expires: 2042-01-14]
      Key fingerprint = 3E6D 826D 3FBA B389 C2F3  8E34 BC4D 06A0 8D8B 756F
uid                   Oracle Linux (release key 1) 
sub   rsa4096/2E708C25 2022-01-19 [E] [expires: 2041-06-01]
pub   rsa4096/8B4EFBE6 2022-01-19 [SC] [expires: 2042-01-14]
      Key fingerprint = 9822 3175 9C74 6706 5D0C  E9B2 A7DD 0708 8B4E FBE6
uid                   Oracle Linux (backup key 1) 
sub   rsa4096/DA900791 2022-01-19 [E] [expires: 2041-06-02]

Compare key fingerprints of installed Oracle GPG keys with fingerprints listed for OL 9 on Oracle verification webpage at https://linux.oracle.com/security/gpg/#gpg.

If key fingerprints do not match, this is a finding.
Install Oracle package-signing keys on the system and verify their fingerprints match vendor values.

To verify Oracle Linux Downloads, users need:
-A checksum file corresponding to the downloaded ISO.
-The public GPG key to verify the Oracle key used to sign the checksum file.

The checksum file contains a list of files that are part of a download package with the corresponding checksums as well as a GPG signature. The GPG signature enables anyone to verify that checksum file was published by Oracle. The steps below describe how to verify they checksum file itself and then verify the contents of the Oracle Linux download by checking against the checksum file.

Import the Oracle Linux GPG key corresponding to the Oracle Linux release:

$ curl https://yum.oracle.com/RPM-GPG-KEY-oracle-ol9 | gpg --import

Note: No "sudo" for curl command

Download the appropriate checksum file and place it in the same directory as the Oracle Linux ISO download:

$ curl https://linux.oracle.com/security/gpg/checksum/OracleLinux-R9-U3-Server-x86_64.checksum > OracleLinux-R9-U3-Server-x86_64.checksum

Download GPG Key:

 $ curl https://yum.oracle.com/RPM-GPG-KEY-oracle-ol9 -o RPM-GPG-KEY-oracle
Note: No "sudo" for curl command

To verify the checksum file:

$ gpg --verify-files OracleLinux-R9-U3-Server-x86_64.checksum
gpg: Signature made Wed 15 Nov 2023 07:22:32 AM EST
gpg:                using RSA key 3E6D826D3FBAB389C2F38E34BC4D06A08D8B756F
gpg:                issuer "secalert_us@oracle.com"
gpg: Good signature from "Oracle Linux (release key 1) " [unknown]
gpg: WARNING: The key's User ID is not certified with a trusted signature!
gpg:          There is no indication that the signature belongs to the owner.
Primary key fingerprint: 3E6D 826D 3FBA B389 C2F3  8E34 BC4D 06A0 8D8B 756F

Verify the ISO download as follows:

$ grep OracleLinux-R9-U3-x86_64-boot.iso OracleLinux-R9-U3-Server-x86_64.checksum | sha256sum -c

OracleLinux-R9-U3-x86_64-boot.iso: OK
OL09-00-000499 SV-271526r1092460_rule
V-271527 CCI-000018 medium OL 9 must generate audit records for all account creations, modifications, disabling, and termination events that affect /etc/sudoers. SRG-OS-000004-GPOS-00004
The actions taken by system administrators must be audited to keep a record of what was executed on the system, as well as for accountability purposes. Editing the sudoers file may be sign of an attacker trying to establish persistent methods to a system, auditing the editing of the sudoers files mitigates this risk.

Satisfies: SRG-OS-000004-GPOS-00004, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPOS-00020, SRG-OS-000062-GPOS-00031, SRG-OS-000304-GPOS-00121, SRG-OS-000392-GPOS-00172, SRG-OS-000462-GPOS-00206, SRG-OS-000470-GPOS-00214, SRG-OS-000471-GPOS-00215, SRG-OS-000239-GPOS-00089, SRG-OS-000240-GPOS-00090, SRG-OS-000241-GPOS-00091, SRG-OS-000303-GPOS-00120, SRG-OS-000466-GPOS-00210, SRG-OS-000476-GPOS-00221
Verify that OL 9 generates audit records for all account creations, modifications, disabling, and termination events that affect "/etc/sudoers" with the following command:

$ sudo auditctl -l | grep /etc/sudoers
-w /etc/sudoers -p wa -k identity
-w /etc/sudoers.d -p wa -k identity

If the command does not return a line or the line is commented out, this is a finding.
Configure OL 9 to generate audit records for all account creations, modifications, disabling, and termination events that affect "/etc/sudoers".

Add or update the following file system rule to "/etc/audit/rules.d/audit.rules":

-w /etc/sudoers -p wa -k identity

The audit daemon must be restarted for the changes to take effect.

Restart auditd:
$ sudo service auditd restart
OL09-00-000500 SV-271527r1092474_rule
V-271528 CCI-000018 medium OL 9 must generate audit records for all account creations, modifications, disabling, and termination events that affect /etc/sudoers.d/ directory. SRG-OS-000004-GPOS-00004
The actions taken by system administrators must be audited to keep a record of what was executed on the system, as well as for accountability purposes. Editing the sudoers file may be sign of an attacker trying to establish persistent methods to a system, auditing the editing of the sudoers files mitigates this risk.

Satisfies: SRG-OS-000004-GPOS-00004, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPOS-00020, SRG-OS-000062-GPOS-00031, SRG-OS-000304-GPOS-00121, SRG-OS-000392-GPOS-00172, SRG-OS-000462-GPOS-00206, SRG-OS-000470-GPOS-00214, SRG-OS-000471-GPOS-00215, SRG-OS-000239-GPOS-00089, SRG-OS-000240-GPOS-00090, SRG-OS-000241-GPOS-00091, SRG-OS-000303-GPOS-00120, SRG-OS-000466-GPOS-00210, SRG-OS-000476-GPOS-00221
Verify that OL 9 generates audit records for all account creations, modifications, disabling, and termination events that affect "/etc/sudoers.d/" with the following command:

$ sudo auditctl -l | grep /etc/sudoers.d
-w /etc/sudoers.d/ -p wa -k identity

If the command does not return a line or the line is commented out, this is a finding.
Configure OL 9 to generate audit records for all account creations, modifications, disabling, and termination events that affect "/etc/sudoers.d/".

Add or update the following file system rule to "/etc/audit/rules.d/audit.rules":

-w /etc/sudoers.d/ -p wa -k identity

The audit daemon must be restarted for the changes to take effect.

Restart auditd:
$ sudo service auditd restart
OL09-00-000505 SV-271528r1092476_rule
V-271529 CCI-000018 medium OL 9 must generate audit records for all account creations, modifications, disabling, and termination events that affect /etc/group. SRG-OS-000004-GPOS-00004
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 must be investigated for legitimacy.

Satisfies: SRG-OS-000004-GPOS-00004, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPOS-00020, SRG-OS-000062-GPOS-00031, SRG-OS-000304-GPOS-00121, SRG-OS-000392-GPOS-00172, SRG-OS-000462-GPOS-00206, SRG-OS-000470-GPOS-00214, SRG-OS-000471-GPOS-00215, SRG-OS-000239-GPOS-00089, SRG-OS-000240-GPOS-00090, SRG-OS-000241-GPOS-00091, SRG-OS-000303-GPOS-00120, SRG-OS-000466-GPOS-00210, SRG-OS-000476-GPOS-00221
Verify that OL 9 generates audit records for all account creations, modifications, disabling, and termination events that affect "/etc/group" with the following command:

$ sudo auditctl -l | egrep '(/etc/group)'  
-w /etc/group -p wa -k identity

If the command does not return a line or the line is commented out, this is a finding.
Configure OL 9 to generate audit records for all account creations, modifications, disabling, and termination events that affect "/etc/group".

Add or update the following file system rule to "/etc/audit/rules.d/audit.rules":

-w /etc/group -p wa -k identity

The audit daemon must be restarted for the changes to take effect.

Restart auditd:
$ sudo service auditd restart
OL09-00-000510 SV-271529r1092478_rule
V-271530 CCI-000018 medium OL 9 must generate audit records for all account creations, modifications, disabling, and termination events that affect /etc/gshadow. SRG-OS-000004-GPOS-00004
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.

Satisfies: SRG-OS-000004-GPOS-00004, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPOS-00020, SRG-OS-000062-GPOS-00031, SRG-OS-000304-GPOS-00121, SRG-OS-000392-GPOS-00172, SRG-OS-000462-GPOS-00206, SRG-OS-000470-GPOS-00214, SRG-OS-000471-GPOS-00215, SRG-OS-000239-GPOS-00089, SRG-OS-000240-GPOS-00090, SRG-OS-000241-GPOS-00091, SRG-OS-000303-GPOS-00120, SRG-OS-000466-GPOS-00210, SRG-OS-000476-GPOS-00221
Verify that OL 9 generates audit records for all account creations, modifications, disabling, and termination events that affect "/etc/gshadow" with the following command:

$ sudo auditctl -l | egrep '(/etc/gshadow)' 
-w /etc/gshadow -p wa -k identity

If the command does not return a line or the line is commented out, this is a finding.
Configure OL 9 to generate audit records for all account creations, modifications, disabling, and termination events that affect "/etc/gshadow".

Add or update the following file system rule to "/etc/audit/rules.d/audit.rules":

-w /etc/gshadow -p wa -k identity

The audit daemon must be restarted for the changes to take effect.

Restart auditd:
$ sudo service auditd restart
OL09-00-000515 SV-271530r1092480_rule
V-271531 CCI-000018 medium OL 9 must generate audit records for all account creations, modifications, disabling, and termination events that affect /etc/opasswd. SRG-OS-000004-GPOS-00004
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.

Satisfies: SRG-OS-000004-GPOS-00004, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPOS-00020, SRG-OS-000062-GPOS-00031, SRG-OS-000304-GPOS-00121, SRG-OS-000392-GPOS-00172, SRG-OS-000462-GPOS-00206, SRG-OS-000470-GPOS-00214, SRG-OS-000471-GPOS-00215, SRG-OS-000239-GPOS-00089, SRG-OS-000240-GPOS-00090, SRG-OS-000241-GPOS-00091, SRG-OS-000303-GPOS-00120, SRG-OS-000466-GPOS-00210, SRG-OS-000476-GPOS-00221
Verify that OL 9 generates audit records for all account creations, modifications, disabling, and termination events that affect "/etc/security/opasswd" with the following command:

$ sudo auditctl -l | egrep '(/etc/security/opasswd)' 
-w /etc/security/opasswd -p wa -k identity

If the command does not return a line or the line is commented out, this is a finding.
Configure OL 9 to generate audit records for all account creations, modifications, disabling, and termination events that affect "/etc/security/opasswd".

Add or update the following file system rule to "/etc/audit/rules.d/audit.rules":

-w /etc/security/opasswd -p wa -k identity

The audit daemon must be restarted for the changes to take effect.

Restart auditd:
$ sudo service auditd restart
OL09-00-000520 SV-271531r1092482_rule
V-271532 CCI-000018 medium OL 9 must generate audit records for all account creations, modifications, disabling, and termination events that affect /etc/passwd. SRG-OS-000004-GPOS-00004
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.

Satisfies: SRG-OS-000004-GPOS-00004, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPOS-00020, SRG-OS-000062-GPOS-00031, SRG-OS-000304-GPOS-00121, SRG-OS-000392-GPOS-00172, SRG-OS-000462-GPOS-00206, SRG-OS-000470-GPOS-00214, SRG-OS-000471-GPOS-00215, SRG-OS-000239-GPOS-00089, SRG-OS-000240-GPOS-00090, SRG-OS-000241-GPOS-00091, SRG-OS-000303-GPOS-00120, SRG-OS-000466-GPOS-00210, SRG-OS-000476-GPOS-00221, SRG-OS-000274-GPOS-00104, SRG-OS-000275-GPOS-00105, SRG-OS-000276-GPOS-00106, SRG-OS-000277-GPOS-00107
Verify that OL 9 generates audit records for all account creations, modifications, disabling, and termination events that affect "/etc/passwd" with the following command:

$ sudo auditctl -l | egrep '(/etc/passwd)' 
-w /etc/passwd -p wa -k identity

If the command does not return a line or the line is commented out, this is a finding.
Configure OL 9 to generate audit records for all account creations, modifications, disabling, and termination events that affect "/etc/passwd".

Add or update the following file system rule to "/etc/audit/rules.d/audit.rules":

-w /etc/passwd -p wa -k identity

The audit daemon must be restarted for the changes to take effect.

Restart auditd:
$ sudo service auditd restart
OL09-00-000525 SV-271532r1092484_rule
V-271533 CCI-000018 medium OL 9 must generate audit records for all account creations, modifications, disabling, and termination events that affect /etc/shadow. SRG-OS-000004-GPOS-00004
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.

Satisfies: SRG-OS-000004-GPOS-00004, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPOS-00020, SRG-OS-000062-GPOS-00031, SRG-OS-000304-GPOS-00121, SRG-OS-000392-GPOS-00172, SRG-OS-000462-GPOS-00206, SRG-OS-000470-GPOS-00214, SRG-OS-000471-GPOS-00215, SRG-OS-000239-GPOS-00089, SRG-OS-000240-GPOS-00090, SRG-OS-000241-GPOS-00091, SRG-OS-000303-GPOS-00120, SRG-OS-000466-GPOS-00210, SRG-OS-000476-GPOS-00221
Verify that OL 9 generates audit records for all account creations, modifications, disabling, and termination events that affect "/etc/shadow" with the following command:

$ sudo auditctl -l | egrep '(/etc/shadow)' 
-w /etc/shadow -p wa -k identity

If the command does not return a line or the line is commented out, this is a finding.
Configure OL 9 to generate audit records for all account creations, modifications, disabling, and termination events that affect "/etc/shadow".

Add or update the following file system rule to "/etc/audit/rules.d/audit.rules":

-w /etc/shadow -p wa -k identity

The audit daemon must be restarted for the changes to take effect.

Restart auditd:
$ sudo service auditd restart
OL09-00-000530 SV-271533r1092486_rule
V-271534 CCI-000130 medium OL 9 must audit all uses of the unix_update command. SRG-OS-000037-GPOS-00015
Without generating audit record specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one.

Audit records can be generated from various components within the information system (e.g., module or policy filter).

When a user logs on, the auid is set to the uid of the account being authenticated. Daemons are not user sessions and have the loginuid set to -1. The auid representation is an unsigned 32-bit integer, which equals 4294967295. The audit system interprets -1, 4294967295, and "unset" in the same way.

The system call rules are loaded into a matching engine that intercepts each system call made by all programs on the system. Therefore, it is very important to use system call rules only when absolutely necessary since these affect performance. The more rules, the bigger the performance hit. The performance can be helped, however, by combining system calls into one rule whenever possible.

Satisfies: SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPOS-00020, SRG-OS-000062-GPOS-00031, SRG-OS-000064-GPOS-00033, SRG-OS-000392-GPOS-00172, SRG-OS-000462-GPOS-00206, SRG-OS-000471-GPOS-00215
Verify that OL 9 is configured to audit the execution of the "unix_update" command with the following command:

$ sudo auditctl -l | grep unix_update
-a always,exit -F path=/usr/sbin/unix_update -F perm=x -F auid>=1000 -F auid!=unset -k privileged-unix-update

If the command does not return a line or the line is commented out, this is a finding.
Configure OL 9 to generate audit records upon successful/unsuccessful attempts to use the "unix_update" command by adding or updating the following rule in "/etc/audit/rules.d/audit.rules":

-a always,exit -F path=/usr/sbin/unix_update -F perm=x -F auid>=1000 -F auid!=unset -k privileged-unix-update

The audit daemon must be restarted for the changes to take effect.

Restart auditd:
$ sudo service auditd restart
OL09-00-000535 SV-271534r1092488_rule
V-271535 CCI-000130 medium OL 9 must audit all uses of the su command. SRG-OS-000037-GPOS-00015
Without generating audit record specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one.

Audit records can be generated from various components within the information system (e.g., module or policy filter).

When a user logs on, the auid is set to the uid of the account being authenticated. Daemons are not user sessions and have the loginuid set to -1. The auid representation is an unsigned 32-bit integer, which equals 4294967295. The audit system interprets -1, 4294967295, and "unset" in the same way.

The system call rules are loaded into a matching engine that intercepts each system call made by all programs on the system. Therefore, it is very important to use system call rules only when absolutely necessary since these affect performance. The more rules, the bigger the performance hit. The performance can be helped, however, by combining system calls into one rule whenever possible.

Satisfies: SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPOS-00020, SRG-OS-000062-GPOS-00031, SRG-OS-000064-GPOS-00033, SRG-OS-000392-GPOS-00172, SRG-OS-000462-GPOS-00206, SRG-OS-000471-GPOS-00215, SRG-OS-000466-GPOS-00210
Verify that OL 9 is configured to audit the execution of the su command with the following command:

$ sudo auditctl -l | grep /usr/bin/su
-a always,exit -F path=/usr/bin/su -F perm=x -F auid>=1000 -F auid!=unset -k privileged-priv_change

If the command does not return a line or the line is commented out, this is a finding.
Configure OL 9 to generate audit records upon successful/unsuccessful attempts to use the su command by adding or updating the following rule in "/etc/audit/rules.d/audit.rules":

-a always,exit -F path=/usr/bin/su -F perm=x -F auid>=1000 -F auid!=unset -k privileged-priv_change

The audit daemon must be restarted for the changes to take effect.

Restart auditd:
$ sudo service auditd restart
OL09-00-000540 SV-271535r1092490_rule
V-271536 CCI-000130 medium OL 9 must audit all uses of the setxattr, fsetxattr, lsetxattr, removexattr, fremovexattr, and lremovexattr system calls. SRG-OS-000037-GPOS-00015
Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one.

Audit records can be generated from various components within the information system (e.g., module or policy filter).

When a user logs on, the auid is set to the uid of the account being authenticated. Daemons are not user sessions and have the loginuid set to -1. The auid representation is an unsigned 32-bit integer, which equals 4294967295. The audit system interprets -1, 4294967295, and "unset" in the same way.

The system call rules are loaded into a matching engine that intercepts each system call made by all programs on the system. Therefore, it is very important to use system call rules only when absolutely necessary since these affect performance. The more rules, the bigger the performance hit. The performance can be helped, however, by combining system calls into one rule whenever possible.

Satisfies: SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPOS-00020, SRG-OS-000062-GPOS-00031, SRG-OS-000392-GPOS-00172, SRG-OS-000458-GPOS-00203, SRG-OS-000462-GPOS-00206, SRG-OS-000463-GPOS-00207, SRG-OS-000471-GPOS-00215, SRG-OS-000474-GPOS-00219, SRG-OS-000466-GPOS-00210, SRG-OS-000064-GPOS-00033
Verify that OL 9 is configured to audit the execution of the setxattr, fsetxattr, lsetxattr, removexattr, fremovexattr, and lremovexattr system calls with the following command:

$ sudo auditctl -l | grep xattr
-a always,exit -F arch=b32 -S setxattr,fsetxattr,lsetxattr,removexattr,fremovexattr,lremovexattr -F auid>=1000 -F auid!=unset -k perm_mod
-a always,exit -F arch=b64 -S setxattr,fsetxattr,lsetxattr,removexattr,fremovexattr,lremovexattr -F auid>=1000 -F auid!=unset -k perm_mod

-a always,exit -F arch=b32 -S setxattr,fsetxattr,lsetxattr,removexattr,fremovexattr,lremovexattr -F auid=0 -k perm_mod
-a always,exit -F arch=b64 -S setxattr,fsetxattr,lsetxattr,removexattr,fremovexattr,lremovexattr -F auid=0 -k perm_mod

If both the "b32" and "b64" audit rules are not defined for the setxattr, fsetxattr, lsetxattr, removexattr, fremovexattr, and lremovexattr system calls, or any of the lines returned are commented out, this is a finding.
Configure OL 9 to audit the execution of the setxattr, fsetxattr, lsetxattr, removexattr, fremovexattr, and lremovexattr system calls by adding or updating the following lines to "/etc/audit/rules.d/audit.rules":

-a always,exit -F arch=b32 -S setxattr,fsetxattr,lsetxattr,removexattr,fremovexattr,lremovexattr -F auid>=1000 -F auid!=unset -k perm_mod
-a always,exit -F arch=b64 -S setxattr,fsetxattr,lsetxattr,removexattr,fremovexattr,lremovexattr -F auid>=1000 -F auid!=unset -k perm_mod

-a always,exit -F arch=b32 -S setxattr,fsetxattr,lsetxattr,removexattr,fremovexattr,lremovexattr -F auid=0 -k perm_mod
-a always,exit -F arch=b64 -S setxattr,fsetxattr,lsetxattr,removexattr,fremovexattr,lremovexattr -F auid=0 -k perm_mod

The audit daemon must be restarted for the changes to take effect.

Restart auditd:
$ sudo service auditd restart
OL09-00-000545 SV-271536r1092492_rule
V-271537 CCI-000130 medium OL 9 must audit all uses of the chage command. SRG-OS-000037-GPOS-00015
Without generating audit records specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one.

Audit records can be generated from various components within the information system (e.g., module or policy filter).

When a user logs on, the auid is set to the uid of the account being authenticated. Daemons are not user sessions and have the loginuid set to -1. The auid representation is an unsigned 32-bit integer, which equals 4294967295. The audit system interprets -1, 4294967295, and "unset" in the same way.

The system call rules are loaded into a matching engine that intercepts each system call made by all programs on the system. Therefore, it is very important to use system call rules only when absolutely necessary since these affect performance. The more rules, the bigger the performance hit. The performance can be helped, however, by combining system calls into one rule whenever possible.

Satisfies: SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPOS-00020, SRG-OS-000062-GPOS-00031, SRG-OS-000392-GPOS-00172, SRG-OS-000462-GPOS-00206, SRG-OS-000468-GPOS-00212, SRG-OS-000471-GPOS-00215
Verify that OL 9 is configured to audit the execution of the chage command with the following command:

$ sudo auditctl -l | grep chage
-a always,exit -F path=/usr/bin/chage -F perm=x -F auid>=1000 -F auid!=unset -k privileged-chage

If the command does not return a line or the line is commented out, this is a finding.
Configure OL 9 to generate audit records upon successful/unsuccessful attempts to use the chage command by adding or updating the following rule in "/etc/audit/rules.d/audit.rules":

-a always,exit -F path=/usr/bin/chage -F perm=x -F auid>=1000 -F auid!=unset -k privileged-chage

The audit daemon must be restarted for the changes to take effect.

Restart auditd:
$ sudo service auditd restart
OL09-00-000550 SV-271537r1092494_rule
V-271538 CCI-000130 medium OL 9 must audit all uses of the chcon command. SRG-OS-000037-GPOS-00015
Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one.

Audit records can be generated from various components within the information system (e.g., module or policy filter).

When a user logs on, the auid is set to the uid of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to -1. The auid representation is an unsigned 32-bit integer, which equals 4294967295. The audit system interprets -1, 4294967295, and "unset" in the same way.

The system call rules are loaded into a matching engine that intercepts each system call made by all programs on the system. Therefore, it is very important to use system call rules only when absolutely necessary since these affect performance. The more rules, the bigger the performance hit. The performance can be helped, however, by combining system calls into one rule whenever possible.

Satisfies: SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPOS-00020, SRG-OS-000062-GPOS-00031, SRG-OS-000392-GPOS-00172, SRG-OS-000462-GPOS-00206, SRG-OS-000468-GPOS-00212, SRG-OS-000471-GPOS-00215, SRG-OS-000463-GPOS-00207, SRG-OS-000465-GPOS-00209
Verify that OL 9 is configured to audit the execution of the chcon command with the following command:

$ sudo auditctl -l | grep chcon
-a always,exit -F path=/usr/bin/chcon -F perm=x -F auid>=1000 -F auid!=unset -k perm_mod

If the command does not return a line or the line is commented out, this is a finding.
Configure OL 9 to generate audit records upon successful/unsuccessful attempts to use the chcon command by adding or updating the following rule in "/etc/audit/rules.d/audit.rules":

-a always,exit -F path=/usr/bin/chcon -F perm=x -F auid>=1000 -F auid!=unset -k perm_mod

The audit daemon must be restarted for the changes to take effect.

Restart auditd:
$ sudo service auditd restart
OL09-00-000555 SV-271538r1092496_rule
V-271539 CCI-000130 medium OL 9 must audit all uses of the setfacl command. SRG-OS-000037-GPOS-00015
Without generating audit records specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one.

Audit records can be generated from various components within the information system (e.g., module or policy filter).

When a user logs on, the auid is set to the uid of the account being authenticated. Daemons are not user sessions and have the loginuid set to -1. The auid representation is an unsigned 32-bit integer, which equals 4294967295. The audit system interprets -1, 4294967295, and "unset" in the same way.

The system call rules are loaded into a matching engine that intercepts each system call made by all programs on the system. Therefore, it is very important to use system call rules only when absolutely necessary since these affect performance. The more rules, the bigger the performance hit. The performance can be helped, however, by combining system calls into one rule whenever possible.

Satisfies: SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPOS-00020, SRG-OS-000062-GPOS-00031, SRG-OS-000392-GPOS-00172, SRG-OS-000462-GPOS-00206, SRG-OS-000471-GPOS-00215
Verify that OL 9 is configured to audit the execution of the setfacl command with the following command:

$ sudo auditctl -l | grep setfacl
-a always,exit -F path=/usr/bin/setfacl -F perm=x -F auid>=1000 -F auid!=unset -k perm_mod

If the command does not return a line or the line is commented out, this is a finding.
Configure OL 9 to generate audit records upon successful/unsuccessful attempts to use the setfacl command by adding or updating the following rule in "/etc/audit/rules.d/audit.rules":

-a always,exit -F path=/usr/bin/setfacl -F perm=x -F auid>=1000 -F auid!=unset -k perm_mod

The audit daemon must be restarted for the changes to take effect.

Restart auditd:
$ sudo service auditd restart
OL09-00-000560 SV-271539r1092498_rule
V-271540 CCI-000130 medium OL 9 must audit all uses of the chsh command. SRG-OS-000037-GPOS-00015
Without generating audit records specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one.

Audit records can be generated from various components within the information system (e.g., module or policy filter).

When a user logs on, the auid is set to the uid of the account being authenticated. Daemons are not user sessions and have the loginuid set to -1. The auid representation is an unsigned 32-bit integer, which equals 4294967295. The audit system interprets -1, 4294967295, and "unset" in the same way.

The system call rules are loaded into a matching engine that intercepts each system call made by all programs on the system. Therefore, it is very important to use system call rules only when absolutely necessary since these affect performance. The more rules, the bigger the performance hit. The performance can be helped, however, by combining system calls into one rule whenever possible.

Satisfies: SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPOS-00020, SRG-OS-000062-GPOS-00031, SRG-OS-000392-GPOS-00172, SRG-OS-000462-GPOS-00206, SRG-OS-000471-GPOS-00215
Verify that OL 9 is configured to audit the execution of the chsh command with the following command:

$ sudo auditctl -l | grep chsh
-a always,exit -F path=/usr/bin/chsh -F perm=x -F auid>=1000 -F auid!=unset -k priv_cmd

If the command does not return a line or the line is commented out, this is a finding.
Configure OL 9 to generate audit records upon successful/unsuccessful attempts to use the chsh command by adding or updating the following rule in "/etc/audit/rules.d/audit.rules":

-a always,exit -F path=/usr/bin/chsh -F perm=x -F auid>=1000 -F auid!=unset -k priv_cmd

The audit daemon must be restarted for the changes to take effect.

Restart auditd:
$ sudo service auditd restart
OL09-00-000565 SV-271540r1092500_rule
V-271541 CCI-000130 medium OL 9 must audit all uses of the crontab command. SRG-OS-000037-GPOS-00015
Without generating audit records specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one.

Audit records can be generated from various components within the information system (e.g., module or policy filter).

When a user logs on, the auid is set to the uid of the account being authenticated. Daemons are not user sessions and have the loginuid set to -1. The auid representation is an unsigned 32-bit integer, which equals 4294967295. The audit system interprets -1, 4294967295, and "unset" in the same way.

The system call rules are loaded into a matching engine that intercepts each system call made by all programs on the system. Therefore, it is very important to use system call rules only when absolutely necessary since these affect performance. The more rules, the bigger the performance hit. The performance can be helped, however, by combining system calls into one rule whenever possible.

Satisfies: SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPOS-00020, SRG-OS-000062-GPOS-00031, SRG-OS-000392-GPOS-00172, SRG-OS-000462-GPOS-00206, SRG-OS-000471-GPOS-00215
Verify that OL 9 is configured to audit the execution of the crontab command with the following command:

$ sudo auditctl -l | grep crontab
-a always,exit -F path=/usr/bin/crontab -F perm=x -F auid>=1000 -F auid!=unset -k privileged-crontab

If the command does not return a line or the line is commented out, this is a finding.
Configure OL 9 to generate audit records upon successful/unsuccessful attempts to use the crontab command by adding or updating the following rule in "/etc/audit/rules.d/audit.rules":

-a always,exit -F path=/usr/bin/crontab -F perm=x -F auid>=1000 -F auid!=unset -k privileged-crontab

The audit daemon must be restarted for the changes to take effect.

Restart auditd:
$ sudo service auditd restart
OL09-00-000570 SV-271541r1092502_rule
V-271542 CCI-000130 medium OL 9 must audit all uses of the gpasswd command. SRG-OS-000037-GPOS-00015
Without generating audit records specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one.

Audit records can be generated from various components within the information system (e.g., module or policy filter).

When a user logs on, the auid is set to the uid of the account being authenticated. Daemons are not user sessions and have the loginuid set to -1. The auid representation is an unsigned 32-bit integer, which equals 4294967295. The audit system interprets -1, 4294967295, and "unset" in the same way.

The system call rules are loaded into a matching engine that intercepts each system call made by all programs on the system. Therefore, it is very important to use system call rules only when absolutely necessary since these affect performance. The more rules, the bigger the performance hit. The performance can be helped, however, by combining system calls into one rule whenever possible.

Satisfies: SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPOS-00020, SRG-OS-000062-GPOS-00031, SRG-OS-000392-GPOS-00172, SRG-OS-000462-GPOS-00206, SRG-OS-000471-GPOS-00215
Verify that OL 9 is configured to audit the execution of the gpasswd command with the following command:

$ sudo auditctl -l | grep gpasswd
-a always,exit -F path=/usr/bin/gpasswd -F perm=x -F auid>=1000 -F auid!=unset -k privileged-gpasswd

If the command does not return a line or the line is commented out, this is a finding.
Configure OL 9 to generate audit records upon successful/unsuccessful attempts to use the gpasswd command by adding or updating the following rule in "/etc/audit/rules.d/audit.rules":

-a always,exit -F path=/usr/bin/gpasswd -F perm=x -F auid>=1000 -F auid!=unset -k privileged-gpasswd

The audit daemon must be restarted for the changes to take effect.

Restart auditd:
$ sudo service auditd restart
OL09-00-000575 SV-271542r1092504_rule
V-271543 CCI-000130 medium OL 9 must audit all uses of the newgrp command. SRG-OS-000037-GPOS-00015
Without generating audit records specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one.

Audit records can be generated from various components within the information system (e.g., module or policy filter).

When a user logs on, the auid is set to the uid of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to -1. The auid representation is an unsigned 32-bit integer, which equals 4294967295. The audit system interprets -1, 4294967295, and "unset" in the same way.

The system call rules are loaded into a matching engine that intercepts each system call made by all programs on the system. Therefore, it is very important to use system call rules only when absolutely necessary since these affect performance. The more rules, the bigger the performance hit. The performance can be helped, however, by combining system calls into one rule whenever possible.

Satisfies: SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPOS-00020, SRG-OS-000062-GPOS-00031, SRG-OS-000392-GPOS-00172, SRG-OS-000462-GPOS-00206, SRG-OS-000471-GPOS-00215
Verify that OL 9 is configured to audit the execution of the newgrp command with the following command:

$ sudo auditctl -l | grep newgrp
-a always,exit -F path=/usr/bin/newgrp -F perm=x -F auid>=1000 -F auid!=unset -k priv_cmd

If the command does not return a line or the line is commented out, this is a finding.
Configure OL 9 to generate audit records upon successful/unsuccessful attempts to use the newgrp command by adding or updating the following rule in "/etc/audit/rules.d/audit.rules":

-a always,exit -F path=/usr/bin/newgrp -F perm=x -F auid>=1000 -F auid!=unset -k priv_cmd

The audit daemon must be restarted for the changes to take effect.

Restart auditd:
$ sudo service auditd restart
OL09-00-000580 SV-271543r1092506_rule
V-271544 CCI-000130 medium OL 9 must audit all uses of the pam_timestamp_check command. SRG-OS-000037-GPOS-00015
Without generating audit records specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one.

Audit records can be generated from various components within the information system (e.g., module or policy filter).

When a user logs on, the auid is set to the uid of the account being authenticated. Daemons are not user sessions and have the loginuid set to -1. The auid representation is an unsigned 32-bit integer, which equals 4294967295. The audit system interprets -1, 4294967295, and "unset" in the same way.

The system call rules are loaded into a matching engine that intercepts each system call made by all programs on the system. Therefore, it is very important to use system call rules only when absolutely necessary since these affect performance. The more rules, the bigger the performance hit. The performance can be helped, however, by combining system calls into one rule whenever possible.

Satisfies: SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPOS-00020, SRG-OS-000062-GPOS-00031, SRG-OS-000392-GPOS-00172, SRG-OS-000462-GPOS-00206, SRG-OS-000471-GPOS-00215
Verify that OL 9 is configured to audit the execution of the pam_timestamp_check command with the following command:

$ sudo auditctl -l | grep timestamp
-a always,exit -F path=/usr/sbin/pam_timestamp_check -F perm=x -F auid>=1000 -F auid!=unset -k privileged-pam_timestamp_check

If the command does not return a line or the line is commented out, this is a finding.
Configure OL 9 to generate audit records upon successful/unsuccessful attempts to use the pam_timestamp_check command by adding or updating the following rule in "/etc/audit/rules.d/audit.rules":

-a always,exit -F path=/usr/sbin/pam_timestamp_check -F perm=x -F auid>=1000 -F auid!=unset -k privileged-pam_timestamp_check

The audit daemon must be restarted for the changes to take effect.

Restart auditd:
$ sudo service auditd restart
OL09-00-000585 SV-271544r1092508_rule
V-271545 CCI-000130 medium OL 9 must audit all uses of the passwd command. SRG-OS-000037-GPOS-00015
Without generating audit records specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one.

Audit records can be generated from various components within the information system (e.g., module or policy filter).

When a user logs on, the auid is set to the uid of the account being authenticated. Daemons are not user sessions and have the loginuid set to -1. The auid representation is an unsigned 32-bit integer, which equals 4294967295. The audit system interprets -1, 4294967295, and "unset" in the same way.

The system call rules are loaded into a matching engine that intercepts each system call made by all programs on the system. Therefore, it is very important to use system call rules only when absolutely necessary since these affect performance. The more rules, the bigger the performance hit. The performance can be helped, however, by combining system calls into one rule whenever possible.

Satisfies: SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPOS-00020, SRG-OS-000062-GPOS-00031, SRG-OS-000392-GPOS-00172, SRG-OS-000462-GPOS-00206, SRG-OS-000471-GPOS-00215
Verify that OL 9 generates audit records for all account creations, modifications, disabling, and termination events that affect "/etc/passwd" with the following command:

$ sudo auditctl -l | egrep '(/usr/bin/passwd)' 
-a always,exit -F path=/usr/bin/passwd -F perm=x -F auid>=1000 -F auid!=unset -k privileged-passwd

If the command does not return a line or the line is commented out, this is a finding.
Configure OL 9 to generate audit records upon successful/unsuccessful attempts to use the passwd command by adding or updating the following rule in "/etc/audit/rules.d/audit.rules":

-a always,exit -F path=/usr/bin/passwd -F perm=x -F auid>=1000 -F auid!=unset -k privileged-passwd

The audit daemon must be restarted for the changes to take effect.

Restart auditd:
$ sudo service auditd restart
OL09-00-000590 SV-271545r1092510_rule
V-271546 CCI-000130 medium OL 9 must audit all uses of the postdrop command. SRG-OS-000037-GPOS-00015
Without generating audit records specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one.

Audit records can be generated from various components within the information system (e.g., module or policy filter).

When a user logs on, the auid is set to the uid of the account being authenticated. Daemons are not user sessions and have the loginuid set to -1. The auid representation is an unsigned 32-bit integer, which equals 4294967295. The audit system interprets -1, 4294967295, and "unset" in the same way.

The system call rules are loaded into a matching engine that intercepts each system call made by all programs on the system. Therefore, it is very important to use system call rules only when absolutely necessary since these affect performance. The more rules, the bigger the performance hit. The performance can be helped however, by combining system calls into one rule whenever possible.

Satisfies: SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPOS-00020, SRG-OS-000062-GPOS-00031, SRG-OS-000392-GPOS-00172, SRG-OS-000462-GPOS-00206, SRG-OS-000471-GPOS-00215
Verify that OL 9 is configured to audit the execution of the postdrop command with the following command:

$ sudo auditctl -l | grep postdrop
-a always,exit -F path=/usr/sbin/postdrop -F perm=x -F auid>=1000 -F auid!=unset -k privileged-unix-update

If the command does not return a line or the line is commented out, this is a finding.
Configure OL 9 to generate audit records upon successful/unsuccessful attempts to use the postdrop command by adding or updating the following rule in "/etc/audit/rules.d/audit.rules":

-a always,exit -F path=/usr/sbin/postdrop -F perm=x -F auid>=1000 -F auid!=unset -k privileged-unix-update

The audit daemon must be restarted for the changes to take effect.

Restart auditd:
$ sudo service auditd restart
OL09-00-000595 SV-271546r1092512_rule
V-271547 CCI-000130 medium OL 9 must audit all uses of the postqueue command. SRG-OS-000037-GPOS-00015
Without generating audit record specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one.

Audit records can be generated from various components within the information system (e.g., module or policy filter).

When a user logs on, the auid is set to the uid of the account being authenticated. Daemons are not user sessions and have the loginuid set to -1. The auid representation is an unsigned 32-bit integer, which equals 4294967295. The audit system interprets -1, 4294967295, and "unset" in the same way.

The system call rules are loaded into a matching engine that intercepts each system call made by all programs on the system. Therefore, it is very important to use system call rules only when absolutely necessary since these affect performance. The more rules, the bigger the performance hit. The performance can be helped, however, by combining system calls into one rule whenever possible.

Satisfies: SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPOS-00020, SRG-OS-000062-GPOS-00031, SRG-OS-000392-GPOS-00172, SRG-OS-000462-GPOS-00206, SRG-OS-000471-GPOS-00215
Verify that OL 9 is configured to audit the execution of the postqueue command with the following command:

$ sudo auditctl -l | grep postqueue
-a always,exit -F path=/usr/sbin/postqueue -F perm=x -F auid>=1000 -F auid!=unset -k privileged-unix-update

If the command does not return a line or the line is commented out, this is a finding.
Configure OL 9 to generate audit records upon successful/unsuccessful attempts to use the postqueue command by adding or updating the following rule in "/etc/audit/rules.d/audit.rules":

-a always,exit -F path=/usr/sbin/postqueue -F perm=x -F auid>=1000 -F auid!=unset -k privileged-unix-update

The audit daemon must be restarted for the changes to take effect.

Restart auditd:
$ sudo service auditd restart
OL09-00-000600 SV-271547r1092514_rule
V-271548 CCI-000130 medium OL 9 must audit all uses of the ssh-agent command. SRG-OS-000037-GPOS-00015
Without generating audit record specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one.

Audit records can be generated from various components within the information system (e.g., module or policy filter).

When a user logs on, the auid is set to the uid of the account being authenticated. Daemons are not user sessions and have the loginuid set to -1. The auid representation is an unsigned 32-bit integer, which equals 4294967295. The audit system interprets -1, 4294967295, and "unset" in the same way.

The system call rules are loaded into a matching engine that intercepts each system call made by all programs on the system. Therefore, it is very important to use system call rules only when absolutely necessary since these affect performance. The more rules, the bigger the performance hit. The performance can be helped, however, by combining system calls into one rule whenever possible.

Satisfies: SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPOS-00020, SRG-OS-000062-GPOS-00031, SRG-OS-000392-GPOS-00172, SRG-OS-000462-GPOS-00206, SRG-OS-000471-GPOS-00215
Verify that OL 9 is configured to audit the execution of the ssh-agent command with the following command:

$ sudo auditctl -l | grep ssh-agent
-a always,exit -F path=/usr/bin/ssh-agent -F perm=x -F auid>=1000 -F auid!=unset -k privileged-ssh

If the command does not return a line or the line is commented out, this is a finding.
Configure OL 9 to generate audit records upon successful/unsuccessful attempts to use the ssh-agent command by adding or updating the following rule in "/etc/audit/rules.d/audit.rules":

-a always,exit -F path=/usr/bin/ssh-agent -F perm=x -F auid>=1000 -F auid!=unset -k privileged-ssh

The audit daemon must be restarted for the changes to take effect.

Restart auditd:
$ sudo service auditd restart
OL09-00-000605 SV-271548r1092516_rule
V-271549 CCI-000130 medium OL 9 must audit all uses of the ssh-keysign command. SRG-OS-000037-GPOS-00015
Without generating audit record specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one.

Audit records can be generated from various components within the information system (e.g., module or policy filter).

When a user logs on, the auid is set to the uid of the account being authenticated. Daemons are not user sessions and have the loginuid set to -1. The auid representation is an unsigned 32-bit integer, which equals 4294967295. The audit system interprets -1, 4294967295, and "unset" in the same way.

The system call rules are loaded into a matching engine that intercepts each system call made by all programs on the system. Therefore, it is very important to use system call rules only when absolutely necessary since these affect performance. The more rules, the bigger the performance hit. The performance can be helped, however, by combining system calls into one rule whenever possible.

Satisfies: SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPOS-00020, SRG-OS-000062-GPOS-00031, SRG-OS-000392-GPOS-00172, SRG-OS-000462-GPOS-00206, SRG-OS-000471-GPOS-00215
Verify that OL 9 is configured to audit the execution of the ssh-keysign command with the following command:

$ sudo auditctl -l | grep ssh-keysign
-a always,exit -F path=/usr/libexec/openssh/ssh-keysign -F perm=x -F auid>=1000 -F auid!=unset -k privileged-ssh

If the command does not return a line or the line is commented out, this is a finding.
Configure OL 9 to generate audit records upon successful/unsuccessful attempts to use the ssh-keysign command by adding or updating the following rule in "/etc/audit/rules.d/audit.rules":

-a always,exit -F path=/usr/libexec/openssh/ssh-keysign -F perm=x -F auid>=1000 -F auid!=unset -k privileged-ssh

The audit daemon must be restarted for the changes to take effect.

Restart auditd:
$ sudo service auditd restart
OL09-00-000610 SV-271549r1092518_rule
V-271550 CCI-000130 medium OL 9 must audit all uses of the sudoedit command. SRG-OS-000037-GPOS-00015
Without generating audit record specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one.

Audit records can be generated from various components within the information system (e.g., module or policy filter).

When a user logs on, the auid is set to the uid of the account being authenticated. Daemons are not user sessions and have the loginuid set to -1. The auid representation is an unsigned 32-bit integer, which equals 4294967295. The audit system interprets -1, 4294967295, and "unset" in the same way.

The system call rules are loaded into a matching engine that intercepts each system call made by all programs on the system. Therefore, it is very important to use system call rules only when absolutely necessary since these affect performance. The more rules, the bigger the performance hit. The performance can be helped, however, by combining system calls into one rule whenever possible.

Satisfies: SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPOS-00020, SRG-OS-000062-GPOS-00031, SRG-OS-000392-GPOS-00172, SRG-OS-000462-GPOS-00206, SRG-OS-000471-GPOS-00215
Verify that OL 9 is configured to audit the execution of the sudoedit command with the following command:

$ sudo auditctl -l | grep /usr/bin/sudoedit
-a always,exit -F path=/usr/bin/sudoedit -F perm=x -F auid>=1000 -F auid!=unset -k priv_cmd

If the command does not return a line or the line is commented out, this is a finding.
Configure OL 9 to generate audit records upon successful/unsuccessful attempts to use the sudoedit command by adding or updating the following rule in "/etc/audit/rules.d/audit.rules":

-a always,exit -F path=/usr/bin/sudoedit -F perm=x -F auid>=1000 -F auid!=unset -k priv_cmd

The audit daemon must be restarted for the changes to take effect.

Restart auditd:
$ sudo service auditd restart
OL09-00-000615 SV-271550r1092520_rule
V-271551 CCI-000130 medium OL 9 must audit all uses of the unix_chkpwd command. SRG-OS-000037-GPOS-00015
Without generating audit record specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one.

Audit records can be generated from various components within the information system (e.g., module or policy filter).

When a user logs on, the auid is set to the uid of the account being authenticated. Daemons are not user sessions and have the loginuid set to -1. The auid representation is an unsigned 32-bit integer, which equals 4294967295. The audit system interprets -1, 4294967295, and "unset" in the same way.

The system call rules are loaded into a matching engine that intercepts each system call made by all programs on the system. Therefore, it is very important to use system call rules only when absolutely necessary since these affect performance. The more rules, the bigger the performance hit. The performance can be helped, however, by combining system calls into one rule whenever possible.

Satisfies: SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPOS-00020, SRG-OS-000062-GPOS-00031, SRG-OS-000392-GPOS-00172, SRG-OS-000462-GPOS-00206, SRG-OS-000471-GPOS-00215
Verify that OL 9 is configured to audit the execution of the unix_chkpwd command with the following command:

$ sudo auditctl -l | grep unix_chkpwd
-a always,exit -F path=/usr/sbin/unix_chkpwd -F perm=x -F auid>=1000 -F auid!=unset -k privileged-unix-update

If the command does not return a line or the line is commented out, this is a finding.
Configure OL 9 to generate audit records upon successful/unsuccessful attempts to use the unix_chkpwd command by adding or updating the following rule in "/etc/audit/rules.d/audit.rules":

-a always,exit -F path=/usr/sbin/unix_chkpwd -F perm=x -F auid>=1000 -F auid!=unset -k privileged-unix-update

The audit daemon must be restarted for the changes to take effect.

Restart auditd:
$ sudo service auditd restart
OL09-00-000620 SV-271551r1092522_rule
V-271552 CCI-000130 medium OL 9 must audit all uses of the userhelper command. SRG-OS-000037-GPOS-00015
Without generating audit record specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one.

Audit records can be generated from various components within the information system (e.g., module or policy filter).

When a user logs on, the auid is set to the uid of the account being authenticated. Daemons are not user sessions and have the loginuid set to -1. The auid representation is an unsigned 32-bit integer, which equals 4294967295. The audit system interprets -1, 4294967295, and "unset" in the same way.

The system call rules are loaded into a matching engine that intercepts each system call made by all programs on the system. Therefore, it is very important to use system call rules only when absolutely necessary since these affect performance. The more rules, the bigger the performance hit. The performance can be helped, however, by combining system calls into one rule whenever possible.

Satisfies: SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPOS-00020, SRG-OS-000062-GPOS-00031, SRG-OS-000392-GPOS-00172, SRG-OS-000462-GPOS-00206, SRG-OS-000471-GPOS-00215
Verify that OL 9 is configured to audit the execution of the userhelper command with the following command:

$ sudo auditctl -l | grep userhelper
-a always,exit -F path=/usr/sbin/userhelper -F perm=x -F auid>=1000 -F auid!=unset -k privileged-unix-update

If the command does not return a line or the line is commented out, this is a finding.
Configure OL 9 to generate audit records upon successful/unsuccessful attempts to use the userhelper command by adding or updating the following rule in "/etc/audit/rules.d/audit.rules":

-a always,exit -F path=/usr/sbin/userhelper -F perm=x -F auid>=1000 -F auid!=unset -k privileged-unix-update

The audit daemon must be restarted for the changes to take effect.

Restart auditd:
$ sudo service auditd restart
OL09-00-000625 SV-271552r1092524_rule
V-271553 CCI-000130 medium OL 9 must audit all uses of the mount command. SRG-OS-000037-GPOS-00015
Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one.

Audit records can be generated from various components within the information system (e.g., module or policy filter).

When a user logs on, the auid is set to the uid of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to -1. The auid representation is an unsigned 32-bit integer, which equals 4294967295. The audit system interprets -1, 4294967295, and "unset" in the same way.

The system call rules are loaded into a matching engine that intercepts each system call made by all programs on the system. Therefore, it is very important to use system call rules only when absolutely necessary since these affect performance. The more rules, the bigger the performance hit. The performance can be helped, however, by combining system calls into one rule whenever possible.

Satisfies: SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPOS-00020, SRG-OS-000062-GPOS-00031, SRG-OS-000392-GPOS-00172, SRG-OS-000462-GPOS-00206, SRG-OS-000471-GPOS-00215
Verify that OL 9 is configured to audit the execution of the mount command with the following command:

$ sudo auditctl -l | grep /usr/bin/mount
-a always,exit -F path=/usr/bin/mount -F perm=x -F auid>=1000 -F auid!=unset -k privileged-mount

If the command does not return a line or the line is commented out, this is a finding.
Configure OL 9 to generate audit records upon successful/unsuccessful attempts to use the mount command by adding or updating the following rule in "/etc/audit/rules.d/audit.rules":

-a always,exit -F path=/usr/bin/mount -F perm=x -F auid>=1000 -F auid!=unset -k privileged-mount

The audit daemon must be restarted for the changes to take effect.

Restart auditd:
$ sudo service auditd restart
OL09-00-000630 SV-271553r1092526_rule
V-271554 CCI-000130 medium OL 9 must audit all uses of the truncate, ftruncate, creat, open, openat, and open_by_handle_at system calls. SRG-OS-000037-GPOS-00015
Without generating audit records specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one.

Audit records can be generated from various components within the information system (e.g., module or policy filter).

When a user logs on, the auid is set to the uid of the account being authenticated. Daemons are not user sessions and have the loginuid set to -1. The auid representation is an unsigned 32-bit integer, which equals 4294967295. The audit system interprets -1, 4294967295, and "unset" in the same way.

The system call rules are loaded into a matching engine that intercepts each system call made by all programs on the system. Therefore, it is very important to use system call rules only when absolutely necessary since these affect performance. The more rules, the bigger the performance hit. The performance can be helped, however, by combining system calls into one rule whenever possible.

Satisfies: SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPOS-00020, SRG-OS-000062-GPOS-00031, SRG-OS-000392-GPOS-00172, SRG-OS-000462-GPOS-00206, SRG-OS-000471-GPOS-00215, SRG-OS-000064-GPOS-00033, SRG-OS-000458-GPOS-00203, SRG-OS-000461-GPOS-00205
Verify that OL 9 is configured to audit successful/unsuccessful attempts to use the truncate, ftruncate, creat, open, openat, and open_by_handle_at system calls with the following command:

$ sudo auditctl -l | grep 'open\|truncate\|creat' 
-a always,exit -F arch=b32 -S truncate,ftruncate,creat,open,openat,open_by_handle_at -F exit=-EPERM -F auid>=1000 -F auid!=unset -k perm_access
-a always,exit -F arch=b64 -S truncate,ftruncate,creat,open,openat,open_by_handle_at -F exit=-EPERM -F auid>=1000 -F auid!=unset -k perm_access

-a always,exit -F arch=b32 -S truncate,ftruncate,creat,open,openat,open_by_handle_at -F exit=-EACCES -F auid>=1000 -F auid!=unset -k perm_access
-a always,exit -F arch=b64 -S truncate,ftruncate,creat,open,openat,open_by_handle_at -F exit=-EACCES -F auid>=1000 -F auid!=unset -k perm_access

If the output does not produce rules containing "-F exit=-EPERM", this is a finding.

If the output does not produce rules containing "-F exit=-EACCES", this is a finding.

If the command does not return an audit rule for truncate, ftruncate, creat, open, openat, and open_by_handle_at or any of the lines returned are commented out, this is a finding.
Configure OL 9 to generate an audit event for any successful/unsuccessful use of the truncate, ftruncate, creat, open, openat, and open_by_handle_at system calls by adding or updating the following rules in the "/etc/audit/rules.d/audit.rules" file:

-a always,exit -F arch=b32 -S truncate,ftruncate,creat,open,openat,open_by_handle_at -F exit=-EPERM -F auid>=1000 -F auid!=unset -k perm_access
-a always,exit -F arch=b64 -S truncate,ftruncate,creat,open,openat,open_by_handle_at -F exit=-EPERM -F auid>=1000 -F auid!=unset -k perm_access

-a always,exit -F arch=b32 -S truncate,ftruncate,creat,open,openat,open_by_handle_at -F exit=-EACCES -F auid>=1000 -F auid!=unset -k perm_access
-a always,exit -F arch=b64 -S truncate,ftruncate,creat,open,openat,open_by_handle_at -F exit=-EACCES -F auid>=1000 -F auid!=unset -k perm_access

The audit daemon must be restarted for the changes to take effect.

Restart auditd:
$ sudo service auditd restart
OL09-00-000635 SV-271554r1092528_rule
V-271555 CCI-000130 medium OL 9 must audit all uses of the chmod, fchmod, and fchmodat system calls. SRG-OS-000037-GPOS-00015
Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one.

Audit records can be generated from various components within the information system (e.g., module or policy filter).

When a user logs on, the auid is set to the uid of the account being authenticated. Daemons are not user sessions and have the loginuid set to -1. The auid representation is an unsigned 32-bit integer, which equals 4294967295. The audit system interprets -1, 4294967295, and "unset" in the same way.

The system call rules are loaded into a matching engine that intercepts each system call made by all programs on the system. Therefore, it is very important to use system call rules only when absolutely necessary since these affect performance. The more rules, the bigger the performance hit. The performance can be helped, however, by combining system calls into one rule whenever possible.

Satisfies: SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPOS-00020, SRG-OS-000062-GPOS-00031, SRG-OS-000392-GPOS-00172, SRG-OS-000462-GPOS-00206, SRG-OS-000471-GPOS-00215, SRG-OS-000064-GPOS-00033, SRG-OS-000466-GPOS-00210, SRG-OS-000458-GPOS-00203
Verify that OL 9 is configured to audit the execution of the chmod, fchmod, and fchmodat system calls with the following command:

$ sudo auditctl -l | grep chmod
-a always,exit -F arch=b32 -S chmod,fchmod,fchmodat -F auid>=1000 -F auid!=unset -k perm_mod
-a always,exit -F arch=b64 -S chmod,fchmod,fchmodat -F auid>=1000 -F auid!=unset -k perm_mod

If both the "b32" and "b64" audit rules are not defined for the chmod, fchmod, and fchmodat system calls, this is a finding.
Configure OL 9 to generate audit records upon successful/unsuccessful attempts to use the chmod, fchmod, and fchmodat system calls.

Add or update the following rules in "/etc/audit/rules.d/audit.rules":

-a always,exit -F arch=b32 -S chmod,fchmod,fchmodat -F auid>=1000 -F auid!=unset -k perm_mod

-a always,exit -F arch=b64 -S chmod,fchmod,fchmodat -F auid>=1000 -F auid!=unset -k perm_mod

The audit daemon must be restarted for the changes to take effect.

Restart auditd:
$ sudo service auditd restart
OL09-00-000640 SV-271555r1092530_rule
V-271556 CCI-000130 medium OL 9 must audit all uses of the chown, fchown, fchownat, and lchown system calls. SRG-OS-000037-GPOS-00015
Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one.

Audit records can be generated from various components within the information system (e.g., module or policy filter).

When a user logs on, the auid is set to the uid of the account being authenticated. Daemons are not user sessions and have the loginuid set to -1. The auid representation is an unsigned 32-bit integer, which equals 4294967295. The audit system interprets -1, 4294967295, and "unset" in the same way.

The system call rules are loaded into a matching engine that intercepts each system call made by all programs on the system. Therefore, it is very important to use system call rules only when absolutely necessary since these affect performance. The more rules, the bigger the performance hit. The performance can be helped, however, by combining system calls into one rule whenever possible.

Satisfies: SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPOS-00020, SRG-OS-000062-GPOS-00031, SRG-OS-000392-GPOS-00172, SRG-OS-000462-GPOS-00206, SRG-OS-000471-GPOS-00215, SRG-OS-000064-GPOS-00033, SRG-OS-000466-GPOS-00210, SRG-OS-000458-GPOS-00203, SRG-OS-000474-GPOS-00219
Verify that OL 9 is configured to audit the execution of the chown, fchown, fchownat, and lchown system calls with the following command:

$ sudo auditctl -l | grep chown
-a always,exit -F arch=b32 -S chown,fchown,fchownat,lchown -F auid>=1000 -F auid!=unset -k perm_mod
-a always,exit -F arch=b64 -S chown,fchown,fchownat,lchown -F auid>=1000 -F auid!=unset -k perm_mod

If both the "b32" and "b64" audit rules are not defined for the chown, fchown, fchownat, and lchown system calls, this is a finding.
Configure OL 9 to generate audit records upon successful/unsuccessful attempts to use the chown, fchown, fchownat, and lchown system calls.

Add or update the following rules in "/etc/audit/rules.d/audit.rules":

-a always,exit -F arch=b32 -S chown,fchown,fchownat,lchown -F auid>=1000 -F auid!=unset -k perm_mod
-a always,exit -F arch=b64 -S chown,fchown,fchownat,lchown -F auid>=1000 -F auid!=unset -k perm_mod

The audit daemon must be restarted for the changes to take effect.

Restart auditd:
$ sudo service auditd restart
OL09-00-000645 SV-271556r1092532_rule
V-271557 CCI-000130 medium OL 9 must audit all uses of the semanage command. SRG-OS-000037-GPOS-00015
Without generating audit records specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one.

Audit records can be generated from various components within the information system (e.g., module or policy filter).

When a user logs on, the auid is set to the uid of the account being authenticated. Daemons are not user sessions and have the loginuid set to -1. The auid representation is an unsigned 32-bit integer, which equals 4294967295. The audit system interprets -1, 4294967295, and "unset" in the same way.

The system call rules are loaded into a matching engine that intercepts each system call made by all programs on the system. Therefore, it is very important to use system call rules only when absolutely necessary since these affect performance. The more rules, the bigger the performance hit. The performance can be helped, however, by combining system calls into one rule whenever possible.

Satisfies: SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPOS-00020, SRG-OS-000062-GPOS-00031, SRG-OS-000392-GPOS-00172, SRG-OS-000462-GPOS-00206, SRG-OS-000471-GPOS-00215, SRG-OS-000463-GPOS-00207, SRG-OS-000465-GPOS-00209
Verify that OL 9 is configured to audit the execution of the semanage command with the following command:

$ sudo auditctl -l | grep semanage
-a always,exit -F path=/usr/sbin/semanage -F perm=x -F auid>=1000 -F auid!=unset -k privileged-unix-update

If the command does not return a line or the line is commented out, this is a finding.
Configure OL 9 to generate audit records upon successful/unsuccessful attempts to use the semanage command by adding or updating the following rule in "/etc/audit/rules.d/audit.rules":

-a always,exit -F path=/usr/sbin/semanage -F perm=x -F auid>=1000 -F auid!=unset -k privileged-unix-update

The audit daemon must be restarted for the changes to take effect.

Restart auditd:
$ sudo service auditd restart
OL09-00-000650 SV-271557r1092534_rule
V-271558 CCI-000130 medium OL 9 must audit all uses of the setfiles command. SRG-OS-000037-GPOS-00015
Without generating audit records specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one.

Audit records can be generated from various components within the information system (e.g., module or policy filter).

When a user logs on, the auid is set to the uid of the account being authenticated. Daemons are not user sessions and have the loginuid set to -1. The auid representation is an unsigned 32-bit integer, which equals 4294967295. The audit system interprets -1, 4294967295, and "unset" in the same way.

The system call rules are loaded into a matching engine that intercepts each system call made by all programs on the system. Therefore, it is very important to use system call rules only when absolutely necessary since these affect performance. The more rules, the bigger the performance hit. The performance can be helped, however, by combining system calls into one rule whenever possible.

Satisfies: SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPOS-00020, SRG-OS-000062-GPOS-00031, SRG-OS-000392-GPOS-00172, SRG-OS-000462-GPOS-00206, SRG-OS-000471-GPOS-00215, SRG-OS-000463-GPOS-00207, SRG-OS-000465-GPOS-00209
Verify that OL 9 is configured to audit the execution of the setfiles command with the following command:

$ sudo auditctl -l | grep setfiles
-a always,exit -F path=/usr/sbin/setfiles -F perm=x -F auid>=1000 -F auid!=unset -k privileged-unix-update

If the command does not return a line or the line is commented out, this is a finding.
Configure OL 9 to generate audit records upon successful/unsuccessful attempts to use the setfiles command by adding or updating the following rule in "/etc/audit/rules.d/audit.rules":

-a always,exit -F path=/usr/sbin/setfiles -F perm=x -F auid>=1000 -F auid!=unset -k privileged-unix-update

The audit daemon must be restarted for the changes to take effect.

Restart auditd:
$ sudo service auditd restart
OL09-00-000655 SV-271558r1092536_rule
V-271559 CCI-000130 medium OL 9 must audit all uses of the setsebool command. SRG-OS-000037-GPOS-00015
Without generating audit records specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one.

Audit records can be generated from various components within the information system (e.g., module or policy filter).

When a user logs on, the auid is set to the uid of the account being authenticated. Daemons are not user sessions and have the loginuid set to -1. The auid representation is an unsigned 32-bit integer, which equals 4294967295. The audit system interprets -1, 4294967295, and "unset" in the same way.

The system call rules are loaded into a matching engine that intercepts each system call made by all programs on the system. Therefore, it is very important to use system call rules only when absolutely necessary since these affect performance. The more rules, the bigger the performance hit. The performance can be helped, however, by combining system calls into one rule whenever possible.

Satisfies: SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPOS-00020, SRG-OS-000062-GPOS-00031, SRG-OS-000392-GPOS-00172, SRG-OS-000462-GPOS-00206, SRG-OS-000471-GPOS-00215, SRG-OS-000463-GPOS-00207, SRG-OS-000465-GPOS-00209
Verify that OL 9 is configured to audit the execution of the setsebool command with the following command:

$ sudo auditctl -l | grep setsebool
 -a always,exit -F path=/usr/sbin/setsebool -F perm=x -F auid>=1000 -F auid!=unset -F key=privileged 

If the command does not return a line or the line is commented out, this is a finding.
Configure OL 9 to generate an audit event for any successful/unsuccessful use of the setsebool command by adding or updating the following rules in the "/etc/audit/rules.d/audit.rules" file:

-a always,exit -F path=/usr/sbin/setsebool -F perm=x -F auid>=1000 -F auid!=unset -F key=privileged 

The audit daemon must be restarted for the changes to take effect.

Restart auditd:
$ sudo service auditd restart
OL09-00-000660 SV-271559r1092538_rule
V-271560 CCI-000130 medium OL 9 must audit all uses of the chacl command. SRG-OS-000037-GPOS-00015
Without generating audit records specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one.

Audit records can be generated from various components within the information system (e.g., module or policy filter).

When a user logs on, the auid is set to the uid of the account being authenticated. Daemons are not user sessions and have the loginuid set to -1. The auid representation is an unsigned 32-bit integer, which equals 4294967295. The audit system interprets -1, 4294967295, and "unset" in the same way.

The system call rules are loaded into a matching engine that intercepts each system call made by all programs on the system. Therefore, it is very important to use system call rules only when absolutely necessary since these affect performance. The more rules, the bigger the performance hit. The performance can be helped, however, by combining system calls into one rule whenever possible.

Satisfies: SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPOS-00020, SRG-OS-000062-GPOS-00031, SRG-OS-000392-GPOS-00172, SRG-OS-000462-GPOS-00206, SRG-OS-000471-GPOS-00215, SRG-OS-000466-GPOS-00210
Verify that OL 9 is configured to audit the execution of the chacl command with the following command:

$ sudo auditctl -l | grep chacl
-a always,exit -F path=/usr/bin/chacl -F perm=x -F auid>=1000 -F auid!=unset -k perm_mod

If the command does not return a line or the line is commented out, this is a finding.
Configure OL 9 to generate audit records upon successful/unsuccessful attempts to use the chacl command by adding or updating the following rule in "/etc/audit/rules.d/audit.rules":

-a always,exit -F path=/usr/bin/chacl -F perm=x -F auid>=1000 -F auid!=unset -k perm_mod

The audit daemon must be restarted for the changes to take effect.

Restart auditd:
$ sudo service auditd restart
OL09-00-000665 SV-271560r1092540_rule
V-271561 CCI-000130 medium OL 9 must audit all uses of the sudo command. SRG-OS-000037-GPOS-00015
Without generating audit record specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one.

Audit records can be generated from various components within the information system (e.g., module or policy filter).

When a user logs on, the auid is set to the uid of the account being authenticated. Daemons are not user sessions and have the loginuid set to -1. The auid representation is an unsigned 32-bit integer, which equals 4294967295. The audit system interprets -1, 4294967295, and "unset" in the same way.

The system call rules are loaded into a matching engine that intercepts each system call made by all programs on the system. Therefore, it is very important to use system call rules only when absolutely necessary since these affect performance. The more rules, the bigger the performance hit. The performance can be helped, however, by combining system calls into one rule whenever possible.

Satisfies: SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPOS-00020, SRG-OS-000062-GPOS-00031, SRG-OS-000392-GPOS-00172, SRG-OS-000462-GPOS-00206, SRG-OS-000471-GPOS-00215, SRG-OS-000466-GPOS-00210
Verify that OL 9 is configured to audit the execution of the sudo command with the following command:

$ sudo auditctl -l | grep /usr/bin/sudo
-a always,exit -F path=/usr/bin/sudo -F perm=x -F auid>=1000 -F auid!=unset -k priv_cmd

If the command does not return a line or the line is commented out, this is a finding.
Configure OL 9 to generate audit records upon successful/unsuccessful attempts to use the sudo command by adding or updating the following rule in "/etc/audit/rules.d/audit.rules":

-a always,exit -F path=/usr/bin/sudo -F perm=x -F auid>=1000 -F auid!=unset -k priv_cmd

The audit daemon must be restarted for the changes to take effect.

Restart auditd:
$ sudo service auditd restart
OL09-00-000670 SV-271561r1092542_rule
V-271562 CCI-000130 medium OL 9 must audit all uses of the usermod command. SRG-OS-000037-GPOS-00015
Without generating audit record specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one.

Audit records can be generated from various components within the information system (e.g., module or policy filter).

When a user logs on, the auid is set to the uid of the account being authenticated. Daemons are not user sessions and have the loginuid set to -1. The auid representation is an unsigned 32-bit integer, which equals 4294967295. The audit system interprets -1, 4294967295, and "unset" in the same way.

The system call rules are loaded into a matching engine that intercepts each system call made by all programs on the system. Therefore, it is very important to use system call rules only when absolutely necessary since these affect performance. The more rules, the bigger the performance hit. The performance can be helped, however, by combining system calls into one rule whenever possible.

Satisfies: SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPOS-00020, SRG-OS-000062-GPOS-00031, SRG-OS-000392-GPOS-00172, SRG-OS-000462-GPOS-00206, SRG-OS-000471-GPOS-00215, SRG-OS-000466-GPOS-00210
Verify that OL 9 is configured to audit the execution of the usermod command with the following command:

$ sudo auditctl -l | grep usermod
-a always,exit -F path=/usr/sbin/usermod -F perm=x -F auid>=1000 -F auid!=unset -k privileged-usermod

If the command does not return a line or the line is commented out, this is a finding.
Configure OL 9 to generate audit records upon successful/unsuccessful attempts to use the usermod command by adding or updating the following rule in "/etc/audit/rules.d/audit.rules":

-a always,exit -F path=/usr/sbin/usermod -F perm=x -F auid>=1000 -F auid!=unset -k privileged-usermod

The audit daemon must be restarted for the changes to take effect.

Restart auditd:
$ sudo service auditd restart
OL09-00-000675 SV-271562r1092544_rule
V-271563 CCI-000130 medium OL 9 must audit all uses of the rename, unlink, rmdir, renameat, and unlinkat system calls. SRG-OS-000037-GPOS-00015
Without generating audit records specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one.

Audit records can be generated from various components within the information system (e.g., module or policy filter).

When a user logs on, the auid is set to the uid of the account being authenticated. Daemons are not user sessions and have the loginuid set to -1. The auid representation is an unsigned 32-bit integer, which equals 4294967295. The audit system interprets -1, 4294967295, and "unset" in the same way.

The system call rules are loaded into a matching engine that intercepts each system call made by all programs on the system. Therefore, it is very important to use system call rules only when absolutely necessary since these affect performance. The more rules, the bigger the performance hit. The performance can be helped, however, by combining system calls into one rule whenever possible.

Satisfies: SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPOS-00020, SRG-OS-000062-GPOS-00031, SRG-OS-000392-GPOS-00172, SRG-OS-000462-GPOS-00206, SRG-OS-000471-GPOS-00215, SRG-OS-000466-GPOS-00210, SRG-OS-000467-GPOS-00211, SRG-OS-000468-GPOS-00212
Verify that OL 9 is configured to audit successful/unsuccessful attempts to use the rename, unlink, rmdir, renameat, and unlinkat system calls with the following command:

$ sudo auditctl -l | grep 'rename\|unlink\|rmdir'
-a always,exit -F arch=b32 -S rename,unlink,rmdir,renameat,unlinkat -F auid>=1000 -F auid!=unset -k delete
-a always,exit -F arch=b64 -S rename,unlink,rmdir,renameat,unlinkat -F auid>=1000 -F auid!=unset -k delete

If the command does not return an audit rule for rename, unlink, rmdir, renameat, and unlinkat or any of the lines returned are commented out, this is a finding.
Configure OL 9 to generate an audit event for any successful/unsuccessful use of the rename, unlink, rmdir, renameat, and unlinkat system calls by adding or updating the following rules in the "/etc/audit/rules.d/audit.rules" file:

-a always,exit -F arch=b32 -S rename,unlink,rmdir,renameat,unlinkat -F auid>=1000 -F auid!=unset -k delete
-a always,exit -F arch=b64 -S rename,unlink,rmdir,renameat,unlinkat -F auid>=1000 -F auid!=unset -k delete

The audit daemon must be restarted for the changes to take effect.

Restart auditd:
$ sudo service auditd restart
OL09-00-000680 SV-271563r1092546_rule
V-271564 CCI-000130 medium OL 9 must audit all uses of the delete_module system call. SRG-OS-000037-GPOS-00015
Without generating audit records specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one.

Audit records can be generated from various components within the information system (e.g., module or policy filter).

When a user logs on, the auid is set to the uid of the account being authenticated. Daemons are not user sessions and have the loginuid set to -1. The auid representation is an unsigned 32-bit integer, which equals 4294967295. The audit system interprets -1, 4294967295, and "unset" in the same way.

The system call rules are loaded into a matching engine that intercepts each system call made by all programs on the system. Therefore, it is very important to use system call rules only when absolutely necessary since these affect performance. The more rules, the bigger the performance hit. The performance can be helped, however, by combining system calls into one rule whenever possible.

Satisfies: SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPOS-00020, SRG-OS-000062-GPOS-00031, SRG-OS-000392-GPOS-00172, SRG-OS-000462-GPOS-00206, SRG-OS-000471-GPOS-00215, SRG-OS-000471-GPOS-00216, SRG-OS-000477-GPOS-00222
Verify that OL 9 is configured to audit the execution of the delete_module system call with the following command:

$ sudo auditctl -l | grep delete_module
-a always,exit -F arch=b32 -S delete_module -F auid>=1000 -F auid!=unset -k module_chng
-a always,exit -F arch=b64 -S delete_module -F auid>=1000 -F auid!=unset -k module_chng

If both the "b32" and "b64" audit rules are not defined for the delete_module system call, or any of the lines returned are commented out, this is a finding.
Configure OL 9 to generate an audit event for any successful/unsuccessful use of the delete_module system call by adding or updating the following rules in the "/etc/audit/rules.d/audit.rules" file:

-a always,exit -F arch=b32 -S delete_module -F auid>=1000 -F auid!=unset -k module_chng
-a always,exit -F arch=b64 -S delete_module -F auid>=1000 -F auid!=unset -k module_chng

The audit daemon must be restarted for the changes to take effect.

Restart auditd:
$ sudo service auditd restart
OL09-00-000685 SV-271564r1092548_rule
V-271565 CCI-000130 medium OL 9 must audit all uses of the init_module and finit_module system calls. SRG-OS-000037-GPOS-00015
Without generating audit records specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one.

Audit records can be generated from various components within the information system (e.g., module or policy filter).

When a user logs on, the auid is set to the uid of the account being authenticated. Daemons are not user sessions and have the loginuid set to -1. The auid representation is an unsigned 32-bit integer, which equals 4294967295. The audit system interprets -1, 4294967295, and "unset" in the same way.

The system call rules are loaded into a matching engine that intercepts each system call made by all programs on the system. Therefore, it is very important to use system call rules only when absolutely necessary since these affect performance. The more rules, the bigger the performance hit. The performance can be helped, however, by combining system calls into one rule whenever possible.

Satisfies: SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPOS-00020, SRG-OS-000062-GPOS-00031, SRG-OS-000392-GPOS-00172, SRG-OS-000462-GPOS-00206, SRG-OS-000471-GPOS-00215, SRG-OS-000471-GPOS-00216, SRG-OS-000477-GPOS-00222
Verify that OL 9 is configured to audit the execution of the init_module and finit_module system calls with the following command:

$ sudo auditctl -l | grep init_module
-a always,exit -F arch=b32 -S init_module,finit_module -F auid>=1000 -F auid!=unset -k module_chng
-a always,exit -F arch=b64 -S init_module,finit_module -F auid>=1000 -F auid!=unset -k module_chng

If both the "b32" and "b64" audit rules are not defined for the init_module and finit_module system calls, or any of the lines returned are commented out, this is a finding.
Configure OL 9 to generate an audit event for any successful/unsuccessful use of the init_module and finit_module system calls by adding or updating the following rules in the "/etc/audit/rules.d/audit.rules" file:

-a always,exit -F arch=b32 -S init_module,finit_module -F auid>=1000 -F auid!=unset -k module_chng
-a always,exit -F arch=b64 -S init_module,finit_module -F auid>=1000 -F auid!=unset -k module_chng

The audit daemon must be restarted for the changes to take effect.

Restart auditd:
$ sudo service auditd restart
OL09-00-000690 SV-271565r1092550_rule
V-271566 CCI-000130 medium OL 9 must audit all uses of the kmod command. SRG-OS-000037-GPOS-00015
Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one.

Audit records can be generated from various components within the information system (e.g., module or policy filter).

When a user logs on, the auid is set to the uid of the account being authenticated. Daemons are not user sessions and have the loginuid set to -1. The auid representation is an unsigned 32-bit integer, which equals 4294967295. The audit system interprets -1, 4294967295, and "unset" in the same way.

The system call rules are loaded into a matching engine that intercepts each system call made by all programs on the system. Therefore, it is very important to use system call rules only when absolutely necessary since these affect performance. The more rules, the bigger the performance hit. The performance can be helped, however, by combining system calls into one rule whenever possible.

Satisfies: SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPOS-00020, SRG-OS-000062-GPOS-00031, SRG-OS-000392-GPOS-00172, SRG-OS-000462-GPOS-00206, SRG-OS-000471-GPOS-00215, SRG-OS-000471-GPOS-00216, SRG-OS-000477-GPOS-00222
Verify that OL 9 is configured to audit the execution of the kmod command with the following command:

$ sudo auditctl -l | grep kmod
-a always,exit -F path=/usr/bin/kmod -F perm=x -F auid>=1000 -F auid!=unset -k modules

If the command does not return a line or the line is commented out, this is a finding.
Configure OL 9 to generate audit records upon successful/unsuccessful attempts to use the kmod command by adding or updating the following rule in "/etc/audit/rules.d/audit.rules":

-a always,exit -F path=/usr/bin/kmod -F perm=x -F auid>=1000 -F auid!=unset -k modules

The audit daemon must be restarted for the changes to take effect.

Restart auditd:
$ sudo service auditd restart
OL09-00-000695 SV-271566r1092552_rule
V-271567 CCI-000130 medium OL 9 must generate audit records for all account creations, modifications, disabling, and termination events that affect /var/log/lastlog. SRG-OS-000037-GPOS-00015
Without generating audit records specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one.

Satisfies: SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPOS-00020, SRG-OS-000062-GPOS-00031, SRG-OS-000392-GPOS-00172, SRG-OS-000462-GPOS-00206, SRG-OS-000471-GPOS-00215, SRG-OS-000473-GPOS-00218, SRG-OS-000470-GPOS-00214
Verify that OL 9 generates audit records for all account creations, modifications, disabling, and termination events that affect /var/log/lastlog with the following command:

$ sudo auditctl -l | grep /var/log/lastlog
-w /var/log/lastlog -p wa -k logins

If the command does not return a line or the line is commented out, this is a finding.
Configure OL 9 to generate audit records for all account creations, modifications, disabling, and termination events that affect /var/log/lastlog.

Add or update the following file system rule to "/etc/audit/rules.d/audit.rules":

-w /var/log/lastlog -p wa -k logins

The audit daemon must be restarted for the changes to take effect.

Restart auditd:
$ sudo service auditd restart
OL09-00-000700 SV-271567r1092554_rule
V-271568 CCI-000130 medium OL 9 must audit all uses of umount system calls. SRG-OS-000037-GPOS-00015
Without generating audit records specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one.

Audit records can be generated from various components within the information system (e.g., module or policy filter).

When a user logs on, the auid is set to the uid of the account being authenticated. Daemons are not user sessions and have the loginuid set to -1. The auid representation is an unsigned 32-bit integer, which equals 4294967295. The audit system interprets -1, 4294967295, and "unset" in the same way.

The system call rules are loaded into a matching engine that intercepts each system call made by all programs on the system. Therefore, it is very important to use system call rules only when absolutely necessary since these affect performance. The more rules, the bigger the performance hit. The performance can be helped, however, by combining system calls into one rule whenever possible.

Satisfies: SRG-OS-000037-GPOS-00015, SRG-OS-000062-GPOS-00031, SRG-OS-000392-GPOS-00172, SRG-OS-000462-GPOS-00206, SRG-OS-000471-GPOS-00215
Verify that OL 9 is configured to audit the execution of the umount command with the following command:

$ sudo auditctl -l | grep umount
-a always,exit -F path=/usr/bin/umount -F perm=x -F auid>=1000 -F auid!=unset -k privileged-mount

If the command does not return an audit rule for umount or any of the lines returned are commented out, this is a finding.
Configure OL 9 to generate audit records upon successful/unsuccessful attempts to use the umount command by adding or updating the following rules in "/etc/audit/rules.d/audit.rules":

-a always,exit -F path=/usr/bin/umount -F perm=x -F auid>=1000 -F auid!=unset -k privileged-mount

The audit daemon must be restarted for the changes to take effect.

Restart auditd:
$ sudo service auditd restart
OL09-00-000705 SV-271568r1092556_rule
V-271569 CCI-001493 medium OL 9 must use cryptographic mechanisms to protect the integrity of audit tools. SRG-OS-000256-GPOS-00097
Protecting the integrity of the tools used for auditing purposes is a critical step toward ensuring the integrity of audit information. Audit information includes all information (e.g., audit records, audit settings, and audit reports) needed to successfully audit information system activity.

Audit tools include, but are not limited to, vendor-provided and open-source audit tools needed to successfully view and manipulate audit information system activity and records. Audit tools include custom queries and report generators.

It is not uncommon for attackers to replace the audit tools or inject code into the existing tools to provide the capability to hide or erase system activity from the audit logs.

To address this risk, audit tools must be cryptographically signed to provide the capability to identify when the audit tools have been modified, manipulated, or replaced. An example is a checksum hash of the file or files.

Satisfies: SRG-OS-000256-GPOS-00097, SRG-OS-000257-GPOS-00098, SRG-OS-000258-GPOS-00099, SRG-OS-000278-GPOS-00108
Verify that OL 9 uses cryptographic mechanisms to protect the integrity of the audit tools with the following command:

$ sudo cat /etc/aide.conf | grep /usr/sbin/au
/usr/sbin/auditctl p+i+n+u+g+s+b+acl+xattrs+sha512
/usr/sbin/auditd p+i+n+u+g+s+b+acl+xattrs+sha512
/usr/sbin/ausearch p+i+n+u+g+s+b+acl+xattrs+sha512
/usr/sbin/aureport p+i+n+u+g+s+b+acl+xattrs+sha512
/usr/sbin/autrace p+i+n+u+g+s+b+acl+xattrs+sha512
/usr/sbin/autrace p+i+n+u+g+s+b+acl+xattrs+sha512
/usr/sbin/augenrules p+i+n+u+g+s+b+acl+xattrs+sha512
 
If AIDE is not installed, ask the system administrator (SA) how file integrity checks are performed on the system.

If any of the audit tools listed above do not have a corresponding line, ask the SA to indicate what cryptographic mechanisms are being used to protect the integrity of the audit tools. If there is no evidence of integrity protection, this is a finding.
Configure OL 9 to protect the integrity of the audit tools.

Add or update the following lines to /etc/aide.conf:
 
/usr/sbin/auditctl p+i+n+u+g+s+b+acl+xattrs+sha512
/usr/sbin/auditd p+i+n+u+g+s+b+acl+xattrs+sha512
/usr/sbin/ausearch p+i+n+u+g+s+b+acl+xattrs+sha512
/usr/sbin/aureport p+i+n+u+g+s+b+acl+xattrs+sha512
/usr/sbin/autrace p+i+n+u+g+s+b+acl+xattrs+sha512
/usr/sbin/autrace p+i+n+u+g+s+b+acl+xattrs+sha512
/usr/sbin/augenrules p+i+n+u+g+s+b+acl+xattrs+sha512
OL09-00-000710 SV-271569r1091419_rule
V-271570 CCI-002233 medium OL 9 must audit uses of the execve system call. SRG-OS-000326-GPOS-00126
Misuse of privileged functions, either intentionally or unintentionally by authorized users, or by unauthorized external entities that have compromised information system accounts, is a serious and ongoing concern and can have significant adverse impacts on organizations. Auditing the use of privileged functions is one way to detect such misuse and identify the risk from insider threats and the advanced persistent threat.

Satisfies: SRG-OS-000326-GPOS-00126, SRG-OS-000327-GPOS-00127, SRG-OS-000755-GPOS-00220
Verify that OL 9 is configured to audit the execution of the execve system call with the following command:

$ sudo auditctl -l | grep execve
-a always,exit -F arch=b32 -S execve -C uid!=euid -F euid=0 -k execpriv 
-a always,exit -F arch=b64 -S execve -C uid!=euid -F euid=0 -k execpriv
-a always,exit -F arch=b32 -S execve -C gid!=egid -F egid=0 -k execpriv 
-a always,exit -F arch=b64 -S execve -C gid!=egid -F egid=0 -k execpriv

If the command does not return all lines or the lines are commented out, this is a finding.
Configure OL 9 to audit the execution of the execve system call.

Add or update the following file system rules to "/etc/audit/rules.d/audit.rules":

-a always,exit -F arch=b32 -S execve -C uid!=euid -F euid=0 -k execpriv 
-a always,exit -F arch=b64 -S execve -C uid!=euid -F euid=0 -k execpriv
-a always,exit -F arch=b32 -S execve -C gid!=egid -F egid=0 -k execpriv 
-a always,exit -F arch=b64 -S execve -C gid!=egid -F egid=0 -k execpriv 

The audit daemon must be restarted for the changes to take effect.

Restart auditd:
$ sudo service auditd restart

Note: Users must reboot to view above results with command "auditctl -l | grep execve".
OL09-00-000715 SV-271570r1092558_rule
V-271571 CCI-002884 medium OL 9 must generate audit records for all account creations, modifications, disabling, and termination events that affect /var/log/faillock. SRG-OS-000392-GPOS-00172
Without generating audit records specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one.

Satisfies: SRG-OS-000392-GPOS-00172, SRG-OS-000470-GPOS-00214, SRG-OS-000473-GPOS-00218
Verify that OL 9 generates audit records for all account creations, modifications, disabling, and termination events that affect /var/log/faillock with the following command:

$ sudo auditctl -l | grep /var/log/faillock
-w /var/log/faillock -p wa -k logins

If the command does not return a line or the line is commented out, this is a finding.
Configure OL 9 to generate audit records for all account creations, modifications, disabling, and termination events that affect /var/log/faillock.

Add or update the following file system rule to "/etc/audit/rules.d/audit.rules":

-w /var/log/faillock -p wa -k logins

The audit daemon must be restarted for the changes to take effect.

Restart auditd:
$ sudo service auditd restart
OL09-00-000720 SV-271571r1092560_rule
V-271572 CCI-002884 medium OL 9 must generate audit records for all account creations, modifications, disabling, and termination events that affect /var/log/tallylog. SRG-OS-000392-GPOS-00172
Without generating audit records specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one.

Satisfies: SRG-OS-000392-GPOS-00172, SRG-OS-000470-GPOS-00214, SRG-OS-000473-GPOS-00218
Verify that OL 9 generates audit records for all account creations, modifications, disabling, and termination events that affect /var/log/tallylog with the following command:

$ sudo auditctl -l | grep /var/log/tallylog
-w /var/log/tallylog -p wa -k logins

If the command does not return a line or the line is commented out, this is a finding.
Configure OL 9 to generate audit records for all account creations, modifications, disabling, and termination events that affect /var/log/tallylog.

Add or update the following file system rule to "/etc/audit/rules.d/audit.rules":

-w /var/log/tallylog -p wa -k logins

The audit daemon must be restarted for the changes to take effect.

Restart auditd:
$ sudo service auditd restart
OL09-00-000725 SV-271572r1092562_rule
V-271573 CCI-000172 medium OL 9 must be configured so that successful/unsuccessful uses of the init command generate an audit record. SRG-OS-000477-GPOS-00222
Misuse of the init command may cause availability issues for the system.
Verify that OL 9 is configured to audit the execution of the init command with the following command:

$ sudo auditctl -l | grep init
-a always,exit -F path=/usr/sbin/init -F perm=x -F auid>=1000 -F auid!=unset -k privileged-init

If the command does not return a line or the line is commented out, this is a finding.
Configure the audit system to generate an audit event for any successful/unsuccessful uses of the init command by adding or updating the following rule in the "/etc/audit/rules.d/audit.rules" file:

-a always,exit -F path=/usr/sbin/init -F perm=x -F auid>=1000 -F auid!=unset -k privileged-init

The audit daemon must be restarted for the changes to take effect.

Restart auditd:
$ sudo service auditd restart
OL09-00-000730 SV-271573r1092564_rule
V-271574 CCI-000172 medium OL 9 must be configured so that successful/unsuccessful uses of the poweroff command generate an audit record. SRG-OS-000477-GPOS-00222
Misuse of the poweroff command may cause availability issues for the system.
Verify that OL 9 is configured to audit the execution of the poweroff command with the following command:

$ sudo auditctl -l | grep poweroff
-a always,exit -F path=/usr/sbin/poweroff -F perm=x -F auid>=1000 -F auid!=unset -k privileged-poweroff

If the command does not return a line or the line is commented out, this is a finding.
Configure the audit system to generate an audit event for any successful/unsuccessful uses of the poweroff command by adding or updating the following rule in the "/etc/audit/rules.d/audit.rules" file:

-a always,exit -F path=/usr/sbin/poweroff -F perm=x -F auid>=1000 -F auid!=unset -k privileged-poweroff

The audit daemon must be restarted for the changes to take effect.

Restart auditd:
$ sudo service auditd restart
OL09-00-000735 SV-271574r1092566_rule
V-271575 CCI-000172 medium OL 9 must be configured so that successful/unsuccessful uses of the reboot command generate an audit record. SRG-OS-000477-GPOS-00222
Misuse of the reboot command may cause availability issues for the system.
Verify that OL 9 is configured to audit the execution of the reboot command with the following command:

$ sudo auditctl -l | grep reboot
-a always,exit -F path=/usr/sbin/reboot -F perm=x -F auid>=1000 -F auid!=unset -k privileged-reboot

If the command does not return a line or the line is commented out, this is a finding.
Configure the audit system to generate an audit event for any successful/unsuccessful uses of the reboot command by adding or updating the following rule in the "/etc/audit/rules.d/audit.rules" file:

-a always,exit -F path=/usr/sbin/reboot -F perm=x -F auid>=1000 -F auid!=unset -k privileged-reboot

The audit daemon must be restarted for the changes to take effect.

Restart auditd:
$ sudo service auditd restart
OL09-00-000740 SV-271575r1092568_rule
V-271576 CCI-000172 medium OL 9 must be configured so that successful/unsuccessful uses of the shutdown command generate an audit record. SRG-OS-000477-GPOS-00222
Misuse of the shutdown command may cause availability issues for the system.
Verify that OL 9 is configured to audit the execution of the shutdown command with the following command:

$ sudo auditctl -l | grep shutdown
-a always,exit -F path=/usr/sbin/shutdown -F perm=x -F auid>=1000 -F auid!=unset -k privileged-shutdown

If the command does not return a line or the line is commented out, this is a finding.
Configure the audit system to generate an audit event for any successful/unsuccessful uses of the shutdown command by adding or updating the following rule in the "/etc/audit/rules.d/audit.rules" file:

-a always,exit -F path=/usr/sbin/shutdown -F perm=x -F auid>=1000 -F auid!=unset -k privileged-shutdown

The audit daemon must be restarted for the changes to take effect.

Restart auditd:
$ sudo service auditd restart
OL09-00-000745 SV-271576r1092570_rule
V-271577 CCI-000130 low OL 9 must enable auditing of processes that start prior to the audit daemon. SRG-OS-000037-GPOS-00015
Without the capability to generate audit records, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one.

If auditing is enabled late in the startup process, the actions of some startup processes may not be audited. Some audit systems also maintain state information only available if auditing is enabled before a given process is created.

Satisfies: SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPOS-00020, SRG-OS-000062-GPOS-00031, SRG-OS-000392-GPOS-00172, SRG-OS-000462-GPOS-00206, SRG-OS-000471-GPOS-00215, SRG-OS-000473-GPOS-00218, SRG-OS-000254-GPOS-00095
Verify that OL 9 is configured to enable auditing of processes that start prior to the audit daemon.

Check that the current GRUB 2 configuration enables auditing:

$ sudo grubby --info=ALL | grep audit
args="ro crashkernel=auto resume=/dev/mapper/ol-swap rd.lvm.lv=ol/root rd.lvm.lv=ol/swap rhgb quiet fips=1 audit=1 audit_backlog_limit=8192 pti=on 

If "audit" is not set to "1" or is missing, this is a finding.

Check that auditing is enabled by default to persist through kernel updates: 

$ sudo grep audit /etc/default/grub
GRUB_CMDLINE_LINUX="audit=1"

If "audit" is not set to "1", is missing, or is commented out, this is a finding.
Enable auditing of processes that start prior to the audit daemon with the following command:

$ sudo grubby --update-kernel=ALL --args="audit=1"

Add or modify the following line in "/etc/default/grub" to ensure the configuration survives kernel updates:

GRUB_CMDLINE_LINUX="audit=1"
OL09-00-000750 SV-271577r1091443_rule
V-271578 CCI-000132 medium OL 9 must label all offloaded audit logs before sending them to the central log server. SRG-OS-000039-GPOS-00017
Enriched logging is needed to determine who, what, and when events occur on a system. Without this, determining root cause of an event will be much more difficult.

When audit logs are not labeled before they are sent to a central log server, the audit data will not be able to be analyzed and tied back to the correct system.

Satisfies: SRG-OS-000039-GPOS-00017, SRG-OS-000342-GPOS-00133, SRG-OS-000479-GPOS-00224
Verify that OL 9 Audit Daemon is configured to label all offloaded audit logs, with the following command:

$ sudo grep name_format /etc/audit/auditd.conf
name_format = hostname

If the "name_format" option is not "hostname", "fqd", or "numeric", or the line is commented out, this is a finding.
Configure OL 9 to label all offloaded audit logs before sending them to the central log server.

Edit the /etc/audit/auditd.conf file and add or update the "name_format" option:

name_format = hostname

The audit daemon must be restarted for changes to take effect.

Restart auditd:
$ sudo service auditd restart
OL09-00-000755 SV-271578r1092572_rule
V-271579 CCI-000169 medium OL 9 audit system must take appropriate action when an error writing to the audit storage volume occurs. SRG-OS-000062-GPOS-00031
It is critical that when the operating system is at risk of failing to process audit logs as required, it takes action to mitigate the failure. Audit processing failures include software/hardware errors; failures in the audit capturing mechanisms; and audit storage capacity being reached or exceeded. Responses to audit failure depend upon the nature of the failure mode.
Verify that OL 9 takes the appropriate action when an audit processing failure occurs.

Check that OL 9 takes the appropriate action when an audit processing failure occurs with the following command:

$ sudo grep disk_error_action /etc/audit/auditd.conf
disk_error_action = HALT

If the value of the "disk_error_action" option is not "SYSLOG", "SINGLE", or "HALT", or the line is commented out, ask the system administrator (SA) to indicate how the system takes appropriate action when an audit process failure occurs. If there is no evidence of appropriate action, this is a finding.
Configure OL 9 to shut down by default upon audit failure (unless availability is an overriding concern).

Add or update the following line (depending on configuration "disk_error_action" can be set to "SYSLOG" or "SINGLE" depending on configuration) in "/etc/audit/auditd.conf" file:

disk_error_action = HALT

If availability has been determined to be more important, and this decision is documented with the information system security officer (ISSO), configure the operating system to notify SA staff and ISSO staff in the event of an audit processing failure by setting the "disk_error_action" to "SYSLOG".
OL09-00-000760 SV-271579r1091449_rule
V-271580 CCI-000169 medium OL 9 audit system must take appropriate action when the audit storage volume is full. SRG-OS-000062-GPOS-00031
It is critical that when the operating system is at risk of failing to process audit logs as required, it takes action to mitigate the failure. Audit processing failures include software/hardware errors; failures in the audit capturing mechanisms; and audit storage capacity being reached or exceeded. Responses to audit failure depend upon the nature of the failure mode.
Verify that OL 9 takes the appropriate action when the audit storage volume is full. 

Check that OL 9 takes the appropriate action when the audit storage volume is full with the following command:

$ sudo grep disk_full_action /etc/audit/auditd.conf
disk_full_action = HALT

If the value of the "disk_full_action" option is not "SYSLOG", "SINGLE", or "HALT", or the line is commented out, ask the system administrator (SA) to indicate how the system takes appropriate action when an audit storage volume is full. If there is no evidence of appropriate action, this is a finding.
Configure OL 9 to shut down by default upon audit failure (unless availability is an overriding concern).

Add or update the following line (depending on configuration "disk_full_action" can be set to "SYSLOG" or "SINGLE" depending on configuration) in "/etc/audit/auditd.conf" file:

disk_full_action = HALT

If availability has been determined to be more important, and this decision is documented with the information system security officer (ISSO), configure the operating system to notify SA staff and ISSO staff in the event of an audit processing failure by setting the "disk_full_action" to "SYSLOG".
OL09-00-000765 SV-271580r1091452_rule
V-271581 CCI-000169 medium OL 9 audit system must take appropriate action when the audit files have reached maximum size. SRG-OS-000062-GPOS-00031
It is critical that when the operating system is at risk of failing to process audit logs as required, it takes action to mitigate the failure. Audit processing failures include software/hardware errors; failures in the audit capturing mechanisms; and audit storage capacity being reached or exceeded. Responses to audit failure depend upon the nature of the failure mode.
Verify that OL 9 takes the appropriate action when the audit files have reached maximum size with the following command:

$ sudo grep max_log_file_action /etc/audit/auditd.conf
max_log_file_action = ROTATE

If the value of the "max_log_file_action" option is not "ROTATE", "SINGLE", or the line is commented out, ask the system administrator (SA)to indicate how the system takes appropriate action when an audit storage volume is full. If there is no evidence of appropriate action, this is a finding.
Configure OL 9 to rotate the audit log when it reaches maximum size.

Add or update the following line in "/etc/audit/auditd.conf" file:

max_log_file_action = ROTATE
OL09-00-000770 SV-271581r1091455_rule
V-271582 CCI-000154 medium OL 9 must periodically flush audit records to disk to prevent the loss of audit records. SRG-OS-000051-GPOS-00024
If option "freq" is not set to a value that requires audit records being written to disk after a threshold number is reached, then audit records may be lost.
Verify that OL 9 is configured to flush audit records to disk after every 100 records with the following command:

$ sudo grep freq /etc/audit/auditd.conf 
freq = 100 

If "freq" isn't set to a value of "100" or greater, the value is missing, or the line is commented out, this is a finding.
Configure OL 9 to flush audit to disk by adding or updating the following configuration in "/etc/audit/auditd.conf":

freq = 100

The audit daemon must be restarted for the changes to take effect.

Restart auditd:
$ sudo service auditd restart
OL09-00-000775 SV-271582r1092574_rule
V-271583 CCI-000162 medium OL 9 audit logs must be group-owned by root or by a restricted logging group to prevent unauthorized read access. SRG-OS-000057-GPOS-00027
Unauthorized disclosure of audit records can reveal system and configuration data to attackers, thus compromising its confidentiality.

Satisfies: SRG-OS-000057-GPOS-00027, SRG-OS-000058-GPOS-00028, SRG-OS-000059-GPOS-00029, SRG-OS-000206-GPOS-00084
Verify that OL 9 audit logs are group-owned by "root" or a restricted logging group. 

First determine if a group other than "root" has been assigned to the audit logs with the following command:

$ sudo grep log_group /etc/audit/auditd.conf
log_group = root

Then determine where the audit logs are stored with the following command:

$ sudo grep -iw log_file /etc/audit/auditd.conf
log_file = /var/log/audit/audit.log

Then, using the location of the audit log file, determine if the audit log is group-owned by "root" using the following command:

$ sudo stat -c "%G %n" /var/log/audit/audit.log
root /var/log/audit/audit.log

If the audit log is not group-owned by "root" or the configured alternative logging group, this is a finding.
Configure OL 9 audit logs to be group-owned by "root" or a restricted logging group.

Change the group of the directory of "/var/log/audit" to be owned by a correct group.

Identify the group that is configured to own audit log:

$ sudo grep -P '^[ ]*log_group[ ]+=.*$' /etc/audit/auditd.conf

Change the ownership to that group:

$ sudo chgrp ${GROUP} /var/log/audit
OL09-00-000785 SV-271583r1091461_rule
V-271584 CCI-000162 medium OL 9 audit log directory must be owned by root to prevent unauthorized read access. SRG-OS-000057-GPOS-00027
Unauthorized disclosure of audit records can reveal system and configuration data to attackers, thus compromising its confidentiality.

Satisfies: SRG-OS-000057-GPOS-00027, SRG-OS-000058-GPOS-00028, SRG-OS-000059-GPOS-00029, SRG-OS-000206-GPOS-00084
Verify that OL 9 audit logs directory is owned by "root". 

First determine where the audit logs are stored with the following command:

$ sudo grep -iw log_file /etc/audit/auditd.conf
log_file = /var/log/audit/audit.log

Then using the location of the audit log file, determine if the audit log directory is owned by "root" using the following command:

$ sudo ls -ld /var/log/audit
drwx------ 2 root root 23 Jun 11 11:56 /var/log/audit

If the audit log directory is not owned by "root", this is a finding.
Configure OL 9 to protect the audit log from unauthorized read access by setting the correct owner as "root" with the following command:

$ sudo chown root /var/log/audit
OL09-00-000790 SV-271584r1091464_rule
V-271585 CCI-000162 medium OL 9 audit logs file must have mode 0600 or less permissive to prevent unauthorized access to the audit log. SRG-OS-000057-GPOS-00027
Only authorized personnel should be aware of errors and the details of the errors. Error messages are an indicator of an organization's operational state or can identify the OL 9 system or platform. Additionally, Personally Identifiable Information (PII) and operational information must not be revealed through error messages to unauthorized personnel or their designated representatives.

The structure and content of error messages must be carefully considered by the organization and development team. The extent to which the information system is able to identify and handle error conditions is guided by organizational policy and operational requirements.

Satisfies: SRG-OS-000057-GPOS-00027, SRG-OS-000058-GPOS-00028, SRG-OS-000059-GPOS-00029, SRG-OS-000206-GPOS-00084
Verify that OL 9 audit logs have a mode of "0600". 

First determine where the audit logs are stored with the following command:

$ sudo grep -iw log_file /etc/audit/auditd.conf
log_file = /var/log/audit/audit.log

Then using the location of the audit log file, determine if the audit log files as a mode of "0640" with the following command:

$ sudo ls -la /var/log/audit/*.log
rw-------. 2 root root 237923 Jun 11 11:56 /var/log/audit/audit.log

If the audit logs have a mode more permissive than "0600", this is a finding.
Configure the audit logs to have a mode of "0600" with the following command:

Replace "[audit_log_file]" to the correct audit log path, by default this location is "/var/log/audit/audit.log".

$ sudo chmod 0600 /var/log/audit/[audit_log_file]

Check the group that owns the system audit logs:

$ sudo grep -m 1 -q ^log_group /etc/audit/auditd.conf

If the log_group is not defined or it is set to root, configure the permissions the following way:

$ sudo chmod 0640 $log_file
$ sudo chmod 0440 $log_file.*

Otherwise, configure the permissions the following way:

$ sudo chmod 0600 $log_file
$ sudo chmod 0400 $log_file.*
OL09-00-000795 SV-271585r1091467_rule
V-271586 CCI-000169 medium OL 9 audit system must audit local events. SRG-OS-000062-GPOS-00031
Without establishing what type of events occurred, the source of events, where events occurred, and the outcome of events, it would be difficult to establish, correlate, and investigate the events leading up to an outage or attack.

If option "local_events" isn't set to "yes" only events from network will be aggregated.
Verify that OL 9 audit system is configured to audit local events with the following command:

$ sudo grep local_events /etc/audit/auditd.conf 
local_events = yes 

If "local_events" isn't set to "yes", if the command does not return a line, or the line is commented out, this is a finding.
Configure OL 9 to generate audit records for local events by adding or updating the following line in "/etc/audit/auditd.conf":

local_events = yes 

The audit daemon must be restarted for the changes to take effect.

Restart auditd:
$ sudo service auditd restart
OL09-00-000800 SV-271586r1092576_rule
V-271587 CCI-000171 medium OL 9 must allow only the information system security manager (ISSM) (or individuals or roles appointed by the ISSM) to select which auditable events are to be audited. SRG-OS-000063-GPOS-00032
Without the capability to restrict the roles and individuals that can select which events are audited, unauthorized personnel may be able to prevent the auditing of critical events. Misconfigured audits may degrade the system's performance by overwhelming the audit log. Misconfigured audits may also make it more difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one.
Verify that OL 9 sets files in directories "/etc/audit/rules.d/" and "/etc/audit/auditd.conf" files to have a mode of "0640" or less permissive with the following command:

$ sudo stat -c "%a %n"  /etc/audit/rules.d/*.rules

$ sudo sh -c 'stat -c "%a %n" /etc/audit/rules.d/*.rules'
600 /etc/audit/rules.d/audit.rules 

If the files in the "/etc/audit/rules.d/" directory or the "/etc/audit/auditd.conf" file have a mode more permissive than "0640", this is a finding.
Configure the files in directory "/etc/audit/rules.d/" and the "/etc/audit/auditd.conf" file to have a mode of "0640" with the following commands:

$ sudo chmod 0640 /etc/audit/rules.d/audit.rules
$ sudo chmod 0640 /etc/audit/rules.d/[customrulesfile].rules
$ sudo chmod 0640 /etc/audit/auditd.conf
OL09-00-000805 SV-271587r1091473_rule
V-271588 CCI-000171 medium OL 9 /etc/audit/auditd.conf file must have 0640 or less permissive to prevent unauthorized access. SRG-OS-000063-GPOS-00032
Without the capability to restrict the roles and individuals that can select which events are audited, unauthorized personnel may be able to prevent the auditing of critical events. Misconfigured audits may degrade the system's performance by overwhelming the audit log. Misconfigured audits may also make it more difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one.
Verify that OL 9 sets the mode of /etc/audit/auditd.conf with the command:

$ sudo stat -c "%a %n" /etc/audit/auditd.conf
640 /etc/audit/auditd.conf

If "/etc/audit/auditd.conf" does not have a mode of "0640", this is a finding.
Configure the /etc/audit/auditd.conf file to have a mode of 0640 with the command:

$ sudo chmod 0640 /etc/audit/auditd.conf
OL09-00-000810 SV-271588r1091476_rule
V-271589 CCI-000139 medium OL 9 must forward mail from postmaster to the root account using a postfix alias. SRG-OS-000046-GPOS-00022
It is critical for the appropriate personnel to be aware if a system is at risk of failing to process audit logs as required. Without this notification, the security personnel may be unaware of an impending failure of the audit capability, and system operation may be adversely affected.

Audit processing failures include software/hardware errors, failures in the audit capturing mechanisms, and audit storage capacity being reached or exceeded.
Verify that OL 9 administrators are notified in the event of an audit processing failure.

Check that the "/etc/aliases" file has a defined value for "root".

$ grep "postmaster:\s*root$" /etc/aliases

If the command does not return a line, or the line is commented out, ask the system administrator to indicate how they and the information systems security officer (ISSO) are notified of an audit process failure. If there is no evidence of the proper personnel being notified of an audit processing failure, this is a finding.
Configure a valid email address as an alias for the root account.

Append the following line to "/etc/aliases":

postmaster: root

Then, run the following command:

$ sudo newaliases
OL09-00-000815 SV-271589r1091479_rule
V-271590 CCI-000139 medium OL 9 must take appropriate action when a critical audit processing failure occurs. SRG-OS-000046-GPOS-00022
It is critical for the appropriate personnel to be aware if a system is at risk of failing to process audit logs as required. Without this notification, the security personnel may be unaware of an impending failure of the audit capability, and system operation may be adversely affected.

Audit processing failures include software/hardware errors, failures in the audit capturing mechanisms, and audit storage capacity being reached or exceeded.

Satisfies: SRG-OS-000046-GPOS-00022, SRG-OS-000343-GPOS-00135
Verify that OL 9 audit service is configured to panic on a critical error with the following command:

$ sudo grep "\-f" /etc/audit/audit.rules 
-f 2

If the value for "-f" is not "2", and availability is not documented as an overriding concern, this is a finding.
Configure OL 9 to shut down when auditing failures occur.

Add the following line to the bottom of the /etc/audit/audit.rules file:

-f 2
OL09-00-000820 SV-271590r1091482_rule
V-271591 CCI-000139 medium The OL 9 system administrator (SA) and/or information system security officer (ISSO) (at a minimum) must be alerted of an audit processing failure event. SRG-OS-000046-GPOS-00022
It is critical for the appropriate personnel to be aware if a system is at risk of failing to process audit logs as required. Without this notification, the security personnel may be unaware of an impending failure of the audit capability, and system operation may be adversely affected.

Audit processing failures include software/hardware errors, failures in the audit capturing mechanisms, and audit storage capacity being reached or exceeded.

This requirement applies to each audit data storage repository (i.e., distinct information system component where audit records are stored), the centralized audit storage capacity of organizations (i.e., all audit data storage repositories combined), or both.

Satisfies: SRG-OS-000046-GPOS-00022, SRG-OS-000343-GPOS-00134
Verify that OL 9 is configured to notify the SA and/or ISSO (at a minimum) in the event of an audit processing failure with the following command:

$ sudo grep action_mail_acct /etc/audit/auditd.conf
action_mail_acct = root

If the value of the "action_mail_acct" keyword is not set to "root" and/or other accounts for security personnel, the "action_mail_acct" keyword is missing, or the retuned line is commented out, ask the SA to indicate how they and the ISSO are notified of an audit process failure. If there is no evidence of the proper personnel being notified of an audit processing failure, this is a finding.
Configure the auditd service to notify the SA and ISSO in the event of an audit processing failure.

Edit the following line in "/etc/audit/auditd.conf" to ensure that administrators are notified via email for those situations:

action_mail_acct = root

The audit daemon must be restarted for changes to take effect.

Restart auditd:
$ sudo service auditd restart
OL09-00-000825 SV-271591r1092578_rule
V-271592 CCI-001464 low OL 9 must allocate an audit_backlog_limit of sufficient size to capture processes that start prior to the audit daemon. SRG-OS-000254-GPOS-00095
Without the capability to generate audit records, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one.

If auditing is enabled late in the startup process, the actions of some startup processes may not be audited. Some audit systems also maintain state information only available if auditing is enabled before a given process is created.

Audit records can be generated from various components within the information system (e.g., module or policy filter).

Allocating an audit_backlog_limit of sufficient size is critical in maintaining a stable boot process. With an insufficient limit allocated, the system is susceptible to boot failures and crashes.

Satisfies: SRG-OS-000254-GPOS-00095, SRG-OS-000341-GPOS-00132
Verify that OL 9 allocates a sufficient audit_backlog_limit to capture processes that start prior to the audit daemon with the following command:

$ sudo grubby --info=ALL | grep args | grep -v 'audit_backlog_limit=8192' 

If the command returns any outputs, and audit_backlog_limit is less than "8192", this is a finding.
Configure OL 9 to allocate sufficient audit_backlog_limit to capture processes that start prior to the audit daemon with the following command:

$ sudo grubby --update-kernel=ALL --args=audit_backlog_limit=8192
OL09-00-000830 SV-271592r1091488_rule
V-271593 CCI-001487 medium OL 9 must produce audit records containing information to establish the identity of any individual or process associated with the event. SRG-OS-000255-GPOS-00096
Without establishing what type of events occurred, the source of events, where events occurred, and the outcome of events, it would be difficult to establish, correlate, and investigate the events leading up to an outage or attack.

Audit record content that may be necessary to satisfy this requirement includes, for example, time stamps, source and destination addresses, user/process identifiers, event descriptions, success/fail indications, filenames involved, and access control or flow control rules invoked.

Enriched logging aids in making sense of who, what, and when events occur on a system. Without this, determining root cause of an event will be much more difficult.
Verify that OL 9 audit system is configured to resolve audit information before writing to disk, with the following command:

$ sudo grep log_format /etc/audit/auditd.conf
log_format = ENRICHED

If the "log_format" option is not "ENRICHED", or the line is commented out, this is a finding.
Configure OL 9 to produce audit records containing information to establish the identity of any individual or process associated with the event.

Edit the /etc/audit/auditd.conf file and add or update the "log_format" option:

log_format = ENRICHED

The audit daemon must be restarted for changes to take effect.

Restart auditd:
$ sudo service auditd restart
OL09-00-000835 SV-271593r1092580_rule
V-271594 CCI-000130 medium OL 9 must be configured so that successful/unsuccessful uses of the umount system call generate an audit record. SRG-OS-000037-GPOS-00015
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.

Satisfies: SRG-OS-000037-GPOS-00015, SRG-OS-000062-GPOS-00031, SRG-OS-000392-GPOS-00172, SRG-OS-000462-GPOS-00206, SRG-OS-000471-GPOS-00215
Verify that OL 9 generates an audit record for all uses of the umount system call with the following commands:

$ sudo grep "umount" /etc/audit/audit.* 

$ sudo grep umount /etc/audit/audit.rules
 
If the system is configured to audit this activity, it will return a line like the following:

-a always,exit -F arch=b32 -S umount -F auid>=1000 -F auid!=unset -k privileged-umount

If the command does not return a line or the line is commented out, this is a finding.
Configure the audit system to generate an audit event for any successful/unsuccessful use of the umount system call by adding or updating the following rules in "/etc/audit/audit.rules" and adding the following rules to "/etc/audit/rules.d/perm_mod.rules" or updating the existing rules in files in the "/etc/audit/rules.d/" directory:

-a always,exit -F arch=b32 -S umount -F auid>=1000 -F auid!=unset -k perm_mod -a always,exit -F arch=b64 -S umount -F auid>=1000 -F auid!=unset -k perm_mod

The audit daemon must be restarted for the changes to take effect.

Restart auditd:
$ sudo service auditd restart
OL09-00-000840 SV-271594r1092582_rule
V-271595 CCI-000130 medium OL 9 must be configured so that successful/unsuccessful uses of the umount2 system call generate an audit record. SRG-OS-000037-GPOS-00015
The changing of file permissions could indicate that a user is attempting to gain access to information that would otherwise be disallowed. Auditing discretionary access control (DAC) modifications can facilitate the identification of patterns of abuse among both authorized and unauthorized users.

Satisfies: SRG-OS-000037-GPOS-00015, SRG-OS-000062-GPOS-00031, SRG-OS-000392-GPOS-00172, SRG-OS-000462-GPOS-00206, SRG-OS-000471-GPOS-00215
Verify that OL 9 generates an audit record for all uses of the umount2 system call with the following commands:

$ sudo grep "umount2" /etc/audit/audit.rules 

$ sudo sh -c 'grep "umount2" /etc/audit/audit.rules' 

If the system is configured to audit this activity, it will return a line.

If no line is returned, this is a finding.
Configure the audit system to generate an audit event for any successful/unsuccessful use of the umount2 system call by adding the following rules to a rules file in /etc/audit/rules.d/ directory: (Example /etc/audit/rules.d/audit.rules)

-a always,exit -F arch=b32 -S umount2 -F auid>=1000 -F auid!=unset -k perm_mod
-a always,exit -F arch=b64 -S umount2 -F auid>=1000 -F auid!=unset -k perm_mod

The audit daemon must be restarted for the changes to take effect.

Restart auditd:
$ sudo service auditd restart
OL09-00-000845 SV-271595r1092584_rule
V-271596 CCI-001849 medium OL 9 must allocate audit record storage capacity to store at least one week's worth of audit records. SRG-OS-000341-GPOS-00132
To ensure OL 9 systems have a sufficient storage capacity in which to write the audit logs, OL 9 needs to be able to allocate audit record storage capacity.

The task of allocating audit record storage capacity is usually performed during initial installation of OL 9.

Satisfies: SRG-OS-000341-GPOS-00132, SRG-OS-000342-GPOS-00133
Verify that OL 9 allocates audit record storage capacity to store at least one week of audit records when audit records are not immediately sent to a central audit record storage facility.

Note: The partition size needed to capture a week of audit records is based on the activity level of the system and the total storage capacity available. Typically 10GB of storage space for audit records should be sufficient.

Determine which partition the audit records are being written to with the following command:

$ sudo grep log_file /etc/audit/auditd.conf
log_file = /var/log/audit/audit.log 

Check the size of the partition that audit records are written to with the following command and verify whether it is sufficiently large:

 # df -h /var/log/audit/
/dev/sda2 24G 10.4G 13.6G 43% /var/log/audit 

If the audit record partition is not allocated for sufficient storage capacity, this is a finding.
Allocate enough storage capacity for at least one week of audit records when audit records are not immediately sent to a central audit record storage facility.

If audit records are stored on a partition made specifically for audit records, resize the partition with sufficient space to contain one week of audit records.

If audit records are not stored on a partition made specifically for audit records, a new partition with sufficient space will need be to be created.
OL09-00-000850 SV-271596r1091500_rule
V-271597 CCI-001851 medium OL 9 must be configured to offload audit records onto a different system from the system being audited via syslog. SRG-OS-000342-GPOS-00133
The auditd service does not include the ability to send audit records to a centralized server for management directly. However, it can use a plug-in for audit event multiplexor (audispd) to pass audit records to the local syslog server.

Satisfies: SRG-OS-000342-GPOS-00133, SRG-OS-000479-GPOS-00224
Verify that OL 9 is configured use the audisp-remote syslog service with the following command:

$ sudo grep active /etc/audit/plugins.d/syslog.conf 
active = yes

If the "active" keyword does not have a value of "yes", the line is commented out, or the line is missing, this is a finding.
Configure OL 9 to offload audit records onto a different system from the system being audited via syslog.

Edit the /etc/audit/plugins.d/syslog.conf file and add or update the "active" option:

active = yes

The audit daemon must be restarted for changes to take effect.

Restart auditd:
$ sudo service auditd restart
OL09-00-000855 SV-271597r1092586_rule
V-271598 CCI-001851 medium OL 9 must take appropriate action when the internal event queue is full. SRG-OS-000342-GPOS-00133
The audit system should have an action setup in the event the internal event queue becomes full so that no data is lost. Information stored in one location is vulnerable to accidental or incidental deletion or alteration.

Offloading is a common process in information systems with limited audit storage capacity.

Satisfies: SRG-OS-000342-GPOS-00133, SRG-OS-000479-GPOS-00224
Verify that OL 9 audit system is configured to take an appropriate action when the internal event queue is full:

$ sudo grep -i overflow_action /etc/audit/auditd.conf 
overflow_action = syslog

If the value of the "overflow_action" option is not set to "syslog", "single", "halt" or the line is commented out, ask the system administrator (SA) to indicate how the audit logs are offloaded to a different system or media.

If there is no evidence that the transfer of the audit logs being offloaded to another system or media takes appropriate action if the internal event queue becomes full, this is a finding.
Configure OL 9 to take appropriate action when the internal event queue is full.

Edit the /etc/audit/auditd.conf file and add or update the "overflow_action" option:

overflow_action = syslog

The audit daemon must be restarted for changes to take effect.

Restart auditd:
$ sudo service auditd restart
OL09-00-000860 SV-271598r1092588_rule
V-271599 CCI-001855 medium OL 9 must take action when allocated audit record storage volume reaches 75 percent of the repository maximum audit record storage capacity. SRG-OS-000343-GPOS-00134
If security personnel are not notified immediately when storage volume reaches 75 percent utilization, they are unable to plan for audit record storage capacity expansion.
Verify that OL 9 takes action when allocated audit record storage volume reaches 75 percent of the repository maximum audit record storage capacity with the following command:

$ sudo grep -w space_left /etc/audit/auditd.conf
space_left = 25%

If the value of the "space_left" keyword is not set to 25 percent of the storage volume allocated to audit logs, or if the line is commented out, ask the system administrator (SA) to indicate how the system is providing real-time alerts to the SA and information system security officer (ISSO). If the "space_left" value is not configured to the correct value, this is a finding.
Configure OL 9 to initiate an action to notify the SA and ISSO (at a minimum) when allocated audit record storage volume reaches 75 percent of the repository maximum audit record storage capacity by adding/modifying the following line in the /etc/audit/auditd.conf file.

space_left  = 25%
OL09-00-000865 SV-271599r1091509_rule
V-271600 CCI-001855 medium OL 9 must notify the system administrator (SA) and information system security officer (ISSO) (at a minimum) when allocated audit record storage volume 75 percent utilization. SRG-OS-000343-GPOS-00134
If security personnel are not notified immediately when storage volume reaches 75 percent utilization, they are unable to plan for audit record storage capacity expansion.
Verify that OL 9 notifies the SA and ISSO (at a minimum) when allocated audit record storage volume reaches 75 percent of the repository maximum audit record storage capacity with the following command:

$ sudo grep -w space_left_action /etc/audit/auditd.conf
space_left_action = email

If the value of the "space_left_action" is not set to "email", or if the line is commented out, ask the SA to indicate how the system is providing real-time alerts to the SA and ISSO.

If there is no evidence that real-time alerts are configured on the system, this is a finding.
Configure OL 9 to initiate an action to notify the SA and ISSO (at a minimum) when allocated audit record storage volume reaches 75 percent of the repository maximum audit record storage capacity by adding/modifying the following line in the /etc/audit/auditd.conf file.

space_left_action = email
OL09-00-000870 SV-271600r1091512_rule
V-271601 CCI-001855 medium OL 9 must take action when allocated audit record storage volume reaches 95 percent of the audit record storage capacity. SRG-OS-000343-GPOS-00134
If action is not taken when storage volume reaches 95 percent utilization, the auditing system may fail when the storage volume reaches capacity.
Verify that OL 9 takes action when allocated audit record storage volume reaches 95 percent of the repository maximum audit record storage capacity with the following command:

$ sudo grep -w admin_space_left /etc/audit/auditd.conf
admin_space_left = 5%

If the value of the "admin_space_left" keyword is not set to 5 percent of the storage volume allocated to audit logs, or if the line is commented out, ask the system administrator (SA) to indicate how the system is taking action if the allocated storage is about to reach capacity. If the "space_left" value is not configured to the correct value, this is a finding.
Configure OL 9 to initiate an action when allocated audit record storage volume reaches 95 percent of the repository maximum audit record storage capacity by adding/modifying the following line in the /etc/audit/auditd.conf file.

admin_space_left  = 5%
OL09-00-000875 SV-271601r1091515_rule
V-271602 CCI-000366 medium OL 9 must write audit records to disk. SRG-OS-000480-GPOS-00227
Audit data should be synchronously written to disk to ensure log integrity. This setting ensures that all audit event data is written disk.
Verify that OL 9 audit system is configured to write logs to the disk with the following command:

$ sudo grep write_logs /etc/audit/auditd.conf 
write_logs = yes 

If "write_logs" does not have a value of "yes", the line is commented out, or the line is missing, this is a finding.
Configure the audit system to write log files to the disk.

Edit the /etc/audit/auditd.conf file and add or update the "write_logs" option to "yes":

write_logs = yes 

The audit daemon must be restarted for changes to take effect.

Restart auditd:
$ sudo service auditd restart
OL09-00-000880 SV-271602r1092590_rule
V-271603 CCI-001855 medium OL 9 must act when allocated audit record storage volume reaches 95 percent of the repository maximum audit record storage capacity. SRG-OS-000343-GPOS-00134
If action is not taken when storage volume reaches 95 percent utilization, the auditing system may fail when the storage volume reaches capacity.
Verify that OL 9 is configured to take action in the event of allocated audit record storage volume reaches 95 percent of the repository maximum audit record storage capacity with the following command:

$ sudo grep admin_space_left_action /etc/audit/auditd.conf
admin_space_left_action = single

If the value of the "admin_space_left_action" is not set to "single", or if the line is commented out, ask the system administrator (SA) to indicate how the system is providing real-time alerts to the SA and information system security officer (ISSO).

If there is no evidence that real-time alerts are configured on the system, this is a finding.
Configure the auditd service to take action in the event of allocated audit record storage volume reaches 95 percent of the repository maximum audit record storage capacity.

Edit the following line in "/etc/audit/auditd.conf" to ensure that the system is forced into single user mode in the event the audit record storage volume is about to reach maximum capacity:

admin_space_left_action = single 

The audit daemon must be restarted for changes to take effect.

Restart auditd:
$ sudo service auditd restart
OL09-00-000885 SV-271603r1092592_rule
V-271604 CCI-000185 medium OL 9, for PKI-based authentication, must validate certificates by constructing a certification path (which includes status information) to an accepted trust anchor. SRG-OS-000066-GPOS-00034
Without path validation, an informed trust decision by the relying party cannot be made when presented with any certificate not already explicitly trusted.

A trust anchor is an authoritative entity represented via a public key and associated data. It is used in the context of public key infrastructures, X.509 digital certificates, and DNSSEC.

When there is a chain of trust, usually the top entity to be trusted becomes the trust anchor; it can be, for example, a certification authority (CA). A certification path starts with the subject certificate and proceeds through a number of intermediate certificates up to a trusted root certificate, typically issued by a trusted CA.

This requirement verifies that a certification path to an accepted trust anchor is used for certificate validation and that the path includes status information. Path validation is necessary for a relying party to make an informed trust decision when presented with any certificate not already explicitly trusted. Status information for certification paths includes certificate revocation lists or online certificate status protocol responses. Validation of the certificate status information is out of scope for this requirement.

Satisfies: SRG-OS-000066-GPOS-00034, SRG-OS-000384-GPOS-00167, SRG-OS-000775-GPOS-00230
Verify that OL 9 for PKI-based authentication has valid certificates by constructing a certification path (which includes status information) to an accepted trust anchor.

Check that the system has a valid DOD root CA installed with the following command:

$ sudo openssl x509 -text -in /etc/sssd/pki/sssd_auth_ca_db.pem

Example output:

Certificate:
    Data:
        Version: 3 (0x2)
        Serial Number: 1 (0x1)
        Signature Algorithm: sha256WithRSAEncryption
        Issuer: C = US, O = U.S. Government, OU = DOD, OU = PKI, CN = DOD Root CA 3
        Validity
        Not Before: Mar 20 18:46:41 2012 GMT
        Not After: Dec 30 18:46:41 2029 GMT
        Subject: C = US, O = U.S. Government, OU = DOD, OU = PKI, CN = DOD Root CA 3
        Subject Public Key Info:
            Public Key Algorithm: rsaEncryption

If the root CA file is not a DOD-issued certificate with a valid date and installed in the "/etc/sssd/pki/sssd_auth_ca_db.pem" location, this is a finding.
Configure OL 9, for PKI-based authentication, to validate certificates by constructing a certification path (which includes status information) to an accepted trust anchor.

Obtain a valid copy of the DOD root CA file from the PKI CA certificate bundle from cyber.mil and copy the DOD_PKE_CA_chain.pem into the following file:
/etc/sssd/pki/sssd_auth_ca_db.pem
OL09-00-000900 SV-271604r1091524_rule
V-271605 CCI-000186 medium OL 9, for PKI-based authentication, must enforce authorized access to the corresponding private key. SRG-OS-000067-GPOS-00035
If the private key is discovered, an attacker can use the key to authenticate as an authorized user and gain access to the network infrastructure.

The cornerstone of the PKI is the private key used to encrypt or digitally sign information.

If the private key is stolen, this will lead to the compromise of the authentication and nonrepudiation gained through PKI because the attacker can use the private key to digitally sign documents and pretend to be the authorized user.

Both the holders of a digital certificate and the issuing authority must protect the computers, storage devices, or whatever they use to keep the private keys.
Verify that OL 9 SSH private key files have a passcode.

For each private key stored on the system, use the following command:

$ sudo ssh-keygen -y -f /path/to/file

If the contents of the key are displayed, this is a finding.
Configure OL 9, for PKI-based authentication, to enforce authorized access to the corresponding private key.

Create a new private and public key pair that uses a passcode with the following command:

$ sudo ssh-keygen -n [passphrase]
OL09-00-000905 SV-271605r1091527_rule
V-271606 CCI-000187 medium OL 9 must map the authenticated identity to the user or group account for PKI-based authentication. SRG-OS-000068-GPOS-00036
Without mapping the certificate used to authenticate to the user account, the ability to determine the identity of the individual user or group will not be available for forensic analysis.
Verify that OL 9 maps the authenticated identity to the certificate of the user or group to the corresponding user or group in the "sssd.conf" file with the following command:

$ sudo cat /etc/sssd/sssd.conf 
[certmap/testing.test/rule_name]
matchrule =.*EDIPI@mil
maprule = (userCertificate;binary={cert!bin})
domains = testing.test

If the certmap section does not exist, ask the system administrator (SA) to indicate how certificates are mapped to accounts. If there is no evidence of certificate mapping, this is a finding.
Configure OL 9 to map the authenticated identity to the user or group account by adding or modifying the certmap section of the "/etc/sssd/sssd.conf" file based on the following example:

[certmap/testing.test/rule_name]
matchrule = .*EDIPI@mil
maprule = (userCertificate;binary={cert!bin})
dmains = testing.test

The "sssd" service must be restarted for the changes to take effect. To restart the "sssd" service, run the following command:

$ sudo systemctl restart sssd.service
OL09-00-000910 SV-271606r1091530_rule
V-271607 CCI-004046 medium OL 9 must enable certificate-based smart card authentication. SRG-OS-000375-GPOS-00160
Without the use of multifactor authentication (MFA), the ease of access to privileged functions is greatly increased. Multifactor authentication requires using two or more factors to achieve authentication. A privileged account is defined as an information system account with authorizations of a privileged user. The DOD Common Access Card (CAC) with DOD-approved PKI is an example of multifactor authentication.

Satisfies: SRG-OS-000375-GPOS-00160, SRG-OS-000105-GPOS-00052
Verify that OL 9 has smart cards enabled in System Security Services Daemon (SSSD) if smart cards are used for MFA with the following command:

$ sudo grep pam_cert_auth /etc/sssd/sssd.conf
pam_cert_auth = True 

If "pam_cert_auth" is not set to "True", the line is commented out, or the line is missing, this is a finding.
Configure OL 9 to enable certificate-based smart card authentication.

Edit the file "/etc/sssd/sssd.conf" and add or edit the following line:

pam_cert_auth = True
OL09-00-000925 SV-271607r1091533_rule
V-271608 CCI-004046 medium OL 9 must implement certificate status checking for multifactor authentication (MFA). SRG-OS-000375-GPOS-00160
Using an authentication device, such as a DOD Common Access Card (CAC) or token that is separate from the information system, ensures that even if the information system is compromised, credentials stored on the authentication device will not be affected.

Multifactor solutions that require devices separate from information systems gaining access include, for example, hardware tokens providing time-based or challenge-response authenticators and smart cards such as the U.S. Government Personal Identity Verification (PIV) card and the DOD CAC.

OL 9 includes multiple options for configuring certificate status checking, but for this requirement focuses on the System Security Services Daemon (SSSD). By default, SSSD performs Online Certificate Status Protocol (OCSP) checking and certificate verification using a sha256 digest function.

Satisfies: SRG-OS-000375-GPOS-00160, SRG-OS-000377-GPOS-00162
Verify that OL 9 implements Online Certificate Status Protocol (OCSP) and is using the proper digest value on the system with the following command:

$ sudo grep certificate_verification /etc/sssd/sssd.conf /etc/sssd/conf.d/*.conf | grep -v "^#"
certificate_verification = ocsp_dgst=sha512

If the certificate_verification line is missing from the [sssd] section, or is missing "ocsp_dgst=sha512", ask the administrator to indicate what type of multifactor authentication is being used and how the system implements certificate status checking. If there is no evidence of certificate status checking being used, this is a finding.
Configure OL 9 to implement certificate status checking for MFA.

Review the "/etc/sssd/conf.d/certificate_verification.conf" file to determine if the system is configured to prevent OCSP or certificate verification.

Add the following line to the "/etc/sssd/conf.d/certificate_verification.conf" file:

certificate_verification = ocsp_dgst=sha512

Set the correct ownership and permissions on the "/etc/sssd/conf.d/certificate_verification.conf" file by running these commands:

$ sudo chown root:root "/etc/sssd/conf.d/certificate_verification.conf"
$ sudo chmod 600 "/etc/sssd/conf.d/certificate_verification.conf"

The "sssd" service must be restarted for the changes to take effect. To restart the "sssd" service, run the following command:

$ sudo systemctl restart sssd.service
OL09-00-000930 SV-271608r1091536_rule
V-271609 CCI-002007 medium OL 9 must prohibit the use of cached authenticators after one day. SRG-OS-000383-GPOS-00166
If cached authentication information is out-of-date, the validity of the authentication information may be questionable.
Note: If smart card authentication is not being used on the system, this requirement is Not Applicable.

Verify that OL 9's System Security Services Daemon (SSSD) prohibits the use of cached authentications after one day.

Check that SSSD allows cached authentications with the following command:

$ sudo grep cache_credentials /etc/sssd/sssd.conf
cache_credentials = true

If "cache_credentials" is set to "false" or missing from the configuration file, this is not a finding and no further checks are required.

If "cache_credentials" is set to "true", check that SSSD prohibits the use of cached authentications after one day with the following command:

$ sudo grep offline_credentials_expiration  /etc/sssd/sssd.conf
offline_credentials_expiration = 1

If "offline_credentials_expiration" is not set to a value of "1", this is a finding.
Configure the SSSD to prohibit the use of cached authentications after one day.

Add or change the following line in "/etc/sssd/sssd.conf" just below the line [pam]:

offline_credentials_expiration = 1
OL09-00-000935 SV-271609r1091539_rule
V-271610 CCI-000764 medium OL 9 must use the CAC smart card driver. SRG-OS-000104-GPOS-00051
Smart card login provides two-factor authentication stronger than that provided by a username and password combination. Smart cards leverage public key infrastructure to provide and verify credentials. Configuring the smart card driver in use by the organization helps to prevent users from using unauthorized smart cards.

Satisfies: SRG-OS-000104-GPOS-00051, SRG-OS-000106-GPOS-00053, SRG-OS-000107-GPOS-00054, SRG-OS-000109-GPOS-00056, SRG-OS-000108-GPOS-00055, SRG-OS-000112-GPOS-00057, SRG-OS-000113-GPOS-00058
Verify that OL 9 loads the CAC driver with the following command:

$ grep card_drivers /etc/opensc.conf
card_drivers = cac; 

If "cac" is not listed as a card driver, or there is no line returned for "card_drivers", this is a finding.
Configure OL 9 to load the CAC driver.

Add or modify the following line in the "/etc/opensc.conf" file:

card_drivers = cac;
OL09-00-000940 SV-271610r1091542_rule
V-271611 CCI-000366 medium OL 9 must ensure the password complexity module is enabled in the system-auth file. SRG-OS-000480-GPOS-00227
Enabling PAM password complexity permits enforcement of strong passwords and consequently makes the system less prone to dictionary attacks.
Verify that OL 9 uses "pwquality" to enforce the password complexity rules in the system-auth file with the following command:

$ cat /etc/pam.d/system-auth | grep pam_pwquality
password required pam_pwquality.so 

If the command does not return a line containing the value "pam_pwquality.so", or the line is commented out, this is a finding.
Configure OL 9 to use "pwquality" to enforce password complexity rules.

Add the following line to the "/etc/pam.d/system-auth" file(or modify the line to have the required value):

password required pam_pwquality.so
OL09-00-001000 SV-271611r1091545_rule
V-271612 CCI-004066 medium OL 9 must ensure the password complexity module in the system-auth file is configured for three retries or less. SRG-OS-000069-GPOS-00037
Use of a complex password helps to increase the time and resources required to compromise the password. Password complexity, or strength, is a measure of the effectiveness of a password in resisting attempts at guessing and brute-force attacks. "pwquality" enforces complex password construction configuration and has the ability to limit brute-force attacks on the system.

OL 9 uses "pwquality" as a mechanism to enforce password complexity. This is set in both:
/etc/pam.d/password-auth
/etc/pam.d/system-auth

By limiting the number of attempts to meet the pwquality module complexity requirements before returning with an error, the system will audit abnormal attempts at password changes.
Verify that OL 9 is configured to limit the "pwquality" retry option to "3". 

Check for the use of the "pwquality" retry option in the system-auth file with the following command:

$ grep pam_pwquality /etc/pam.d/system-auth 
password required pam_pwquality.so retry=3

If the value of "retry" is set to "0" or greater than "3", or is missing, this is a finding.
Configure OL 9 to limit the "pwquality" retry option to "3".

Add the following line to the "/etc/pam.d/system-auth" file (or modify the line to have the required value):

password required pam_pwquality.so retry=3
OL09-00-001001 SV-271612r1091548_rule
V-271613 CCI-004066 medium OL 9 must enforce password complexity by requiring that at least one uppercase character be used. SRG-OS-000069-GPOS-00037
Use of a complex password helps to increase the time and resources required to compromise the password. Password complexity, or strength, is a measure of the effectiveness of a password in resisting attempts at guessing and brute-force attacks. Password complexity is one factor of several that determines how long it takes to crack a password. The more complex the password, the greater the number of possible combinations that need to be tested before the password is compromised. Requiring a minimum number of uppercase characters makes password guessing attacks more difficult by ensuring a larger search space.
Verify that OL 9 enforces password complexity by requiring at least one uppercase character.

Check the value for "ucredit" with the following command:

$ grep ucredit /etc/security/pwquality.conf /etc/security/pwquality.conf.d/*.conf 
ucredit = -1 

If the value of "ucredit" is a positive number or is commented out, this is a finding.
Configure OL 9 to enforce password complexity by requiring that at least one uppercase character is used by setting the "ucredit" option.

Add the following line to /etc/security/pwquality.conf (or modify the line to have the required value):

ucredit = -1
OL09-00-001005 SV-271613r1091551_rule
V-271614 CCI-004066 medium OL 9 must ensure the password complexity module is enabled in the password-auth file. SRG-OS-000069-GPOS-00037
Enabling PAM password complexity permits enforcement of strong passwords and consequently makes the system less prone to dictionary attacks.

Satisfies: SRG-OS-000069-GPOS-00037, SRG-OS-000070-GPOS-00038
Verify that OL 9 uses "pwquality" to enforce the password complexity rules in the password-auth file with the following command:

$  grep pam_pwquality /etc/pam.d/password-auth | grep pam_pwquality
password required pam_pwquality.so 

If the command does not return a line containing the value "pam_pwquality.so", or the line is commented out, this is a finding.
Configure OL 9 to use "pwquality" to enforce password complexity rules.

Add the following line to the "/etc/pam.d/password-auth" file (or modify the line to have the required value):

password required pam_pwquality.so
OL09-00-001010 SV-271614r1091554_rule
V-271615 CCI-004066 medium OL 9 must enforce password complexity by requiring that at least one lowercase character be used. SRG-OS-000070-GPOS-00038
Use of a complex password helps to increase the time and resources required to compromise the password. Password complexity, or strength, is a measure of the effectiveness of a password in resisting attempts at guessing and brute-force attacks. 

Password complexity is one factor of several that determines how long it takes to crack a password. The more complex the password, the greater the number of possible combinations that need to be tested before the password is compromised. Requiring a minimum number of lowercase characters makes password guessing attacks more difficult by ensuring a larger search space.
Verify that OL 9 enforces password complexity by requiring at least one lowercase character.

Check the value for "lcredit" with the following command:

$ grep lcredit /etc/security/pwquality.conf /etc/security/pwquality.conf.d/*.conf 
/etc/security/pwquality.conf:lcredit = -1 

If the value of "lcredit" is a positive number or is commented out, this is a finding.
Configure OL 9 to enforce password complexity by requiring at least one lowercase character is used by setting the "lcredit" option.

Add the following line to "/etc/security/pwquality.conf" (or modify the line to have the required value):

lcredit = -1
OL09-00-001015 SV-271615r1091557_rule
V-271616 CCI-004066 medium OL 9 must enforce password complexity by requiring that at least one numeric character be used. SRG-OS-000071-GPOS-00039
Use of a complex password helps to increase the time and resources required to compromise the password. Password complexity, or strength, is a measure of the effectiveness of a password in resisting attempts at guessing and brute-force attacks.

Password complexity is one factor of several that determines how long it takes to crack a password. The more complex the password, the greater the number of possible combinations that need to be tested before the password is compromised. Requiring digits makes password guessing attacks more difficult by ensuring a larger search space.
Verify that OL 9 enforces password complexity by requiring at least one numeric character.

Check the value for "dcredit" with the following command:

$ grep dcredit /etc/security/pwquality.conf /etc/security/pwquality.conf.d/*.conf
/etc/security/pwquality.conf:dcredit = -1 

If the value of "dcredit" is a positive number or is commented out, this is a finding.
Configure OL 9 to enforce password complexity by requiring at least one numeric character is used by setting the "dcredit" option.

Add the following line to "/etc/security/pwquality.conf" (or modify the line to have the required value):

dcredit = -1
OL09-00-001020 SV-271616r1091560_rule
V-271617 CCI-004066 medium OL 9 must require the change of at least eight characters when passwords are changed. SRG-OS-000072-GPOS-00040
Use of a complex password helps to increase the time and resources required to compromise the password. Password complexity, or strength, is a measure of the effectiveness of a password in resisting attempts at guessing and brute-force attacks. 

Password complexity is one factor of several that determines how long it takes to crack a password. The more complex the password, the greater the number of possible combinations that need to be tested before the password is compromised. Requiring a minimum number of different characters during password changes ensures that newly changed passwords will not resemble previously compromised ones. Note that passwords changed on compromised systems will still be compromised.
Verify that OL 9 requires the change of at least eight characters when passwords are changed.

Verify the value of the "difok" option in "/etc/security/pwquality.conf" with the following command:

$ grep difok /etc/security/pwquality.conf /etc/security/pwquality.conf.d/*.conf 
difok = 8
 
If the value of "difok" is set to less than "8", or is commented out, this is a finding.
Configure OL 9 to require the change of at least eight of the total number of characters when passwords are changed by setting the "difok" option.

Add the following line to "/etc/security/pwquality.conf" (or modify the line to have the required value):

difok = 8
OL09-00-001025 SV-271617r1091563_rule
V-271618 CCI-004066 medium OL 9 must require the maximum number of repeating characters of the same character class be limited to four when passwords are changed. SRG-OS-000072-GPOS-00040
Use of a complex password helps to increase the time and resources required to compromise the password. Password complexity, or strength, is a measure of the effectiveness of a password in resisting attempts at guessing and brute-force attacks.

Password complexity is one factor of several that determines how long it takes to crack a password. The more complex a password, the greater the number of possible combinations that need to be tested before the password is compromised.
Verify that OL 9 requires the maximum number of repeating characters of the same character class be limited to four when passwords are changed.

Verify the value of the "maxclassrepeat" option in "/etc/security/pwquality.conf" with the following command:

$ grep maxclassrepeat /etc/security/pwquality.conf /etc/security/pwquality.conf.d/*.conf 
maxclassrepeat = 4

If the value of "maxclassrepeat" is set to "0", more than "4", or is commented out, this is a finding.
Configure OL 9 to require the change of the number of repeating characters of the same character class when passwords are changed by setting the "maxclassrepeat" option.

Add the following line to "/etc/security/pwquality.conf" conf (or modify the line to have the required value):

maxclassrepeat = 4
OL09-00-001030 SV-271618r1091566_rule
V-271619 CCI-004066 medium OL 9 must require the maximum number of repeating characters be limited to three when passwords are changed. SRG-OS-000072-GPOS-00040
Use of a complex password helps to increase the time and resources required to compromise the password. Password complexity, or strength, is a measure of the effectiveness of a password in resisting attempts at guessing and brute-force attacks.

Password complexity is one factor of several that determines how long it takes to crack a password. The more complex a password, the greater the number of possible combinations that need to be tested before the password is compromised.
Verify that OL 9 requires the maximum number of repeating characters be limited to three when passwords are changed.

Verify the value of the "maxrepeat" option in "/etc/security/pwquality.conf" with the following command:

$ grep maxrepeat /etc/security/pwquality.conf /etc/security/pwquality.conf.d/*.conf 
maxrepeat = 3

If the value of "maxrepeat" is set to more than "3", or is commented out, this is a finding.
Configure OL 9 to require the change of the number of repeating consecutive characters when passwords are changed by setting the "maxrepeat" option.

Add the following line to "/etc/security/pwquality.conf" (or modify the line to have the required value):

maxrepeat = 3
OL09-00-001035 SV-271619r1091569_rule
V-271620 CCI-004066 medium OL 9 must require the change of at least four character classes when passwords are changed. SRG-OS-000072-GPOS-00040
Use of a complex password helps to increase the time and resources required to compromise the password. Password complexity, or strength, is a measure of the effectiveness of a password in resisting attempts at guessing and brute-force attacks.

Password complexity is one factor of several that determines how long it takes to crack a password. The more complex a password, the greater the number of possible combinations that need to be tested before the password is compromised.
Verify that OL 9 requires the change of at least four character classes when passwords are changed.

Verify the value of the "minclass" option in "/etc/security/pwquality.conf" with the following command:

$ grep minclass /etc/security/pwquality.conf /etc/security/pwquality.conf.d/*.conf 
minclass = 4

If the value of "minclass" is set to less than "4", or is commented out, this is a finding.
Configure OL 9 to require the change of at least four character classes when passwords are changed by setting the "minclass" option.

Add the following line to "/etc/security/pwquality.conf" (or modify the line to have the required value):

minclass = 4
OL09-00-001040 SV-271620r1091572_rule
V-271621 CCI-004066 medium OL 9 must enforce password complexity rules for the root account. SRG-OS-000072-GPOS-00040
Use of a complex password helps to increase the time and resources required to compromise the password. Password complexity, or strength, is a measure of the effectiveness of a password in resisting attempts at guessing and brute-force attacks.

Password complexity is one factor of several that determines how long it takes to crack a password. The more complex the password, the greater the number of possible combinations that need to be tested before the password is compromised.

Satisfies: SRG-OS-000072-GPOS-00040, SRG-OS-000071-GPOS-00039, SRG-OS-000070-GPOS-00038, SRG-OS-000266-GPOS-00101, SRG-OS-000078-GPOS-00046, SRG-OS-000480-GPOS-00225, SRG-OS-000069-GPOS-00037
Verify that OL 9 enforces password complexity rules for the root account.

Check if root user is required to use complex passwords with the following command:

$ grep enforce_for_root /etc/security/pwquality.conf /etc/security/pwquality.conf.d/*.conf
/etc/security/pwquality.conf:enforce_for_root

If "enforce_for_root" is commented or missing, this is a finding.
Configure OL 9 to enforce password complexity on the root account.

Add or update the following line in /etc/security/pwquality.conf:

enforce_for_root
OL09-00-001045 SV-271621r1091575_rule
V-271622 CCI-004062 medium OL 9 must be configured so that user and group account administration utilities are configured to store only encrypted representations of passwords. SRG-OS-000073-GPOS-00041
Passwords need to be protected at all times, and encryption is the standard method for protecting passwords. If passwords are not encrypted, they can be plainly read (i.e., clear text) and easily compromised. Passwords that are encrypted with a weak algorithm are no more protected than if they are kept in plain text.

This setting ensures user and group account administration utilities are configured to store only encrypted representations of passwords. Additionally, the "crypt_style" configuration option ensures the use of a strong hashing algorithm that makes password cracking attacks more difficult.
Verify that OL 9 user and group account administration utilities are configured to store only encrypted representations of passwords with the following command:

# grep crypt /etc/libuser.conf 
crypt_style = sha512

If the "crypt_style" variable is not set to "sha512", is not in the defaults section, is commented out, or does not exist, this is a finding.
Configure OL 9 to use the SHA-512 algorithm for password hashing.

Add or change the following line in the "[default]" section of "/etc/libuser.conf" file:

crypt_style = sha512
OL09-00-001050 SV-271622r1091578_rule
V-271623 CCI-004062 medium OL 9 must be configured to use the shadow file to store only encrypted representations of passwords. SRG-OS-000073-GPOS-00041
Passwords need to be protected at all times, and encryption is the standard method for protecting passwords. If passwords are not encrypted, they can be plainly read (i.e., clear text) and easily compromised. Passwords that are encrypted with a weak algorithm are no more protected than if they are kept in plain text.

This setting ensures user and group account administration utilities are configured to store only encrypted representations of passwords. Additionally, the "crypt_style" configuration option ensures the use of a strong hashing algorithm that makes password cracking attacks more difficult.
Verify that OL 9 shadow file is configured to store only encrypted representations of passwords with a hash value of "SHA512" with the following command:

# grep -i encrypt_method /etc/login.defs
ENCRYPT_METHOD SHA512

If "ENCRYPT_METHOD" does not have a value of "SHA512", or the line is commented out, this is a finding.
Configure OL 9 to store only SHA-512 encrypted representations of passwords.

Add or update the following line in the "/etc/login.defs" file:

ENCRYPT_METHOD SHA512
OL09-00-001055 SV-271623r1091581_rule
V-271624 CCI-004062 medium OL 9 pam_unix.so module must be configured in the password-auth file to use a FIPS 140-3 approved cryptographic hashing algorithm for system authentication. SRG-OS-000073-GPOS-00041
Unapproved mechanisms that are used for authentication to the cryptographic module are not verified and therefore, cannot be relied upon to provide confidentiality or integrity, and DOD data may be compromised.

OL 9 systems using encryption are required to use FIPS-compliant mechanisms for authenticating to cryptographic modules. 

FIPS 140-3 is the current standard for validating that mechanisms used to access cryptographic modules use authentication that meets DOD requirements. This allows for Security Levels 1, 2, 3, or 4 for use on a general-purpose computing system.
Verify that OL 9 pam_unix.so module is configured to use sha512 in /etc/pam.d/password-auth with the following command:

$ grep "^password.*pam_unix.so.*sha512" /etc/pam.d/password-auth
password sufficient pam_unix.so sha512

If "sha512" is missing, or the line is commented out, this is a finding.
Configure OL 9 to use a FIPS 140-3 approved cryptographic hashing algorithm for system authentication.

Edit/modify the following line in the "/etc/pam.d/password-auth" file to include the sha512 option for pam_unix.so:

password sufficient pam_unix.so sha512
OL09-00-001060 SV-271624r1091584_rule
V-271625 CCI-004062 medium OL 9 password-auth must be configured to use a sufficient number of hashing rounds. SRG-OS-000073-GPOS-00041
Passwords need to be protected at all times, and encryption is the standard method for protecting passwords. If passwords are not encrypted, they can be plainly read (i.e., clear text) and easily compromised. Passwords that are encrypted with a weak algorithm are no more protected than if they are kept in plain text.

Using more hashing rounds makes password cracking attacks more difficult.

Satisfies: SRG-OS-000073-GPOS-00041, SRG-OS-000120-GPOS-00061
Verify that OL 9 password-auth is configured to use a sufficient number of hashing rounds with the following command:

$ sudo grep rounds /etc/pam.d/password-auth
password sufficient pam_unix.so sha512 rounds=100000

If a matching line is not returned or "rounds" is less than "100000", this a finding.
Configure Oracle Linux 9 to use 100000 hashing rounds for hashing passwords.

Add or modify the following line in "/etc/pam.d/password-auth" and set "rounds" to "100000".

password sufficient pam_unix.so sha512 rounds=100000
OL09-00-001065 SV-271625r1091587_rule
V-271626 CCI-004062 medium OL 9 system-auth must be configured to use a sufficient number of hashing rounds. SRG-OS-000073-GPOS-00041
Passwords need to be protected at all times, and encryption is the standard method for protecting passwords. If passwords are not encrypted, they can be plainly read (i.e., clear text) and easily compromised. Passwords that are encrypted with a weak algorithm are no more protected than if they are kept in plain text.

Using more hashing rounds makes password cracking attacks more difficult.

Satisfies: SRG-OS-000073-GPOS-00041, SRG-OS-000120-GPOS-00061
Verify that OL 9 system-auth is configured to use a sufficient number of hashing rounds with the following command:

$ sudo grep rounds /etc/pam.d/system-auth
password sufficient pam_unix.so sha512 rounds=100000

If a matching line is not returned or "rounds" is less than 100000, this a finding.
Configure Oracle Linux 9 to use 100000 hashing rounds for hashing passwords.

Add or modify the following line in "/etc/pam.d/system-auth" and set "rounds" to 100000.

password sufficient pam_unix.so sha512 rounds=100000'
OL09-00-001070 SV-271626r1091590_rule
V-271627 CCI-004062 medium OL 9 shadow password suite must be configured to use a sufficient number of hashing rounds. SRG-OS-000073-GPOS-00041
Passwords need to be protected at all times, and encryption is the standard method for protecting passwords. If passwords are not encrypted, they can be plainly read (i.e., clear text) and easily compromised. Passwords that are encrypted with a weak algorithm are no more protected than if they are kept in plain text.

Using more hashing rounds makes password cracking attacks more difficult.

Satisfies: SRG-OS-000073-GPOS-00041, SRG-OS-000120-GPOS-00061
Verify that OL 9 has a minimum number of hash rounds configured with the following command:

$ grep -i sha_crypt /etc/login.defs

If "SHA_CRYPT_MIN_ROUNDS" or "SHA_CRYPT_MAX_ROUNDS" is less than "100000", this is a finding.
Configure OL 9 to encrypt all stored passwords with a strong cryptographic hash.

Edit/modify the following line in the "/etc/login.defs" file and set "SHA_CRYPT_MIN_ROUNDS" to a value no lower than "100000":

SHA_CRYPT_MIN_ROUNDS 100000
SHA_CRYPT_MAX_ROUNDS 100000
OL09-00-001075 SV-271627r1091593_rule
V-271628 CCI-004062 medium OL 9 must employ FIPS 140-3 approved cryptographic hashing algorithms for all stored passwords. SRG-OS-000073-GPOS-00041
The system must use a strong hashing algorithm to store the password.

Passwords need to be protected at all times, and encryption is the standard method for protecting passwords. If passwords are not encrypted, they can be plainly read (i.e., clear text) and easily compromised.

Satisfies: SRG-OS-000073-GPOS-00041, SRG-OS-000120-GPOS-00061
Verify that OL 9 interactive user account passwords are using a strong password hash with the following command:

$ sudo cut -d: -f2 /etc/shadow
$6$kcOnRq/5$NUEYPuyL.wghQwWssXRcLRFiiru7f5JPV6GaJhNC2aK5F3PZpE/BCCtwrxRc/AInKMNX3CdMw11m9STiql12f/ 

Password hashes "!" or "*" indicate inactive accounts not available for logon and are not evaluated.

If any interactive user password hash does not begin with "$6", this is a finding.
Lock all interactive user accounts not using SHA-512 hashing until the passwords can be regenerated with SHA-512.

To lock an account:

$ sudo passwd -l [username]
OL09-00-001080 SV-271628r1091596_rule
V-271629 CCI-004066 medium OL 9 passwords for new users or password changes must have a 24-hour minimum password lifetime restriction in /etc/login.defs. SRG-OS-000075-GPOS-00043
Enforcing a minimum password lifetime helps to prevent repeated password changes to defeat the password reuse or history enforcement requirement. If users are allowed to immediately and continually change their password, then the password could be repeatedly changed in a short period of time to defeat the organization's policy regarding password reuse.

Setting the minimum password age protects against users cycling back to a favorite password after satisfying the password reuse requirement.
Verify that OL 9 enforces a 24-hour minimum password lifetime for new user accounts.

Check for the value of "PASS_MIN_DAYS" in "/etc/login.defs" with the following command: 

$ grep -i pass_min_days /etc/login.defs
PASS_MIN_DAYS 1

If the "PASS_MIN_DAYS" parameter value is not "1" or greater, or is commented out, this is a finding.
Configure OL 9 to enforce 24 hours as the minimum password lifetime.

Add the following line in "/etc/login.defs" (or modify the line to have the required value):

PASS_MIN_DAYS 1
OL09-00-001085 SV-271629r1091599_rule
V-271630 CCI-004066 medium OL 9 passwords must have a 24-hour minimum password lifetime restriction in /etc/shadow. SRG-OS-000075-GPOS-00043
Enforcing a minimum password lifetime helps to prevent repeated password changes to defeat the password reuse or history enforcement requirement. If users are allowed to immediately and continually change their password, the password could be repeatedly changed in a short period of time to defeat the organization's policy regarding password reuse.
Verify that OL 9 has configured the minimum time period between password changes for each user account as 24 hours or greater with the following command:

$ sudo awk -F: '$4 < 1 {print $1 " " $4}' /etc/shadow

If any results are returned that are not associated with a system account, this is a finding.
Configure noncompliant accounts to enforce a 24-hour minimum password lifetime:

$ sudo passwd -n 1 [user]
OL09-00-001090 SV-271630r1091602_rule
V-271631 CCI-004066 medium OL 9 user account passwords for new users or password changes must have a 60-day maximum password lifetime restriction in /etc/login.defs. SRG-OS-000076-GPOS-00044
Any password, no matter how complex, can eventually be cracked; therefore, passwords need to be changed periodically. If the operating system does not limit the lifetime of passwords and force users to change their passwords, there is the risk that the operating system passwords could be compromised.

Setting the password maximum age ensures users are required to periodically change their passwords. Requiring shorter password lifetimes increases the risk of users writing down the password in a convenient location subject to physical compromise.
Verify that OL 9 enforces a 60-day maximum password lifetime for new user accounts by running the following command:

$ grep -i pass_max_days /etc/login.defs
PASS_MAX_DAYS 60

If the "PASS_MAX_DAYS" parameter value is greater than "60", or commented out, this is a finding.
Configure OL 9 to enforce a 60-day maximum password lifetime.

Add or modify the following line in the "/etc/login.defs" file:

PASS_MAX_DAYS 60
OL09-00-001095 SV-271631r1091605_rule
V-271632 CCI-004066 medium OL 9 user account passwords must have a 60-day maximum password lifetime restriction. SRG-OS-000076-GPOS-00044
Any password, no matter how complex, can eventually be cracked; therefore, passwords need to be changed periodically. If OL 9 does not limit the lifetime of passwords and force users to change their passwords, there is the risk that OL 9 passwords could be compromised.
Verify that OL 9 user account passwords have a 60-day maximum password lifetime restriction with the following commands:

$ sudo awk -F: '$5 > 60 {print $1 "" "" $5}' /etc/shadow

$ sudo awk -F: '$5 <= 0 {print $1 "" "" $5}' /etc/shadow

If any results are returned that are not associated with a system account, this is a finding.
Configure noncompliant accounts to enforce a 60-day maximum password lifetime restriction.

passwd -x 60 [user]
OL09-00-001100 SV-271632r1091608_rule
V-271633 CCI-004066 medium OL 9 passwords must be created with a minimum of 15 characters. SRG-OS-000078-GPOS-00046
The shorter the password, the lower the number of possible combinations that need to be tested before the password is compromised.

Password complexity, or strength, is a measure of the effectiveness of a password in resisting attempts at guessing and brute-force attacks. Password length is one factor of several that helps to determine strength and how long it takes to crack a password. Use of more characters in a password helps to increase exponentially the time and/or resources required to compromise the password.

OL 9 uses "pwquality" as a mechanism to enforce password complexity. Configurations are set in the "etc/security/pwquality.conf" file.

The "minlen", sometimes noted as minimum length, acts as a "score" of complexity based on the credit components of the "pwquality" module. By setting the credit components to a negative value, not only will those components be required, but they will not count toward the total "score" of "minlen". This will enable "minlen" to require a 15-character minimum.

The DOD minimum password requirement is 15 characters.
Verify that OL 9 enforces a minimum 15-character password length with the following command:

$ grep minlen /etc/security/pwquality.conf /etc/security/pwquality.conf.d/*.conf 
minlen = 15

If the command does not return a "minlen" value of "15" or greater, does not return a line, or the line is commented out, this is a finding.
Configure OL 9 to enforce a minimum 15-character password length.

Add the following line to "/etc/security/pwquality.conf" (or modify the line to have the required value):

minlen = 15
OL09-00-001105 SV-271633r1091611_rule
V-271634 CCI-000366 high OL 9 must not allow blank or null passwords. SRG-OS-000480-GPOS-00227
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.
Verify that OL 9 does not allow null passwords with the following command:

$ grep -i nullok /etc/pam.d/system-auth /etc/pam.d/password-auth

If output is produced, this is a finding.
Remove any instances of the "nullok" option in the "/etc/pam.d/password-auth" and "/etc/pam.d/system-auth" files to prevent logons with empty passwords.

Note: Manual changes to the listed file may be overwritten by the "authselect" program.
OL09-00-001110 SV-271634r1091614_rule
V-271635 CCI-000213 medium OL 9 must require a boot loader superuser password. SRG-OS-000080-GPOS-00048
To mitigate the risk of unauthorized access to sensitive information by entities that have been issued certificates by DOD-approved PKIs, all DOD systems (e.g., web servers and web portals) must be properly configured to incorporate access control methods that do not rely solely on the possession of a certificate for access. Successful authentication must not automatically give an entity access to an asset or security boundary. Authorization procedures and controls must be implemented to ensure each authenticated entity also has a validated and current authorization. Authorization is the process of determining whether an entity, once authenticated, is permitted to access a specific asset. Information systems use access control policies and enforcement mechanisms to implement this requirement.

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.
Verify that OL 9 requires a boot loader superuser password with the following command:

$ sudo grep "superusers" /etc/grub2.cfg 
password_pbkdf2  superusers-account   ${GRUB2_PASSWORD}  

To verify the boot loader superuser account password has been set, and the password encrypted, run the following command:

$ sudo cat /boot/grub2/user.cfg 
GRUB2_PASSWORD=grub.pbkdf2.sha512.10000.C4E08AC72FBFF7E837FD267BFAD7AEB3D42DDC
2C99F2A94DD5E2E75C2DC331B719FE55D9411745F82D1B6CFD9E927D61925F9BBDD1CFAA0080E0
916F7AB46E0D.1302284FCCC52CD73BA3671C6C12C26FF50BA873293B24EE2A96EE3B57963E6D7
0C83964B473EC8F93B07FE749AA6710269E904A9B08A6BBACB00A2D242AD828 

If a "GRUB2_PASSWORD" is not set, this is a finding.
Configure OL 9 to require a grub bootloader password for the grub superuser account.

Generate an encrypted grub2 password for the grub superuser account with the following command:

$ sudo grub2-setpassword
Enter password:
Confirm password:
OL09-00-001115 SV-271635r1091617_rule
V-271636 CCI-004066 medium OL 9 must enforce password complexity by requiring that at least one special character be used. SRG-OS-000266-GPOS-00101
Use of a complex password helps to increase the time and resources required to compromise the password. Password complexity, or strength, is a measure of the effectiveness of a password in resisting attempts at guessing and brute-force attacks. Password complexity is one factor of several that determines how long it takes to crack a password. The more complex the password, the greater the number of possible combinations that need to be tested before the password is compromised. OL 9 uses "pwquality" as a mechanism to enforce password complexity. Note that to require special characters without degrading the "minlen" value, the credit value must be expressed as a negative number in "/etc/security/pwquality.conf".
Verify that OL 9 enforces password complexity by requiring at least one special character with the following command:

$ sudo grep ocredit /etc/security/pwquality.conf /etc/security/pwquality.conf.d/*.conf 
ocredit = -1 

If the value of "ocredit" is a positive number or is commented out, this is a finding.
Configure OL 9 to enforce password complexity by requiring at least one special character be used by setting the "ocredit" option.

Add the following line to "/etc/security/pwquality.conf" (or modify the line to have the required value):

ocredit = -1
OL09-00-001120 SV-271636r1091620_rule
V-271637 CCI-000366 medium OL 9 must prevent the use of dictionary words for passwords. SRG-OS-000480-GPOS-00225
Use of a complex password helps to increase the time and resources required to compromise the password. Password complexity, or strength, is a measure of the effectiveness of a password in resisting attempts at guessing and brute-force attacks. If OL 9 allows the user to select passwords based on dictionary words, this increases the chances of password compromise by increasing the opportunity for successful guesses, and brute-force attacks.
Verify that OL 9 prevents the use of dictionary words for passwords with the following command:

$ grep dictcheck /etc/security/pwquality.conf /etc/pwquality.conf.d/*.conf 
/etc/security/pwquality.conf:dictcheck=1 

If "dictcheck" does not have a value other than "0", or is commented out, this is a finding.
Configure OL 9 to prevent the use of dictionary words for passwords.

Add or update the following line in the "/etc/security/pwquality.conf" file or a configuration file in the /etc/pwquality.conf.d/ directory to contain the "dictcheck" parameter:

dictcheck=1
OL09-00-001125 SV-271637r1091623_rule
V-271638 CCI-000366 medium OL 9 must not have accounts configured with blank or null passwords. SRG-OS-000480-GPOS-00227
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.
Verify that OL 9 does not have accounts configured with blank or null passwords with the following command:

$ sudo awk -F: '!$2 {print $1}' /etc/shadow

If the command returns any results, this is a finding.
Configure OL 9 so that all accounts have a password or lock the account with the following commands:

Perform a password reset:

$ sudo passwd [username] 

To lock an account:

$ sudo passwd -l [username]
OL09-00-001130 SV-271638r1091626_rule
V-271639 CCI-000778 medium OL 9 file system automount function must be disabled unless required. SRG-OS-000114-GPOS-00059
An authentication process resists replay attacks if it is impractical to achieve a successful authentication by recording and replaying a previous authentication message.

Satisfies: SRG-OS-000114-GPOS-00059, SRG-OS-000378-GPOS-00163
Verify that OL 9 file system automount function has been disabled and masked with the following command:

$ systemctl is-enabled  autofs
masked

If the returned value is not "masked" and is not documented as operational requirement with the information system security officer (ISSO), this is a finding.
Configure OL 9 to disable and mask the ability to automount devices.

The autofs service can be disabled and masked with the following command:

$ sudo systemctl mask --now autofs.service
OL09-00-002000 SV-271639r1091629_rule
V-271640 CCI-000366 medium OL 9 must be configured so that the Network File System (NFS) is configured to use RPCSEC_GSS. SRG-OS-000480-GPOS-00227
When an NFS server is configured to use RPCSEC_SYS, a selected userid and groupid are used to handle requests from the remote user. The userid and groupid could mistakenly or maliciously be set incorrectly. The RPCSEC_GSS method of authentication uses certificates on the server and client systems to authenticate the remote mount request more securely.
If no NFS mounts are configured, this requirement is Not Applicable.

Verify that OL 9 has the "sec" option configured for all NFS mounts with the following command:

$ cat /etc/fstab | grep nfs
192.168.22.2:/mnt/export /data nfs4 rw,nosuid,nodev,noexec,sync,soft,sec=krb5p:krb5i:krb5

If the system is mounting file systems via NFS and has the sec option without the "krb5:krb5i:krb5p" settings, the "sec" option has the "sys" setting, or the "sec" option is missing, this is a finding.
Update the "/etc/fstab" file so the option "sec" is defined for each NFS mounted file system and the "sec" option does not have the "sys" setting. 

Ensure the "sec" option is defined as "krb5p:krb5i:krb5".
OL09-00-002010 SV-271640r1091632_rule
V-271641 CCI-000366 medium OL 9 must prevent special devices on file systems that are imported via Network File System (NFS). SRG-OS-000480-GPOS-00227
The "nodev" mount option causes the system to not interpret character or block special devices. Executing character or block special devices from untrusted file systems increases the opportunity for nonprivileged users to attain unauthorized administrative access.
If no NFS mounts are configured, this requirement is Not Applicable.

Verify that OL 9 has the "nodev" option configured for all NFS mounts with the following command:

$ cat /etc/fstab | grep nfs
192.168.22.2:/mnt/export /data nfs4 rw,nosuid,nodev,noexec,sync,soft,sec=krb5:krb5i:krb5p

If the system is mounting file systems via NFS and the "nodev" option is missing, this is a finding.
Update each NFS mounted file system to use the "nodev" option on file systems that are being imported via NFS.
OL09-00-002011 SV-271641r1091635_rule
V-271642 CCI-000366 medium OL 9 must prevent code from being executed on file systems that are imported via Network File System (NFS). SRG-OS-000480-GPOS-00227
The "noexec" mount option causes the system not to execute binary files. This option must be used for mounting any file system not containing approved binary as they may be incompatible. Executing files from untrusted file systems increases the opportunity for nonprivileged users to attain unauthorized administrative access.
If no NFS mounts are configured, this requirement is Not Applicable.

Verify that OL 9 has the "noexec" option configured for all NFS mounts with the following command:

$ cat /etc/fstab | grep nfs
192.168.22.2:/mnt/export /data nfs4 rw,nosuid,nodev,noexec,sync,soft,sec=krb5:krb5i:krb5p

If the system is mounting file systems via NFS and the "noexec" option is missing, this is a finding.
Update each NFS mounted file system to use the "noexec" option on file systems that are being imported via NFS.
OL09-00-002012 SV-271642r1092593_rule
V-271643 CCI-000366 medium OL 9 must prevent files with the setuid and setgid bit set from being executed on file systems that are imported via Network File System (NFS). SRG-OS-000480-GPOS-00227
The "nosuid" mount option causes the system not to execute "setuid" and "setgid" files with owner privileges. This option must be used for mounting any file system not containing approved "setuid" and "setguid" files. Executing files from untrusted file systems increases the opportunity for nonprivileged users to attain unauthorized administrative access.
If no NFS mounts are configured, this requirement is Not Applicable.

Verify that OL 9 has the "nosuid" option configured for all NFS mounts with the following command:

$ cat /etc/fstab | grep nfs
192.168.22.2:/mnt/export /data nfs4 rw,nosuid,nodev,noexec,sync,soft,sec=krb5:krb5i:krb5p

If the system is mounting file systems via NFS and the "nosuid" option is missing, this is a finding.
Update each NFS mounted file system to use the "nosuid" option on file systems that are being imported via NFS.
OL09-00-002013 SV-271643r1091641_rule
V-271644 CCI-000366 medium OL 9 must prevent code from being executed on file systems that are used with removable media. SRG-OS-000480-GPOS-00227
The "noexec" mount option causes the system not to execute binary files. This option must be used for mounting any file system not containing approved binary files, as they may be incompatible. Executing files from untrusted file systems increases the opportunity for nonprivileged users to attain unauthorized administrative access.
Verify that OL 9 file systems that are used for removable media are mounted with the "noexec" option with the following command:

$ more /etc/fstab
UUID=2bc871e4-e2a3-4f29-9ece-3be60c835222 /mnt/usbflash vfat noauto,owner,ro,nosuid,nodev,noexec 0 0

If a file system found in "/etc/fstab" refers to removable media and it does not have the "noexec" option set, this is a finding.
Configure the "/etc/fstab" to use the "noexec" option on file systems that are associated with removable media.
OL09-00-002020 SV-271644r1091644_rule
V-271645 CCI-000366 medium OL 9 must prevent special devices on file systems that are used with removable media. SRG-OS-000480-GPOS-00227
The "nodev" mount option causes the system not to interpret character or block special devices. Executing character or blocking special devices from untrusted file systems increases the opportunity for nonprivileged users to attain unauthorized administrative access.
Verify that OL 9 file systems that are used for removable media are mounted with the "nodev" option with the following command:

$ more /etc/fstab
UUID=2bc871e4-e2a3-4f29-9ece-3be60c835222 /mnt/usbflash vfat noauto,owner,ro,nosuid,nodev,noexec 0 0

If a file system found in "/etc/fstab" refers to removable media and it does not have the "nodev" option set, this is a finding.
Configure the "/etc/fstab" to use the "nodev" option on file systems that are associated with removable media.
OL09-00-002021 SV-271645r1091647_rule
V-271646 CCI-000366 medium OL 9 must prevent files with the setuid and setgid bit set from being executed on file systems that are used with removable media. SRG-OS-000480-GPOS-00227
The "nosuid" mount option causes the system not to execute "setuid" and "setgid" files with owner privileges. This option must be used for mounting any file system not containing approved "setuid" and "setguid" files. Executing files from untrusted file systems increases the opportunity for nonprivileged users to attain unauthorized administrative access.
Verify that OL 9 file systems that are used for removable media are mounted with the "nosuid" option with the following command:

$ more /etc/fstab
UUID=2bc871e4-e2a3-4f29-9ece-3be60c835222 /mnt/usbflash vfat noauto,owner,ro,nosuid,nodev,noexec 0 0

If a file system found in "/etc/fstab" refers to removable media and it does not have the "nosuid" option set, this is a finding.
Configure the "/etc/fstab" to use the "nosuid" option on file systems that are associated with removable media.
OL09-00-002022 SV-271646r1091650_rule
V-271647 CCI-001764 medium OL 9 must mount /boot with the nodev option. SRG-OS-000368-GPOS-00154
The only legitimate location for device files is the "/dev" directory located on the root partition. The only exception to this is chroot jails.
Verify that OL 9 is configured to mount /boot with the nodev option.

Verify that the "/boot" mount point has the "nodev" option is with the following command:

$ mount | grep '\s/boot\s'
/dev/sda1 on /boot type xfs (rw,nodev,relatime,seclabel,attr2)

If the "/boot" file system does not have the "nodev" option set, this is a finding.
Configure OL 9 to mount /boot with the nodev option.

Modify "/etc/fstab" to use the "nodev" option on the "/boot" directory.
OL09-00-002030 SV-271647r1091653_rule
V-271648 CCI-001764 medium OL 9 must prevent files with the setuid and setgid bit set from being executed on the /boot directory. SRG-OS-000368-GPOS-00154
The "nosuid" mount option causes the system not to execute "setuid" and "setgid" files with owner privileges. This option must be used for mounting any file system not containing approved "setuid" and "setguid" files. Executing files from untrusted file systems increases the opportunity for nonprivileged users to attain unauthorized administrative access.
Verify that OL 9 is configured to mount /boot with the nosuid option.

Verify that the /boot directory is mounted with the "nosuid" option with the following command:

$ mount | grep '\s/boot\s'
/dev/sda1 on /boot type xfs (rw,nosuid,relatime,seclabe,attr2,inode64,noquota)

If the /boot file system does not have the "nosuid" option set, this is a finding.
Configure OL 9 to prevent files with the setuid and setgid bit set from being executed on the /boot directory.

Modify "/etc/fstab" to use the "nosuid" option on the "/boot" directory.
OL09-00-002031 SV-271648r1091656_rule
V-271649 CCI-001764 medium OL 9 must prevent files with the setuid and setgid bit set from being executed on the /boot/efi directory. SRG-OS-000368-GPOS-00154
The "nosuid" mount option causes the system not to execute "setuid" and "setgid" files with owner privileges. This option must be used for mounting any file system not containing approved "setuid" and "setguid" files. Executing files from untrusted file systems increases the opportunity for nonprivileged users to attain unauthorized administrative access.
For systems that use BIOS, this requirement is Not Applicable.

Verify that OL 9 /boot/efi directory is mounted with the "nosuid" option with the following command:

$ mount | grep '\s/boot/efi\s'
/dev/sda1 on /boot/efi type vfat (rw,nosuid,relatime,fmask=0077,dmask=0077,codepage=437,iocharset=ascii,shortname=winnt,errors=remount-ro)

If the /boot/efi file system does not have the "nosuid" option set, this is a finding.
Configure OL 9 to prevent files with the setuid and setgid bit set from being executed on the /boot/efi directory.

Modify "/etc/fstab" to use the "nosuid" option on the "/boot/efi" directory.
OL09-00-002032 SV-271649r1091659_rule
V-271650 CCI-001764 medium OL 9 must mount /dev/shm with the nodev option. SRG-OS-000368-GPOS-00154
The nodev mount option causes the system to not interpret character or block special devices. Executing character or block special devices from untrusted file systems increases the opportunity for nonprivileged users to attain unauthorized administrative access.

The only legitimate location for device files is the "/dev" directory located on the root partition, with the exception of chroot jails if implemented.
Verify that OL 9 is configured to mount /dev/shm with the nodev option.

Verify "/dev/shm" is mounted with the "nodev" option with the following command:

$ mount | grep /dev/shm
tmpfs on /dev/shm type tmpfs (rw,nodev,nosuid,noexec,seclabel)

If the /dev/shm file system is mounted without the "nodev" option, this is a finding.
Configure OL 9 to mount /dev/shm with the nodev option.

Modify "/etc/fstab" to use the "nodev" option on the "/dev/shm" file system.
OL09-00-002040 SV-271650r1091662_rule
V-271651 CCI-001764 medium OL 9 must mount /dev/shm with the noexec option. SRG-OS-000368-GPOS-00154
The noexec mount option causes the system to not execute binary files. This option must be used for mounting any file system not containing approved binary files, as they may be incompatible. Executing files from untrusted file systems increases the opportunity for nonprivileged users to attain unauthorized administrative access.
Verify that OL 9 is configured to mount /dev/shm with the noexec option.

Verify "/dev/shm" is mounted with the "noexec" option with the following command:

$ mount | grep /dev/shm
tmpfs on /dev/shm type tmpfs (rw,nodev,nosuid,noexec,seclabel)

If the /dev/shm file system is mounted without the "noexec" option, this is a finding.
Configure OL 9 to mount /dev/shm with the noexec option.

Modify "/etc/fstab" to use the "noexec" option on the "/dev/shm" file system.
OL09-00-002041 SV-271651r1091665_rule
V-271652 CCI-001764 medium OL 9 must mount /dev/shm with the nosuid option. SRG-OS-000368-GPOS-00154
The "nosuid" mount option causes the system to not execute "setuid" and "setgid" files with owner privileges. This option must be used for mounting any file system not containing approved "setuid" and "setguid" files. Executing files from untrusted file systems increases the opportunity for nonprivileged users to attain unauthorized administrative access.
Verify that OL 9 is configured to mount /dev/shm with the nosuid option.

Verify "/dev/shm" is mounted with the "nosuid" option with the following command:

$ mount | grep /dev/shm
tmpfs on /dev/shm type tmpfs (rw,nodev,nosuid,noexec,seclabel)

If the /dev/shm file system is mounted without the "nosuid" option, this is a finding.
Configure OL 9 to mount /dev/shm with the nosuid option.

Modify "/etc/fstab" to use the "nosuid" option on the "/dev/shm" file system.
OL09-00-002042 SV-271652r1094966_rule
V-271653 CCI-001764 medium OL 9 must mount /tmp with the nodev option. SRG-OS-000368-GPOS-00154
The "nodev" mount option causes the system to not interpret character or block special devices. Executing character or block special devices from untrusted file systems increases the opportunity for nonprivileged users to attain unauthorized administrative access.

The only legitimate location for device files is the "/dev" directory located on the root partition, with the exception of chroot jails if implemented.
Verify that OL 9 is configured to mount /tmp with the nodev option.

Verify "/tmp" is mounted with the "nodev" option:

$ mount | grep /tmp
/dev/mapper/ol-tmp on /tmp type xfs (rw,nodev,nosuid,noexec,seclabel)

If the "/tmp" file system is mounted without the "nodev" option, this is a finding.
Configure OL 9 to mount /tmp with the nodev option.

Modify "/etc/fstab" to use the "nodev" option on the "/tmp" directory.
OL09-00-002050 SV-271653r1091671_rule
V-271654 CCI-001764 medium OL 9 must mount /tmp with the noexec option. SRG-OS-000368-GPOS-00154
The "noexec" mount option causes the system to not execute binary files. This option must be used for mounting any file system not containing approved binary files, as they may be incompatible. Executing files from untrusted file systems increases the opportunity for nonprivileged users to attain unauthorized administrative access.
Verify that OL 9 is configured to mount /tmp with the noexec option.

Verify "/tmp" is mounted with the "noexec" option:

$ mount | grep /tmp
/dev/mapper/ol-tmp on /tmp type xfs (rw,nodev,nosuid,noexec,seclabel)

If the "/tmp" file system is mounted without the "noexec" option, this is a finding.
Configure OL 9 to mount /tmp with the noexec option.

Modify "/etc/fstab" to use the "noexec" option on the "/tmp" directory.
OL09-00-002051 SV-271654r1091674_rule
V-271655 CCI-001764 medium OL 9 must mount /tmp with the nosuid option. SRG-OS-000368-GPOS-00154
The "nosuid" mount option causes the system to not execute "setuid" and "setgid" files with owner privileges. This option must be used for mounting any file system not containing approved "setuid" and "setguid" files. Executing files from untrusted file systems increases the opportunity for nonprivileged users to attain unauthorized administrative access.
Verify that OL 9 is configured to mount /tmp with the nosuid option.

Verify "/tmp" is mounted with the "nosuid" option:

$ mount | grep /tmp
/dev/mapper/ol-tmp on /tmp type xfs (rw,nodev,nosuid,noexec,seclabel)

If the "/tmp" file system is mounted without the "nosuid" option, this is a finding.
Configure OL 9 to mount /tmp with the nosuid option.

Modify "/etc/fstab" to use the "nosuid" option on the "/tmp" directory.
OL09-00-002052 SV-271655r1091677_rule
V-271656 CCI-001764 medium OL 9 must mount /var with the nodev option. SRG-OS-000368-GPOS-00154
The "nodev" mount option causes the system to not interpret character or block special devices. Executing character or block special devices from untrusted file systems increases the opportunity for nonprivileged users to attain unauthorized administrative access.

The only legitimate location for device files is the "/dev" directory located on the root partition, with the exception of chroot jails if implemented.
Verify that OL 9 is configured to mount /var with the nodev option.

Verify "/var" is mounted with the "nodev" option:

$ mount | grep /var
/dev/mapper/ol-var on /var type xfs (rw,nodev,nosuid,noexec,seclabel)

If the "/var" file system is mounted without the "nodev" option, this is a finding.
Configure OL 9 to mount /var with the nodev option.

Modify "/etc/fstab" to use the "nodev" option on the "/var" directory.
OL09-00-002060 SV-271656r1091680_rule
V-271657 CCI-001764 medium OL 9 must mount /var/log with the nodev option. SRG-OS-000368-GPOS-00154
The "nodev" mount option causes the system to not interpret character or block special devices. Executing character or block special devices from untrusted file systems increases the opportunity for nonprivileged users to attain unauthorized administrative access.

The only legitimate location for device files is the "/dev" directory located on the root partition, with the exception of chroot jails if implemented.
Verify that OL 9 is configured to mount /var/log with the nodev option.

Verify "/var/log" is mounted with the "nodev" option:

$ mount | grep /var/log
/dev/mapper/ol-var-log on /var/log type xfs (rw,nodev,nosuid,noexec,seclabel)

If the "/var/log" file system is mounted without the "nodev" option, this is a finding.
Configure OL 9 to mount /var/log with the nodev option.

Modify "/etc/fstab" to use the "nodev" option on the "/var/log" directory.
OL09-00-002061 SV-271657r1091683_rule
V-271658 CCI-001764 medium OL 9 must mount /var/log with the noexec option. SRG-OS-000368-GPOS-00154
The "noexec" mount option causes the system to not execute binary files. This option must be used for mounting any file system not containing approved binary files, as they may be incompatible. Executing files from untrusted file systems increases the opportunity for nonprivileged users to attain unauthorized administrative access.
Verify that OL 9 is configured to mount /var/log with the noexec option.

Verify "/var/log" is mounted with the "noexec" option:

$ mount | grep /var/log
/dev/mapper/ol-var-log on /var/log type xfs (rw,nodev,nosuid,noexec,seclabel)

If the "/var/log" file system is mounted without the "noexec" option, this is a finding.
Configure OL 9 to mount /var/log with the noexec option.

Modify "/etc/fstab" to use the "noexec" option on the "/var/log" directory.
OL09-00-002062 SV-271658r1091686_rule
V-271659 CCI-001764 medium OL 9 must mount /var/log with the nosuid option. SRG-OS-000368-GPOS-00154
The "nosuid" mount option causes the system to not execute "setuid" and "setgid" files with owner privileges. This option must be used for mounting any file system not containing approved "setuid" and "setguid" files. Executing files from untrusted file systems increases the opportunity for nonprivileged users to attain unauthorized administrative access.
Verify that OL 9 is configured to mount /var/log with the nosuid option.

Verify "/var/log" is mounted with the "nosuid" option:

$ mount | grep /var/log
/dev/mapper/ol-var-log on /var/log type xfs (rw,nodev,nosuid,noexec,seclabel)

If the "/var/log" file system is mounted without the "nosuid" option, this is a finding.
Configure OL 9 to mount /var/log with the nosuid option.

Modify "/etc/fstab" to use the "nosuid" option on the "/var/log" directory.
OL09-00-002063 SV-271659r1091689_rule
V-271660 CCI-001764 medium OL 9 must mount /var/log/audit with the nodev option. SRG-OS-000368-GPOS-00154
The "nodev" mount option causes the system to not interpret character or block special devices. Executing character or block special devices from untrusted file systems increases the opportunity for nonprivileged users to attain unauthorized administrative access.

The only legitimate location for device files is the "/dev" directory located on the root partition, with the exception of chroot jails if implemented.
Verify that OL 9 is configured to mount /var/log/audit with the nodev option.

Verify "/var/log/audit" is mounted with the "nodev" option:

$ mount | grep /var/log/audit
/dev/mapper/ol-var-log-audit on /var/log/audit type xfs (rw,nodev,nosuid,noexec,seclabel)

If the "/var/log/audit" file system is mounted without the "nodev" option, this is a finding.
Configure OL 9 to mount /var/log/audit with the nodev option.

Modify "/etc/fstab" to use the "nodev" option on the "/var/log/audit" directory.
OL09-00-002064 SV-271660r1091692_rule
V-271661 CCI-001764 medium OL 9 must mount /var/log/audit with the noexec option. SRG-OS-000368-GPOS-00154
The "noexec" mount option causes the system to not execute binary files. This option must be used for mounting any file system not containing approved binary files, as they may be incompatible. Executing files from untrusted file systems increases the opportunity for nonprivileged users to attain unauthorized administrative access.
Verify that OL 9 is configured to mount /var/log/audit with the noexec option.

Verify "/var/log/audit" is mounted with the "noexec" option:

$ mount | grep /var/log/audit
/dev/mapper/ol-var-log-audit on /var/log/audit type xfs (rw,nodev,nosuid,noexec,seclabel)

If the "/var/log/audit" file system is mounted without the "noexec" option, this is a finding.
Configure OL 9 to mount /var/log/audit with the noexec option.

Modify "/etc/fstab" to use the "noexec" option on the "/var/log/audit" directory.
OL09-00-002065 SV-271661r1091695_rule
V-271662 CCI-001764 medium OL 9 must mount /var/log/audit with the nosuid option. SRG-OS-000368-GPOS-00154
The "nosuid" mount option causes the system to not execute "setuid" and "setgid" files with owner privileges. This option must be used for mounting any file system not containing approved "setuid" and "setguid" files. Executing files from untrusted file systems increases the opportunity for nonprivileged users to attain unauthorized administrative access.
Verify that OL 9 is configured to mount /var/log/audit with the nosuid option.

Verify "/var/log/audit" is mounted with the "nosuid" option:

$ mount | grep /var/log/audit
/dev/mapper/ol-var-log-audit on /var/log/audit type xfs (rw,nodev,nosuid,noexec,seclabel)

If the "/var/log/audit" file system is mounted without the "nosuid" option, this is a finding.
Configure OL 9 to mount /var/log/audit with the nosuid option.

Modify "/etc/fstab" to use the "nosuid" option on the "/var/log/audit" directory.
OL09-00-002066 SV-271662r1091698_rule
V-271663 CCI-001764 medium OL 9 must mount /var/tmp with the nodev option. SRG-OS-000368-GPOS-00154
The "nodev" mount option causes the system to not interpret character or block special devices. Executing character or block special devices from untrusted file systems increases the opportunity for nonprivileged users to attain unauthorized administrative access.

The only legitimate location for device files is the "/dev" directory located on the root partition, with the exception of chroot jails if implemented.
Verify that OL 9 is configured to mount /var/tmp with the nodev option.

Verify "/var/tmp" is mounted with the "nodev" option:

$ mount | grep /var/tmp
/dev/mapper/ol-var-tmp on /var/tmp type xfs (rw,nodev,nosuid,noexec,seclabel)

If the "/var/tmp" file system is mounted without the "nodev" option, this is a finding.
Configure OL 9 to mount /var/tmp with the nodev option.

Modify "/etc/fstab" to use the "nodev" option on the "/var/tmp" directory.
OL09-00-002067 SV-271663r1091701_rule
V-271664 CCI-001764 medium OL 9 must mount /var/tmp with the noexec option. SRG-OS-000368-GPOS-00154
The "noexec" mount option causes the system to not execute binary files. This option must be used for mounting any file system not containing approved binary files, as they may be incompatible. Executing files from untrusted file systems increases the opportunity for nonprivileged users to attain unauthorized administrative access.
Verify that OL 9 is configured to mount /var/tmp with the noexec option.

Verify "/var/tmp" is mounted with the "noexec" option:

$ mount | grep /var/tmp
/dev/mapper/ol-var-tmp on /var/tmp type xfs (rw,nodev,nosuid,noexec,seclabel)

If the "/var/tmp" file system is mounted without the "noexec" option, this is a finding.
Configure OL 9 to mount /var/tmp with the noexec option.

Modify "/etc/fstab" to use the "noexec" option on the "/var/tmp" directory.
OL09-00-002068 SV-271664r1091704_rule
V-271665 CCI-001764 medium OL 9 must mount /var/tmp with the nosuid option. SRG-OS-000368-GPOS-00154
The "nosuid" mount option causes the system to not execute "setuid" and "setgid" files with owner privileges. This option must be used for mounting any file system not containing approved "setuid" and "setguid" files. Executing files from untrusted file systems increases the opportunity for nonprivileged users to attain unauthorized administrative access.
Verify that OL 9 is configured to mount /var/tmp with the nosuid option.

Verify "/var/tmp" is mounted with the "nosuid" option:

$ mount | grep /var/tmp
/dev/mapper/ol-var-tmp on /var/tmp type xfs (rw,nodev,nosuid,noexec,seclabel)

If the "/var/tmp" file system is mounted without the "nosuid" option, this is a finding.
Configure OL 9 to mount /var/tmp with the nosuid option.

Modify "/etc/fstab" to use the "nosuid" option on the "/var/tmp" directory.
OL09-00-002069 SV-271665r1091707_rule
V-271666 CCI-001764 medium OL 9 must prevent device files from being interpreted on file systems that contain user home directories. SRG-OS-000368-GPOS-00154
The "nodev" mount option causes the system to not interpret character or block special devices. Executing character or block special devices from untrusted file systems increases the opportunity for nonprivileged users to attain unauthorized administrative access.

The only legitimate location for device files is the "/dev" directory located on the root partition, with the exception of chroot jails if implemented.
Verify that OL 9 is configured to mount /home with the nodev option.

Verify "/home" is mounted with the "nodev" option with the following command:

Note: If a separate file system has not been created for the user home directories (user home directories are mounted under "/"), this is automatically a finding, as the "nodev" option cannot be used on the "/" system.

$ mount | grep /home
tmpfs on /home type tmpfs (rw,nodev,nosuid,noexec,seclabel)

If the "/home" file system is mounted without the "nodev" option, this is a finding.
Configure OL 9 to prevent device files from being interpreted on file systems that contain user home directories.

Modify "/etc/fstab" to use the "nodev" option on the "/home" directory.
OL09-00-002070 SV-271666r1091710_rule
V-271667 CCI-001764 medium OL 9 must prevent files with the setuid and setgid bit set from being executed on file systems that contain user home directories. SRG-OS-000368-GPOS-00154
The "nosuid" mount option causes the system to not execute "setuid" and "setgid" files with owner privileges. This option must be used for mounting any file system not containing approved "setuid" and "setguid" files. Executing files from untrusted file systems increases the opportunity for nonprivileged users to attain unauthorized administrative access.
Verify that OL 9 is configured to mount /home with the nosuid option.

Verify "/home" is mounted with the "nosuid" option with the following command:

Note: If a separate file system has not been created for the user home directories (user home directories are mounted under "/"), this is automatically a finding, as the "nosuid" option cannot be used on the "/" system.

$ mount | grep /home
tmpfs on /home type tmpfs (rw,nodev,nosuid,noexec,seclabel)

If the "/home" file system is mounted without the "nosuid" option, this is a finding.
Configure OL 9 to prevent files with the setuid and setgid bit set from being executed on file systems that contain user home directories.

Modify "/etc/fstab" to use the "nosuid" option on the "/home" directory.
OL09-00-002071 SV-271667r1091713_rule
V-271668 CCI-000366 medium OL 9 must prevent code from being executed on file systems that contain user home directories. SRG-OS-000480-GPOS-00227
The noexec mount option causes the system to not execute binary files. This option must be used for mounting any file system not containing approved binary files, as they may be incompatible. Executing files from untrusted file systems increases the opportunity for nonprivileged users to attain unauthorized administrative access.
Verify that OL 9 is configured to mount /home with the nodexec option.

Verify "/home" is mounted with the "noexec" option with the following command:

Note: If a separate file system has not been created for the user home directories (user home directories are mounted under "/"), this is automatically a finding, as the "noexec" option cannot be used on the "/" system.

$ mount | grep /home
tmpfs on /home type xfs (rw,nodev,nosuid,noexec,seclabel)

If the "/home" file system is mounted without the "noexec" option, this is a finding.
Configure OL 9 to prevent code from being executed on file systems that contain user home directories.

Modify "/etc/fstab" to use the "noexec" option on the "/home" directory.
OL09-00-002072 SV-271668r1091716_rule
V-271669 CCI-000366 medium OL 9 must prevent special devices on nonroot local partitions. SRG-OS-000480-GPOS-00227
The "nodev" mount option causes the system to not interpret character or block special devices. Executing character or block special devices from untrusted file systems increases the opportunity for nonprivileged users to attain unauthorized administrative access.

The only legitimate location for device files is the "/dev" directory located on the root partition, with the exception of chroot jails if implemented.
Verify that OL 9 prevents special devices on nonroot local partitions.

Verify all nonroot local partitions are mounted with the "nodev" option with the following command:

$ mount | grep '^/dev\S* on /\S' | grep --invert-match 'nodev'

If any output is produced, this is a finding.
Configure the "/etc/fstab" to use the "nodev" option on all nonroot local partitions.
OL09-00-002080 SV-271669r1091719_rule
V-271670 CCI-000778 medium OL 9 must disable the graphical user interface automount function unless required. SRG-OS-000114-GPOS-00059
Automatically mounting file systems permits easy introduction of unknown devices, thereby facilitating malicious activity.

Satisfies: SRG-OS-000114-GPOS-00059, SRG-OS-000378-GPOS-00163
This requirement assumes the use of the OL 9 default graphical user interface—the GNOME desktop environment. If the system does not have any graphical user interface installed, this requirement is Not Applicable.

Verify that OL 9 disables the graphical user interface automount function with the following command:

$ gsettings get org.gnome.desktop.media-handling automount-open 
false

If "automount-open" is set to "true", and is not documented with the information system security officer (ISSO) as an operational requirement, this is a finding.
Configure the GNOME desktop to disable automated mounting of removable media.

The dconf settings can be edited in the /etc/dconf/db/* location.

Update the [org/gnome/desktop/media-handling] section of the "/etc/dconf/db/local.d/00-security-settings" database file and add or update the following lines:

[org/gnome/desktop/media-handling]
automount-open=false

Update the dconf system databases:

$ sudo dconf update
OL09-00-002100 SV-271670r1091722_rule
V-271671 CCI-001764 medium OL 9 must disable the graphical user interface autorun function unless required. SRG-OS-000368-GPOS-00154
Allowing autorun commands to execute may introduce malicious code to a system. Configuring this setting prevents autorun commands from executing.
This requirement assumes the use of the OL 9 default graphical user interface—the GNOME desktop environment. If the system does not have any graphical user interface installed, this requirement is Not Applicable.

Verify that OL 9 disables the graphical user interface autorun function with the following command:

$ gsettings get org.gnome.desktop.media-handling autorun-never 
true

If "autorun-never" is set to "false", and is not documented with the information system security officer (ISSO) as an operational requirement, this is a finding.
Configure the GNOME desktop to disable the autorun function on removable media.

The dconf settings can be edited in the /etc/dconf/db/* location.

Update the [org/gnome/desktop/media-handling] section of the "/etc/dconf/db/local.d/00-security-settings" database file and add or update the following lines:

[org/gnome/desktop/media-handling]
autorun-never=true

Update the dconf system databases:

$ sudo dconf update
OL09-00-002101 SV-271671r1091725_rule
V-271672 CCI-000366 medium OL 9 must disable the user list at logon for graphical user interfaces. SRG-OS-000480-GPOS-00227
Leaving the user list enabled is a security risk since it allows anyone with physical access to the system to enumerate known user accounts without authenticated access to the system.
This requirement assumes the use of the OL 9 default graphical user interface—the GNOME desktop environment. If the system does not have any graphical user interface installed, this requirement is Not Applicable.

Verify that OL 9 disables the user logon list for graphical user interfaces with the following command:

$ gsettings get org.gnome.login-screen disable-user-list
true

If the setting is "false", this is a finding.
Configure OL 9 to disable the user list at logon for graphical user interfaces.

Create a database to contain the systemwide screensaver settings (if it does not already exist) with the following command:

Note: The example below is using the database "local" for the system, so if the system is using another database in "/etc/dconf/profile/user", the file should be created under the appropriate subdirectory.

$ sudo touch /etc/dconf/db/local.d/02-login-screen

[org/gnome/login-screen]
disable-user-list=true

Update the system databases:

$ sudo dconf update
OL09-00-002102 SV-271672r1092631_rule
V-271673 CCI-000057 medium OL 9 must initiate a session lock for graphical user interfaces when the screensaver is activated. SRG-OS-000029-GPOS-00010
A session lock is a temporary action taken when a user stops work and moves away from the immediate physical vicinity of the information system but does not want to logout because of the temporary nature of the absence.
This requirement assumes the use of the OL 9 default graphical user interface—the GNOME desktop environment. If the system does not have any graphical user interface installed, this requirement is Not Applicable.

Verify that OL 9 initiates a session lock for graphical user interfaces when the screensaver is activated with the following command:

$ gsettings get org.gnome.desktop.screensaver lock-delay
uint32 5

If the "uint32" setting is not set to "5" or less, or is missing, this is a finding.
Configure OL 9 to initiate a session lock for graphical user interfaces when a screensaver is activated.

Create a database to contain the system-wide screensaver settings (if it does not already exist) with the following command: 

Note: The example below is using the database "local" for the system, so if the system is using another database in "/etc/dconf/profile/user", the file should be created under the appropriate subdirectory.

$ sudo touch /etc/dconf/db/local.d/00-screensaver

[org/gnome/desktop/screensaver]
lock-delay=uint32 5

The "uint32" must be included along with the integer key values as shown.

Update the system databases:

$ sudo dconf update
OL09-00-002103 SV-271673r1091731_rule
V-271674 CCI-000057 medium OL 9 must automatically lock graphical user sessions after 15 minutes of inactivity. SRG-OS-000029-GPOS-00010
A session time-out lock is a temporary action taken when a user stops work and moves away from the immediate physical vicinity of the information system but does not logout because of the temporary nature of the absence. Rather than relying on the user to manually lock their operating system session prior to vacating the vicinity, the GNOME desktop can be configured to identify when a user's session has idled and take action to initiate a session lock.

Satisfies: SRG-OS-000029-GPOS-00010, SRG-OS-000031-GPOS-00012
This requirement assumes the use of the OL 9 default graphical user interface—the GNOME desktop environment. If the system does not have any graphical user interface installed, this requirement is Not Applicable.

Verify that OL 9 initiates a session lock after a 15-minute period of inactivity for graphical user interfaces with the following command:

$ gsettings get org.gnome.desktop.session idle-delay
uint32 900

If "idle-delay" is set to "0" or a value greater than "900", this is a finding.
Configure OL 9 to initiate a screensaver after a 15-minute period of inactivity for graphical user interfaces.

Create a database to contain the system-wide screensaver settings (if it does not already exist) with the following command:

$ sudo touch /etc/dconf/db/local.d/00-screensaver

Edit /etc/dconf/db/local.d/00-screensaver and add or update the following lines:

[org/gnome/desktop/session]
# Set the lock time out to 900 seconds before the session is considered idle
idle-delay=uint32 900

Update the system databases:

$ sudo dconf update
OL09-00-002104 SV-271674r1091734_rule
V-271676 CCI-000060 medium OL 9 must conceal, via the session lock, information previously visible on the display with a publicly viewable image. SRG-OS-000031-GPOS-00012
Setting the screensaver mode to blank-only conceals the contents of the display from passersby.
This requirement assumes the use of the OL 9 default graphical user interface—the GNOME desktop environment. If the system does not have any graphical user interface installed, this requirement is Not Applicable.

Verify that OL 9 configures the screensaver to be blank with the following command:

$ gsettings get org.gnome.desktop.screensaver picture-uri 

If properly configured, the output should be "''".

To ensure that users cannot set the screensaver background, run the following: 

$ grep picture-uri /etc/dconf/db/local.d/locks/* 

If properly configured, the output should be "/org/gnome/desktop/screensaver/picture-uri".

If it is not set or configured properly, this is a finding.
Configure OL 9 to conceal, via the session lock, information previously visible on the display with a publicly viewable image.

The dconf settings can be edited in the /etc/dconf/db/* location.

Add or update the [org/gnome/desktop/screensaver] section of the "/etc/dconf/db/local.d/00-security-settings" database file and add or update the following lines:

[org/gnome/desktop/screensaver]
picture-uri=''

Add the following line to "/etc/dconf/db/local.d/locks/00-security-settings-lock" to prevent user modification:

/org/gnome/desktop/screensaver/picture-uri

Update the dconf system databases:

$ sudo dconf update
OL09-00-002106 SV-271676r1091740_rule
V-271677 CCI-000366 medium OL 9 must disable the ability of a user to accidentally press Ctrl-Alt-Del and cause a system to shut down or reboot. SRG-OS-000480-GPOS-00227
A locally logged-in user who presses Ctrl-Alt-Del, when at the console, can reboot the system. If accidentally pressed, as could happen in the case of mixed OS environment, this can create the risk of short-term loss of availability of systems due to unintentional reboot.
This requirement assumes the use of the OL 9 default graphical user interface—the GNOME desktop environment. If the system does not have any graphical user interface installed, this requirement is Not Applicable.

Verify that OL 9 is configured to ignore the Ctrl-Alt-Del sequence in the GNOME desktop with the following command:

$ gsettings get org.gnome.settings-daemon.plugins.media-keys logout 
"['']"

If the GNOME desktop is configured to shut down when Ctrl-Alt-Del is pressed, this is a finding.
Configure OL 9 to ignore the Ctrl-Alt-Del sequence in the GNOME desktop.

Add or update the [org/gnome/settings-daemon/plugins/media-keys] section of the /etc/dconf/db/local.d/00-security-settings database file and add or update the following lines:

[org/gnome/settings-daemon/plugins/media-keys]
logout=['']

Run the following command to update the database:

$ sudo dconf update
OL09-00-002107 SV-271677r1091743_rule
V-271678 CCI-000778 medium OL 9 must prevent a user from overriding the disabling of the graphical user interface automount function. SRG-OS-000114-GPOS-00059
A nonprivileged account is any operating system account with authorizations of a nonprivileged user.

Satisfies: SRG-OS-000114-GPOS-00059, SRG-OS-000378-GPOS-00163
This requirement assumes the use of the OL 9 default graphical user interface—the GNOME desktop environment. If the system does not have any graphical user interface installed, this requirement is Not Applicable.

Verify that OL 9 disables ability of the user to override the graphical user interface automount setting.

Determine which profile the system database is using with the following command:

$ grep system-db /etc/dconf/profile/user
system-db:local

Check that the automount setting is locked from nonprivileged user modification with the following command:

Note: The example below is using the database "local" for the system, so the path is "/etc/dconf/db/local.d". This path must be modified if a database other than "local" is being used.

$ grep 'automount-open' /etc/dconf/db/local.d/locks/* 
/org/gnome/desktop/media-handling/automount-open

If the command does not return at least the example result, this is a finding.
Configure the GNOME desktop to not allow a user to change the setting that disables automated mounting of removable media.

Add the following line to "/etc/dconf/db/local.d/locks/00-security-settings-lock" to prevent user modification:

/org/gnome/desktop/media-handling/automount-open

Update the dconf system databases:

$ sudo dconf update
OL09-00-002120 SV-271678r1091746_rule
V-271679 CCI-000778 medium OL 9 must prevent a user from overriding the disabling of the graphical user interface autorun function. SRG-OS-000114-GPOS-00059
Techniques used to address this include protocols using nonces (e.g., numbers generated for a specific one-time use) or challenges (e.g., TLS, WS_Security). Additional techniques include time-synchronous or challenge-response one-time authenticators.

Satisfies: SRG-OS-000114-GPOS-00059, SRG-OS-000378-GPOS-00163
This requirement assumes the use of the OL 9 default graphical user interface—the GNOME desktop environment. If the system does not have any graphical user interface installed, this requirement is Not Applicable.

Verify that OL 9 disables ability of the user to override the graphical user interface autorun setting.

Determine which profile the system database is using with the following command:

$ grep system-db /etc/dconf/profile/user
system-db:local

Check that the automount setting is locked from nonprivileged user modification with the following command:

Note: The example below is using the database "local" for the system, so the path is "/etc/dconf/db/local.d". This path must be modified if a database other than "local" is being used.

$ grep 'autorun-never' /etc/dconf/db/local.d/locks/* 
/org/gnome/desktop/media-handling/autorun-never

If the command does not return at least the example result, this is a finding.
Configure the GNOME desktop to not allow a user to change the setting that disables autorun on removable media.

Add the following line to "/etc/dconf/db/local.d/locks/00-security-settings-lock" to prevent user modification:

/org/gnome/desktop/media-handling/autorun-never

Update the dconf system databases:

$ sudo dconf update
OL09-00-002121 SV-271679r1091749_rule
V-271680 CCI-000048 medium OL 9 must prevent a user from overriding the banner-message-enable setting for the graphical user interface. SRG-OS-000023-GPOS-00006
Display of a standardized and approved use notification before granting access to the operating system ensures privacy and security notification verbiage used is consistent with applicable federal laws, Executive Orders, directives, policies, regulations, standards, and guidance.

For U.S. government systems, system use notifications are required only for access via login interfaces with human users and are not required when such human interfaces do not exist.

Satisfies: SRG-OS-000023-GPOS-00006, SRG-OS-000228-GPOS-00088
This requirement assumes the use of the OL 9 default graphical user interface—the GNOME desktop environment. If the system does not have any graphical user interface installed, this requirement is Not Applicable.

Verify that OL 9 prevents a user from overriding settings for graphical user interfaces. 

Determine which profile the system database is using with the following command:

$ grep system-db /etc/dconf/profile/user
system-db:local

Check that graphical settings are locked from nonprivileged user modification with the following command:

Note: The example below is using the database "local" for the system, so the path is "/etc/dconf/db/local.d". This path must be modified if a database other than "local" is being used.

$ grep banner-message-enable /etc/dconf/db/local.d/locks/* 
/org/gnome/login-screen/banner-message-enable

If the output is not "/org/gnome/login-screen/banner-message-enable", the line is commented out, or the line is missing, this is a finding.
Configure OL 9 to prevent a user from overriding the banner setting for graphical user interfaces. 

Create a database to contain the system-wide graphical user logon settings (if it does not already exist) with the following command:

$ sudo touch /etc/dconf/db/local.d/locks/session

Add the following setting to prevent nonprivileged users from modifying it:

/org/gnome/login-screen/banner-message-enable

Run the following command to update the database:

$ sudo dconf update
OL09-00-002122 SV-271680r1091752_rule
V-271681 CCI-000056 medium OL 9 must prevent a user from overriding the screensaver lock-enabled setting for the graphical user interface. SRG-OS-000028-GPOS-00009
A session time-out lock is a temporary action taken when a user stops work and moves away from the immediate physical vicinity of the information system but does not log out because of the temporary nature of the absence. Rather than relying on the user to manually lock their operating system session prior to vacating the vicinity, operating systems need to be able to identify when a user's session has idled and take action to initiate the session lock.

The session lock is implemented at the point where session activity can be determined and/or controlled.

Implementing session settings will have little value if a user is able to manipulate these settings from the defaults prescribed in the other requirements of this implementation guide.

Satisfies: SRG-OS-000028-GPOS-00009, SRG-OS-000030-GPOS-00011
This requirement assumes the use of the OL 9 default graphical user interface—the GNOME desktop environment. If the system does not have any graphical user interface installed, this requirement is Not Applicable.

Verify that OL 9 prevents a user from overriding settings for graphical user interfaces. 

Determine which profile the system database is using with the following command:

$ grep system-db /etc/dconf/profile/user
system-db:local

Check that graphical settings are locked from nonprivileged user modification with the following command:

Note: The example below is using the database "local" for the system, so the path is "/etc/dconf/db/local.d". This path must be modified if a database other than "local" is being used.

$ grep -i lock-enabled /etc/dconf/db/local.d/locks/*
/org/gnome/desktop/screensaver/lock-enabled

If the command does not return at least the example result, this is a finding.
Configure OL 9 to prevent a user from overriding settings for graphical user interfaces.

Create a database to contain the system-wide screensaver settings (if it does not already exist) with the following command: 

Note: The example below is using the database "local" for the system, so if the system is using another database in "/etc/dconf/profile/user", the file should be created under the appropriate subdirectory.

$ sudo touch /etc/dconf/db/local.d/locks/session

Add the following setting to prevent nonprivileged users from modifying it:

/org/gnome/desktop/screensaver/lock-enabled

Update the system databases:

$ sudo dconf update
OL09-00-002123 SV-271681r1091755_rule
V-271682 CCI-000057 medium OL 9 must prevent a user from overriding the session idle-delay setting for the graphical user interface. SRG-OS-000029-GPOS-00010
A session time-out lock is a temporary action taken when a user stops work and moves away from the immediate physical vicinity of the information system but does not logout because of the temporary nature of the absence. Rather than relying on the user to manually lock their operating system session prior to vacating the vicinity, the GNOME desktop can be configured to identify when a user's session has idled and take action to initiate the session lock. As such, users should not be allowed to change session settings.

Satisfies: SRG-OS-000029-GPOS-00010, SRG-OS-000031-GPOS-00012
This requirement assumes the use of the OL 9 default graphical user interface—the GNOME desktop environment. If the system does not have any graphical user interface installed, this requirement is Not Applicable.

Verify that OL 9 prevents a user from overriding settings for graphical user interfaces. 

Determine which profile the system database is using with the following command:

$ grep system-db /etc/dconf/profile/user
system-db:local

Check that graphical settings are locked from nonprivileged user modification with the following command:

Note: The example below is using the database "local" for the system, so the path is "/etc/dconf/db/local.d". This path must be modified if a database other than "local" is being used.

$ grep -i idle /etc/dconf/db/local.d/locks/*
/org/gnome/desktop/session/idle-delay

If the command does not return at least the example result, this is a finding.
Configure OL 9 to prevent a user from overriding settings for graphical user interfaces.

Create a database to contain the system-wide screensaver settings (if it does not already exist) with the following command: 

Note: The example below is using the database "local" for the system, so if the system is using another database in "/etc/dconf/profile/user", the file should be created under the appropriate subdirectory.

$ sudo touch /etc/dconf/db/local.d/locks/session

Add the following setting to prevent nonprivileged users from modifying it:

/org/gnome/desktop/session/idle-delay

Update the system databases:

$ sudo dconf update
OL09-00-002124 SV-271682r1091758_rule
V-271683 CCI-000057 medium OL 9 must prevent a user from overriding the session lock-delay setting for the graphical user interface. SRG-OS-000029-GPOS-00010
A session time-out lock is a temporary action taken when a user stops work and moves away from the immediate physical vicinity of the information system but does not logout because of the temporary nature of the absence. Rather than relying on the user to manually lock their operating system session prior to vacating the vicinity, the GNOME desktop can be configured to identify when a user's session has idled and take action to initiate the session lock. As such, users should not be allowed to change session settings.
This requirement assumes the use of the OL 9 default graphical user interface—the GNOME desktop environment. If the system does not have any graphical user interface installed, this requirement is Not Applicable.

Verify that OL 9 prevents a user from overriding settings for graphical user interfaces. 

Determine which profile the system database is using with the following command:

$ grep system-db /etc/dconf/profile/user
system-db:local

Check that graphical settings are locked from nonprivileged user modification with the following command:

Note: The example below is using the database "local" for the system, so the path is "/etc/dconf/db/local.d". This path must be modified if a database other than "local" is being used.

$ grep -i lock-delay /etc/dconf/db/local.d/locks/*
/org/gnome/desktop/screensaver/lock-delay

If the command does not return at least the example result, this is a finding.
Configure OL 9 to prevent a user from overriding settings for graphical user interfaces.

Create a database to contain the system-wide screensaver settings (if it does not already exist) with the following command: 

Note: The example below is using the database "local" for the system, so if the system is using another database in "/etc/dconf/profile/user", the file should be created under the appropriate subdirectory.

$ sudo touch /etc/dconf/db/local.d/locks/session

Add the following setting to prevent nonprivileged users from modifying it:

/org/gnome/desktop/screensaver/lock-delay

Update the system databases:

$ sudo dconf update
OL09-00-002125 SV-271683r1091761_rule
V-271684 CCI-000056 medium OL 9 must prevent a user from overriding the disabling of the graphical user smart card removal action. SRG-OS-000028-GPOS-00009
A session lock is a temporary action taken when a user stops work and moves away from the immediate physical vicinity of the information system but does not want to log out because of the temporary nature of the absence.

The session lock is implemented at the point where session activity can be determined. Rather than be forced to wait for a period of time to expire before the user session can be locked, OL 9 must provide users with the ability to manually invoke a session lock so users can secure their session if it is necessary to temporarily vacate the immediate physical vicinity.

Satisfies: SRG-OS-000028-GPOS-00009, SRG-OS-000030-GPOS-00011
This requirement assumes the use of the OL 9 default graphical user interface—the GNOME desktop environment. If the system does not have any graphical user interface installed, this requirement is Not Applicable.

Verify that OL 9 disables ability of the user to override the smart card removal action setting.

Determine which profile the system database is using with the following command:

$ grep system-db /etc/dconf/profile/user
system-db:local

Check that the removal action setting is locked from nonprivileged user modification with the following command:

Note: The example below is using the database "local" for the system, so the path is "/etc/dconf/db/local.d". This path must be modified if a database other than "local" is being used.

$ grep 'removal-action' /etc/dconf/db/local.d/locks/* 
/org/gnome/settings-daemon/peripherals/smartcard/removal-action

If the command does not return at least the example result, this is a finding.
Configure OL 9 must prevent a user from overriding the disabling of the graphical user smart card removal action.

Add the following line to "/etc/dconf/db/local.d/locks/00-security-settings-lock":

/org/gnome/settings-daemon/peripherals/smartcard/removal-action

Update the dconf system databases:

$ sudo dconf update
OL09-00-002126 SV-271684r1091764_rule
V-271685 CCI-000366 medium OL 9 must disable the ability of a user to restart the system from the login screen. SRG-OS-000480-GPOS-00227
A user who is at the console can reboot the system at the login screen. If restart or shutdown buttons are pressed at the login screen, this can create the risk of short-term loss of availability of systems due to reboot.
This requirement assumes the use of the OL 9 default graphical user interface—the GNOME desktop environment. If the system does not have any graphical user interface installed, this requirement is Not Applicable.

Verify that OL 9 disables a user's ability to restart the system with the following command:

$ grep -R disable-restart-buttons /etc/dconf/db/*
/etc/dconf/db/distro.d/20-authselect:disable-restart-buttons='true'

If the "disable-restart-button" setting is not set to "true", is missing or commented out from the dconf database files, this is a finding.
Configure OL 9 to disable a user's ability to restart the system.

Add or update the [org/gnome/settings-daemon/] section of the /etc/dconf/db/local.d/00-security-settings" database file and add or update the following lines:

[org/gnome/settings-daemon/peripherals/smartcard]
disable-restart-buttons='true'

Then update the dconf system databases:

$ sudo dconf update
OL09-00-002127 SV-271685r1091767_rule
V-271686 CCI-000366 medium OL 9 must prevent a user from overriding the disable-restart-buttons setting for the graphical user interface. SRG-OS-000480-GPOS-00227
A user who is at the console can reboot the system at the login screen. If restart or shutdown buttons are pressed at the login screen, this can create the risk of short-term loss of availability of systems due to reboot.
This requirement assumes the use of the OL 9 default graphical user interface—the GNOME desktop environment. If the system does not have any graphical user interface installed, this requirement is Not Applicable.

Verify that OL 9 prevents a user from overriding the disable-restart-buttons setting for graphical user interfaces. 

Determine which profile the system database is using with the following command:

$ grep system-db /etc/dconf/profile/user
system-db:local

Check that graphical settings are locked from nonprivileged user modification with the following command:

Note: The example below is using the database "local" for the system, so the path is "/etc/dconf/db/local.d". This path must be modified if a database other than "local" is being used.

$ grep disable-restart-buttons /etc/dconf/db/local.d/locks/* 
/org/gnome/login-screen/disable-restart-buttons

If the command does not return at least the example result, this is a finding.
Configure OL 9 to prevent a user from overriding the disable-restart-buttons setting for graphical user interfaces. 

Create a database to contain the system-wide graphical user logon settings (if it does not already exist) with the following command:

$ sudo touch /etc/dconf/db/local.d/locks/session

Add the following line to prevent nonprivileged users from modifying it:

/org/gnome/login-screen/disable-restart-buttons

Run the following command to update the database:

$ sudo dconf update
OL09-00-002128 SV-271686r1091770_rule
V-271687 CCI-000366 medium OL 9 must prevent a user from overriding the Ctrl-Alt-Del sequence settings for the graphical user interface. SRG-OS-000480-GPOS-00227
A locally logged-in user who presses Ctrl-Alt-Del, when at the console, can reboot the system. If accidentally pressed, as could happen in the case of mixed OS environment, this can create the risk of short-term loss of availability of systems due to unintentional reboot.
This requirement assumes the use of the OL 9 default graphical user interface—the GNOME desktop environment. If the system does not have any graphical user interface installed, this requirement is Not Applicable.

Verify that OL 9 users cannot enable the Ctrl-Alt-Del sequence in the GNOME desktop with the following command:

$ grep logout /etc/dconf/db/local.d/locks/* 
/org/gnome/settings-daemon/plugins/media-keys/logout

If the output is not "/org/gnome/settings-daemon/plugins/media-keys/logout", the line is commented out, or the line is missing, this is a finding.
Configure OL 9 to disallow the user changing the Ctrl-Alt-Del sequence in the GNOME desktop.

Create a database to container system-wide graphical user logon settings (if it does not already exist) with the following command:

$ sudo touch /etc/dconf/db/local.d/locks/session

Add the following line to the session locks file to prevent nonprivileged users from modifying the Ctrl-Alt-Del setting:

/org/gnome/settings-daemon/plugins/media-keys/logout

Run the following command to update the database:

$ sudo dconf update
OL09-00-002129 SV-271687r1091773_rule
V-271688 CCI-000048 medium OL 9 must be configured to enable the display of the Standard Mandatory DOD Notice and Consent Banner before granting local or remote access to the system via a graphical user logon. SRG-OS-000023-GPOS-00006
Display of a standardized and approved use notification before granting access to the operating system ensures privacy and security notification verbiage used is consistent with applicable federal laws, Executive Orders, directives, policies, regulations, standards, and guidance.

For U.S. government systems, system use notifications are required only for access via login interfaces with human users and are not required when such human interfaces do not exist.

Satisfies: SRG-OS-000023-GPOS-00006, SRG-OS-000228-GPOS-00088
This requirement assumes the use of the OL 9 default graphical user interface—the GNOME desktop environment. If the system does not have any graphical user interface installed, this requirement is Not Applicable.

Verify that OL 9 displays a banner before granting access to the operating system via a graphical user logon.

Determine if the operating system displays a banner at the logon screen with the following command:

$ gsettings get org.gnome.login-screen banner-message-enable
true

If the result is "false", this is a finding.
Configure OL 9 to display the Standard Mandatory DOD Notice and Consent Banner before granting access to the system via a graphical user logon.

Create a database to contain the system-wide graphical user logon settings (if it does not already exist) with the following command:

$ sudo touch /etc/dconf/db/local.d/01-banner-message

Add the following lines to the [org/gnome/login-screen] section of the "/etc/dconf/db/local.d/01-banner-message":

[org/gnome/login-screen]

banner-message-enable=true

Run the following command to update the database:

$ sudo dconf update
OL09-00-002150 SV-271688r1091776_rule
V-271689 CCI-000048 medium OL 9 must display the Standard Mandatory DOD Notice and Consent Banner before granting local or remote access to the system via a graphical user logon. SRG-OS-000023-GPOS-00006
Display of a standardized and approved use notification before granting access to the operating system ensures privacy and security notification verbiage used is consistent with applicable federal laws, Executive Orders, directives, policies, regulations, standards, and guidance.

System use notifications are required only for access via logon interfaces with human users and are not required when such human interfaces do not exist.

The banner must be formatted in accordance with applicable DOD policy. Use the following verbiage for operating systems that can accommodate banners of 1300 characters:

"You are accessing a U.S. Government (USG) Information System (IS) that is provided for USG-authorized use only.

By using this IS (which includes any device attached to this IS), you consent to the following conditions:

-The USG routinely intercepts and monitors communications on this IS for purposes including, but not limited to, penetration testing, COMSEC monitoring, network operations and defense, personnel misconduct (PM), law enforcement (LE), and counterintelligence (CI) investigations.

-At any time, the USG may inspect and seize data stored on this IS.

-Communications using, or data stored on, this IS are not private, are subject to routine monitoring, interception, and search, and may be disclosed or used for any USG-authorized purpose.

-This IS includes security measures (e.g., authentication and access controls) to protect USG interests--not for your personal benefit or privacy.

-Notwithstanding the above, using this IS does not constitute consent to PM, LE or CI investigative searching or monitoring of the content of privileged communications, or work product, related to personal representation or services by attorneys, psychotherapists, or clergy, and their assistants. Such communications and work product are private and confidential. See User Agreement for details."

Satisfies: SRG-OS-000023-GPOS-00006, SRG-OS-000228-GPOS-00088
This requirement assumes the use of the OL 9 default graphical user interface—the GNOME desktop environment. If the system does not have any graphical user interface installed, this requirement is Not Applicable.

Verify that OL 9 displays the Standard Mandatory DOD Notice and Consent Banner before granting access to the operating system via a graphical user logon.

Check that the operating system displays the exact Standard Mandatory DOD Notice and Consent Banner text with the command:

$ gsettings get org.gnome.login-screen banner-message-text

banner-message-text=
'You are accessing a U.S. Government (USG) Information System (IS) that is provided for USG-authorized use only.\nBy using this IS (which includes any device attached to this IS), you consent to the following conditions:\n-The USG routinely intercepts and monitors communications on this IS for purposes including, but not limited to, penetration testing, COMSEC monitoring, network operations and defense, personnel misconduct (PM), law enforcement (LE), and counterintelligence (CI) investigations.\n-At any time, the USG may inspect and seize data stored on this IS.\n-Communications using, or data stored on, this IS are not private, are subject to routine monitoring, interception, and search, and may be disclosed or used for any USG-authorized purpose.\n-This IS includes security measures (e.g., authentication and access controls) to protect USG interests--not for your personal benefit or privacy.\n-Notwithstanding the above, using this IS does not constitute consent to PM, LE or CI investigative searching or monitoring of the content of privileged communications, or work product, related to personal representation or services by attorneys, psychotherapists, or clergy, and their assistants. Such communications and work product are private and confidential. See User Agreement for details.'

Note: The "\n " characters are for formatting only. They will not be displayed on the graphical interface.

If the banner does not match the Standard Mandatory DOD Notice and Consent Banner exactly, this is a finding.
Configure the operating system to display the Standard Mandatory DOD Notice and Consent Banner before granting access to the system.

Add the following lines to the [org/gnome/login-screen] section of the "/etc/dconf/db/local.d/01-banner-message":

banner-message-text='You are accessing a U.S. Government (USG) Information System (IS) that is provided for USG-authorized use only.\nBy using this IS (which includes any device attached to this IS), you consent to the following conditions:\n-The USG routinely intercepts and monitors communications on this IS for purposes including, but not limited to, penetration testing, COMSEC monitoring, network operations and defense, personnel misconduct (PM), law enforcement (LE), and counterintelligence (CI) investigations.\n-At any time, the USG may inspect and seize data stored on this IS.\n-Communications using, or data stored on, this IS are not private, are subject to routine monitoring, interception, and search, and may be disclosed or used for any USG-authorized purpose.\n-This IS includes security measures (e.g., authentication and access controls) to protect USG interests--not for your personal benefit or privacy.\n-Notwithstanding the above, using this IS does not constitute consent to PM, LE or CI investigative searching or monitoring of the content of privileged communications, or work product, related to personal representation or services by attorneys, psychotherapists, or clergy, and their assistants. Such communications and work product are private and confidential. See User Agreement for details.'

Note: The "\n " characters are for formatting only. They will not be displayed on the graphical interface.

Run the following command to update the database:

$ sudo dconf update
OL09-00-002151 SV-271689r1091779_rule
V-271690 CCI-000056 medium OL 9 must be able to directly initiate a session lock for all connection types using smart card when the smart card is removed. SRG-OS-000028-GPOS-00009
A session lock is a temporary action taken when a user stops work and moves away from the immediate physical vicinity of the information system but does not want to log out because of the temporary nature of the absence.

The session lock is implemented at the point where session activity can be determined. Rather than be forced to wait for a period of time to expire before the user session can be locked, OL 9 needs to provide users with the ability to manually invoke a session lock so users can secure their session if it is necessary to temporarily vacate the immediate physical vicinity.

Satisfies: SRG-OS-000028-GPOS-00009, SRG-OS-000030-GPOS-00011
This requirement assumes the use of the OL 9 default graphical user interface—the GNOME desktop environment. If the system does not have any graphical user interface installed, this requirement is Not Applicable.

Verify that OL 9 enables a user's session lock until that user reestablishes access using established identification and authentication procedures with the following command:

$ grep -R removal-action /etc/dconf/db/*
/etc/dconf/db/distro.d/20-authselect:removal-action='lock-screen'

If the "removal-action='lock-screen'" setting is missing or commented out from the dconf database files, this is a finding.
Configure OL 9 to enable a user's session lock until that user reestablishes access using established identification and authentication procedures.

Select or create an authselect profile and incorporate the "with-smartcard-lock-on-removal" feature with the following example:

$ sudo authselect select sssd with-smartcard with-smartcard-lock-on-removal

Alternatively, the dconf settings can be edited in the /etc/dconf/db/* location.

Add or update the [org/gnome/settings-daemon/peripherals/smartcard] section of the /etc/dconf/db/local.d/00-security-settings" database file and add or update the following lines:

[org/gnome/settings-daemon/peripherals/smartcard]
removal-action='lock-screen'

Update the dconf system databases:

$ sudo dconf update
OL09-00-002160 SV-271690r1092634_rule
V-271691 CCI-000366 high OL 9 must not allow unattended or automatic logon via the graphical user interface. SRG-OS-000480-GPOS-00229
Failure to restrict system access to authenticated users negatively impacts operating system security.
This requirement assumes the use of the OL 9 default graphical user interface—the GNOME desktop environment. If the system does not have any graphical user interface installed, this requirement is Not Applicable.

Verify that OL 9 does not allow an unattended or automatic logon to the system via a graphical user interface.

Check for the value of the "AutomaticLoginEnable" in the "/etc/gdm/custom.conf" file with the following command:

$  grep -i automaticlogin /etc/gdm/custom.conf
[daemon]
AutomaticLoginEnable=false

If the value of "AutomaticLoginEnable" is not set to "false", this is a finding.
Configure the GNOME desktop display manager to disable automatic login.

Set AutomaticLoginEnable to false in the [daemon] section in /etc/gdm/custom.conf. For example:

[daemon]
AutomaticLoginEnable=false
OL09-00-002161 SV-271691r1091785_rule
V-271692 CCI-000366 medium OL 9 effective dconf policy must match the policy keyfiles. SRG-OS-000480-GPOS-00227
Unlike text-based keyfiles, the binary database is impossible to check through most automated and all manual means; therefore, to evaluate dconf configuration, both have to be true at the same time - configuration files have to be compliant, and the database needs to be more recent than those keyfiles, which gives confidence that it reflects them.
This requirement assumes the use of the OL 9 default graphical user interface—the GNOME desktop environment. If the system does not have any graphical user interface installed, this requirement is Not Applicable.

Verify that OL 9 effective dconf policy matches the policy keyfiles.

Check the last modification time of the local databases, comparing it to the last modification time of the related keyfiles. The following command will check every dconf database and compare its modification time to the related system keyfiles:

$ function dconf_needs_update { for db in $(find /etc/dconf/db -maxdepth 1 -type f); do db_mtime=$(stat -c %Y "$db"); keyfile_mtime=$(stat -c %Y "$db".d/* | sort -n | tail -1); if [ -n "$db_mtime" ] && [ -n "$keyfile_mtime" ] && [ "$db_mtime" -lt "$keyfile_mtime" ]; then echo "$db needs update"; return 1; fi; done; }; dconf_needs_update

If the command has any output, then a dconf database needs to be updated, and this is a finding.
Update the dconf databases by running the following command:

$ sudo dconf update
OL09-00-002162 SV-271692r1091788_rule
V-271693 CCI-000366 medium OL 9 must define default permissions for the bash shell. SRG-OS-000480-GPOS-00227
The umask controls the default access mode assigned to newly created files. A umask of 077 limits new files to mode 600 or less permissive. Although umask can be represented as a four-digit number, the first digit representing special access modes is typically ignored or required to be "0". This requirement applies to the globally configured system defaults and the local interactive user defaults for each account on the system.
Verify that OL 9 "umask" setting is configured correctly in the "/etc/bashrc" file with the following command:

Note: If the value of the "umask" parameter is set to "000" "/etc/bashrc" file, the severity of this requirement is raised to a CAT I.

$ grep umask /etc/bashrc 
umask 077
umask 077  

If the value for the "umask" parameter is not "077", or the "umask" parameter is missing or is commented out, this is a finding.
Configure OL 9 to define default permissions for all authenticated users using the bash shell.

Add or edit the lines for the "umask" parameter in the "/etc/bashrc" file to "077":

umask 077
OL09-00-002301 SV-271693r1091791_rule
V-271694 CCI-000366 medium OL 9 must define default permissions for the c shell. SRG-OS-000480-GPOS-00227
The umask controls the default access mode assigned to newly created files. A umask of 077 limits new files to mode 600 or less permissive. Although umask can be represented as a four-digit number, the first digit representing special access modes is typically ignored or required to be "0". This requirement applies to the globally configured system defaults and the local interactive user defaults for each account on the system.
Verify that OL 9 "umask" setting is configured correctly in the "/etc/csh.cshrc" file with the following command:

Note: If the value of the "umask" parameter is set to "000" "/etc/csh.cshrc" file, the severity of this requirement is raised to a CAT I.

$ grep umask /etc/csh.cshrc 
umask 077
umask 077  

If the value for the "umask" parameter is not "077", or the "umask" parameter is missing or is commented out, this is a finding.
Configure OL 9 to define default permissions for all authenticated users using the c shell.

Add or edit the lines for the "umask" parameter in the "/etc/csh.cshrc" file to "077":

umask 077
OL09-00-002302 SV-271694r1091794_rule
V-271695 CCI-000366 medium OL 9 must define default permissions for the system default profile. SRG-OS-000480-GPOS-00227
The umask controls the default access mode assigned to newly created files. A umask of 077 limits new files to mode 600 or less permissive. Although umask can be represented as a four-digit number, the first digit representing special access modes is typically ignored or required to be "0". This requirement applies to the globally configured system defaults and the local interactive user defaults for each account on the system.
Verify that OL 9 "umask" setting is configured correctly in the "/etc/profile" file with the following command:

Note: If the value of the "umask" parameter is set to "000" "/etc/profile" file, the severity of this requirement is raised to a CAT I.

$ grep umask /etc/profile 
umask 077

If the value for the "umask" parameter is not "077", or the "umask" parameter is missing or is commented out, this is a finding.
Configure OL 9 to define default permissions for all authenticated users in such a way that the user can only read and modify their own files.

Add or edit the lines for the "umask" parameter in the "/etc/profile" file to "077":

umask 077
OL09-00-002303 SV-271695r1091797_rule
V-271696 CCI-000366 medium OL 9 must define default permissions for all authenticated users in such a way that the user can only read and modify their own files. SRG-OS-000480-GPOS-00228
Setting the most restrictive default permissions ensures that when new accounts are created, they do not have unnecessary access.
Verify that OL 9 defines default permissions for all authenticated users in such a way that the user can only read and modify their own files with the following command:

Note: If the value of the "UMASK" parameter is set to "000" in "/etc/login.defs" file, the severity of this requirement is raised to a CAT I.

$ grep -i umask /etc/login.defs
UMASK 077

If the value for the "UMASK" parameter is not "077", or the "UMASK" parameter is missing or is commented out, this is a finding.
Configure OL 9 to define default permissions for all authenticated users in such a way that the user can only read and modify their own files.

Add or edit the lines for the "UMASK" parameter in the "/etc/login.defs" file to "077":

UMASK 077
OL09-00-002304 SV-271696r1091800_rule
V-271697 CCI-000382 low OL 9 must disable the chrony daemon from acting as a server. SRG-OS-000096-GPOS-00050
Minimizing the exposure of the server functionality of the chrony daemon diminishes the attack surface.

Satisfies: SRG-OS-000096-GPOS-00050, SRG-OS-000095-GPOS-00049
Verify that OL 9 disables the chrony daemon from acting as a server with the following command:

$ grep -w port /etc/chrony.conf
port 0

If the "port" option is not set to "0", is commented out, or is missing, this is a finding.
Configure OL 9 to disable the chrony daemon from acting as a server by adding/modifying the following line in the /etc/chrony.conf file:

port 0
OL09-00-002320 SV-271697r1091803_rule
V-271698 CCI-000382 low OL 9 must disable network management of the chrony daemon. SRG-OS-000096-GPOS-00050
Not exposing the management interface of the chrony daemon on the network diminishes the attack space.

Satisfies: SRG-OS-000096-GPOS-00050, SRG-OS-000095-GPOS-00049
Verify that OL 9 disables network management of the chrony daemon with the following command:

$ grep -w cmdport /etc/chrony.conf
cmdport 0

If the "cmdport" option is not set to "0", is commented out, or is missing, this is a finding.
Configure OL 9 to disable network management of the chrony daemon by adding/modifying the following line in the /etc/chrony.conf file:

cmdport 0
OL09-00-002321 SV-271698r1091806_rule
V-271699 CCI-004923 medium OL 9 must securely compare internal information system clocks at least every 24 hours. SRG-OS-000355-GPOS-00143
Inaccurate time stamps make it more difficult to correlate events and can lead to an inaccurate analysis. Determining the correct time a particular event occurred on a system is critical when conducting forensic analysis and investigating system events. Sources outside the configured acceptable allowance (drift) may be inaccurate.

Synchronizing internal information system clocks provides uniformity of time stamps for information systems with multiple system clocks and systems connected over a network.

Depending on the infrastructure being used the "pool" directive may not be supported.

Authoritative time sources include the United States Naval Observatory (USNO) time servers, a time server designated for the appropriate DOD network (NIPRNet/SIPRNet), and/or the Global Positioning System (GPS).

Satisfies: SRG-OS-000355-GPOS-00143, SRG-OS-000356-GPOS-00144, SRG-OS-000359-GPOS-00146
Verify that OL 9 securely compares internal information system clocks at least every 24 hours with an NTP server with the following command:

$ grep maxpoll /etc/chrony.conf
server 0.us.pool.ntp.mil iburst maxpoll 16

If the "maxpoll" option is set to a number greater than 16 or the line is commented out, this is a finding.

Verify the "chrony.conf" file is configured to an authoritative DOD time source by running the following command:

$ grep -i server /etc/chrony.conf
server 0.us.pool.ntp.mil 

If the parameter "server" is not set or is not set to an authoritative DOD time source, this is a finding.
Configure OL 9 to securely compare internal information system clocks at least every 24 hours with an NTP server by adding/modifying the following line in the /etc/chrony.conf file.

server [ntp.server.name] iburst maxpoll 16
OL09-00-002323 SV-271699r1091809_rule
V-271700 CCI-000169 low OL 9 must enable Linux audit logging for the USBGuard daemon. SRG-OS-000062-GPOS-00031
Without the capability to generate audit records, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one.

If auditing is enabled late in the startup process, the actions of some startup processes may not be audited. Some audit systems also maintain state information only available if auditing is enabled before a given process is created.

Audit records can be generated from various components within the information system (e.g., module or policy filter).

The list of audited events is the set of events for which audits are to be generated. This set of events is typically a subset of the list of all events for which the system is capable of generating audit records.

DOD has defined the list of events for which OL 9 will provide an audit record generation capability as the following:

1. Successful and unsuccessful attempts to access, modify, or delete privileges, security objects, security levels, or categories of information (e.g., classification levels);

2. Access actions, such as successful and unsuccessful logon attempts, privileged activities or other system-level access, starting and ending time for user access to the system, concurrent logons from different workstations, successful and unsuccessful accesses to objects, all program initiations, and all direct access to the information system;

3. All account creations, modifications, disabling, and terminations; and 

4. All kernel module load, unload, and restart actions.
Verify that OL 9 Linux Audit logging is enabled for the USBGuard daemon with the following command:

$ sudo grep AuditBackend /etc/usbguard/usbguard-daemon.conf 
AuditBackend=LinuxAudit 

If "AuditBackend" is not set to "LinuxAudit", this is a finding.
Configure OL 9 USBGuard AuditBackend to use the audit system.

Add or edit the following line in /etc/usbguard/usbguard-daemon.conf 

AuditBackend=LinuxAudit
OL09-00-002330 SV-271700r1091812_rule
V-271701 CCI-001958 medium OL 9 must block unauthorized peripherals before establishing a connection. SRG-OS-000378-GPOS-00163
The USBguard-daemon is the main component of the USBGuard software framework. It runs as a service in the background and enforces the USB device authorization policy for all USB devices. The policy is defined by a set of rules using a rule language described in the usbguard-rules.conf file. The policy and the authorization state of USB devices can be modified during runtime using the usbguard tool.

The system administrator (SA) must work with the site information system security officer (ISSO) to determine a list of authorized peripherals and establish rules within the USBGuard software framework to allow only authorized devices.
Verify that OL 9 USBGuard has a policy configured with the following command:

$ usbguard list-rules
allow id 1d6b:0001 serial

If the command does not return results or an error is returned, ask the SA to indicate how unauthorized peripherals are being blocked.

If there is no evidence that unauthorized peripherals are being blocked before establishing a connection, this is a finding.
Configure the operating system to enable the blocking of unauthorized peripherals with the following command:

Note: This command must be run from a root shell and will create an allow list for any USB devices currently connect to the system.

# usbguard generate-policy --no-hash > /etc/usbguard/rules.conf

Note: Enabling and starting USBGuard without properly configuring it for an individual system will immediately prevent any access over a USB device such as a keyboard or mouse.
OL09-00-002331 SV-271701r1091815_rule
V-271702 CCI-003959 medium OL 9 must disable automatic mounting of Universal Serial Bus (USB) mass storage driver. SRG-OS-000690-GPOS-00140
Without authenticating devices, unidentified or unknown devices may be introduced, thereby facilitating malicious activity.

Peripherals include, but are not limited to, such devices as flash drives, external storage, and printers.
Verify that OL 9 disables automatic mounting of the USB storage kernel module with the following command:

$ grep usb-storage /etc/modprobe.d/* | grep "/bin/true" 
install usb-storage /bin/true

If the command does not return any output, or the line is commented out, this is a finding.

Verify the operating system disables the ability to use USB mass storage device.

$ grep usb-storage /etc/modprobe.d/* | grep -i "blacklist"
blacklist usb-storage

If the command does not return any output, or the line is commented out, this is a finding.
Configure OL 9 to disable using the USB storage kernel module. 

Create a file under "/etc/modprobe.d" to contain the following:

# sudo su -c "echo install usb-storage /bin/true >> /etc/modprobe.d/DISASTIG.conf"

Configure the operating system to disable the ability to use USB mass storage devices.

# sudo su -c "echo blacklist usb-storage >> /etc/modprobe.d/DISASTIG.conf"
OL09-00-002332 SV-271702r1091818_rule
V-271703 CCI-000067 medium OL 9 must log SSH connection attempts and failures to the server. SRG-OS-000032-GPOS-00013
SSH provides several logging levels with varying amounts of verbosity. "DEBUG" is specifically not recommended other than strictly for debugging SSH communications since it provides so much data that it is difficult to identify important security information. "INFO" or "VERBOSE" level is the basic level that only records login activity of SSH users. In many situations, such as Incident Response, it is important to determine when a particular user was active on a system. The logout record can eliminate those users who disconnected, which helps narrow the field.
Verify that OL 9 logs SSH connection attempts and failures to the server.

Check what the SSH daemon's "LogLevel" option is set to with the following command:

$ sudo /usr/sbin/sshd -dd 2>&1 | awk '/filename/ {print $4}' | tr -d '\r' | tr '\n' ' ' | xargs sudo grep -iH '^\s*loglevel'
LogLevel VERBOSE

If a value of "VERBOSE" is not returned, the line is commented out, or is missing, this is a finding.
Configure OL 9 to log connection attempts add or modify the following line in "/etc/ssh/sshd_config" or in a file in "/etc/ssh/sshd_config.d".

LogLevel VERBOSE

Restart the SSH daemon for the settings to take effect:

$ sudo systemctl restart sshd.service
OL09-00-002340 SV-271703r1091821_rule
V-271704 CCI-001813 medium OL 9 SSH daemon must not allow Generic Security Service Application Program Interface (GSSAPI) authentication. SRG-OS-000364-GPOS-00151
GSSAPI authentication is used to provide additional authentication mechanisms to applications. Allowing GSSAPI authentication through SSH exposes the system's GSSAPI to remote hosts, increasing the attack surface of the system.
Verify that OL 9 SSH daemon does not allow GSSAPI authentication with the following command:

$ sudo /usr/sbin/sshd -dd 2>&1 | awk '/filename/ {print $4}' | tr -d '\r' | tr '\n' ' ' | xargs sudo grep -iH '^\s*gssapiauthentication'
GSSAPIAuthentication no

If the value is returned as "yes", the returned line is commented out, no output is returned, and the use of GSSAPI authentication has not been documented with the information system security officer (ISSO), this is a finding.
Configure the SSH daemon to not allow GSSAPI authentication.

Add or uncomment the following line to "/etc/ssh/sshd_config" or to a file in "/etc/ssh/sshd_config.d" and set the value to "no":

GSSAPIAuthentication no

The SSH service must be restarted for changes to take effect:

$ sudo systemctl restart sshd.service
OL09-00-002341 SV-271704r1091824_rule
V-271705 CCI-002418 medium OL 9 must force a frequent session key renegotiation for SSH connections to the server. SRG-OS-000423-GPOS-00187
Without protection of the transmitted information, confidentiality and integrity may be compromised because unprotected communications can be intercepted and either read or altered. 

This requirement applies to both internal and external networks and all types of information system components from which information can be transmitted (e.g., servers, mobile devices, notebook computers, printers, copiers, scanners, and facsimile machines). Communication paths outside the physical protection of a controlled boundary are exposed to the possibility of interception and modification. 

Protecting the confidentiality and integrity of organizational information can be accomplished by physical means (e.g., employing physical distribution systems) or by logical means (e.g., employing cryptographic techniques). If physical means of protection are employed, then logical means (cryptography) do not have to be employed, and vice versa.

Session key regeneration limits the chances of a session key becoming compromised.

Satisfies: SRG-OS-000423-GPOS-00187, SRG-OS-000033-GPOS-00014, SRG-OS-000424-GPOS-00188
Verify that OL 9 SSH server is configured to force frequent session key renegotiation with the following command:

$ sudo /usr/sbin/sshd -dd 2>&1 | awk '/filename/ {print $4}' | tr -d '\r' | tr '\n' ' ' | xargs sudo grep -iH '^\s*rekeylimit'
RekeyLimit 1G 1h

If "RekeyLimit" does not have a maximum data amount and maximum time defined, is missing or commented out, this is a finding.
Configure OL 9 to force a frequent session key renegotiation for SSH connections to the server by adding or modifying the following line in the "/etc/ssh/sshd_config" or in a file in "/etc/ssh/sshd_config.d":

RekeyLimit 1G 1h

Restart the SSH daemon for the settings to take effect.

$ sudo systemctl restart sshd.service
OL09-00-002342 SV-271705r1091827_rule
V-271706 CCI-000766 high OL 9 SSHD must not allow blank passwords. SRG-OS-000106-GPOS-00053
If an account has an empty password, anyone could log on and run commands with the privileges of that account. Accounts with empty passwords should never be used in operational environments.
Verify that OL 9 remote access using SSH prevents logging on with a blank password with the following command:

$ sudo /usr/sbin/sshd -dd 2>&1 | awk '/filename/ {print $4}' | tr -d '\r' | tr '\n' ' ' | xargs sudo grep -iH '^\s*permitemptypasswords'
PermitEmptyPasswords no

If the "PermitEmptyPasswords" keyword is set to "yes", is missing, or is commented out, this is a finding.
Configure OL 9 to prevent SSH users from logging on with blank passwords by editing the following line in "/etc/ssh/sshd_config" or in a file in "/etc/ssh/sshd_config.d":

PermitEmptyPasswords no

Restart the SSH daemon for the settings to take effect:

$ sudo systemctl restart sshd.service
OL09-00-002343 SV-271706r1091830_rule
V-271707 CCI-000877 high OL 9 must enable the Pluggable Authentication Module (PAM) interface for SSHD. SRG-OS-000125-GPOS-00065
When UsePAM is set to "yes", PAM runs through account and session types properly. This is important when restricted access to services based off of IP, time, or other factors of the account is needed. Additionally, this ensures users can inherit certain environment variables on login or disallow access to the server.
Verify that OL 9 SSHD is configured to allow for the UsePAM interface with the following command:

$ sudo /usr/sbin/sshd -dd 2>&1 | awk '/filename/ {print $4}' | tr -d '\r' | tr '\n' ' ' | xargs sudo grep -iH '^\s*usepam'
UsePAM yes

If the "UsePAM" keyword is set to "no", is missing, or is commented out, this is a finding.
Configure the OL 9 SSHD to use the UsePAM interface by adding or modifying the following line in "/etc/ssh/sshd_config" or in a file in "/etc/ssh/sshd_config.d".

UsePAM yes

Restart the SSH daemon for the settings to take effect:

$ sudo systemctl restart sshd.service
OL09-00-002344 SV-271707r1091833_rule
V-271708 CCI-004045 medium OL 9 must not permit direct logons to the root account using remote access via SSH. SRG-OS-000109-GPOS-00056
Even though the communications channel may be encrypted, an additional layer of security is gained by extending the policy of not logging directly on as root. In addition, logging in with a user-specific account provides individual accountability of actions performed on the system and also helps to minimize direct attack attempts on root's password.
Verify that OL 9 remote access using SSH prevents users from logging on directly as "root" with the following command:

$ sudo /usr/sbin/sshd -dd 2>&1 | awk '/filename/ {print $4}' | tr -d '\r' | tr '\n' ' ' | xargs sudo grep -iH '^\s*permitrootlogin'
PermitRootLogin no

If the "PermitRootLogin" keyword is set to "yes", is missing, or is commented out, this is a finding.
Configure OL 9 to prevent SSH users from logging on directly as root by adding or modifying the following line in "/etc/ssh/sshd_config" or in a file in "/etc/ssh/sshd_config.d".

PermitRootLogin no

Restart the SSH daemon for the settings to take effect:

$ sudo systemctl restart sshd.service
OL09-00-002345 SV-271708r1092594_rule
V-271709 CCI-001133 medium OL 9 must be configured so that all network connections associated with SSH traffic terminate after becoming unresponsive. SRG-OS-000163-GPOS-00072
Terminating an unresponsive SSH session within a short time period reduces the window of opportunity for unauthorized personnel to take control of a management session enabled on the console or console port that has been left unattended. In addition, quickly terminating an idle SSH session will also free up resources committed by the managed network element.

Terminating network connections associated with communications sessions includes, for example, deallocating associated TCP/IP address/port pairs at the operating system level and deallocating networking assignments at the application level if multiple application sessions are using a single operating system-level network connection. This does not mean the operating system terminates all sessions or network access; it only ends the unresponsive session and releases the resources associated with that session.

OL 9 uses /etc/ssh/sshd_config for configurations of OpenSSH. Within the sshd_config, the product of the values of "ClientAliveInterval" and "ClientAliveCountMax" are used to establish the inactivity threshold. The "ClientAliveInterval" is a timeout interval in seconds, after which if no data has been received from the client, SSHD will send a message through the encrypted channel to request a response from the client. The "ClientAliveCountMax" is the number of client alive messages that may be sent without SSHD receiving any messages back from the client. If this threshold is met, sshd will disconnect the client. For more information on these settings and others, refer to the sshd_config man pages.

Satisfies: SRG-OS-000163-GPOS-00072, SRG-OS-000279-GPOS-00109
Verify that OL 9 is configured so that all network connections associated with SSH traffic terminate after becoming unresponsive.

Verify that the "ClientAliveCountMax" is set to "1" by performing the following command:

$ sudo /usr/sbin/sshd -dd 2>&1 | awk '/filename/ {print $4}' | tr -d '\r' | tr '\n' ' ' | xargs sudo grep -iH '^\s*clientalivecountmax'
ClientAliveCountMax 1

If "ClientAliveCountMax" does not exist, is not set to a value of "1" in "/etc/ssh/sshd_config", or is commented out, this is a finding.
Note: This setting must be applied in conjunction with ClientAliveInterval to function correctly.

Configure the SSH server to terminate a user session automatically after the SSH client has become unresponsive.

Modify or append the following lines in the "/etc/ssh/sshd_config" or in a file in "/etc/ssh/sshd_config.d":

ClientAliveCountMax 1

In order for the changes to take effect, the SSH daemon must be restarted.

$ sudo systemctl restart sshd.service
OL09-00-002346 SV-271709r1091839_rule
V-271710 CCI-001133 medium OL 9 must be configured so that all network connections associated with SSH traffic are terminated after 10 minutes of becoming unresponsive. SRG-OS-000163-GPOS-00072
Terminating an unresponsive SSH session within a short time period reduces the window of opportunity for unauthorized personnel to take control of a management session enabled on the console or console port that has been left unattended. In addition, quickly terminating an idle SSH session will also free up resources committed by the managed network element.

Terminating network connections associated with communications sessions includes, for example, deallocating associated TCP/IP address/port pairs at the operating system level and deallocating networking assignments at the application level if multiple application sessions are using a single operating system-level network connection. This does not mean the operating system terminates all sessions or network access; it only ends the unresponsive session and releases the resources associated with that session.

OL 9 uses /etc/ssh/sshd_config for configurations of OpenSSH. Within the sshd_config, the product of the values of "ClientAliveInterval" and "ClientAliveCountMax" are used to establish the inactivity threshold. The "ClientAliveInterval" is a timeout interval in seconds, after which if no data has been received from the client, SSHD will send a message through the encrypted channel to request a response from the client. The "ClientAliveCountMax" is the number of client alive messages that may be sent without SSHD receiving any messages back from the client. If this threshold is met, SSHD will disconnect the client. For more information on these settings and others, refer to the sshd_config man pages.

Satisfies: SRG-OS-000163-GPOS-00072, SRG-OS-000279-GPOS-00109, SRG-OS-000395-GPOS-00175
Verify that OL 9 is configured so that all network connections associated with SSH traffic are terminated after 10 minutes of becoming unresponsive.

Verify that the "ClientAliveInterval" variable is set to a value of "600" or less by performing the following command:

$ sudo /usr/sbin/sshd -dd 2>&1 | awk '/filename/ {print $4}' | tr -d '\r' | tr '\n' ' ' | xargs sudo grep -iH '^\s*clientaliveinterval'
ClientAliveInterval 600

If "ClientAliveInterval" does not exist, does not have a value of "600" or less in "/etc/ssh/sshd_config", or is commented out, this is a finding.
Note: This setting must be applied in conjunction with ClientAliveCountMax" setting to function correctly.

Configure the SSH server to terminate a user session automatically after the SSH client has been unresponsive for 10 minutes.

Modify or append the following lines in the "/etc/ssh/sshd_config" or in a file in "/etc/ssh/sshd_config.d":

ClientAliveInterval 600

In order for the changes to take effect, the SSH daemon must be restarted.

$ sudo systemctl restart sshd.service
OL09-00-002347 SV-271710r1092596_rule
V-271711 CCI-000366 medium OL 9 SSH daemon must not allow rhosts authentication. SRG-OS-000480-GPOS-00227
SSH trust relationships mean a compromise on one host can allow an attacker to move trivially to other hosts.
Verify that OL 9 SSH daemon does not allow rhosts authentication with the following command:

$ sudo /usr/sbin/sshd -dd 2>&1 | awk '/filename/ {print $4}' | tr -d '\r' | tr '\n' ' ' | xargs sudo grep -iH '^\s*ignorerhosts'
IgnoreRhosts yes

If the value is returned as "no", the returned line is commented out, or no output is returned, this is a finding.
Configure the SSH daemon to not allow rhosts authentication.

Add the following line to "/etc/ssh/sshd_config" or to a file in "/etc/ssh/sshd_config.d" or uncomment the line and set the value to "yes":

IgnoreRhosts yes

The SSH service must be restarted for changes to take effect:

$ sudo systemctl restart sshd.service
OL09-00-002348 SV-271711r1091845_rule
V-271712 CCI-000366 medium OL 9 SSH daemon must not allow known hosts authentication. SRG-OS-000480-GPOS-00227
Configuring the IgnoreUserKnownHosts setting for the SSH daemon provides additional assurance that remote login via SSH will require a password, even in the event of misconfiguration elsewhere.
Verify that OL 9 SSH daemon does not allow known hosts authentication with the following command:

$ sudo /usr/sbin/sshd -dd 2>&1 | awk '/filename/ {print $4}' | tr -d '\r' | tr '\n' ' ' | xargs sudo grep -iH '^\s*ignoreuserknownhosts'
IgnoreUserKnownHosts yes

If the value is returned as "no", the returned line is commented out, or no output is returned, this is a finding.
Configure the SSH daemon to not allow known hosts authentication.

Add the following line to "/etc/ssh/sshd_config" or to a file in "/etc/ssh/sshd_config.d" or uncomment the line and set the value to "yes":

IgnoreUserKnownHosts yes

The SSH service must be restarted for changes to take effect:

$ sudo systemctl restart sshd.service
OL09-00-002349 SV-271712r1091848_rule
V-271713 CCI-000366 medium OL 9 SSH daemon must disable remote X connections for interactive users. SRG-OS-000480-GPOS-00227
When X11 forwarding is enabled, there may be additional exposure to the server and client displays if the SSHD proxy display is configured to listen on the wildcard address. By default, SSHD binds the forwarding server to the loopback address and sets the hostname part of the DISPLAY environment variable to localhost. This prevents remote hosts from connecting to the proxy display.
Verify that OL 9 SSH daemon does not allow X11Forwarding with the following command:

$ sudo /usr/sbin/sshd -dd 2>&1 | awk '/filename/ {print $4}' | tr -d '\r' | tr '\n' ' ' | xargs sudo grep -iH '^\s*x11forwarding'
X11forwarding no

If the value is returned as "yes", the returned line is commented out, or no output is returned, and X11 forwarding is not documented with the information system security officer (ISSO) as an operational requirement, this is a finding.
Configure the SSH daemon to not allow X11 forwarding.

Add the following line to "/etc/ssh/sshd_config" or to a file in "/etc/ssh/sshd_config.d" or uncomment the line and set the value to "no":

X11Forwarding no

The SSH service must be restarted for changes to take effect:

$ sudo systemctl restart sshd.service
OL09-00-002350 SV-271713r1091851_rule
V-271714 CCI-000366 medium OL 9 SSH daemon must perform strict mode checking of home directory configuration files. SRG-OS-000480-GPOS-00227
If other users have access to modify user-specific SSH configuration files, they may be able to log into the system as another user.
Verify that OL 9 SSH daemon performs strict mode checking of home directory configuration files with the following command:

$ sudo /usr/sbin/sshd -dd 2>&1 | awk '/filename/ {print $4}' | tr -d '\r' | tr '\n' ' ' | xargs sudo grep -iH '^\s*strictmodes'
StrictModes yes

If the "StrictModes" keyword is set to "no", the returned line is commented out, or no output is returned, this is a finding.
Configure the SSH daemon to perform strict mode checking of home directory configuration files.

Add the following line to "/etc/ssh/sshd_config" or to a file in "/etc/ssh/sshd_config.d" or uncomment the line and set the value to "yes":

StrictModes yes

The SSH service must be restarted for changes to take effect:

$ sudo systemctl restart sshd.service
OL09-00-002351 SV-271714r1091854_rule
V-271715 CCI-000366 medium OL 9 SSH daemon must display the date and time of the last successful account logon upon an SSH logon. SRG-OS-000480-GPOS-00227
Providing users feedback on when account accesses last occurred facilitates user recognition and reporting of unauthorized account use.
Verify that OL 9 SSH daemon provides users with feedback on when account accesses last occurred with the following command:

$ sudo /usr/sbin/sshd -dd 2>&1 | awk '/filename/ {print $4}' | tr -d '\r' | tr '\n' ' ' | xargs sudo grep -iH '^\s*printlastlog'
PrintLastLog yes

If the "PrintLastLog" keyword is set to "no", the returned line is commented out, or no output is returned, this is a finding.
Configure the SSH daemon to provide users with feedback on when account accesses last occurred.

Add the following line to "/etc/ssh/sshd_config" or to a file in "/etc/ssh/sshd_config.d" or uncomment the line and set the value to "yes":

PrintLastLog yes

The SSH service must be restarted for changes to take effect:

$ sudo systemctl restart sshd.service
OL09-00-002352 SV-271715r1091857_rule
V-271716 CCI-000366 medium OL 9 SSH daemon must prevent remote hosts from connecting to the proxy display. SRG-OS-000480-GPOS-00227
When X11 forwarding is enabled, there may be additional exposure to the server and client displays if the SSHD proxy display is configured to listen on the wildcard address. By default, SSHD binds the forwarding server to the loopback address and sets the hostname part of the "DISPLAY" environment variable to localhost. This prevents remote hosts from connecting to the proxy display.
Verify that OL 9 SSH daemon prevents remote hosts from connecting to the proxy display with the following command:

$ sudo /usr/sbin/sshd -dd 2>&1 | awk '/filename/ {print $4}' | tr -d '\r' | tr '\n' ' ' | xargs sudo grep -iH '^\s*x11uselocalhost'
X11UseLocalhost yes

If the "X11UseLocalhost" keyword is set to "no", is missing, or is commented out, this is a finding.
Configure the SSH daemon to prevent remote hosts from connecting to the proxy display.

Add the following line to "/etc/ssh/sshd_config" or to a file in "/etc/ssh/sshd_config.d" or uncomment the line and set the value to "yes":

X11UseLocalhost yes

The SSH service must be restarted for changes to take effect:

$ sudo systemctl restart sshd.service
OL09-00-002354 SV-271716r1091860_rule
V-271717 CCI-000366 medium OL 9 SSH daemon must not allow compression or must only allow compression after successful authentication. SRG-OS-000480-GPOS-00227
If compression is allowed in an SSH connection prior to authentication, vulnerabilities in the compression software could result in compromise of the system from an unauthenticated connection, potentially with root privileges.
Verify that OL 9 SSH daemon performs compression after a user successfully authenticates with the following command:

$ sudo /usr/sbin/sshd -dd 2>&1 | awk '/filename/ {print $4}' | tr -d '\r' | tr '\n' ' ' | xargs sudo grep -iH '^\s*compression'
Compression delayed

If the "Compression" keyword is set to "yes", is missing, or the returned line is commented out, this is a finding.
Configure the SSH daemon to not allow compression.

Add the following line to "/etc/ssh/sshd_config" or to a file in "/etc/ssh/sshd_config.d" or uncomment the line and set the value to "delayed" or "no":

Compression no

The SSH service must be restarted for changes to take effect:

$ sudo systemctl restart sshd.service
OL09-00-002355 SV-271717r1091863_rule
V-271718 CCI-001813 medium OL 9 SSH daemon must not allow Kerberos authentication. SRG-OS-000364-GPOS-00151
Kerberos authentication for SSH is often implemented using Generic Security Service Application Program Interface (GSSAPI). If Kerberos is enabled through SSH, the SSH daemon provides a means of access to the system's Kerberos implementation. Vulnerabilities in the system's Kerberos implementations may be subject to exploitation.
Verify that OL 9 SSH daemon does not allow Kerberos authentication with the following command:

$ sudo /usr/sbin/sshd -dd 2>&1 | awk '/filename/ {print $4}' | tr -d '\r' | tr '\n' ' ' | xargs sudo grep -iH '^\s*kerberosauthentication'
KerberosAuthentication no

If the value is returned as "yes", the returned line is commented out, no output is returned, and the use of Kerberos authentication has not been documented with the information system security officer (ISSO), this is a finding.
Configure the SSH daemon to not allow Kerberos authentication.

Add the following line in "/etc/ssh/sshd_config" or to a file in "/etc/ssh/sshd_config.d" or uncomment the line and set the value to "no":

KerberosAuthentication no

The SSH service must be restarted for changes to take effect:

$ sudo systemctl restart sshd.service
OL09-00-002356 SV-271718r1091866_rule
V-271719 CCI-000366 medium OL 9 must not allow a noncertificate trusted host SSH logon to the system. SRG-OS-000480-GPOS-00229
SSH trust relationships mean a compromise on one host can allow an attacker to move trivially to other hosts.
Verify that OL 9 does not allow a noncertificate trusted host SSH logon to the system with the following command:

$ sudo /usr/sbin/sshd -dd 2>&1 | awk '/filename/ {print $4}' | tr -d '\r' | tr '\n' ' ' | xargs sudo grep -iH '^\s*hostbasedauthentication'
HostbasedAuthentication no

If the "HostbasedAuthentication" keyword is not set to "no", is missing, or is commented out, this is a finding.
Configure OL 9 to not allow a noncertificate trusted host SSH logon to access the system.

Add or modify the following line in "/etc/ssh/sshd_config" or in a file in "/etc/ssh/sshd_config.d".

HostbasedAuthentication no

Restart the SSH daemon for the settings to take effect:

$ sudo systemctl restart sshd.service
OL09-00-002357 SV-271719r1091869_rule
V-271720 CCI-000366 medium OL 9 must not allow users to override SSH environment variables. SRG-OS-000480-GPOS-00229
SSH environment options potentially allow users to bypass access restriction in some configurations.
Verify that OL 9 does not allow users to override SSH environment variables.

Verify that unattended or automatic logon via SSH is disabled with the following command:

$ sudo /usr/sbin/sshd -dd 2>&1 | awk '/filename/ {print $4}' | tr -d '\r' | tr '\n' ' ' | xargs sudo grep -iH '^\s*permituserenvironment'
PermitUserEnvironment no

If "PermitUserEnvironment" is set to "yes", is missing completely, or is commented out, this is a finding.
Configure the OL 9 SSH daemon to not allow unattended or automatic logon to the system.

Add or edit the following line in the "/etc/ssh/sshd_config" or in a file in "/etc/ssh/sshd_config.d":

PermitUserEnvironment no

Restart the SSH daemon for the setting to take effect:

$ sudo systemctl restart sshd.service
OL09-00-002358 SV-271720r1091872_rule
V-271721 CCI-000765 medium OL 9 SSHD must accept public key authentication. SRG-OS-000105-GPOS-00052
Without the use of multifactor authentication, the ease of access to privileged functions is greatly increased. Multifactor authentication requires using two or more factors to achieve authentication. A privileged account is defined as an information system account with authorizations of a privileged user. A DOD CAC with DOD-approved PKI is an example of multifactor authentication.

Satisfies: SRG-OS-000105-GPOS-00052, SRG-OS-000106-GPOS-00053, SRG-OS-000107-GPOS-00054, SRG-OS-000108-GPOS-00055
Verify that OL 9 SSH daemon accepts public key encryption with the following command:
 
$ sudo grep -i PubkeyAuthentication /etc/ssh/sshd_config
PubkeyAuthentication yes
 
If "PubkeyAuthentication" is set to no, the line is commented out, or the line is missing, this is a finding.
Configure OL 9 to accept public key authentication by adding or modifying the following line in "/etc/ssh/sshd_config".

PubkeyAuthentication yes

Restart the SSH daemon for the settings to take effect:

$ sudo systemctl restart sshd.service
OL09-00-002359 SV-271721r1091875_rule
V-271722 CCI-000366 medium OL 9 must require reauthentication when using the "sudo" command. SRG-OS-000480-GPOS-00227
Without reauthentication, users may access resources or perform tasks for which they do not have authorization. 

When operating systems provide the capability to escalate a functional capability, it is critical the organization requires the user to reauthenticate when using the "sudo" command.

If the value is set to an integer less than "0", the user's time stamp will not expire and the user will not have to reauthenticate for privileged actions until the user's session is terminated.
Verify that OL 9 requires reauthentication when using the "sudo" command to elevate privileges with the following command:

$ sudo grep -i 'timestamp_timeout' /etc/sudoers /etc/sudoers.d/*
/etc/sudoers:Defaults timestamp_timeout=0

If results are returned from more than one file location, this is a finding.

If "timestamp_timeout" is set to a negative number, is commented out, or no results are returned, this is a finding.
Configure OL 9 to reauthenticate "sudo" commands after the specified timeout:

Add the following line to "/etc/sudoers":

Defaults timestamp_timeout=0
OL09-00-002360 SV-271722r1091878_rule
V-271723 CCI-002165 medium OL 9 must restrict the use of the su command. SRG-OS-000312-GPOS-00123
The su program allows to run commands with a substitute user and group ID. It is commonly used to run commands as the root user. Limiting access to such commands is considered a good security practice.
Verify that OL 9 requires uses to be members of the "wheel" group with the following command:

$ grep pam_wheel /etc/pam.d/su 
auth             required        pam_wheel.so use_uid 

If a line for "pam_wheel.so" does not exist, or is commented out, this is a finding.
Configure OL 9 to require users to be in the "wheel" group to run su command.

In file "/etc/pam.d/su", uncomment the following line:

"#auth    required    pam_wheel.so use_uid"

Or use the following command to update /etc/pam.d/su 

$ sed '/^[[:space:]]*#[[:space:]]*auth[[:space:]]\+required[[:space:]]\+pam_wheel\.so[[:space:]]\+use_uid$/s/^[[:space:]]*#//' -i /etc/pam.d/su

If necessary, create a "wheel" group and add administrative users to the group.

$ grep wheel /etc/group
OL09-00-002361 SV-271723r1091881_rule
V-271724 CCI-002234 medium OL 9 must require users to reauthenticate for privilege escalation. SRG-OS-000327-GPOS-00127
Without reauthentication, users may access resources or perform tasks for which they do not have authorization.

When operating systems provide the capability to escalate a functional capability, it is critical that the user reauthenticate.
Verify that OL 9 requires users to reauthenticate for privilege escalation.

Verify that "/etc/sudoers" has no occurrences of "!authenticate" with the following command:

$ sudo grep -ri '!authenticate' /etc/sudoers /etc/sudoers.d/*

If any occurrences of "!authenticate" are returned, this is a finding.
Configure OL 9 to not allow users to execute privileged actions without authenticating.

Remove any occurrence of "!authenticate" found in "/etc/sudoers" file or files in the "/etc/sudoers.d" directory.

$ sudo sed -i '/\!authenticate/ s/^/# /g' /etc/sudoers /etc/sudoers.d/*
OL09-00-002362 SV-271724r1091884_rule
V-271725 CCI-002234 medium OL 9 must require users to provide a password for privilege escalation. SRG-OS-000327-GPOS-00127
Without reauthentication, users may access resources or perform tasks for which they do not have authorization.

When operating systems provide the capability to escalate a functional capability, it is critical that the user reauthenticate.
Verify that OL 9 requires users to provide a password for privilege escalation.

Verify that "/etc/sudoers" has no occurrences of "NOPASSWD" with the following command:

$ sudo grep -ri nopasswd /etc/sudoers /etc/sudoers.d/*

If any occurrences of "NOPASSWD" are returned, this is a finding.
Configure OL 9 to not allow users to execute privileged actions without authenticating with a password.

Remove any occurrence of "NOPASSWD" found in "/etc/sudoers" file or files in the "/etc/sudoers.d" directory.

$ sudo sed -i '/NOPASSWD/ s/^/# /g' /etc/sudoers /etc/sudoers.d/*
OL09-00-002363 SV-271725r1091887_rule
V-271726 CCI-002234 medium OL 9 must not be configured to bypass password requirements for privilege escalation. SRG-OS-000327-GPOS-00127
Without reauthentication, users may access resources or perform tasks for which they do not have authorization. When operating systems provide the capability to escalate a functional capability, it is critical the user reauthenticate.
Verify that OL 9 is not configured to bypass password requirements for privilege escalation with the following command:

$ grep pam_succeed_if /etc/pam.d/sudo 

If any occurrences of "pam_succeed_if" are returned, this is a finding.
Configure the operating system to require users to supply a password for privilege escalation.

Remove any occurrences of " pam_succeed_if " in the  "/etc/pam.d/sudo" file.
OL09-00-002364 SV-271726r1091890_rule
V-271727 CCI-000366 medium OL 9 must disable the use of user namespaces. SRG-OS-000480-GPOS-00227
User namespaces are used primarily for Linux containers. The value "0" disallows the use of user namespaces.
Note: User namespaces are used primarily for Linux containers. If containers are in use, this requirement is Not Applicable.

Verify that OL 9 disables the use of user namespaces with the following commands:

$ sysctl user.max_user_namespaces
user.max_user_namespaces = 0

If the returned line does not have a value of "0", or a line is not returned, this is a finding.
Configure OL 9 to disable the use of user namespaces by adding the following line to a file, in the "/etc/sysctl.d" directory:

Note: User namespaces are used primarily for Linux containers. If containers are in use, this requirement is Not Applicable. 

user.max_user_namespaces = 0

The system configuration files need to be reloaded for the changes to take effect. To reload the contents of the files, run the following command:

$ sudo sysctl --system
OL09-00-002370 SV-271727r1091893_rule
V-271728 CCI-000366 medium OL 9 must disable the kernel.core_pattern. SRG-OS-000480-GPOS-00227
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.
Verify that OL 9 disables storing core dumps with the following commands:

$ sysctl kernel.core_pattern
kernel.core_pattern = |/bin/false

If the returned line does not have a value of "|/bin/false", or a line is not returned and the need for core dumps is not documented with the information system security officer (ISSO) as an operational requirement, this is a finding.
Configure OL 9 to disable storing core dumps.

Add or edit the following line in a system configuration file, in the "/etc/sysctl.d/" directory:

kernel.core_pattern = |/bin/false

The system configuration files need to be reloaded for the changes to take effect. To reload the contents of the files, run the following command:

$ sudo sysctl --system
OL09-00-002380 SV-271728r1091896_rule
V-271729 CCI-000366 medium OL 9 must disable core dump backtraces. SRG-OS-000480-GPOS-00227
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 or system operators trying to debug problems.

Enabling core dumps on production systems is not recommended; however, there may be overriding operational requirements to enable advanced debugging. Permitting temporary enablement of core dumps during such situations must be reviewed through local needs and policy.
Verify that OL 9 disables core dump backtraces by issuing the following command:

$ grep -i process /etc/systemd/coredump.conf
ProcessSizeMax=0

If the "ProcessSizeMax" item is missing, commented out, or the value is anything other than "0" and the need for core dumps is not documented with the information system security officer (ISSO) as an operational requirement for all domains that have the "core" item assigned, this is a finding.
Configure the operating system to disable core dump backtraces.

Add or modify the following line in /etc/systemd/coredump.conf:

ProcessSizeMax=0
OL09-00-002381 SV-271729r1091899_rule
V-271730 CCI-000366 medium OL 9 must disable storing core dumps. SRG-OS-000480-GPOS-00227
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 or system operators trying to debug problems. Enabling core dumps on production systems is not recommended; however, there may be overriding operational requirements to enable advanced debugging. Permitting temporary enablement of core dumps during such situations must be reviewed through local needs and policy.
Verify that OL 9 disables storing core dumps for all users by issuing the following command:

$ grep -i storage /etc/systemd/coredump.conf
Storage=none

If the "Storage" item is missing, commented out, or the value is anything other than "none" and the need for core dumps is not documented with the information system security officer (ISSO) as an operational requirement for all domains that have the "core" item assigned, this is a finding.
Configure the operating system to disable storing core dumps for all users.

Add or modify the following line in /etc/systemd/coredump.conf:

Storage=none
OL09-00-002382 SV-271730r1091902_rule
V-271731 CCI-000366 medium OL 9 must disable core dumps for all users. SRG-OS-000480-GPOS-00227
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.
Verify that OL 9 disables core dumps for all users by issuing the following command:

$ grep -r -s core /etc/security/limits.conf /etc/security/limits.d/*.conf
/etc/security/limits.conf:* hard core 0

This can be set as a global domain (with the * wildcard) but may be set differently for multiple domains.

If the "core" item is missing, commented out, or the value is anything other than "0" and the need for core dumps is not documented with the information system security officer (ISSO) as an operational requirement for all domains that have the "core" item assigned, this is a finding.
Configure the operating system to disable core dumps for all users.

Add the following line to the top of the /etc/security/limits.conf or in a single ".conf" file defined in /etc/security/limits.d/:

* hard core 0
OL09-00-002383 SV-271731r1091905_rule
V-271732 CCI-000366 medium OL 9 must disable acquiring, saving, and processing core dumps. SRG-OS-000480-GPOS-00227
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.
Verify that OL 9 is not configured to acquire, save, or process core dumps with the following command:

$ systemctl status systemd-coredump.socket
systemd-coredump.socket
Loaded: masked (Reason: Unit systemd-coredump.socket is masked.)
Active: inactive (dead)

If the "systemd-coredump.socket" is loaded and not masked and the need for core dumps is not documented with the information system security officer (ISSO) as an operational requirement, this is a finding.
Configure the system to disable the systemd-coredump.socket with the following command:

$ sudo systemctl mask --now systemd-coredump.socket

Created symlink /etc/systemd/system/systemd-coredump.socket -> /dev/null

Reload the daemon for this change to take effect.

$ sudo systemctl daemon-reload
OL09-00-002384 SV-271732r1091908_rule
V-271733 CCI-000366 medium OL 9 must be configured so that the kdump service is disabled. SRG-OS-000480-GPOS-00227
Kernel core dumps may contain the full contents of system memory at the time of the crash. Kernel core dumps consume a considerable amount of disk space and may result in denial of service by exhausting the available space on the target file system partition. Unless the system is used for kernel development or testing, there is little need to run the kdump service.
Verify that OL 9 kdump service is disabled or masked in system boot configuration with the following command:

$ systemctl is-enabled  kdump  
disabled (or masked)

Verify that the kdump service is not active (i.e., not running) through current runtime configuration with the following command:

$ systemctl is-active kdump 
inactive 

Verify that the kdump service is masked with the following command:

$ systemctl show  kdump  | grep "LoadState\|UnitFileState" 
LoadState=masked 
UnitFileState=masked 

If the "kdump" service is loaded or active, and is not masked, this is a finding.
Configure OL 9 to disable and mask the kdump service.

To disable the kdump service, run the following command:

$ sudo systemctl disable --now kdump

To mask the kdump service, run the following command:

$ sudo systemctl mask --now kdump
OL09-00-002385 SV-271733r1092598_rule
V-271734 CCI-002824 medium OL 9 must clear SLUB/SLAB objects to prevent use-after-free attacks. SRG-OS-000433-GPOS-00192
Some adversaries launch attacks with the intent of executing code in nonexecutable regions of memory or in memory locations that are prohibited. Security safeguards employed to protect memory include, for example, data execution prevention and address space layout randomization. Data execution prevention safeguards can be either hardware-enforced or software-enforced with hardware providing the greater strength of mechanism.

Poisoning writes an arbitrary value to freed pages, so any modification or reference to that page after being freed or before being initialized will be detected and prevented. This prevents many types of use-after-free vulnerabilities at little performance cost. Also prevents leak of data and detection of corrupted memory.

SLAB objects are blocks of physically contiguous memory. SLUB is the unqueued SLAB allocator.

Satisfies: SRG-OS-000433-GPOS-00192, SRG-OS-000134-GPOS-00068
Verify that OL 9 GRUB 2 is configured to enable poisoning of SLUB/SLAB objects to mitigate use-after-free vulnerabilities with the following commands:

Check that the current GRUB 2 configuration has poisoning of SLUB/SLAB objects enabled:

$ sudo grubby --info=ALL | grep args | grep -v 'slub_debug=P' 
If any output is returned, this is a finding.

Check that poisoning of SLUB/SLAB objects is enabled by default to persist in kernel updates: 

$ sudo grep slub_debug /etc/default/grub
GRUB_CMDLINE_LINUX="slub_debug=P"

If "slub_debug" is not set to "P", is missing or commented out, this is a finding.
Configure OL 9 to enable poisoning of SLUB/SLAB objects with the following commands:

$ sudo grubby --update-kernel=ALL --args="slub_debug=P"

Add or modify the following line in "/etc/default/grub" to ensure the configuration survives kernel updates:

GRUB_CMDLINE_LINUX="slub_debug=P"
OL09-00-002390 SV-271734r1091914_rule
V-271735 CCI-002824 low OL 9 must enable mitigations against processor-based vulnerabilities. SRG-OS-000433-GPOS-00193
Kernel page-table isolation is a kernel feature that mitigates the Meltdown security vulnerability and hardens the kernel against attempts to bypass kernel address space layout randomization (KASLR).

Satisfies: SRG-OS-000433-GPOS-00193, SRG-OS-000095-GPOS-00049
Verify that OL 9 enables kernel page-table isolation with the following command:

$ sudo grubby --info=ALL | grep pti
args="ro crashkernel=auto resume=/dev/mapper/ol-swap rd.lvm.lv=ol/root rd.lvm.lv=ol/swap rhgb quiet fips=1 audit=1 audit_backlog_limit=8192 pti=on 

If the "pti" entry does not equal "on", or is missing, this is a finding.

Check that kernel page-table isolation is enabled by default to persist in kernel updates: 

$ sudo grep pti /etc/default/grub
GRUB_CMDLINE_LINUX="pti=on"

If "pti" is not set to "on", is missing or commented out, this is a finding.
Configure OL 9 to enable kernel page-table isolation with the following command:

$ sudo grubby --update-kernel=ALL --args="pti=on"

Add or modify the following line in "/etc/default/grub" to ensure the configuration survives kernel updates:

GRUB_CMDLINE_LINUX="pti=on"
OL09-00-002391 SV-271735r1091917_rule
V-271736 CCI-000366 medium OL 9 must disable the ability of systemd to spawn an interactive boot process. SRG-OS-000480-GPOS-00227
Using interactive or recovery boot, the console user could disable auditing, firewalls, or other services, weakening system security.
Verify that OL 9 GRUB 2 is configured to disable interactive boot.

Check that the current GRUB 2 configuration disables the ability of systemd to spawn an interactive boot process with the following command:

$ sudo grubby --info=ALL | grep args | grep 'systemd.confirm_spawn'

If any output is returned, this is a finding.
Configure OL 9 to allocate sufficient audit_backlog_limit to disable the ability of systemd to spawn an interactive boot process with the following command:

$ sudo grubby --update-kernel=ALL --remove-args="systemd.confirm_spawn"
OL09-00-002392 SV-271736r1091920_rule
V-271737 CCI-001084 medium OL 9 must disable virtual system calls. SRG-OS-000134-GPOS-00068
System calls are special routines in the Linux kernel, which userspace applications ask to do privileged tasks. Invoking a system call is an expensive operation because the processor must interrupt the currently executing task and switch context to kernel mode and then back to userspace after the system call completes. Virtual system calls map into user space a page that contains some variables and the implementation of some system calls. This allows the system calls to be executed in userspace to alleviate the context switching expense.

Virtual system calls provide an opportunity of attack for a user who has control of the return instruction pointer. Disabling virtual system calls help to prevent return-oriented programming (ROP) attacks via buffer overflows and overruns. If the system intends to run containers based on OL 6 components, virtual system calls will have to be enabled so the components function properly.
Verify that OL 9 disables virtual system calls. 

Check the current GRUB 2 configuration with the following command:

$ sudo grubby --info=ALL | grep args | grep -v 'vsyscall=none'

If any output is returned, this is a finding.

Check that virtual system calls are disabled by default to persist in kernel updates with the following command: 

$ grep vsyscall /etc/default/grub
GRUB_CMDLINE_LINUX="vsyscall=none"

If "vsyscall" is not set to "none", is missing or commented out, and is not documented with the information system security officer (ISSO) as an operational requirement, this is a finding.
Document the use of virtual system calls with the ISSO as an operational requirement or disable them with the following command:

$ sudo grubby --update-kernel=ALL --args="vsyscall=none"

Add or modify the following line in "/etc/default/grub" to ensure the configuration survives kernel updates:

GRUB_CMDLINE_LINUX="vsyscall=none"
OL09-00-002393 SV-271737r1094967_rule
V-271738 CCI-001084 medium OL 9 must clear the page allocator to prevent use-after-free attacks. SRG-OS-000134-GPOS-00068
Poisoning writes an arbitrary value to freed pages, so any modification or reference to that page after being freed or before being initialized will be detected and prevented. This prevents many types of use-after-free vulnerabilities at little performance cost. Also prevents leak of data and detection of corrupted memory.
Verify that OL 9 clears the page allocator to prevent use-after-free attacks.

Verify that GRUB 2 is configured to enable page poisoning to mitigate use-after-free vulnerabilities.

Check that the current GRUB 2 configuration has page poisoning enabled with the following command:

$ sudo grubby --info=ALL | grep args | grep -v 'page_poison=1'

If any output is returned, this is a finding.

Check that page poisoning is enabled by default to persist in kernel updates with the following command: 

$ grep page_poison /etc/default/grub
GRUB_CMDLINE_LINUX="page_poison=1"

If "page_poison" is not set to "1", is missing or commented out, this is a finding.
Configure OL 9 to enable page poisoning with the following commands:

$ sudo grubby --update-kernel=ALL --args="page_poison=1"

Add or modify the following line in "/etc/default/grub" to ensure the configuration survives kernel updates:

GRUB_CMDLINE_LINUX="page_poison=1"
OL09-00-002394 SV-271738r1092600_rule
V-271739 CCI-001665 medium OL 9 systemd-journald service must be enabled. SRG-OS-000269-GPOS-00103
In the event of a system failure, OL 9 must preserve any information necessary to determine cause of failure and any information necessary to return to operations with least disruption to system processes.
Verify that OL 9 systemd-journald is active with the following command:

$ systemctl is-active systemd-journald
active

If the systemd-journald service is not active, this is a finding.
Configure OL 9 to enable the systemd-journald service with the following command:

$ sudo systemctl enable --now systemd-journald
OL09-00-002400 SV-271739r1091929_rule
V-271740 CCI-002165 medium OL 9 must enable kernel parameters to enforce discretionary access control on hardlinks. SRG-OS-000312-GPOS-00123
By enabling the fs.protected_hardlinks kernel parameter, users can no longer create soft or hard links to files they do not own. Disallowing such hardlinks mitigates vulnerabilities based on insecure file system accessed by privileged programs, avoiding an exploitation vector exploiting unsafe use of open() or creat().

Satisfies: SRG-OS-000312-GPOS-00123, SRG-OS-000324-GPOS-00125
Verify that OL 9 is configured to enable DAC on hardlinks.

Check the status of the fs.protected_hardlinks kernel parameter with the following command:

$ sudo sysctl fs.protected_hardlinks
fs.protected_hardlinks = 1

If "fs.protected_hardlinks" is not set to "1" or is missing, this is a finding.
Configure OL 9 to enable DAC on hardlinks with the following:

Add or edit the following line in a system configuration file in the "/etc/sysctl.d/" directory:

fs.protected_hardlinks = 1

Load settings from all system configuration files with the following command:

$ sudo sysctl --system
OL09-00-002401 SV-271740r1091932_rule
V-271741 CCI-002165 medium OL 9 must enable kernel parameters to enforce discretionary access control on symlinks. SRG-OS-000312-GPOS-00123
By enabling the fs.protected_symlinks kernel parameter, symbolic links are permitted to be followed only when outside a sticky world-writable directory, or when the user identifier (UID) of the link and follower match, or when the directory owner matches the symlink's owner. Disallowing such symlinks helps mitigate vulnerabilities based on insecure file system accessed by privileged programs, avoiding an exploitation vector exploiting unsafe use of open() or creat().

Satisfies: SRG-OS-000312-GPOS-00123, SRG-OS-000324-GPOS-00125
Verify that OL 9 is configured to enable DAC on symlinks.

Check the status of the fs.protected_symlinks kernel parameter with the following command:

$ sudo sysctl fs.protected_symlinks
fs.protected_symlinks = 1

If "fs.protected_symlinks " is not set to "1" or is missing, this is a finding.
Configure OL 9 to enable DAC on symlinks with the following:

Add or edit the following line in a system configuration file in the "/etc/sysctl.d/" directory:

fs.protected_symlinks = 1

Load settings from all system configuration files with the following command:

$ sudo sysctl --system
OL09-00-002402 SV-271741r1091935_rule
V-271742 CCI-002235 medium OL 9 debug-shell systemd service must be disabled. SRG-OS-000324-GPOS-00125
The debug-shell requires no authentication and provides root privileges to anyone who has physical access to the machine. While this feature is disabled by default, masking it adds an additional layer of assurance that it will not be enabled via a dependency in systemd. This also prevents attackers with physical access from trivially bypassing security on the machine through valid troubleshooting configurations and gaining root access when the system is rebooted.
Verify that OL 9 is configured to mask the debug-shell systemd service with the following command:

$ systemctl status debug-shell.service
debug-shell.service
Loaded: masked (Reason: Unit debug-shell.service is masked.)
Active: inactive (dead)

If the "debug-shell.service" is loaded and not masked, this is a finding.
Configure OL 9 to mask the debug-shell systemd service with the following command:

$ sudo systemctl disable --now debug-shell.service
$ sudo systemctl mask --now debug-shell.service
OL09-00-002403 SV-271742r1091938_rule
V-271743 CCI-000068 medium OL 9 IP tunnels must use 140-3 approved cryptographic algorithms. SRG-OS-000033-GPOS-00014
Overriding the system crypto policy makes the behavior of the Libreswan service violate expectations and makes system configuration more fragmented.
Note: If the IPsec service is not installed, this requirement is Not Applicable.

Verify that the IPsec service uses the systemwide cryptographic policy with the following command:

$ grep include /etc/ipsec.conf /etc/ipsec.d/*.conf
/etc/ipsec.conf:include /etc/crypto-policies/back-ends/libreswan.config

If the IPsec configuration file does not contain "include /etc/crypto-policies/back-ends/libreswan.config", this is a finding.
Configure IPsec to use the systemwide cryptographic policy.

Add the following line to "/etc/ipsec.conf":

include /etc/crypto-policies/back-ends/libreswan.config
OL09-00-002404 SV-271743r1092635_rule
V-271744 CCI-000139 medium OL 9 must have mail aliases to notify the information system security officer (ISSO) and system administrator (SA) (at a minimum) in the event of an audit processing failure. SRG-OS-000046-GPOS-00022
It is critical for the appropriate personnel to be aware if a system is at risk of failing to process audit logs as required. Without this notification, the security personnel may be unaware of an impending failure of the audit capability, and system operation may be adversely affected.

Audit processing failures include software/hardware errors, failures in the audit capturing mechanisms, and audit storage capacity being reached or exceeded.

This requirement applies to each audit data storage repository (i.e., distinct information system component where audit records are stored), the centralized audit storage capacity of organizations (i.e., all audit data storage repositories combined), or both.
Verify that OL 9 is configured to notify the appropriate interactive users in the event of an audit processing failure.

Find the alias maps that are being used with the following command:

$ postconf alias_maps 
alias_maps = hash:/etc/aliases

Query the Postfix alias maps for an alias for the root user with the following command:

$ postmap -q root hash:/etc/aliases
isso

If an alias is not set, this is a finding.
Configure OL 9 to have mail aliases notify the ISSO and SA (at a minimum) in the event of an audit processing failure.

Edit the aliases map file (by default /etc/aliases) used by Postfix and configure a root alias (using the user ISSO as an example):

root:    ISSO

Update the aliases database with the command:

$ sudo newaliases
OL09-00-002405 SV-271744r1091944_rule
V-271745 CCI-001082 medium OL 9 must restrict access to the kernel message buffer. SRG-OS-000132-GPOS-00067
Preventing unauthorized information transfers mitigates the risk of information, including encrypted representations of information, produced by the actions of prior users/roles (or the actions of processes acting on behalf of prior users/roles) from being available to any current users/roles (or current processes) that obtain access to shared system resources (e.g., registers, main memory, hard disks) after those resources have been released back to information systems. The control of information in shared resources is also commonly referred to as object reuse and residual information protection.

This requirement generally applies to the design of an information technology product, but it can also apply to the configuration of particular information system components that are, or use, such products. This can be verified by acceptance/validation processes in DOD or other government agencies.

There may be shared resources with configurable protections (e.g., files in storage) that may be assessed on specific information system components.

Restricting access to the kernel message buffer limits access to only root. This prevents attackers from gaining additional system information as a nonprivileged user.

Satisfies: SRG-OS-000132-GPOS-00067, SRG-OS-000138-GPOS-00069
Verify that OL 9 is configured to restrict access to the kernel message buffer with the following commands:

Check the status of the kernel.dmesg_restrict kernel parameter.

$ sudo sysctl kernel.dmesg_restrict
kernel.dmesg_restrict = 1

If "kernel.dmesg_restrict" is not set to "1" or is missing, this is a finding.
Configure OL 9 to restrict access to the kernel message buffer.

Add or edit the following line in /etc/sysctl.d/99-sysctl.conf system configuration file:

kernel.dmesg_restrict = 1

Load settings from all system configuration files with the following command:

$ sudo sysctl --system
OL09-00-002406 SV-271745r1091947_rule
V-271746 CCI-001082 medium OL 9 must prevent kernel profiling by nonprivileged users. SRG-OS-000132-GPOS-00067
Preventing unauthorized information transfers mitigates the risk of information, including encrypted representations of information, produced by the actions of prior users/roles (or the actions of processes acting on behalf of prior users/roles) from being available to any current users/roles (or current processes) that obtain access to shared system resources (e.g., registers, main memory, hard disks) after those resources have been released back to information systems. The control of information in shared resources is also commonly referred to as object reuse and residual information protection.

This requirement generally applies to the design of an information technology product, but it can also apply to the configuration of particular information system components that are, or use, such products. This can be verified by acceptance/validation processes in DOD or other government agencies.

There may be shared resources with configurable protections (e.g., files in storage) that may be assessed on specific information system components.

Setting the kernel.perf_event_paranoid kernel parameter to "2" prevents attackers from gaining additional system information as a nonprivileged user.

Satisfies: SRG-OS-000132-GPOS-00067, SRG-OS-000138-GPOS-00069
Verify that OL 9 is configured to prevent kernel profiling by nonprivileged users with the following commands:

Check the status of the kernel.perf_event_paranoid kernel parameter.

$ sysctl kernel.perf_event_paranoid
kernel.perf_event_paranoid = 2

If "kernel.perf_event_paranoid" is not set to "2" or is missing, this is a finding.
Configure OL 9 to prevent kernel profiling by nonprivileged users.

Add or edit the following line in /etc/sysctl.d/99-sysctl.conf system configuration file:

kernel.perf_event_paranoid = 2

Load settings from all system configuration files with the following command:

$ sudo sysctl --system
OL09-00-002407 SV-271746r1091950_rule
V-271747 CCI-001082 medium OL 9 must restrict exposed kernel pointer addresses access. SRG-OS-000132-GPOS-00067
Exposing kernel pointers (through procfs or "seq_printf()") exposes kernel writeable structures, which may contain functions pointers. If a write vulnerability occurs in the kernel, allowing write access to any of this structure, the kernel can be compromised. This option disallows any program without the CAP_SYSLOG capability to get the addresses of kernel pointers by replacing them with "0".

Satisfies: SRG-OS-000132-GPOS-00067, SRG-OS-000433-GPOS-00192
Verify that OL 9 restricts access to exposed kernel pointers with the following command:

$ sysctl kernel.kptr_restrict 
kernel.kptr_restrict = 1
Configure OL 9 to prevent the leak of kernel pointers to unprivileged users.

Add or edit the following line in /etc/sysctl.d/99-sysctl.conf system configuration file:

kernel.kptr_restrict = 1

Reload settings from all system configuration files with the following command:

$ sudo sysctl --system
OL09-00-002408 SV-271747r1091953_rule
V-271748 CCI-001082 medium OL 9 must disable access to network bpf system call from nonprivileged processes. SRG-OS-000132-GPOS-00067
Loading and accessing the packet filters programs and maps using the bpf() system call has the potential of revealing sensitive information about the kernel state.
Verify that OL 9 prevents privilege escalation thru the kernel by disabling access to the bpf system call with the following commands:

$ sysctl kernel.unprivileged_bpf_disabled
kernel.unprivileged_bpf_disabled = 1

If the returned line does not have a value of "1", or a line is not returned, this is a finding.
Configure OL 9 to prevent privilege escalation thru the kernel by disabling access to the bpf syscall by adding the following line to a file, in the "/etc/sysctl.d" directory:

kernel.unprivileged_bpf_disabled = 1

The system configuration files need to be reloaded for the changes to take effect. To reload the contents of the files, run the following command:

$ sudo sysctl --system
OL09-00-002409 SV-271748r1091956_rule
V-271749 CCI-001082 medium OL 9 must restrict usage of ptrace to descendant processes. SRG-OS-000132-GPOS-00067
Unrestricted usage of ptrace allows compromised binaries to run ptrace on other processes of the user. Like this, the attacker can steal sensitive information from the target processes (e.g., SSH sessions, web browser, etc.) without any additional assistance from the user (i.e., without resorting to phishing).
Verify that OL 9 restricts usage of ptrace to descendant processes with the following commands:

$ sysctl kernel.yama.ptrace_scope
kernel.yama.ptrace_scope = 1

If the returned line does not have a value of "1", or a line is not returned, this is a finding.
Configure OL 9 to restrict usage of ptrace to descendant processes by adding the following line to "/etc/sysctl.d/99-sysctl.conf":

kernel.yama.ptrace_scope = 1

The system configuration files need to be reloaded for the changes to take effect. To reload the contents of the files, run the following command:

$ sudo sysctl --system
OL09-00-002410 SV-271749r1091959_rule
V-271750 CCI-001133 medium OL 9 must automatically exit interactive command shell user sessions after 15 minutes of inactivity. SRG-OS-000163-GPOS-00072
Terminating an idle interactive command shell user session within a short time period reduces the window of opportunity for unauthorized personnel to take control of it when left unattended in a virtual terminal or physical console.

Satisfies: SRG-OS-000163-GPOS-00072, SRG-OS-000029-GPOS-00010
Verify that OL 9 is configured to exit interactive command shell user sessions after 15 minutes of inactivity or less with the following command:

$ grep -i tmout /etc/profile /etc/profile.d/*.sh
/etc/profile.d/tmout.sh:declare -xr TMOUT=900

If "TMOUT" is not set to "900" or less in a script located in the "/etc/'profile.d/ directory, is missing or is commented out, this is a finding.
Configure OL 9 to exit interactive command shell user sessions after 15 minutes of inactivity.

Add or edit the following line in "/etc/profile.d/tmout.sh":

#!/bin/bash

declare -xr TMOUT=900
OL09-00-002411 SV-271750r1091962_rule
V-271751 CCI-002235 high OL 9 must be configured so that the systemd Ctrl-Alt-Delete burst key sequence is disabled. SRG-OS-000324-GPOS-00125
A locally logged-on user who presses Ctrl-Alt-Delete when at the console can reboot the system. If accidentally pressed, as could happen in the case of a mixed OS environment, this can create the risk of short-term loss of availability of systems due to unintentional reboot. In a graphical user environment, risk of unintentional reboot from the Ctrl-Alt-Delete sequence is reduced because the user will be prompted before any action is taken.
Verify that OL 9 is configured to not reboot the system when Ctrl-Alt-Delete is pressed seven times within two seconds with the following command:

$ grep -i ctrl /etc/systemd/system.conf
CtrlAltDelBurstAction=none

If the "CtrlAltDelBurstAction" is not set to "none", commented out, or is missing, this is a finding.
Configure the system to disable the CtrlAltDelBurstAction by added or modifying the following line in the "/etc/systemd/system.conf" configuration file:

CtrlAltDelBurstAction=none

Reload the daemon for this change to take effect.

$ sudo systemctl daemon-reload
OL09-00-002412 SV-271751r1091965_rule
V-271752 CCI-002235 high OL 9 must be configured so that the x86 Ctrl-Alt-Delete key sequence is disabled. SRG-OS-000324-GPOS-00125
A locally logged-on user who presses Ctrl-Alt-Delete when at the console can reboot the system. If accidentally pressed, as could happen in the case of a mixed OS environment, this can create the risk of short-term loss of availability of systems due to unintentional reboot. In a graphical user environment, risk of unintentional reboot from the Ctrl-Alt-Delete sequence is reduced because the user will be prompted before any action is taken.
Verify that OL 9 is not configured to reboot the system when Ctrl-Alt-Delete is pressed with the following command:

$ systemctl status ctrl-alt-del.target
ctrl-alt-del.target
Loaded: masked (Reason: Unit ctrl-alt-del.target is masked.)
Active: inactive (dead)

If the "ctrl-alt-del.target" is loaded and not masked, this is a finding.
Configure OL 9 to disable the ctrl-alt-del.target with the following command:

$ sudo systemctl disable --now ctrl-alt-del.target
$ sudo systemctl mask --now ctrl-alt-del.target
OL09-00-002413 SV-271752r1091968_rule
V-271753 CCI-000054 low OL 9 must limit the number of concurrent sessions to ten for all accounts and/or account types. SRG-OS-000027-GPOS-00008
Operating system management includes the ability to control the number of users and user sessions that use an operating system. Limiting the number of allowed users and sessions per user is helpful in reducing the risks related to denial-of-service (DoS) attacks.

This requirement addresses concurrent sessions for information system accounts and does not address concurrent sessions by single users via multiple system accounts. The maximum number of concurrent sessions must be defined based on mission needs and the operational environment for each system.
Verify that OL 9 limits the number of concurrent sessions to "10" for all accounts and/or account types with the following command:

$ grep -r -s maxlogins /etc/security/limits.conf /etc/security/limits.d/*.conf
/etc/security/limits.conf:* hard maxlogins 10

This can be set as a global domain (with the * wildcard) but may be set differently for multiple domains.

If the "maxlogins" item is missing, commented out, or the value is set greater than "10" and is not documented with the information system security officer (ISSO) as an operational requirement for all domains that have the "maxlogins" item assigned, this is a finding.
Configure OL 9 to limit the number of concurrent sessions to "10" for all accounts and/or account types.

Add the following line to the /etc/security/limits.conf or in a ".conf" file defined in /etc/security/limits.d/:

* hard maxlogins 10
OL09-00-002415 SV-271753r1091971_rule
V-271754 CCI-002238 medium OL 9 must automatically lock an account when three unsuccessful logon attempts occur during a 15-minute time period. SRG-OS-000329-GPOS-00128
By limiting the number of failed logon attempts the risk of unauthorized system access via user password guessing, otherwise known as brute-forcing, is reduced. Limits are imposed by locking the account.

Satisfies: SRG-OS-000329-GPOS-00128, SRG-OS-000021-GPOS-00005
Note: If the system administrator demonstrates the use of an approved centralized account management method that locks an account after three unsuccessful logon attempts within a period of 15 minutes, this requirement is Not Applicable.

Verify that OL 9 locks an account after three unsuccessful logon attempts within a period of 15 minutes with the following command:

$ grep fail_interval /etc/security/faillock.conf 
fail_interval = 900

If the "fail_interval" option is not set to "900" or less (but not "0"), the line is commented out, or the line is missing, this is a finding.
Configure OL 9 to lock out the "root" account after a number of incorrect login attempts within 15 minutes using "pam_faillock.so" by enabling the feature using the following command:
 
$ sudo authselect enable-feature with-faillock  

Then edit the "/etc/security/faillock.conf" file as follows:

fail_interval = 900
OL09-00-002416 SV-271754r1091974_rule
V-271755 CCI-002238 medium OL 9 must maintain an account lock until the locked account is released by an administrator. SRG-OS-000329-GPOS-00128
By limiting the number of failed logon attempts the risk of unauthorized system access via user password guessing, otherwise known as brute-forcing, is reduced. Limits are imposed by locking the account.

Satisfies: SRG-OS-000329-GPOS-00128, SRG-OS-000021-GPOS-00005
Verify that OL 9 is configured to lock an account until released by an administrator after three unsuccessful logon attempts with the command:

$ grep 'unlock_time =' /etc/security/faillock.conf
unlock_time = 0

If the "unlock_time" option is not set to "0", the line is missing, or commented out, this is a finding.
Configure OL 9 to lock an account until released by an administrator after three unsuccessful logon attempts with the command:
 
$ sudo authselect enable-feature with-faillock  

Then edit the "/etc/security/faillock.conf" file as follows:

unlock_time = 0
OL09-00-002417 SV-271755r1091977_rule
V-271756 CCI-002476 high OL 9 local disk partitions must implement cryptographic mechanisms to prevent unauthorized disclosure or modification of all information that requires at rest protection. SRG-OS-000405-GPOS-00184
OL 9 systems handling data requiring "data at rest" protections must employ cryptographic mechanisms to prevent unauthorized disclosure and modification of the information at rest.

Selection of a cryptographic mechanism is based on the need to protect the integrity of organizational information. The strength of the mechanism is commensurate with the security category and/or classification of the information. Organizations have the flexibility to either encrypt all information on storage devices (i.e., full disk encryption) or encrypt specific data structures (e.g., files, records, or fields).

Satisfies: SRG-OS-000405-GPOS-00184, SRG-OS-000185-GPOS-00079, SRG-OS-000404-GPOS-00183
Note: If there is a documented and approved reason for not having data-at-rest encryption, this requirement is Not Applicable.

Verify that OL 9 prevents unauthorized disclosure or modification of all information requiring at-rest protection by using disk encryption. 

Verify all system partitions are encrypted with the following command:

$ sudo blkid
/dev/map per/ol-root:  UUID="67b7d7fe-de60-6fd0-befb-e6748cf97743" TYPE="crypto_LUKS"

Every persistent disk partition present must be of type "crypto_LUKS". If any partitions other than the boot partition or pseudo file systems (such as /proc or /sys) or temporary file systems (that are tmpfs) are not type "crypto_LUKS", ask the administrator to indicate how the partitions are encrypted. If there is no evidence that these partitions are encrypted, this is a finding.
Configure OL 9 to prevent unauthorized modification of all information at rest by using disk encryption.

Encrypting a partition in an already installed system is more difficult, because existing partitions will need to be resized and changed.

To encrypt an entire partition, dedicate a partition for encryption in the partition layout.
OL09-00-002418 SV-271756r1091980_rule
V-271757 CCI-000366 high OL 9 file systems must not contain shosts.equiv files. SRG-OS-000480-GPOS-00227
The shosts.equiv files are used to configure host-based authentication for the system via SSH. Host-based authentication is not sufficient for preventing unauthorized access to the system, as it does not require interactive identification and authentication of a connection request, or for the use of two-factor authentication.
Verify that OL 9 has no "shosts.equiv" files on the system with the following command:

$ sudo find / -name shosts.equiv

If a "shosts.equiv" file is found, this is a finding.
Remove any found "shosts.equiv" files from the system.

$ sudo rm /[path]/[to]/[file]/shosts.equiv
OL09-00-002419 SV-271757r1092604_rule
V-271758 CCI-000366 high OL 9 file systems must not contain .shosts files. SRG-OS-000480-GPOS-00227
The .shosts files are used to configure host-based authentication for individual users or the system via SSH. Host-based authentication is not sufficient for preventing unauthorized access to the system, as it does not require interactive identification and authentication of a connection request, or for the use of two-factor authentication.
Verify that OL 9 has no ".shosts" files on the system with the following command:

$ sudo find / -name .shosts

If a ".shosts" file is found, this is a finding.
Remove any found ".shosts" files from the system.

$ sudo rm /[path]/[to]/[file]/.shosts
OL09-00-002420 SV-271758r1091986_rule
V-271759 CCI-002418 medium OL 9 must implement DOD-approved encryption in the bind package. SRG-OS-000423-GPOS-00187
Without cryptographic integrity protections, information can be altered by unauthorized users without detection.

Cryptographic mechanisms used for protecting the integrity of information include, for example, signed hash functions using asymmetric cryptography enabling distribution of the public key to verify the hash information while maintaining the confidentiality of the secret key used to generate the hash.

OL 9 incorporates system-wide crypto policies by default. The employed algorithms can be viewed in the /etc/crypto-policies/back-ends/ directory.

Satisfies: SRG-OS-000423-GPOS-00187, SRG-OS-000426-GPOS-00190
Note: If the "bind" package is not installed, this requirement is Not Applicable.

Verify that OL 9 BIND uses the system crypto policy with the following command:

$ sudo grep include /etc/named.conf 
include "/etc/crypto-policies/back-ends/bind.config";' 

If BIND is installed and the BIND config file does not include the "/etc/crypto-policies/back-ends/bind.config" directive, or the line is commented out, this is a finding.
Configure BIND to use the system crypto policy.

Add the following line to the "options" section in "/etc/named.conf":

include "/etc/crypto-policies/back-ends/bind.config";
OL09-00-002421 SV-271759r1091989_rule
V-271760 CCI-002824 medium OL 9 must implement nonexecutable data to protect its memory from unauthorized code execution. SRG-OS-000433-GPOS-00192
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. This is enabled by default on the latest Oracle systems if supported by the hardware.
Verify that OL 9 ExecShield is enabled on 64-bit systems with the following command:

$ sudo dmesg | grep '[NX|DX]*protection' 
[ 0.000000] NX (Execute Disable) protection: active

If "dmesg" does not show "NX (Execute Disable) protection" active, this is a finding.
Update the GRUB 2 bootloader configuration.

Run the following command:

$ sudo grubby --update-kernel=ALL --remove-args=noexec
OL09-00-002422 SV-271760r1091992_rule
V-271761 CCI-002824 medium OL 9 must implement address space layout randomization (ASLR) to protect its memory from unauthorized code execution. SRG-OS-000433-GPOS-00193
ASLR makes it more difficult for an attacker to predict the location of attack code they have introduced into a process' address space during an attempt at exploitation. Additionally, ASLR makes it more difficult for an attacker to know the location of existing code to repurpose it using return-oriented programming (ROP) techniques.
Verify that OL 9 is implementing ASLR with the following command:

$ sysctl kernel.randomize_va_space
kernel.randomize_va_space = 2

If "kernel.randomize_va_space" is not set to "2" or is missing, this is a finding.
Configure OL 9 to implement address space layout randomization (ASLR) to protect its memory from unauthorized code execution.

Add or edit the following line in a system configuration file in the "/etc/sysctl.d/" directory:

kernel.randomize_va_space = 2

Reload settings from all system configuration files with the following command:

$ sudo sysctl --system
OL09-00-002423 SV-271761r1091995_rule
V-271762 CCI-000803 medium OL 9 must use mechanisms meeting the requirements of applicable federal laws, executive orders, directives, policies, regulations, standards, and guidance for authentication to a cryptographic module. SRG-OS-000120-GPOS-00061
Overriding the system crypto policy makes the behavior of Kerberos violate expectations and makes system configuration more fragmented.
Verify that OL 9 configures Kerberos to use the systemwide crypto policy with the following command:

$ file /etc/crypto-policies/back-ends/krb5.config
/etc/crypto-policies/back-ends/krb5.config: symbolic link to  /usr/share/crypto-policies/FIPS/krb5.txt

If the symlink does not exist or points to a different target, this is a finding.
Configure Kerberos to use system crypto policy.

Remove incorrect symlink if it exists using the following command:

$ sudo rm /etc/crypto-policies/back-ends/krb5.config

Create a symlink pointing to system crypto policy in the Kerberos configuration using the following command:

$ sudo ln -s /usr/share/crypto-policies/FIPS/krb5.txt /etc/crypto-policies/back-ends/krb5.config
OL09-00-002424 SV-271762r1091998_rule
V-271763 CCI-000366 medium OL 9 must be configured to prevent unrestricted mail relaying. SRG-OS-000480-GPOS-00227
If unrestricted mail relaying is permitted, unauthorized senders could use this host as a mail relay for the purpose of sending spam or other unauthorized activity.
Note: If postfix is not installed, this requirement is Not Applicable.

Verify that OL 9 is configured to prevent unrestricted mail relaying with the following command:

$ postconf -n smtpd_client_restrictions 
smtpd_client_restrictions = permit_mynetworks,reject 

If the "smtpd_client_restrictions" parameter contains any entries other than "permit_mynetworks" and "reject", and the additional entries have not been documented with the information system security officer (ISSO), this is a finding.
Modify the postfix configuration file to restrict client connections to the local network with the following command:

$ sudo postconf -e 'smtpd_client_restrictions = permit_mynetworks,reject'
OL09-00-002425 SV-271763r1092001_rule
V-271764 CCI-000366 medium OL 9 Trivial File Transfer Protocol (TFTP) daemon must be configured to operate in secure mode if the TFTP server is required. SRG-OS-000480-GPOS-00227
Restricting TFTP to a specific directory prevents remote users from copying, transferring, or overwriting system files. Using the "-s" option causes the TFTP service to only serve files from the given directory.
Verify that OL 9 TFTP daemon is configured to operate in secure mode.

Check if a TFTP server is installed with the following command:

$ sudo dnf list --installed tftp-server
Installed Packages
tftp-server.x86_64                                       5.2-38.el9                                       @ol9_appstream

Note: If a TFTP server is not installed, this requirement is Not Applicable.

If a TFTP server is installed, check for the server arguments with the following command: 

$ systemctl cat tftp | grep ExecStart
ExecStart=/usr/sbin/in.tftpd -s /var/lib/tftpboot

If the "ExecStart" line does not have a "-s" option, and a subdirectory is not assigned, this is a finding.
Configure the TFTP daemon to operate in secure mode.

Find the path for the systemd service.

$ sudo systemctl show tftp | grep FragmentPath=
FragmentPath=/etc/systemd/system/tftp.service

Edit the ExecStart line on that file to add the -s option with a subdirectory.

ExecStart=/usr/sbin/in.tftpd -s /var/lib/tftpboot
OL09-00-002426 SV-271764r1092004_rule
V-271765 CCI-000366 medium OL 9 must be configured so that local initialization files do not execute world-writable programs. SRG-OS-000480-GPOS-00227
If user start-up files execute world-writable programs, especially in unprotected directories, they could be maliciously modified to destroy user files or otherwise compromise the system at the user level. If the system is compromised at the user level, it is easier to elevate privileges to eventually compromise the system at the root and network level.
Verify that OL 9 is configured so that local initialization files do not execute world-writable programs with the following command:

Note: The example will be for a system that is configured to create user home directories in the "/home" directory.

$ sudo find /home -perm -002 -type f -name ".[^.]*" -exec ls -ld {} \; 

If any local initialization files are found to reference world-writable files, this is a finding.
Configure OL 9 so that local initialization files do not execute world-writable programs.

Set the mode on files being executed by the local initialization files with the following command:

$ sudo chmod 0755 
OL09-00-002427 SV-271765r1092007_rule
V-271766 CCI-003992 medium OL 9 must prevent the loading of a new kernel for later execution. SRG-OS-000366-GPOS-00153
Changes to any 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.

Disabling kexec_load prevents an unsigned kernel image (that could be a windows kernel or modified vulnerable kernel) from being loaded. Kexec can be used subvert the entire secureboot process and should be avoided at all costs especially since it can load unsigned kernel images.
Verify that OL 9 is configured to disable kernel image loading.

Check the status of the kernel.kexec_load_disabled kernel parameter with the following command:

$ sysctl kernel.kexec_load_disabled
kernel.kexec_load_disabled = 1

If "kernel.kexec_load_disabled" is not set to "1" or is missing, this is a finding.
Configure OL 9 to prevent the loading of a new kernel for later execution.

Add or edit the following line in a system configuration file in the "/etc/sysctl.d/" directory:

kernel.kexec_load_disabled = 1

Load settings from all system configuration files with the following command:

$ sudo sysctl --system
OL09-00-002428 SV-271766r1092010_rule
V-271767 CCI-000803 medium OL 9 must prevent system daemons from using Kerberos for authentication. SRG-OS-000120-GPOS-00061
Unapproved mechanisms used for authentication to the cryptographic module are not verified; therefore, cannot be relied upon to provide confidentiality or integrity and DOD data may be compromised.

OL 9 systems using encryption are required to use FIPS-compliant mechanisms for authenticating to cryptographic modules.

The key derivation function (KDF) in Kerberos is not FIPS compatible. Ensuring the system does not have any keytab files present prevents system daemons from using Kerberos for authentication. A keytab is a file containing pairs of Kerberos principals and encrypted keys.

FIPS 140-3 is the current standard for validating that mechanisms used to access cryptographic modules use authentication that meets DOD requirements. This allows for Security Levels 1, 2, 3, or 4 for use on a general-purpose computing system.
Verify that OL 9 prevents system daemons from using Kerberos for authentication with the following command:

$ ls -al /etc/*.keytab
ls: cannot access '/etc/*.keytab': No such file or directory 

If this command produces any "keytab" file(s), this is a finding.
Configure OL 9 to prevent system daemons from using Kerberos for authentication.

Remove any files with the .keytab extension from the operating system.

$ sudo rm -f /etc/*.keytab
OL09-00-002429 SV-271767r1092013_rule
V-271768 CCI-000366 medium OL 9 must enable hardening for the Berkeley Packet Filter (BPF) just-in-time compiler. SRG-OS-000480-GPOS-00227
When hardened, the extended BPF just-in-time (JIT) compiler will randomize any kernel addresses in the BPF programs and maps and will not expose the JIT addresses in "/proc/kallsyms".
Verify that OL 9 enables hardening for the BPF JIT with the following commands:

$ sudo sysctl net.core.bpf_jit_harden
net.core.bpf_jit_harden = 2

If the returned line does not have a value of "2", or a line is not returned, this is a finding.
Configure OL 9 to enable hardening for the BPF JIT compiler by adding the following line to a file, in the "/etc/sysctl.d" directory:

net.core.bpf_jit_harden = 2

The system configuration files need to be reloaded for the changes to take effect. To reload the contents of the files, run the following command:

$ sudo sysctl --system
OL09-00-002430 SV-271768r1092016_rule
V-271769 CCI-000366 medium OL 9 must be configured so that all system device files are correctly labeled to prevent unauthorized modification. SRG-OS-000480-GPOS-00227
If an unauthorized or modified device is allowed to exist on the system, there is the possibility the system may perform unintended or unauthorized operations.
Verify that OL 9 configures all system device files to be correctly labeled to prevent unauthorized modification.

List all device files on the system that are incorrectly labeled with the following commands:

Note: Device files are normally found under "/dev", but applications may place device files in other directories and may necessitate a search of the entire system.

$ sudo find /dev -context *:device_t:* \( -type c -o -type b \) -printf "%p %Z\n"

$ sudo find /dev -context *:unlabeled_t:* \( -type c -o -type b \) -printf "%p %Z\n"

Note: There are device files, such as "/dev/dtrace/helper" or "/dev/vmci", that are used for system trace capabilities or when the operating system is a host virtual machine. They will not be owned by a user on the system and require the "device_t" label to operate. These device files are not a finding.

If there is output from either of these commands, other than already noted, this is a finding.
Configure OL 9 to correctly label all system devices.

Restore the SELinux policy for the affected device file from the system policy database using the following command:

$ sudo restorecon -v 

Substituting "" with the path to the affected device file (from the output of the previous commands). An example device file path would be "/dev/ttyUSB0". If the output of the above command does not indicate that the device was relabeled to a more specific SELinux type label, then the SELinux policy of the system must be updated with more specific policy for the device class specified. If a package was used to install support for a device class, that package could be reinstalled using the following command:

$ sudo dnf reinstall -y 

If a package was not used to install the SELinux policy for a given device class, then it must be generated manually and provide specific type labels.
OL09-00-002500 SV-271769r1092019_rule
V-271770 CCI-000366 medium OL 9 must not have unauthorized accounts. SRG-OS-000480-GPOS-00227
Accounts providing no operational purpose provide additional opportunities for system compromise. Unnecessary accounts include user accounts for individuals not requiring access to the system and application accounts for applications not installed on the system.
Verify that OL 9 prohibits unauthorized interactive user accounts with the following command:

$ less /etc/passwd  
root:x:0:0:root:/root:/bin/bash
...
games:x:12:100:games:/usr/games:/sbin/nologin
scsaustin:x:1001:1001:scsaustin:/home/scsaustin:/bin/bash
djohnson:x:1002:1002:djohnson:/home/djohnson:/bin/bash

Interactive user account, generally will have a user identifier (UID) of 1000 or greater, a home directory in a specific partition, and an interactive shell.

Obtain the list of interactive user accounts authorized to be on the system from the system administrator or information system security officer (ISSO) and compare it to the list of local interactive user accounts on the system.

If there are unauthorized local user accounts on the system, this is a finding.
Remove unauthorized local interactive user accounts with the following command where  is the unauthorized account:

$ sudo userdel  
OL09-00-002501 SV-271770r1092022_rule
V-271771 CCI-000366 medium OL 9 SSH private host key files must have mode 0640 or less permissive. SRG-OS-000480-GPOS-00227
If an unauthorized user obtains the private SSH host key file, the host could be impersonated.
Verify that OL 9 SSH private host key files have a mode of "0640" or less permissive with the following command:

$ ls -l /etc/ssh/*_key
640 /etc/ssh/ssh_host_dsa_key
640 /etc/ssh/ssh_host_ecdsa_key
640 /etc/ssh/ssh_host_ed25519_key
640 /etc/ssh/ssh_host_rsa_key

If any private host key file has a mode more permissive than "0640", this is a finding.
Configure the mode of SSH private host key files under "/etc/ssh" to "0640" with the following command:

$ sudo chmod 0640 /etc/ssh/ssh_host*key

Restart the SSH daemon for the changes to take effect:

$ sudo systemctl restart sshd.service
OL09-00-002502 SV-271771r1092025_rule
V-271772 CCI-000366 medium OL 9 SSH public host key files must have mode 0644 or less permissive. SRG-OS-000480-GPOS-00227
If a public host key file is modified by an unauthorized user, the SSH service may be compromised.
Verify that OL 9 SSH public host key files have a mode of "0644" or less permissive with the following command:

Note: SSH public key files may be found in other directories on the system depending on the installation.

$ sudo stat -c "%a %n" /etc/ssh/*.pub
644 /etc/ssh/ssh_host_dsa_key.pub
644 /etc/ssh/ssh_host_ecdsa_key.pub
644 /etc/ssh/ssh_host_ed25519_key.pub
644 /etc/ssh/ssh_host_rsa_key.pub

If any key.pub file has a mode more permissive than "0644", this is a finding.
Change the mode of public host key files under "/etc/ssh" to "0644" with the following command:

$ sudo chmod 0644 /etc/ssh/*key.pub

Restart the SSH daemon for the changes to take effect:

$ sudo systemctl restart sshd.service
OL09-00-002503 SV-271772r1092028_rule
V-271773 CCI-001499 medium OL 9 system commands must be group-owned by root or a system account. SRG-OS-000259-GPOS-00100
If OL 9 allowed any user to make changes to software libraries, then those changes might be implemented without undergoing the appropriate testing and approvals that are part of a robust change management process.

This requirement applies to OL 9 with software libraries that are accessible and configurable, as in the case of interpreted languages. Software libraries also include privileged programs that execute with escalated privileges.
Verify that OL 9 system commands contained in the following directories are group-owned by "root", or a required system account, with the following command:

$ sudo find -L /bin /sbin /usr/bin /usr/sbin /usr/local/bin /usr/local/sbin ! -group root -exec ls -l {} \;

If any system commands are returned and is not group-owned by a required system account, this is a finding.
Configure the system commands to be protected from unauthorized access.

Run the following command, replacing "[FILE]" with any system command file not group-owned by "root" or a required system account.

$ sudo chgrp root [FILE]
OL09-00-002504 SV-271773r1092031_rule
V-271774 CCI-001499 medium OL 9 system commands must be owned by root. SRG-OS-000259-GPOS-00100
If OL 9 allowed any user to make changes to software libraries, then those changes might be implemented without undergoing the appropriate testing and approvals that are part of a robust change management process.

This requirement applies to OL 9 with software libraries that are accessible and configurable, as in the case of interpreted languages. Software libraries also include privileged programs that execute with escalated privileges.
Verify that OL 9 system commands contained in the following directories are owned by "root" with the following command:

$ sudo find -L /bin /sbin /usr/bin /usr/sbin /usr/libexec /usr/local/bin /usr/local/sbin ! -user root -exec ls -l {} \;

If any system commands are found to not be owned by root, this is a finding.
Configure the system commands to be protected from unauthorized access.

Run the following command, replacing "[FILE]" with any system command file not owned by "root".

$ sudo chown root [FILE]
OL09-00-002505 SV-271774r1092034_rule
V-271775 CCI-001499 medium OL 9 system commands must have mode 755 or less permissive. SRG-OS-000259-GPOS-00100
If OL 9 allowed any user to make changes to software libraries, then those changes might be implemented without undergoing the appropriate testing and approvals that are part of a robust change management process.

This requirement applies to OL 9 with software libraries that are accessible and configurable, as in the case of interpreted languages. Software libraries also include privileged programs that execute with escalated privileges.
Verify that OL 9 system commands contained in the following directories have mode "755" or less permissive with the following command:

$ sudo find -L /bin /sbin /usr/bin /usr/sbin /usr/libexec /usr/local/bin /usr/local/sbin -perm /022 -exec ls -l {} \;

If any system commands are found to be group-writable or world-writable, this is a finding.
Configure the system commands to be protected from unauthorized access.

Run the following command, replacing "[FILE]" with any system command with a mode more permissive than "755".

$ sudo chmod 755 [FILE]
OL09-00-002506 SV-271775r1092037_rule
V-271776 CCI-000366 medium OL 9 SSH server configuration file must be group-owned by root. SRG-OS-000480-GPOS-00227
Service configuration files enable or disable features of their respective services, which if configured incorrectly, can lead to insecure and vulnerable configurations. Therefore, service configuration files must be owned by the correct group to prevent unauthorized changes.
Verify that OL 9 configures group ownership of the "/etc/ssh/sshd_config" file with the following command:

$ ls -al /etc/ssh/sshd_config
rw-------. 1 root root 3669 Feb 22 11:34 /etc/ssh/sshd_config

If the "/etc/ssh/sshd_config" file does not have a group owner of "root", this is a finding.
Configure the "/etc/ssh/sshd_config" file to be group-owned by root with the following command:

$ sudo chgrp root /etc/ssh/sshd_config
OL09-00-002507 SV-271776r1092040_rule
V-271777 CCI-000366 medium OL 9 SSH server configuration file must be owned by root. SRG-OS-000480-GPOS-00227
Service configuration files enable or disable features of their respective services, which if configured incorrectly, can lead to insecure and vulnerable configurations. Therefore, service configuration files must be owned by the correct group to prevent unauthorized changes.
Verify that OL 9 configures ownership of the "/etc/ssh/sshd_config" file with the following command:

$ ls -al /etc/ssh/sshd_config
rw-------. 1 root root 3669 Feb 22 11:34 /etc/ssh/sshd_config

If the "/etc/ssh/sshd_config" file does not have an owner of "root", this is a finding.
Configure the "/etc/ssh/sshd_config" file to be owned by root with the following command:

$ sudo chown root /etc/ssh/sshd_config
OL09-00-002508 SV-271777r1092043_rule
V-271778 CCI-000366 medium OL 9 SSH server configuration file must have mode 0600 or less permissive. SRG-OS-000480-GPOS-00227
Service configuration files enable or disable features of their respective services that if configured incorrectly can lead to insecure and vulnerable configurations. Therefore, service configuration files should be owned by the correct group to prevent unauthorized changes.
Verify that OL 9 configures permissions of the "/etc/ssh/sshd_config" file with the following command:

$ ls -al /etc/ssh/sshd_config
rw-------. 1 root root 3669 Feb 22 11:34 /etc/ssh/sshd_config

If the "/etc/ssh/sshd_config" permissions are not "0600", this is a finding.
Configure the "/etc/ssh/sshd_config" permissions to be "0600" with the following command:

$ sudo chmod 0600 /etc/ssh/sshd_config
OL09-00-002509 SV-271778r1092046_rule
V-271779 CCI-001090 medium OL 9 must be configured so that a sticky bit must be set on all public directories. SRG-OS-000138-GPOS-00069
Preventing unauthorized information transfers mitigates the risk of information, including encrypted representations of information, produced by the actions of prior users/roles (or the actions of processes acting on behalf of prior users/roles) from being available to any current users/roles (or current processes) that obtain access to shared system resources (e.g., registers, main memory, hard disks) after those resources have been released back to information systems. The control of information in shared resources is also commonly referred to as object reuse and residual information protection.

This requirement generally applies to the design of an information technology product, but it can also apply to the configuration of particular information system components that are, or use, such products. This can be verified by acceptance/validation processes in DOD or other government agencies.
Verify that OL 9 world-writable directories have the sticky bit set.

Determine if all world-writable directories have the sticky bit set by running the following command:

$ sudo find / -type d \( -perm -0002 -a ! -perm -1000 \) -print 2>/dev/null
drwxrwxrwt 7 root root 4096 Jul 26 11:19 /tmp

If any of the returned directories are world-writable and do not have the sticky bit set, this is a finding.
Configure all world-writable directories to have the sticky bit set to prevent unauthorized and unintended information transferred via shared system resources.

Set the sticky bit on all world-writable directories using the command, replace "[World-Writable Directory]" with any directory path missing the sticky bit:

$ sudo chmod a+t [World-Writable Directory]
OL09-00-002510 SV-271779r1092049_rule
V-271780 CCI-000366 medium OL 9 local files and directories must have a valid group owner. SRG-OS-000480-GPOS-00227
Files without a valid group owner may be unintentionally inherited if a group is assigned the same Group Identifier (GID) as the GID of the files without a valid group owner.
Verify that OL 9 local files and directories have a valid group with the following command:

$ df --local -P | awk {'if (NR!=1) print $6'} | sudo xargs -I '{}' find '{}' -xdev -nogroup

If any files on the system do not have an assigned group, this is a finding.
Configure OL 9 local files and directories to have a valid group owner.

Either remove all files and directories from OL 9 that do not have a valid group, or assign a valid group to all files and directories on the system with the "chgrp" command:

$ sudo chgrp  
OL09-00-002511 SV-271780r1092052_rule
V-271781 CCI-000366 medium OL 9 local files and directories must have a valid owner. SRG-OS-000480-GPOS-00227
Unowned files and directories may be unintentionally inherited if a user is assigned the same user identifier "UID" as the UID of the unowned files.
Verify that OL 9 local files and directories on OL 9 have a valid owner with the following command:

$ df --local -P | awk {'if (NR!=1) print $6'} | sudo xargs -I '{}' find '{}' -xdev -nouser

If any files on the system do not have an assigned owner, this is a finding.
Configure OL 9 local files and directories to have a valid owner.

Either remove all files and directories from the system that do not have a valid user, or assign a valid user to all unowned files and directories on OL 9 with the "chown" command:

$ sudo chown  
OL09-00-002512 SV-271781r1092055_rule
V-271782 CCI-000366 medium OL 9 local initialization files must have mode 0740 or less permissive. SRG-OS-000480-GPOS-00227
Local initialization files are used to configure the user's shell environment upon logon. Malicious modification of these files could compromise accounts upon logon.
Verify that OL 9 configures all local initialization files to have a mode of "0740" or less permissive with the following command:

Note: The example will be for the "wadea" user, who has a home directory of "/home/wadea".

$ sudo ls -al /home/wadea/.[^.]* | more
-rwxr-xr-x 1 wadea users 896 Mar 10 2011 .profile
-rwxr-xr-x 1 wadea users 497 Jan 6 2007 .login
-rwxr-xr-x 1 wadea users 886 Jan 6 2007 .something

If any local initialization files have a mode more permissive than "0740", this is a finding.
Set the mode of the local initialization files to "0740" with the following command:

Note: The example will be for the wadea user, who has a home directory of "/home/wadea".

$ sudo chmod 0740 /home/wadea/.
OL09-00-002513 SV-271782r1092058_rule
V-271783 CCI-000366 medium OL 9 local interactive user home directories must be group-owned by the home directory owner's primary group. SRG-OS-000480-GPOS-00227
If the Group Identifier (GID) of a local interactive user's home directory is not the same as the primary GID of the user, this would allow unauthorized access to the user's files, and users that share the same group may not be able to access files that they legitimately should.
Verify that OL 9 configures assigned home directories of all local interactive users to be group-owned by that user's primary GID with the following command:

Note: This may miss local interactive users that have been assigned a privileged user identifier (UID). Evidence of interactive use may be obtained from a number of log files containing system logon information. The returned directory "/home/wadea" is used as an example.

$ sudo ls -ld $(awk -F: '($3>=1000)&&($7 !~ /nologin/){print $6}' /etc/passwd)
drwxr-x--- 2 wadea admin 4096 Jun 5 12:41 wadea

Check the user's primary group with the following command:

$ sudo grep $(grep wadea /etc/passwd | awk -F: '{print $4}') /etc/group
admin:x:250:wadea,jonesj,jacksons

If the user home directory referenced in "/etc/passwd" is not group-owned by that user's primary GID, this is a finding.
Change the group owner of a local interactive user's home directory to the group found in "/etc/passwd". To change the group owner of a local interactive user's home directory, use the following command:

Note: The example will be for the user "wadea", who has a home directory of "/home/wadea", and has a primary group of users.

$ sudo chgrp users /home/wadea
OL09-00-002514 SV-271783r1092061_rule
V-271784 CCI-000366 medium OL 9 local interactive user home directories must have mode 0750 or less permissive. SRG-OS-000480-GPOS-00227
Excessive permissions on local interactive user home directories may allow unauthorized access to user files by other users.
Verify that OL 9 configures assigned home directories of all local interactive users to have a mode of "0750" or less permissive with the following command:

Note: This may miss interactive users that have been assigned a privileged user identifier (UID). Evidence of interactive use may be obtained from a number of log files containing system logon information.

$ sudo ls -ld $(awk -F: '($3>=1000)&&($7 !~ /nologin/){print $6}' /etc/passwd)
drwxr-x--- 2 wadea admin 4096 Jun 5 12:41 wadea

If home directories referenced in "/etc/passwd" do not have a mode of "0750" or less permissive, this is a finding.
Change the mode of interactive user's home directories to "0750". To change the mode of a local interactive user's home directory, use the following command:

Note: The example will be for the user "wadea".

$ sudo chmod 0750 /home/wadea
OL09-00-002515 SV-271784r1092064_rule
V-271785 CCI-001090 medium OL 9 world-writable directories must be owned by root, sys, bin, or an application user. SRG-OS-000138-GPOS-00069
If a world-writable directory is not owned by root, sys, bin, or an application user identifier (UID), unauthorized users may be able to modify files created by others.

The only authorized public directories are those temporary directories supplied with the system or those designed to be temporary file repositories. The setting is normally reserved for directories used by the system and by users for temporary file storage, (e.g., /tmp), and for directories requiring global read/write access.
Verify that OL 9 configures world writable directories to be owned by root, a system account, or an application account with the following command. It will discover and print world-writable directories that are not owned by root. Run it once for each local partition [PART]:

$ sudo find  [PART]  -xdev -type d -perm -0002 -uid +0 -print 

If there is output, this is a finding.
Configure all public directories to be owned by root or a system account to prevent unauthorized and unintended information transferred via shared system resources.

Set the owner of all public directories as root or a system account using the command, replace "[Public Directory]" with any directory path not owned by root or a system account:

$ sudo chown root [Public Directory]
OL09-00-002516 SV-271785r1092067_rule
V-271786 CCI-001499 medium OL 9 library directories must be group-owned by root or a system account. SRG-OS-000259-GPOS-00100
If OL 9 allowed any user to make changes to software libraries, then those changes might be implemented without undergoing the appropriate testing and approvals that are part of a robust change management process.

This requirement applies to OL 9 with software libraries that are accessible and configurable, as in the case of interpreted languages. Software libraries also include privileged programs that execute with escalated privileges.
Verify that OL 9 system-wide shared library directories are group-owned by "root" with the following command:

$ sudo find /lib /lib64 /usr/lib /usr/lib64 ! -group root -type d -exec stat -c "%n %G" '{}' \;

If any system-wide shared library directory is returned and is not group-owned by a required system account, this is a finding.
Configure the system-wide shared library directories (/lib, /lib64, /usr/lib and /usr/lib64) to be protected from unauthorized access.

Run the following command, replacing "[DIRECTORY]" with any library directory not group-owned by "root".

$ sudo chgrp root [DIRECTORY]
OL09-00-002520 SV-271786r1092070_rule
V-271787 CCI-001499 medium OL 9 library directories must be owned by root. SRG-OS-000259-GPOS-00100
If OL 9 allowed any user to make changes to software libraries, then those changes might be implemented without undergoing the appropriate testing and approvals that are part of a robust change management process.

This requirement applies to OL 9 with software libraries that are accessible and configurable, as in the case of interpreted languages. Software libraries also include privileged programs that execute with escalated privileges.
Verify that OL 9 system-wide shared library directories are owned by "root" with the following command:

$ sudo find /lib /lib64 /usr/lib /usr/lib64 ! -user root -type d -exec stat -c "%n %U" '{}' \;

If any system-wide shared library directory is not owned by root, this is a finding.
Configure the system-wide shared library directories within (/lib, /lib64, /usr/lib and /usr/lib64) to be protected from unauthorized access.

Run the following command, replacing "[DIRECTORY]" with any library directory not owned by "root".

$ sudo chown root [DIRECTORY]
OL09-00-002521 SV-271787r1092073_rule
V-271788 CCI-001499 medium OL 9 library directories must have mode 755 or less permissive. SRG-OS-000259-GPOS-00100
If OL 9 allowed any user to make changes to software libraries, then those changes might be implemented without undergoing the appropriate testing and approvals that are part of a robust change management process.

This requirement applies to OL 9 with software libraries that are accessible and configurable, as in the case of interpreted languages. Software libraries also include privileged programs that execute with escalated privileges.
Verify that OL 9 system-wide shared library directories have mode "755" or less permissive with the following command:

$ sudo find -L /lib /lib64 /usr/lib /usr/lib64 -perm /022 -type d -exec ls -l {} \;

If any system-wide shared library file is found to be group-writable or world-writable, this is a finding.
Configure the system-wide shared library directories (/lib, /lib64, /usr/lib and /usr/lib64) to be protected from unauthorized access. 

Run the following command, replacing "[DIRECTORY]" with any library directory with a mode more permissive than 755.

$ sudo chmod 755 [DIRECTORY]
OL09-00-002522 SV-271788r1092076_rule
V-271789 CCI-001499 medium OL 9 library files must be group-owned by root or a system account. SRG-OS-000259-GPOS-00100
If OL 9 allowed any user to make changes to software libraries, then those changes might be implemented without undergoing the appropriate testing and approvals that are part of a robust change management process.

This requirement applies to OL 9 with software libraries that are accessible and configurable, as in the case of interpreted languages. Software libraries also include privileged programs that execute with escalated privileges.
Verify that OL 9 system-wide shared library files are group-owned by "root" with the following command:

$ sudo find -L /lib /lib64 /usr/lib /usr/lib64 ! -group root -exec ls -l {} \;

If any system-wide shared library file is returned and is not group-owned by a required system account, this is a finding.
Configure the system-wide shared library files (/lib, /lib64, /usr/lib and /usr/lib64) to be protected from unauthorized access.

Run the following command, replacing "[FILE]" with any library file not group-owned by "root".

$ sudo chgrp root [FILE]
OL09-00-002523 SV-271789r1092079_rule
V-271790 CCI-001499 medium OL 9 library files must be owned by root. SRG-OS-000259-GPOS-00100
If OL 9 allowed any user to make changes to software libraries, then those changes might be implemented without undergoing the appropriate testing and approvals that are part of a robust change management process.

This requirement applies to OL 9 with software libraries that are accessible and configurable, as in the case of interpreted languages. Software libraries also include privileged programs that execute with escalated privileges.
Verify that OL 9 system-wide shared library files are owned by "root" with the following command:

$ sudo find -L /lib /lib64 /usr/lib /usr/lib64 ! -user root -exec ls -l {} \;

If any system-wide shared library file is not owned by root, this is a finding.
Configure the system-wide shared library files (/lib, /lib64, /usr/lib and /usr/lib64) to be protected from unauthorized access.

Run the following command, replacing "[FILE]" with any library file not owned by "root".

$ sudo chown root [FILE]
OL09-00-002524 SV-271790r1092082_rule
V-271791 CCI-001499 medium OL 9 library files must have mode 755 or less permissive. SRG-OS-000259-GPOS-00100
If OL 9 allowed any user to make changes to software libraries, then those changes might be implemented without undergoing the appropriate testing and approvals that are part of a robust change management process.

This requirement applies to OL 9 with software libraries that are accessible and configurable, as in the case of interpreted languages. Software libraries also include privileged programs that execute with escalated privileges.
Verify that OL 9 system-wide shared library files contained in the following directories have mode "755" or less permissive with the following command:

$ sudo find -L /lib /lib64 /usr/lib /usr/lib64 -perm /022 -type f -exec ls -l {} \;

If any system-wide shared library file is found to be group-writable or world-writable, this is a finding.
Configure the library files to be protected from unauthorized access. Run the following command, replacing "[FILE]" with any library file with a mode more permissive than 755.

$ sudo chmod 755 [FILE]
OL09-00-002525 SV-271791r1092085_rule
V-271792 CCI-000366 medium OL 9 /boot/grub2/grub.cfg file must be group-owned by root. SRG-OS-000480-GPOS-00227
The "root" group is a highly privileged group. The group-owner of this file should not have any access privileges.
Verify that OL 9 configures the group ownership of the "/boot/grub2/grub.cfg" file with the following command:

$ sudo stat -c "%G %n" /boot/grub2/grub.cfg 
root /boot/grub2/grub.cfg

If "/boot/grub2/grub.cfg" file does not have a group owner of "root", this is a finding.
Change the group of the file /boot/grub2/grub.cfg to root by running the following command:

$ sudo chgrp root /boot/grub2/grub.cfg
OL09-00-002530 SV-271792r1094968_rule
V-271793 CCI-000366 medium OL 9 /boot/grub2/grub.cfg file must be owned by root. SRG-OS-000480-GPOS-00227
The "/boot/grub2/grub.cfg" file stores sensitive system configuration. Protection of this file is critical for system security.
Verify that OL 9 configures ownership of the "/boot/grub2/grub.cfg" file with the following command:

$ sudo stat -c "%U %n" /boot/grub2/grub.cfg 
root /boot/grub2/grub.cfg 

If "/boot/grub2/grub.cfg" file does not have an owner of "root", this is a finding.
Change the owner of the file /boot/grub2/grub.cfg to root by running the following command:

$ sudo chown root /boot/grub2/grub.cfg
OL09-00-002531 SV-271793r1092605_rule
V-271794 CCI-000366 medium OL 9 /etc/group file must be group-owned by root. SRG-OS-000480-GPOS-00227
The "/etc/group" file contains information regarding groups that are configured on the system. Protection of this file is important for system security.
Verify that OL 9 configures group ownership of the "/etc/group" file with the following command:

$ stat -c "%G %n" /etc/group 
root /etc/group

If "/etc/group" file does not have a group owner of "root", this is a finding.
Change the group of the file /etc/group to root by running the following command:

$ sudo chgrp root /etc/group
OL09-00-002532 SV-271794r1092094_rule
V-271795 CCI-000366 medium OL 9 /etc/group- file must be group-owned by root. SRG-OS-000480-GPOS-00227
The "/etc/group-" file is a backup file of "/etc/group", and as such, contains information regarding groups that are configured on the system. Protection of this file is important for system security.
Verify that OL 9 configures group ownership of the "/etc/group-" file with the following command:

$ stat -c "%G %n" /etc/group- 
root /etc/group-

If "/etc/group-" file does not have a group owner of "root", this is a finding.
Change the group of the file /etc/group- to root by running the following command:

$ sudo chgrp root /etc/group-
OL09-00-002533 SV-271795r1092097_rule
V-271796 CCI-000366 medium OL 9 /etc/group file must be owned by root. SRG-OS-000480-GPOS-00227
The "/etc/group" file contains information regarding groups that are configured on the system. Protection of this file is important for system security.
Verify that OL 9 configures ownership of the "/etc/group" file with the following command:

$ stat -c "%U %n" /etc/group 
root /etc/group 

If "/etc/group" file does not have an owner of "root", this is a finding.
Change the owner of the file /etc/group to root by running the following command:

$ sudo chown root /etc/group
OL09-00-002534 SV-271796r1092100_rule
V-271797 CCI-000366 medium OL 9 /etc/group- file must be owned by root. SRG-OS-000480-GPOS-00227
The "/etc/group-" file is a backup file of "/etc/group", and as such, contains information regarding groups that are configured on the system. Protection of this file is important for system security.
Verify that OL 9 configures ownership of the "/etc/group-" file with the following command:

$ stat -c "%U %n" /etc/group- 
root /etc/group- 

If "/etc/group-" file does not have an owner of "root", this is a finding.
Change the owner of the file /etc/group- to root by running the following command:

$ sudo chown root /etc/group-
OL09-00-002535 SV-271797r1092103_rule
V-271798 CCI-000366 medium OL 9 /etc/group file must have mode 0644 or less permissive to prevent unauthorized access. SRG-OS-000480-GPOS-00227
The "/etc/group" file contains information regarding groups that are configured on the system. Protection of this file is important for system security.
Verify that OL 9 configures the "/etc/group" file to have a mode of "0644" or less permissive with the following command:

$ stat -c "%a %n" /etc/group
644 /etc/group

If a value of "0644" or less permissive is not returned, this is a finding.
Change the mode of the file "/etc/group" to "0644" by running the following command:

$ sudo chmod 0644 /etc/group
OL09-00-002536 SV-271798r1092106_rule
V-271799 CCI-000366 medium OL 9 /etc/group- file must have mode 0644 or less permissive to prevent unauthorized access. SRG-OS-000480-GPOS-00227
The "/etc/group-" file is a backup file of "/etc/group", and as such, contains information regarding groups that are configured on the system. Protection of this file is important for system security.
Verify that OL 9 configures the "/etc/group-" file to have a mode "0644" or less permissive with the following command:

$ stat -c "%a %n" /etc/group-
644 /etc/group-

If a value of "0644" or less permissive is not returned, this is a finding.
Change the mode of the file "/etc/group-" to "0644" by running the following command:

$ sudo chmod 0644 /etc/group-
OL09-00-002537 SV-271799r1092109_rule
V-271800 CCI-000366 medium OL 9 /etc/gshadow file must be group-owned by root. SRG-OS-000480-GPOS-00227
The "/etc/gshadow" file contains group password hashes. Protection of this file is critical for system security.
Verify that OL 9 configures group ownership of the "/etc/gshadow" file with the following command:

$ stat -c "%G %n" /etc/gshadow 
root /etc/gshadow

If "/etc/gshadow" file does not have a group owner of "root", this is a finding.
Change the group of the file /etc/gshadow to root by running the following command:

$ sudo chgrp root /etc/gshadow
OL09-00-002538 SV-271800r1092112_rule
V-271801 CCI-000366 medium OL 9 /etc/gshadow- file must be group-owned by root. SRG-OS-000480-GPOS-00227
The "/etc/gshadow-" file is a backup of "/etc/gshadow", and as such, contains group password hashes. Protection of this file is critical for system security.
Verify that OL 9 configures group ownership of the "/etc/gshadow-" file with the following command:

$ stat -c "%G %n" /etc/gshadow- 
root /etc/gshadow-

If "/etc/gshadow-" file does not have a group owner of "root", this is a finding.
Change the group of the file /etc/gshadow- to root by running the following command:

$ sudo chgrp root /etc/gshadow-
OL09-00-002539 SV-271801r1092115_rule
V-271802 CCI-000366 medium OL 9 /etc/gshadow file must be owned by root. SRG-OS-000480-GPOS-00227
The "/etc/gshadow" file contains group password hashes. Protection of this file is critical for system security.
Verify that OL 9 configures ownership of the "/etc/gshadow" file with the following command:

$ stat -c "%U %n" /etc/gshadow 
root /etc/gshadow 

If "/etc/gshadow" file does not have an owner of "root", this is a finding.
Change the owner of the file /etc/gshadow to root by running the following command:

$ sudo chown root /etc/gshadow
OL09-00-002540 SV-271802r1092118_rule
V-271803 CCI-000366 medium OL 9 /etc/gshadow- file must be owned by root. SRG-OS-000480-GPOS-00227
The "/etc/gshadow-" file is a backup of "/etc/gshadow", and as such, contains group password hashes. Protection of this file is critical for system security.
Verify that OL 9 configures ownership of the "/etc/gshadow-" file with the following command:

$ stat -c "%U %n" /etc/gshadow- 
root /etc/gshadow- 

If "/etc/gshadow-" file does not have an owner of "root", this is a finding.
Change the owner of the file /etc/gshadow- to root by running the following command:

$ sudo chown root /etc/gshadow-
OL09-00-002541 SV-271803r1092121_rule
V-271804 CCI-000366 medium OL 9 /etc/gshadow file must have mode 0000 or less permissive to prevent unauthorized access. SRG-OS-000480-GPOS-00227
The "/etc/gshadow" file contains group password hashes. Protection of this file is critical for system security.
Verify that OL 9 configures the "/etc/gshadow" file to have a mode pf "0000" with the following command:

$ stat -c "%a %n" /etc/gshadow
0 /etc/gshadow

If a value of "0" is not returned, this is a finding.
Change the mode of the file "/etc/gshadow" to "0000" by running the following command:

$ sudo chmod 0000 /etc/gshadow
OL09-00-002542 SV-271804r1092124_rule
V-271805 CCI-000366 medium OL 9 /etc/gshadow- file must have mode 0000 or less permissive to prevent unauthorized access. SRG-OS-000480-GPOS-00227
The "/etc/gshadow-" file is a backup of "/etc/gshadow", and as such, contains group password hashes. Protection of this file is critical for system security.
Verify that OL 9 configures the "/etc/gshadow-" file to have a mode of "0000" with the following command:

$ stat -c "%a %n" /etc/gshadow-
0 /etc/gshadow-

If a value of "0" is not returned, this is a finding.
Change the mode of the file "/etc/gshadow-" to "0000" by running the following command:

$ sudo chmod 0000 /etc/gshadow-
OL09-00-002543 SV-271805r1092127_rule
V-271806 CCI-000366 medium OL 9 /etc/passwd file must be group-owned by root. SRG-OS-000480-GPOS-00227
The "/etc/passwd" file contains information about the users that are configured on the system. Protection of this file is critical for system security.
Verify that OL 9 configures group ownership of the "/etc/passwd" file with the following command:

$ stat -c "%G %n" /etc/passwd 
root /etc/passwd

If "/etc/passwd" file does not have a group owner of "root", this is a finding.
Change the group of the file /etc/passwd to root by running the following command:

$ sudo chgrp root /etc/passwd
OL09-00-002544 SV-271806r1092130_rule
V-271807 CCI-000366 medium OL 9 /etc/passwd- file must be group-owned by root. SRG-OS-000480-GPOS-00227
The "/etc/passwd-" file is a backup file of "/etc/passwd", and as such, contains information about the users that are configured on the system. Protection of this file is critical for system security.
Verify that OL 9 configures group ownership of the "/etc/passwd-" file with the following command:

$ stat -c "%G %n" /etc/passwd-
root /etc/passwd-

If "/etc/passwd-" file does not have a group owner of "root", this is a finding.
Change the group of the file /etc/passwd- to root by running the following command:

$ sudo chgrp root /etc/passwd-
OL09-00-002545 SV-271807r1092133_rule
V-271808 CCI-000366 medium OL 9 /etc/passwd file must be owned by root. SRG-OS-000480-GPOS-00227
The "/etc/passwd" file contains information about the users that are configured on the system. Protection of this file is critical for system security.
Verify that OL 9 configures ownership of the "/etc/passwd" file with the following command:

$ stat -c "%U %n" /etc/passwd
root /etc/passwd

If "/etc/passwd" file does not have an owner of "root", this is a finding.
Change the owner of the file /etc/passwd to root by running the following command:

$ sudo chown root /etc/passwd
OL09-00-002546 SV-271808r1092136_rule
V-271809 CCI-000366 medium OL 9 /etc/passwd- file must be owned by root. SRG-OS-000480-GPOS-00227
The "/etc/passwd-" file is a backup file of "/etc/passwd", and as such, contains information about the users that are configured on the system. Protection of this file is critical for system security.
Verify that OL 9 configures ownership of the "/etc/passwd-" file with the following command:

$ stat -c "%U %n" /etc/passwd- 
root /etc/passwd- 

If "/etc/passwd-" file does not have an owner of "root", this is a finding.
Change the owner of the file /etc/passwd- to root by running the following command:

$ sudo chown root /etc/passwd-
OL09-00-002547 SV-271809r1092139_rule
V-271810 CCI-000366 medium OL 9 /etc/passwd file must have mode 0644 or less permissive to prevent unauthorized access. SRG-OS-000480-GPOS-00227
If the "/etc/passwd" file is writable by a group-owner or the world the risk of its compromise is increased. The file contains the list of accounts on the system and associated information, and protection of this file is critical for system security.
Verify that OL 9 configures the "/etc/passwd" file to have a mode of "0644" or less permissive with the following command:

$ stat -c "%a %n" /etc/passwd
644 /etc/passwd

If a value of "0644" or less permissive is not returned, this is a finding.
Change the mode of the file "/etc/passwd" to "0644" by running the following command:

$ sudo chmod 0644 /etc/passwd
OL09-00-002548 SV-271810r1092142_rule
V-271811 CCI-000366 medium OL 9 /etc/passwd- file must have mode 0644 or less permissive to prevent unauthorized access. SRG-OS-000480-GPOS-00227
The "/etc/passwd-" file is a backup file of "/etc/passwd", and as such, contains information about the users that are configured on the system. Protection of this file is critical for system security.
Verify that OL 9 configures the "/etc/passwd-" file to have a mode of "0644" or less permissive with the following command:

$ stat -c "%a %n" /etc/passwd-
644 /etc/passwd-

If a value of "0644" or less permissive is not returned, this is a finding.
Change the mode of the file "/etc/passwd-" to "0644" by running the following command:

$ sudo chmod 0644 /etc/passwd-
OL09-00-002549 SV-271811r1092145_rule
V-271812 CCI-000366 medium OL 9 /etc/shadow file must be group-owned by root. SRG-OS-000480-GPOS-00227
The "/etc/shadow" file stores password hashes. Protection of this file is critical for system security.
Verify that OL 9 configures group ownership of the "/etc/shadow" file with the following command:

$ stat -c "%G %n" /etc/shadow 
root /etc/shadow

If "/etc/shadow" file does not have a group owner of "root", this is a finding.
Change the group of the file /etc/shadow to root by running the following command:

$ sudo chgrp root /etc/shadow
OL09-00-002550 SV-271812r1092148_rule
V-271813 CCI-000366 medium OL 9 /etc/shadow- file must be group-owned by root. SRG-OS-000480-GPOS-00227
The "/etc/shadow-" file is a backup file of "/etc/shadow", and as such, contains the list of local system accounts and password hashes. Protection of this file is critical for system security.
Verify that OL 9 configures group ownership of the "/etc/shadow-" file with the following command:

$ stat -c "%G %n" /etc/shadow-
root /etc/shadow-

If "/etc/shadow-" file does not have a group owner of "root", this is a finding.
Change the group of the file /etc/shadow- to root by running the following command:

$ sudo chgrp root /etc/shadow-
OL09-00-002551 SV-271813r1092151_rule
V-271814 CCI-000366 medium OL 9 /etc/shadow file must be owned by root. SRG-OS-000480-GPOS-00227
The "/etc/shadow" file contains the list of local system accounts and stores password hashes. Protection of this file is critical for system security. Failure to give ownership of this file to root provides the designated owner with access to sensitive information, which could weaken the system security posture.
Verify that OL 9 configures ownership of the "/etc/shadow" file with the following command:

$  stat -c "%U %n" /etc/shadow
root /etc/shadow

If "/etc/shadow" file does not have an owner of "root", this is a finding.
Change the owner of the file /etc/shadow to root by running the following command:

$ sudo chown root /etc/shadow
OL09-00-002552 SV-271814r1092154_rule
V-271815 CCI-000366 medium OL 9 /etc/shadow- file must be owned by root. SRG-OS-000480-GPOS-00227
The "/etc/shadow-" file is a backup file of "/etc/shadow", and as such, contains the list of local system accounts and password hashes. Protection of this file is critical for system security.
Verify that OL 9 configures ownership of the "/etc/shadow-" file with the following command:

$ stat -c "%U %n" /etc/shadow- 
root /etc/shadow- 

If "/etc/shadow-" file does not have an owner of "root", this is a finding.
Change the owner of the file /etc/shadow- to root by running the following command:

$ sudo chown root /etc/shadow-
OL09-00-002553 SV-271815r1092157_rule
V-271816 CCI-000366 medium OL 9 /etc/shadow- file must have mode 0000 or less permissive to prevent unauthorized access. SRG-OS-000480-GPOS-00227
The "/etc/shadow-" file is a backup file of "/etc/shadow", and as such, contains the list of local system accounts and password hashes. Protection of this file is critical for system security.
Verify that OL 9 configures the "/etc/shadow-" file to have a mode of "0000" with the following command:

$ stat -c "%a %n" /etc/shadow-
0 /etc/shadow-

If a value of "0" is not returned, this is a finding.
Change the mode of the file "/etc/shadow-" to "0000" by running the following command:

$ sudo chmod 0000 /etc/shadow-
OL09-00-002554 SV-271816r1092160_rule
V-271817 CCI-000366 medium OL 9 /etc/shadow file must have mode 0000 to prevent unauthorized access. SRG-OS-000480-GPOS-00227
The "/etc/shadow" file contains the list of local system accounts and stores password hashes. Protection of this file is critical for system security. Failure to give ownership of this file to root provides the designated owner with access to sensitive information, which could weaken the system security posture.
Verify that OL 9 configures the "/etc/shadow" file to have a mode of "0000" with the following command:

$ stat -c "%a %n" /etc/shadow
0 /etc/shadow

If a value of "0" is not returned, this is a finding.
Change the mode of the file "/etc/shadow" to "0000" by running the following command:

$ sudo chmod 0000 /etc/shadow
OL09-00-002555 SV-271817r1092163_rule
V-271818 CCI-001314 medium OL 9 /var/log directory must be group-owned by root. SRG-OS-000206-GPOS-00084
Only authorized personnel should be aware of errors and the details of the errors. Error messages are an indicator of an organization's operational state or can identify the OL 9 system or platform. Additionally, personally identifiable information (PII) and operational information must not be revealed through error messages to unauthorized personnel or their designated representatives.

The structure and content of error messages must be carefully considered by the organization and development team. The extent to which the information system is able to identify and handle error conditions is guided by organizational policy and operational requirements.
Verify that OL 9 configures the "/var/log" directory to be group-owned by root with the following command:

$ ls -ld /var/log
drwxr-xr-x. 16 root root 4096 July 11 11:34 /var/log

If "/var/log" does not have a group owner of "root", this is a finding.
Configure the group owner of the directory "/var/log" to "root" by running the following command:

$ sudo chgrp root /var/log
OL09-00-002560 SV-271818r1092166_rule
V-271819 CCI-001314 medium OL 9 /var/log directory must be owned by root. SRG-OS-000206-GPOS-00084
Only authorized personnel should be aware of errors and the details of the errors. Error messages are an indicator of an organization's operational state or can identify the OL 9 system or platform. Additionally, personally identifiable information (PII) and operational information must not be revealed through error messages to unauthorized personnel or their designated representatives.

The structure and content of error messages must be carefully considered by the organization and development team. The extent to which the information system is able to identify and handle error conditions is guided by organizational policy and operational requirements.
Verify that OL 9 configures the "/var/log" directory to be owned by root with the following command:

$ ls -ld /var/log
drwxr-xr-x. 16 root root 4096 July 11 11:34 /var/log

If "/var/log" does not have an owner of "root", this is a finding.
Configure the owner of the directory "/var/log" to "root" by running the following command:

$ sudo chown root /var/log
OL09-00-002561 SV-271819r1092169_rule
V-271820 CCI-001314 medium OL 9 /var/log directory must have mode 0755 or less permissive. SRG-OS-000206-GPOS-00084
Only authorized personnel should be aware of errors and the details of the errors. Error messages are an indicator of an organization's operational state or can identify the OL 9 system or platform. Additionally, personally identifiable information (PII) and operational information must not be revealed through error messages to unauthorized personnel or their designated representatives.

The structure and content of error messages must be carefully considered by the organization and development team. The extent to which the information system is able to identify and handle error conditions is guided by organizational policy and operational requirements.
Verify that OL 9 configures the "/var/log" directory to have a mode of "0755" or less permissive with the following command:

$ ls -ld /var/log
drwxr-xr-x. 16 root root 4096 July 11 11:34 /var/log

If "/var/log" does not have a mode of "0755" or less permissive, this is a finding.
Configure the "/var/log" directory to a mode of "0755" by running the following command:

$ sudo chmod 0755 /var/log
OL09-00-002562 SV-271820r1092172_rule
V-271821 CCI-001314 medium OL 9 /var/log/messages file must be group-owned by root. SRG-OS-000206-GPOS-00084
Only authorized personnel should be aware of errors and the details of the errors. Error messages are an indicator of an organization's operational state or can identify the OL 9 system or platform. Additionally, personally identifiable information (PII) and operational information must not be revealed through error messages to unauthorized personnel or their designated representatives.

The structure and content of error messages must be carefully considered by the organization and development team. The extent to which the information system is able to identify and handle error conditions is guided by organizational policy and operational requirements.
Verify that OL 9 configures the "/var/log/messages" file to be group-owned by root with the following command:

$ ls -la /var/log/messages
rw-------. 1 root root 564223 July 11 11:34 /var/log/messages

If "/var/log/messages" does not have a group owner of "root", this is a finding.
Change the group owner of the "/var/log/messages" file to "root" by running the following command:

$ sudo chgrp root /var/log/messages
OL09-00-002563 SV-271821r1092175_rule
V-271822 CCI-001314 medium OL 9 /var/log/messages file must be owned by root. SRG-OS-000206-GPOS-00084
Only authorized personnel should be aware of errors and the details of the errors. Error messages are an indicator of an organization's operational state or can identify the OL 9 system or platform. Additionally, personally identifiable information (PII) and operational information must not be revealed through error messages to unauthorized personnel or their designated representatives.

The structure and content of error messages must be carefully considered by the organization and development team. The extent to which the information system is able to identify and handle error conditions is guided by organizational policy and operational requirements.
Verify that OL 9 configures the "/var/log/messages" file to be owned by root with the following command:

$ ls -la /var/log/messages
rw-------. 1 root root 564223 July 11 11:34 /var/log/messages

If "/var/log/messages" does not have an owner of "root", this is a finding.
Change the owner of the "/var/log/messages" file to "root" by running the following command:

$ sudo chown root /var/log/messages
OL09-00-002564 SV-271822r1092178_rule
V-271823 CCI-001314 medium OL 9 /var/log/messages file must have mode 0640 or less permissive. SRG-OS-000206-GPOS-00084
Only authorized personnel should be aware of errors and the details of the errors. Error messages are an indicator of an organization's operational state or can identify the OL 9 system or platform. Additionally, personally identifiable information (PII) and operational information must not be revealed through error messages to unauthorized personnel or their designated representatives.

The structure and content of error messages must be carefully considered by the organization and development team. The extent to which the information system is able to identify and handle error conditions is guided by organizational policy and operational requirements.
Verify that OL 9 configures the "/var/log/messages" file to have a mode of "0640" or less permissive with the following command:

$ ls -la /var/log/messages
rw-------. 1 root root 564223 July 11 11:34 /var/log/messages

If "/var/log/messages" does not have a mode of "0640" or less permissive, this is a finding.
Configure the "/var/log/messages" file to have a mode of "0640" by running the following command:

$ sudo chmod 0640 /var/log/messages
OL09-00-002565 SV-271823r1092181_rule
V-271824 CCI-001493 medium OL 9 audit tools must be group-owned by root. SRG-OS-000256-GPOS-00097
Protecting audit information also includes identifying and protecting the tools used to view and manipulate log data; therefore, protecting audit tools is necessary to prevent unauthorized operation on audit information.

OL 9 systems providing tools to interface with audit information will leverage user permissions and roles identifying the user accessing the tools, and the corresponding rights the user enjoys, to make access decisions regarding the access to audit tools.

Audit tools include, but are not limited to, vendor-provided and open source audit tools needed to successfully view and manipulate audit information system activity and records. Audit tools include custom queries and report generators.
Verify that OL 9 audit tools are group owned by "root" with the following command:

$ sudo stat -c "%G %n" /sbin/auditctl /sbin/aureport /sbin/ausearch /sbin/autrace /sbin/auditd /sbin/rsyslogd /sbin/augenrules
root /sbin/auditctl
root /sbin/aureport
root /sbin/ausearch
root /sbin/autrace
root /sbin/auditd
root /sbin/rsyslogd
root /sbin/augenrules

If any audit tools do not have a group owner of "root", this is a finding.
Configure the audit tools to be group-owned by "root" by running the following command:

$ sudo chgrp root [audit_tool]

Replace "[audit_tool]" with each audit tool not group-owned by "root".
OL09-00-002570 SV-271824r1092184_rule
V-271825 CCI-001493 medium OL 9 audit tools must be owned by root. SRG-OS-000256-GPOS-00097
Protecting audit information also includes identifying and protecting the tools used to view and manipulate log data. Therefore, protecting audit tools is necessary to prevent unauthorized operation on audit information.

OL 9 systems providing tools to interface with audit information will leverage user permissions and roles identifying the user accessing the tools, and the corresponding rights the user enjoys, to make access decisions regarding the access to audit tools.

Audit tools include, but are not limited to, vendor-provided and open source audit tools needed to successfully view and manipulate audit information system activity and records. Audit tools include custom queries and report generators.
Verify that OL 9 audit tools are owned by "root" with the following command:

$ sudo stat -c "%U %n" /sbin/auditctl /sbin/aureport /sbin/ausearch /sbin/autrace /sbin/auditd /sbin/rsyslogd /sbin/augenrules
root /sbin/auditctl
root /sbin/aureport
root /sbin/ausearch
root /sbin/autrace
root /sbin/auditd
root /sbin/rsyslogd
root /sbin/augenrules

If any audit tools do not have an owner of "root", this is a finding.
Configure the audit tools to be owned by "root" by running the following command:

$ sudo chown root [audit_tool]

Replace "[audit_tool]" with each audit tool not owned by "root".
OL09-00-002571 SV-271825r1092187_rule
V-271826 CCI-001493 medium OL 9 audit tools must have a mode of 0755 or less permissive. SRG-OS-000256-GPOS-00097
Protecting audit information also includes identifying and protecting the tools used to view and manipulate log data. Therefore, protecting audit tools is necessary to prevent unauthorized operation on audit information.

OL 9 systems providing tools to interface with audit information will leverage user permissions and roles identifying the user accessing the tools, and the corresponding rights the user enjoys, to make access decisions regarding the access to audit tools.

Audit tools include, but are not limited to, vendor-provided and open source audit tools needed to successfully view and manipulate audit information system activity and records. Audit tools include custom queries and report generators.
Verify that OL 9 audit tools have a mode of "0755" or less with the following command:

$ stat -c "%a %n" /sbin/auditctl /sbin/aureport /sbin/ausearch /sbin/autrace /sbin/auditd /sbin/rsyslogd /sbin/augenrules
755 /sbin/auditctl
755 /sbin/aureport
755 /sbin/ausearch
750 /sbin/autrace
755 /sbin/auditd
755 /sbin/rsyslogd
755 /sbin/augenrules

If any of the audit tool files have a mode more permissive than "0755", this is a finding.
Configure the audit tools to have a mode of "0755" by running the following command:

$ sudo chmod 0755 [audit_tool]

Replace "[audit_tool]" with each audit tool that has a more permissive mode than 0755.
OL09-00-002572 SV-271826r1092190_rule
V-271827 CCI-000366 medium OL 9 cron configuration directories must have a mode of 0700 or less permissive. SRG-OS-000480-GPOS-00227
Service configuration files enable or disable features of their respective services that if configured incorrectly can lead to insecure and vulnerable configurations. Therefore, service configuration files should have the correct access rights to prevent unauthorized changes.
Verify that OL 9 configures permissions of the cron directories with the following command:

$ find /etc/cron* -type d | xargs stat -c "%a %n"
700 /etc/cron.d
700 /etc/cron.daily
700 /etc/cron.hourly
700 /etc/cron.monthly
700 /etc/cron.weekly

If any cron configuration directory is more permissive than "700", this is a finding.
Configure any OL 9 cron configuration directory with a mode more permissive than "0700" as follows:

$ sudo chmod 0700 [cron configuration directory]
OL09-00-002580 SV-271827r1092193_rule
V-271828 CCI-000366 medium OL 9 cron configuration files directory must be group-owned by root. SRG-OS-000480-GPOS-00227
Service configuration files enable or disable features of their respective services that if configured incorrectly can lead to insecure and vulnerable configurations; therefore, service configuration files should be owned by the correct group to prevent unauthorized changes.
Verify that OL 9 configures group ownership of all cron configuration files with the following command:

$ stat -c "%G %n" /etc/cron*
root /etc/cron.d
root /etc/cron.daily
root /etc/cron.deny
root /etc/cron.hourly
root /etc/cron.monthly
root /etc/crontab
root /etc/cron.weekly

If any crontab is not group owned by root, this is a finding.
Configure any cron configuration not group-owned by root with the following command:

$ sudo chgrp root [cron config file]
OL09-00-002581 SV-271828r1092196_rule
V-271829 CCI-000366 medium OL 9 cron configuration files directory must be owned by root. SRG-OS-000480-GPOS-00227
Service configuration files enable or disable features of their respective services that if configured incorrectly can lead to insecure and vulnerable configurations; therefore, service configuration files must be owned by the correct group to prevent unauthorized changes.
Verify that OL 9 configures ownership of all cron configuration files with the command:

$ stat -c "%U %n" /etc/cron*
root /etc/cron.d
root /etc/cron.daily
root /etc/cron.deny
root /etc/cron.hourly
root /etc/cron.monthly
root /etc/crontab
root /etc/cron.weekly

If any crontab is not owned by root, this is a finding.
Configure any cron configuration not owned by root with the following command:

$ sudo chown root [cron config file]
OL09-00-002582 SV-271829r1092199_rule
V-271830 CCI-000366 medium OL 9 /etc/crontab file must have mode 0600. SRG-OS-000480-GPOS-00227
Service configuration files enable or disable features of their respective services that if configured incorrectly can lead to insecure and vulnerable configurations; therefore, service configuration files must have the correct access rights to prevent unauthorized changes.
Verify that OL 9 configures permissions of /etc/crontab with the following command:

$ stat -c "%a %n" /etc/crontab
0600

If /etc/crontab does not have a mode of "0600", this is a finding.
Configure the OL 9 file /etc/crontab with mode 600.

$ sudo chmod 0600 /etc/crontab
OL09-00-002583 SV-271830r1092202_rule
V-271831 CCI-000366 high OL 9 must be configured so that the root account is the only account having unrestricted access to the system. SRG-OS-000480-GPOS-00227
An account has root authority if it has a user identifier (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.
Verify that OL 9 configures only the "root" account to have a UID "0" assignment with the following command:

$ awk -F: '$3 == 0 {print $1}' /etc/passwd
root

If any accounts other than "root" have a UID of "0", this is a finding.
Change the UID of any account on the system, other than root, that has a UID of "0". 

If the account is associated with system commands or applications, the UID should be changed to one greater than "0" but less than "1000". Otherwise, assign a UID of greater than "1000" that has not already been assigned.
OL09-00-003000 SV-271831r1092205_rule
V-271832 CCI-000764 medium OL 9 duplicate User IDs (UIDs) must not exist for interactive users. SRG-OS-000104-GPOS-00051
To ensure accountability and prevent unauthenticated access, interactive users must be identified and authenticated to prevent potential misuse and compromise of the system.

Satisfies: SRG-OS-000104-GPOS-00051, SRG-OS-000121-GPOS-00062, SRG-OS-000042-GPOS-00020
Verify that OL 9 contains no duplicate UIDs for interactive users with the following command:

$ sudo awk -F ":" 'list[$3]++{print $1, $3}' /etc/passwd 

If output is produced and the accounts listed are interactive user accounts, this is a finding.
Edit the file "/etc/passwd" and provide each interactive user account that has a duplicate UID with a unique UID.
OL09-00-003001 SV-271832r1092208_rule
V-271833 CCI-000366 medium OL 9 local interactive users must have a home directory assigned in the /etc/passwd file. SRG-OS-000480-GPOS-00227
If local interactive users are not assigned a valid home directory, there is no place for the storage and control of files they should own.
Verify that OL 9 configures interactive users on the system have a home directory assigned with the following command:
 
$ sudo awk -F: '($3>=1000)&&($7 !~ /nologin/){print $1, $3, $6}' /etc/passwd
smithk:x:1000:1000:smithk:/home/smithk:/bin/bash
scsaustin:x:1001:1001:scsaustin:/home/scsaustin:/bin/bash
djohnson:x:1002:1002:djohnson:/home/djohnson:/bin/bash

Inspect the output and verify that all interactive users (normally users with a user identifier [UID] greater that 1000) have a home directory defined.

If users home directory is not defined, this is a finding.
Create and assign home directories to all local interactive users on OL 9 that currently do not have a home directory assigned.
OL09-00-003002 SV-271833r1092607_rule
V-271834 CCI-000764 medium OL 9 interactive users must have a primary group that exists. SRG-OS-000104-GPOS-00051
If a user is assigned the Group Identifier (GID) of a group that does not exist on the system, and a group with the GID is subsequently created, the user may have unintended rights to any files associated with the group.
Verify that OL 9 interactive users have a valid GID.

Check that the interactive users have a valid GID with the following command:
 
$ sudo pwck -qr 
 
If the system has any interactive users with duplicate GIDs, this is a finding.
Configure the system so that all GIDs are referenced in "/etc/passwd" are defined in "/etc/group".

Edit the file "/etc/passwd" and ensure that every user's GID is a valid GID.
OL09-00-003005 SV-271834r1092214_rule
V-271835 CCI-000764 medium OL 9 groups must have unique Group ID (GID). SRG-OS-000104-GPOS-00051
To ensure accountability and prevent unauthenticated access, groups must be identified uniquely to prevent potential misuse and compromise of the system.
Verify that OL 9 contains no duplicate GIDs for interactive users with the following command:
 
$  cut -d : -f 3 /etc/group | uniq -d
 
If the system has duplicate GIDs, this is a finding.
Edit the file "/etc/group" and provide each group that has a duplicate GID with a unique GID.
OL09-00-003006 SV-271835r1092217_rule
V-271836 CCI-000044 medium OL 9 must configure SELinux context type to allow the use of a nondefault faillock tally directory. SRG-OS-000021-GPOS-00005
Not having the correct SELinux context on the faillock directory may lead to unauthorized access to the directory.
Note: If the system does not have SELinux enabled and enforcing a targeted policy, or if the pam_faillock module is not configured for use, this requirement is Not Applicable.

Verify that OL 9 configures the SELinux context type to allow the use of a nondefault faillock tally directory.

Verify the location of the nondefault tally directory for the pam_faillock module with the following command:

$ grep 'dir =' /etc/security/faillock.conf
dir = /var/log/faillock

Check the security context type of the nondefault tally directory with the following command:

$ ls -Zd /var/log/faillock
unconfined_u:object_r:faillog_t:s0 /var/log/faillock

If the security context type of the nondefault tally directory is not "faillog_t", this is a finding.
Configure OL 9 to allow the use of a nondefault faillock tally directory while SELinux enforces a targeted policy.

Create a nondefault faillock tally directory (if it does not already exist) with the following example:

$ sudo mkdir /var/log/faillock

Update the /etc/selinux/targeted/contexts/files/file_contexts.local with "faillog_t" context type for the nondefault faillock tally directory with the following command:

$ sudo semanage fcontext -a -t faillog_t "/var/log/faillock(/.*)?"

Update the context type of the nondefault faillock directory/subdirectories and files with the following command:

$ sudo restorecon -R -v /var/log/faillock
OL09-00-003010 SV-271836r1092637_rule
V-271837 CCI-000044 medium OL 9 must configure the use of the pam_faillock.so module in the /etc/pam.d/system-auth file. SRG-OS-000021-GPOS-00005
If the pam_faillock.so module is not loaded, the system will not correctly lockout accounts to prevent password guessing attacks.
Verify that OL 9 configures the pam_faillock.so module to exist in the "/etc/pam.d/system-auth" file with the following command:

$ grep pam_faillock.so /etc/pam.d/system-auth
auth required pam_faillock.so preauth
auth required pam_faillock.so authfail
account required pam_faillock.so

If the pam_faillock.so module is not present in the "/etc/pam.d/system-auth" file with the "preauth" line listed before pam_unix.so, this is a finding.
Configure OL 9 to include the use of the pam_faillock.so module in the /etc/pam.d/system-auth file.

Add/modify the appropriate sections of the "/etc/pam.d/system-auth" file to match the following lines:
Note: The "preauth" line must be listed before pam_unix.so.

auth required pam_faillock.so preauth
auth required pam_faillock.so authfail
account required pam_faillock.so
OL09-00-003011 SV-271837r1092223_rule
V-271838 CCI-000044 medium OL 9 must configure the use of the pam_faillock.so module in the /etc/pam.d/password-auth file. SRG-OS-000021-GPOS-00005
If the pam_faillock.so module is not loaded, the system will not correctly lockout accounts to prevent password guessing attacks.
Verify that OL 9 configures the pam_faillock.so module to exist in the "/etc/pam.d/password-auth" file with the following command:

$ grep pam_faillock.so /etc/pam.d/password-auth
auth required pam_faillock.so preauth
auth required pam_faillock.so authfail
account required pam_faillock.so

If the pam_faillock.so module is not present in the "/etc/pam.d/password-auth" file with the "preauth" line listed before pam_unix.so, this is a finding.
Configure OL 9 to include the use of the pam_faillock.so module in the /etc/pam.d/password-auth file.

Add/modify the appropriate sections of the "/etc/pam.d/password-auth" file to match the following lines:
Note: The "preauth" line must be listed before pam_unix.so.

auth required pam_faillock.so preauth
auth required pam_faillock.so authfail
account required pam_faillock.so
OL09-00-003012 SV-271838r1092226_rule
V-271839 CCI-002238 medium OL 9 must automatically lock an account when three unsuccessful logon attempts occur. SRG-OS-000329-GPOS-00128
By limiting the number of failed logon attempts, the risk of unauthorized system access via user password guessing, otherwise known as brute-force attacks, is reduced. Limits are imposed by locking the account.

Satisfies: SRG-OS-000329-GPOS-00128, SRG-OS-000021-GPOS-00005
Verify that OL 9 is configured to lock an account after three unsuccessful logon attempts with the command:

$ grep 'deny =' /etc/security/faillock.conf
deny = 3

If the "deny" option is not set to "3" or less (but not "0"), is missing or commented out, this is a finding.
Configure OL 9 to lock an account when three unsuccessful logon attempts occur.

Add/modify the "/etc/security/faillock.conf" file to match the following line:

deny = 3
OL09-00-003020 SV-271839r1092229_rule
V-271840 CCI-002238 medium OL 9 must automatically lock the root account until the root account is released by an administrator when three unsuccessful logon attempts occur during a 15-minute time period. SRG-OS-000329-GPOS-00128
By limiting the number of failed logon attempts, the risk of unauthorized system access via user password guessing, also known as brute-forcing, is reduced. Limits are imposed by locking the account.

Satisfies: SRG-OS-000329-GPOS-00128, SRG-OS-000021-GPOS-00005
Verify that OL 9 is configured to lock the root account after three unsuccessful logon attempts with the command:

$ grep even_deny_root /etc/security/faillock.conf
even_deny_root

If the "even_deny_root" option is not set, is missing or commented out, this is a finding.
Configure OL 9 to lock out the "root" account after a number of incorrect login attempts using "pam_faillock.so", first enable the feature using the following command:
 
$ sudo authselect enable-feature with-faillock  

Then edit the "/etc/security/faillock.conf" file as follows:
 
  add or uncomment the following line:
 even_deny_root
OL09-00-003021 SV-271840r1092232_rule
V-271841 CCI-000044 medium OL 9 must log username information when unsuccessful logon attempts occur. SRG-OS-000021-GPOS-00005
Without auditing of these events, it may be harder or impossible to identify what an attacker did after an attack.
Verify that OL 9 logs username information when unsuccessful logon attempts occur.

Verify the "/etc/security/faillock.conf" file is configured to log username information when unsuccessful logon attempts occur with the following command:

$ grep audit /etc/security/faillock.conf
audit

If the "audit" option is not set, is missing, or is commented out, this is a finding.
Configure OL 9 to log username information when unsuccessful logon attempts occur.

Add/modify the "/etc/security/faillock.conf" file to match the following line:

audit
OL09-00-003022 SV-271841r1092235_rule
V-271842 CCI-000044 medium OL 9 must ensure account lockouts persist. SRG-OS-000021-GPOS-00005
Having lockouts persist across reboots ensures that account is only unlocked by an administrator. If the lockouts did not persist across reboots, an attacker could simply reboot the system to continue brute force attacks against the accounts on the system.
Verify that OL 9 ensures that account lockouts persist.

Verify the "/etc/security/faillock.conf" file is configured use a nondefault faillock directory to ensure contents persist after reboot with the following command:

$ grep 'dir =' /etc/security/faillock.conf
dir = /var/log/faillock

If the "dir" option is not set to a nondefault documented tally log directory, is missing or commented out, this is a finding.
Configure OL 9 maintain the contents of the faillock directory after a reboot.

Add/modify the "/etc/security/faillock.conf" file to match the following line:

dir = /var/log/faillock
OL09-00-003023 SV-271842r1092238_rule
V-271843 CCI-001682 medium OL 9 must automatically expire temporary accounts within 72 hours. SRG-OS-000123-GPOS-00064
Temporary accounts are privileged or nonprivileged accounts that are established during pressing circumstances, such as new software or hardware configuration or an incident response, where the need for prompt account activation requires bypassing normal account authorization procedures. If any inactive temporary accounts are left enabled on the system and are not either manually removed or automatically expired within 72 hours, the security posture of the system will be degraded and exposed to exploitation by unauthorized users or insider threat actors.

Temporary accounts are different from emergency accounts. Emergency accounts, also known as "last resort" or "break glass" accounts, are local logon accounts enabled on the system for emergency use by authorized system administrators to manage a system when standard logon methods are failing or not available. Emergency accounts are not subject to manual removal or scheduled expiration requirements.

The automatic expiration of temporary accounts may be extended as needed by the circumstances, but it must not be extended indefinitely. A documented permanent account should be established for privileged users who need long-term maintenance accounts.

Satisfies: SRG-OS-000123-GPOS-00064, SRG-OS-000002-GPOS-00002
Verify that OL 9 configures temporary accounts to be provisioned with an expiration date of 72 hours.

For every existing temporary account, run the following command to obtain its account expiration information:

$ chage -l  | grep -i "account expires"

Verify each of these accounts has an expiration date set within 72 hours. 

If any temporary accounts have no expiration date set or do not expire within 72 hours, this is a finding.
Configure the operating system to expire temporary accounts after 72 hours with the following command:

$ sudo chage -E $(date -d +3days +%Y-%m-%d) 
OL09-00-003030 SV-271843r1094969_rule
V-271844 CCI-000366 medium OL 9 local interactive user home directories defined in the /etc/passwd file must exist. SRG-OS-000480-GPOS-00227
If a local interactive user has a home directory defined that does not exist, the user may be given access to the / directory as the current working directory upon logon. This could create a denial of service because the user would not be able to access their logon configuration files, and it may give them visibility to system files they normally would not be able to access.
Verify that OL 9 assigned home directories of all interactive users on the system exist with the following command:

$ sudo pwck -r 

The output should not return any interactive users.

If users home directory does not exist, this is a finding.
Create home directories to all local interactive users that currently do not have a home directory assigned. Use the following commands to create the user home directory assigned in "/etc/ passwd":

Note: The example will be for the user wadea, who has a home directory of "/home/wadea", a user identifier (UID) of "wadea", and a Group Identifier (GID) of "users assigned" in "/etc/passwd".

$ sudo mkdir /home/wadea 
$ sudo chown wadea /home/wadea
$ sudo chgrp users /home/wadea
$ sudo chmod 0750 /home/wadea
OL09-00-003050 SV-271844r1092244_rule
V-271845 CCI-000366 medium OL 9 system accounts must not have an interactive login shell. SRG-OS-000480-GPOS-00227
Ensuring shells are not given to system accounts upon login makes it more difficult for attackers to make use of system accounts.
Verify that OL 9 configures system accounts to not have an interactive login shell with the following command:

$ awk -F: '($3<1000){print $1 ":" $3 ":" $7}' /etc/passwd
root:0:/bin/bash
bin:1:/sbin/nologin
daemon:2:/sbin/nologin
adm:3:/sbin/nologin
lp:4:/sbin/nologin

Identify the system accounts from this listing that do not have a nologin shell.

If any system account (other than the root account) has a login shell and it is not documented with the information system security officer (ISSO), this is a finding.
Configure OL 9 so that all noninteractive accounts on the system do not have an interactive shell assigned to them.

If the system account needs a shell assigned for mission operations, document the need with the ISSO.

Run the following command to disable the interactive shell for a specific noninteractive user account:

Replace  with the user that has a login shell.

$ sudo usermod --shell /sbin/nologin 

Do not perform the steps in this section on the root account. Doing so will cause the system to become inaccessible.
OL09-00-003051 SV-271845r1092247_rule
V-271846 CCI-000366 medium OL 9 local interactive user accounts must be assigned a home directory upon creation. SRG-OS-000480-GPOS-00227
If local interactive users are not assigned a valid home directory, there is no place for the storage and control of files they should own.
Verify that OL 9 local interactive users are assigned a home directory upon creation with the following command:

$ grep -i create_home /etc/login.defs
CREATE_HOME yes

If the value for "CREATE_HOME" parameter is not set to "yes", the line is missing, or the line is commented out, this is a finding.
Configure OL 9 to assign home directories to all new local interactive users by setting the "CREATE_HOME" parameter in "/etc/login.defs" to "yes" as follows.

CREATE_HOME yes
OL09-00-003052 SV-271846r1092250_rule
V-271847 CCI-000366 medium OL 9 must be configured so that executable search paths within the initialization files of all local interactive users must only contain paths that resolve to the system default or the users home directory. SRG-OS-000480-GPOS-00227
The executable search path (typically the PATH environment variable) contains a list of directories for the shell to search to find executables. If this path includes the current working directory (other than the users home directory), executables in these directories may be executed instead of system commands.

This variable is formatted as a colon-separated list of directories. If there is an empty entry, such as a leading or trailing colon or two consecutive colons, this is interpreted as the current working directory. If deviations from the default system search path for the local interactive user are required, they must be documented with the information system security officer (ISSO).
Verify that OL 9 local interactive user initialization file executable search path statements do not contain statements that will reference a working directory other than user home directories with the following commands:

$ sudo grep -i path= /home/*/.*
/home/[localinteractiveuser]/.bash_profile:PATH=$PATH:$HOME/.local/bin:$HOME/bin

If any local interactive user initialization files have executable search path statements that include directories outside of their home directory and is not documented with the ISSO as an operational requirement, this is a finding.
Edit the local interactive user initialization files to change any PATH variable statements that reference directories other than their home directory.

If a local interactive user requires path variables to reference a directory owned by the application, it must be documented with the ISSO.
OL09-00-003053 SV-271847r1092253_rule
V-271848 CCI-000366 medium OL 9 must set the umask value to 077 for all local interactive user accounts. SRG-OS-000480-GPOS-00227
The umask controls the default access mode assigned to newly created files. A umask of 077 limits new files to mode 600 or less permissive. Although umask can be represented as a four-digit number, the first digit representing special access modes is typically ignored or required to be "0". This requirement applies to the globally configured system defaults and the local interactive user defaults for each account on the system.
Verify that OL 9 configures the default umask for all local interactive users to be "077".

Identify the locations of all local interactive user home directories by looking at the "/etc/passwd" file.

Check all local interactive user initialization files for interactive users with the following command:

Note: The example is for a system that is configured to create users home directories in the "/home" directory.

$ grep -ri umask /home/
/home/wadea/.bash_history:grep -i umask /etc/bashrc /etc/csh.cshrc /etc/profile
/home/wadea/.bash_history:grep -i umask /etc/login.defs

If any local interactive user initialization files are found to have a umask statement that sets a value less restrictive than "077", this is a finding.
Remove the umask statement from all local interactive user's initialization files. 

If the account is for an application, the requirement for a umask less restrictive than "077" can be documented with the information system security officer, but the user agreement for access to the account must specify that the local interactive user must log on to their account first and then switch the user to the application account with the correct option to gain the account's environment variables.
OL09-00-003060 SV-271848r1092256_rule
V-271849 CCI-003627 medium OL 9 must disable account identifiers (individuals, groups, roles, and devices) after 35 days of inactivity. SRG-OS-000118-GPOS-00060
Inactive identifiers pose a risk to systems and applications because attackers may exploit an inactive identifier and potentially obtain undetected access to the system.

Disabling inactive accounts ensures that accounts which may not have been responsibly removed are not available to attackers who may have compromised their credentials.

Owners of inactive accounts will not notice if unauthorized access to their user account has been obtained.

Satisfies: SRG-OS-000118-GPOS-00060, SRG-OS-000590-GPOS-00110
Verify that OL 9 account identifiers (individuals, groups, roles, and devices) are disabled after 35 days of inactivity with the following command:

Check the account inactivity value by performing the following command:

$ sudo grep -i inactive /etc/default/useradd
INACTIVE=35

If "INACTIVE" is set to "-1", a value greater than "35", or is commented out, this is a finding.
Configure OL 9 to disable account identifiers after 35 days of inactivity after the password expiration. 

Run the following command to change the configuration for useradd:

$ sudo useradd -D -f 35

The recommendation is 35 days, but a lower value is acceptable.
OL09-00-003065 SV-271849r1092259_rule
V-271850 CCI-000366 medium OL 9 must enforce a delay of at least four seconds between logon prompts following a failed logon attempt. SRG-OS-000480-GPOS-00226
Increasing the time between a failed authentication attempt and reprompting to enter credentials helps to slow a single-threaded brute force attack.
Verify that OL 9 enforces a delay of at least four seconds between console logon prompts following a failed logon attempt with the following command:

$ grep -i fail_delay /etc/login.defs
FAIL_DELAY 4

If the value of "FAIL_DELAY" is not set to "4" or greater, or the line is commented out, this is a finding.
Configure the OL 9 to enforce a delay of at least four seconds between logon prompts following a failed console logon attempt.

Modify the "/etc/login.defs" file to set the "FAIL_DELAY" parameter to 4 or greater:

FAIL_DELAY 4
OL09-00-003070 SV-271850r1092262_rule
V-271851 CCI-000067 medium OL 9 remote access methods must be monitored. SRG-OS-000032-GPOS-00013
Logging remote access methods can be used to trace the decrease in the risks associated with remote user access management. It can also be used to spot cyberattacks and ensure ongoing compliance with organizational policies surrounding the use of remote access methods.
Verify that OL 9 monitors all remote access methods.

Check that remote access methods are being logged by running the following command:

$ grep -rE '(auth.\*|authpriv.\*|daemon.\*)' /etc/rsyslog.conf
authpriv.*                                              /var/log/secure
 
If "auth.*", "authpriv.*" or "daemon.*" are not configured to be logged, this is a finding.
Configure OL 9 remote access methods to be monitored.

Add or update the following lines to the "/etc/rsyslog.conf" file:

auth.*;authpriv.*;daemon.* /var/log/secure

The "rsyslog" service must be restarted for the changes to take effect with the following command:

$ sudo systemctl restart rsyslog.service
OL09-00-005000 SV-271851r1092265_rule
V-271852 CCI-001851 medium OL 9 must be configured to forward audit records via TCP to a different system or media from the system being audited via rsyslog. SRG-OS-000479-GPOS-00224
Information stored in one location is vulnerable to accidental or incidental deletion or alteration.

Offloading is a common process in information systems with limited audit storage capacity.

OL 9 installation media provides "rsyslogd", a system utility providing support for message logging. Support for both internet and Unix domain sockets enables this utility to support both local and remote logging. Coupling this utility with "gnutls" (a secure communications library implementing the SSL, TLS, and DTLS protocols) creates a method to securely encrypt and offload auditing.

Rsyslog provides three ways to forward message: the traditional UDP transport, which is extremely lossy but standard; the plain TCP based transport, which loses messages only during certain situations but is widely available; and the RELP transport, which does not lose messages but is currently available only as part of the rsyslogd 3.15.0 and above.

Examples of each configuration:
UDP *.* @remotesystemname
TCP *.* @@remotesystemname
RELP *.* :omrelp:remotesystemname:2514
Note that a port number was given as there is no standard port for RELP.

Satisfies: SRG-OS-000479-GPOS-00224, SRG-OS-000342-GPOS-00133
Verify that OL 9 audit system offloads audit records onto a different system or media from the system being audited via rsyslog using TCP with the following command:

$ grep @@ /etc/rsyslog.conf /etc/rsyslog.d/*.conf
/etc/rsyslog.conf:*.* @@[remoteloggingserver]:[port]

If a remote server is not configured, or the line is commented out, ask the system administrator (SA) to indicate how the audit logs are offloaded to a different system or media. 

If there is no evidence that the audit logs are being offloaded to another system or media, this is a finding.
Configure OL 9 to offload audit records onto a different system or media from the system being audited via TCP using rsyslog by specifying the remote logging server in "/etc/rsyslog.conf"" or "/etc/rsyslog.d/[customfile].conf" with the name or IP address of the log aggregation server.

*.* @@[remoteloggingserver]:[port]"
OL09-00-005005 SV-271852r1092608_rule
V-271853 CCI-000366 medium OL 9 must use cron logging. SRG-OS-000480-GPOS-00227
Cron logging can be used to trace the successful or unsuccessful execution of cron jobs. It can also be used to spot intrusions into the use of the cron facility by unauthorized and malicious users.
Verify that OL 9 rsyslog is configured to log cron events with the following command:

Note: If another logging package is used, substitute the utility configuration file for "/etc/rsyslog.conf" or "/etc/rsyslog.d/*.conf" files.

$ grep -s cron /etc/rsyslog.conf /etc/rsyslog.d/*.conf
/etc/rsyslog.conf:*.info;mail.none;authpriv.none;cron.none                          /var/log/messages
/etc/rsyslog.conf:cron.*                                                           /var/log/cron             

If the command does not return a response, check for cron logging all facilities with the following command:

$ grep -s /var/log/messages /etc/rsyslog.conf /etc/rsyslog.d/*.conf
/etc/rsyslog.conf:*.info;mail.none;authpriv.none;cron.none                          /var/log/messages

If "rsyslog" is not logging messages for the cron facility or all facilities, this is a finding.
Configure "rsyslog" to log all cron messages by adding or updating the following line to "/etc/rsyslog.conf" or a configuration file in the /etc/rsyslog.d/ directory:

cron.* /var/log/cron

The rsyslog daemon must be restarted for the changes to take effect:

$ sudo systemctl restart rsyslog.service
OL09-00-005010 SV-271853r1092271_rule
V-271854 CCI-001851 medium OL 9 must authenticate the remote logging server for offloading audit logs via rsyslog. SRG-OS-000342-GPOS-00133
Information stored in one location is vulnerable to accidental or incidental deletion or alteration.

Offloading is a common process in information systems with limited audit storage capacity.

OL 9 installation media provides "rsyslogd", a system utility providing support for message logging. Support for both internet and Unix domain sockets enables this utility to support both local and remote logging. Coupling this utility with "gnutls" (a secure communications library implementing the SSL, TLS, and DTLS protocols) creates a method to securely encrypt and offload auditing.

"Rsyslog" supported authentication modes include:
anon - anonymous authentication
x509/fingerprint - certificate fingerprint authentication
x509/certvalid - certificate validation only
x509/name - certificate validation and subject name authentication

Satisfies: SRG-OS-000342-GPOS-00133, SRG-OS-000479-GPOS-00224
Verify that OL 9 authenticates the remote logging server for off-loading audit logs with the following command:

$ grep -i '$ActionSendStreamDriverAuthMode' /etc/rsyslog.conf /etc/rsyslog.d/*.conf 
 /etc/rsyslog.conf:$ActionSendStreamDriverAuthMode x509/name 

If the value of the "$ActionSendStreamDriverAuthMode" option is not set to "x509/name" or the line is commented out, ask the system administrator (SA) to indicate how the audit logs are offloaded to a different system or media. 

If there is no evidence that the transfer of the audit logs being offloaded to another system or media is encrypted, this is a finding.
Configure OL 9 to authenticate the remote logging server for off-loading audit logs by setting the following option in "/etc/rsyslog.conf" or "/etc/rsyslog.d/[customfile].conf":

$ActionSendStreamDriverAuthMode x509/name
OL09-00-005015 SV-271854r1092274_rule
V-271855 CCI-001851 medium OL 9 must encrypt the transfer of audit records offloaded onto a different system or media from the system being audited via rsyslog. SRG-OS-000342-GPOS-00133
Information stored in one location is vulnerable to accidental or incidental deletion or alteration.

Offloading is a common process in information systems with limited audit storage capacity.

OL 9 installation media provides "rsyslogd", a system utility providing support for message logging. Support for both internet and Unix domain sockets enables this utility to support both local and remote logging. Coupling this utility with "gnutls" (a secure communications library implementing the SSL, TLS, and DTLS protocols) creates a method to securely encrypt and offload auditing.

"Rsyslog" supported authentication modes include:
anon - anonymous authentication
x509/fingerprint - certificate fingerprint authentication
x509/certvalid - certificate validation only
x509/name - certificate validation and subject name authentication

Satisfies: SRG-OS-000342-GPOS-00133, SRG-OS-000479-GPOS-00224
Verify that OL 9 encrypts audit records offloaded onto a different system or media from the system being audited via rsyslog with the following command:

$ grep -i '$ActionSendStreamDriverMode' /etc/rsyslog.conf /etc/rsyslog.d/*.conf 
/etc/rsyslog.conf:$ActionSendStreamDriverMode 1 

If the value of the "$ActionSendStreamDriverMode" option is not set to "1" or the line is commented out, this is a finding.
Configure OL 9 to encrypt offloaded audit records via rsyslog by setting the following options in "/etc/rsyslog.conf" or "/etc/rsyslog.d/[customfile].conf":

$ActionSendStreamDriverMode 1
OL09-00-005020 SV-271855r1092277_rule
V-271856 CCI-001851 medium OL 9 must encrypt via the gtls driver the transfer of audit records offloaded onto a different system or media from the system being audited via rsyslog. SRG-OS-000342-GPOS-00133
Information stored in one location is vulnerable to accidental or incidental deletion or alteration.

Offloading is a common process in information systems with limited audit storage capacity.

OL 9 installation media provides "rsyslogd", a system utility providing support for message logging. Support for both internet and Unix domain sockets enables this utility to support both local and remote logging. Coupling this utility with "gnutls" (a secure communications library implementing the SSL, TLS, and DTLS protocols) creates a method to securely encrypt and offload auditing.

Satisfies: SRG-OS-000342-GPOS-00133, SRG-OS-000479-GPOS-00224
Verify that OL 9 uses the gtls driver to encrypt audit records offloaded onto a different system or media from the system being audited with the following command:

$ grep -i '$DefaultNetstreamDriver' /etc/rsyslog.conf /etc/rsyslog.d/*.conf 
/etc/rsyslog.conf:$DefaultNetstreamDriver gtls 

If the value of the "$DefaultNetstreamDriver" option is not set to "gtls" or the line is commented out, this is a finding.
Configure OL 9 to use the gtls driver to encrypt offloaded audit records by setting the following options in "/etc/rsyslog.conf" or "/etc/rsyslog.d/[customfile].conf":

$DefaultNetstreamDriver gtls
OL09-00-005025 SV-271856r1092280_rule
V-271857 CCI-000366 medium OL 9 must be configured so that the rsyslog daemon does not accept log messages from other servers unless the server is being used for log aggregation. SRG-OS-000480-GPOS-00227
Unintentionally running a rsyslog server accepting remote messages puts the system at increased risk. Malicious rsyslog messages sent to the server could exploit vulnerabilities in the server software itself, could introduce misleading information into the system's logs, or could fill the system's storage leading to a denial of service.

If the system is intended to be a log aggregation server, its use must be documented with the information system security officer (ISSO).
Verify that OL 9 is not configured to receive remote logs using rsyslog with the following commands:

$ grep -i modload /etc/rsyslog.conf /etc/rsyslog.d/*
$ModLoad imtcp
$ModLoad imrelp

$ grep -i serverrun /etc/rsyslog.conf /etc/rsyslog.d/*
$InputTCPServerRun 514
$InputRELPServerRun 514

Note: An error about no files or directories may be returned. This is not a finding.

If any lines are returned by the command, then rsyslog is configured to receive remote messages, and this is a finding.
Configure OL 9 to not receive remote logs using rsyslog.

Remove the lines in /etc/rsyslog.conf and any files in the /etc/rsyslog.d directory that match any of the following:

$ModLoad imtcp
$ModLoad imudp
$ModLoad imrelp
$InputTCPServerRun [0-9]*
$UDPServerRun [0-9]*
$InputRELPServerRun [0-9]*

The rsyslog daemon must be restarted for the changes to take effect:

$ sudo systemctl restart rsyslog.service
OL09-00-005030 SV-271857r1092283_rule
V-271858 CCI-002385 medium OL 9 must protect against or limit the effects of denial-of-service (DoS) attacks by ensuring rate-limiting measures on impacted network interfaces are implemented. SRG-OS-000420-GPOS-00186
DoS is a condition when a resource is not available for legitimate users. When this occurs, the organization either cannot accomplish its mission or must operate at degraded capacity.

This requirement addresses the configuration of OL 9 to mitigate the impact of DoS attacks that have occurred or are ongoing on system availability. For each system, known and potential DoS attacks must be identified and solutions for each type implemented. A variety of technologies exists to limit or, in some cases, eliminate the effects of DoS attacks (e.g., limiting processes or establishing memory partitions). Employing increased capacity and bandwidth, combined with service redundancy, may reduce the susceptibility to some DoS attacks.
Verify that OL 9 nftables is configured to allow rate limits on any connection to the system with the following command:

$ sudo grep -i firewallbackend /etc/firewalld/firewalld.conf
# FirewallBackend
FirewallBackend=nftables

If the "nftables" is not set as the "FirewallBackend" default, this is a finding.
Configure "nftables" to be the default "firewallbackend" for "firewalld" by adding or editing the following line in "/etc/firewalld/firewalld.conf":

FirewallBackend=nftables

Establish rate-limiting rules based on organization-defined types of DoS attacks on impacted network interfaces.
OL09-00-006000 SV-271858r1092286_rule
V-271859 CCI-001444 medium OL 9 wireless network adapters must be disabled. SRG-OS-000299-GPOS-00117
This requirement applies to wireless peripheral technologies (e.g., wireless mice, keyboards, displays, etc.) used with OL 9 systems. Wireless peripherals (e.g., Wi-Fi/Bluetooth/IR keyboards, mice and pointing devices, and near field communications [NFC]) present a unique challenge by creating an open, unsecured port on a computer. Wireless peripherals must meet DOD requirements for wireless data transmission and be approved for use by the authorizing official (AO). Even though some wireless peripherals, such as mice and pointing devices, do not ordinarily carry information that need to be protected, modification of communications with these wireless peripherals may be used to compromise the OL 9 operating system.

Satisfies: SRG-OS-000299-GPOS-00117, SRG-OS-000300-GPOS-00118, SRG-OS-000424-GPOS-00188, SRG-OS-000481-GPOS-00481
Note: For systems that do not have physical wireless network radios, this requirement is Not Applicable.

Verify that OL 9 allows no wireless interfaces to be configured on the system with the following command:

$ nmcli device status
DEVICE           TYPE       STATE         CONNECTION
virbr0           bridge     connected     virbr0
wlp7s0           wifi       connected     wifiSSID
enp6s0           ethernet   disconnected  --
p2p-dev-wlp7s0   wifi-p2p   disconnected  --
lo               loopback   unmanaged     --
virbr0-nic       tun        unmanaged     --

If a wireless interface is configured and has not been documented and approved by the information system security officer (ISSO), this is a finding.
Configure the system to disable all wireless network interfaces with the following command:

$ sudo nmcli radio all off
OL09-00-006001 SV-271859r1092289_rule
V-271860 CCI-000366 medium OL 9 must configure a DNS processing mode set be Network Manager. SRG-OS-000480-GPOS-00227
To ensure that DNS resolver settings are respected, a DNS mode in Network Manager must be configured.
Verify that OL 9 has a DNS mode configured in Network Manager.

$ NetworkManager --print-config
[main]
dns=none

If the DNS key under main does not exist or is not set to "none" or "default", this is a finding.
Configure NetworkManager in OL 9 to use a DNS mode.

In "/etc/NetworkManager/NetworkManager.conf" add the following line in the "[main]" section:

dns = none

NetworkManager must be reloaded for the change to take effect.

$ sudo systemctl reload NetworkManager
OL09-00-006002 SV-271860r1092292_rule
V-271861 CCI-000366 medium OL 9 systems using Domain Name Servers (DNS) resolution must have at least two name servers configured. SRG-OS-000480-GPOS-00227
To provide availability for name resolution services, multiple redundant name servers are mandated. A failure in name resolution could lead to the failure of security functions requiring name resolution, which may include time synchronization, centralized authentication, and remote system logging.
Verify that OL 9 configures name servers used by the system with the following command:

$ grep nameserver /etc/resolv.conf
nameserver 192.168.1.2
nameserver 192.168.1.3

If less than two lines are returned that are not commented out, this is a finding.
Configure the operating system to use two or more name servers for DNS resolution based on the DNS mode of the system.

If the NetworkManager DNS mode is set to "none", then add the following lines to "/etc/resolv.conf":

nameserver [name server 1]
nameserver [name server 2]

Replace [name server 1] and [name server 2] with the IPs of two different DNS resolvers.

If the NetworkManager DNS mode is set to "default" then add two DNS servers to a NetworkManager connection. Using the following commands:

$ sudo nmcli connection modify [connection name] ipv4.dns [name server 1]
$ sudo nmcli connection modify [connection name] ipv4.dns [name server 2]

Replace [name server 1] and [name server 2] with the IPs of two different DNS resolvers. Replace [connection name] with a valid NetworkManager connection name on the system. Replace ipv4 with ipv6 if IPv6 DNS servers are used.
OL09-00-006003 SV-271861r1092295_rule
V-271862 CCI-000366 medium OL 9 network interfaces must not be in promiscuous mode. SRG-OS-000480-GPOS-00227
Network interfaces in promiscuous mode allow for the capture of all network traffic visible to the system. If unauthorized individuals can access these applications, it may allow them to collect information such as logon IDs, passwords, and key exchanges between systems.

If the system is being used to perform a network troubleshooting function, the use of these tools must be documented with the information systems security officer (ISSO) and restricted to only authorized personnel.
Verify that OL 9 configures network interfaces to not operate in promiscuous mode with the following command:

$ ip link | grep -i promisc

If network interfaces are found on the system in promiscuous mode and their use has not been approved by the ISSO and documented, this is a finding.
Configure network interfaces to turn off promiscuous mode unless approved by the ISSO and documented.

Set the promiscuous mode of an interface to off with the following command:

$ sudo ip link set dev  multicast off promisc off
OL09-00-006004 SV-271862r1092298_rule
V-271863 CCI-000366 medium OL 9 must not have unauthorized IP tunnels configured. SRG-OS-000480-GPOS-00227
IP tunneling mechanisms can be used to bypass network filtering. If tunneling is required, it must be documented with the information system security officer (ISSO).
Verify that OL 9 does not have unauthorized IP tunnels configured.

Determine if the IPsec service is active with the following command:

$ systemctl status ipsec
ipsec.service - Internet Key Exchange (IKE) Protocol Daemon for IPsec
Loaded: loaded (/usr/lib/systemd/system/ipsec.service; disabled)
Active: inactive (dead)

If the IPsec service is active, check for configured IPsec connections ("conn"), with the following command:

$ grep -rni conn /etc/ipsec.conf /etc/ipsec.d/ 

Verify any returned results are documented with the ISSO.

If the IPsec tunnels are active and not approved, this is a finding.
Remove all unapproved tunnels from the system, or document them with the ISSO.
OL09-00-006010 SV-271863r1092639_rule
V-271864 CCI-000366 medium OL 9 must ignore Internet Protocol version 4 (IPv4) Internet Control Message Protocol (ICMP) redirect messages. SRG-OS-000480-GPOS-00227
ICMP redirect messages are used by routers to inform hosts that a more direct route exists for a particular destination. These messages modify the host's route table and are unauthenticated. An illicit ICMP redirect message could result in a man-in-the-middle attack.

This feature of the IPv4 protocol has few legitimate uses. It should be disabled unless absolutely required.
Verify that OL 9 will not accept IPv4 ICMP redirect messages.

Check the value of all "accept_redirects" variables with the following command:

$ sysctl net.ipv4.conf.all.accept_redirects
net.ipv4.conf.all.accept_redirects = 0

If the returned line does not have a value of "0", a line is not returned, or the line is commented out, this is a finding.
Configure OL 9 to ignore IPv4 ICMP redirect messages.

Add or edit the following line in a single system configuration file in the "/etc/sysctl.d/" directory:

net.ipv4.conf.all.accept_redirects = 0

Load settings from all system configuration files with the following command:

$ sudo sysctl --system
OL09-00-006020 SV-271864r1092304_rule
V-271865 CCI-000366 medium OL 9 must not forward Internet Protocol version 4 (IPv4) source-routed packets. SRG-OS-000480-GPOS-00227
Source-routed packets allow the source of the packet to suggest routers forward the packet along a different path than configured on the router, which can be used to bypass network security measures. This requirement applies only to the forwarding of source-routed traffic, such as when IPv4 forwarding is enabled and the system is functioning as a router.

Accepting source-routed packets in the IPv4 protocol has few legitimate uses. It must be disabled unless it is absolutely required.
Verify that OL 9 will not accept IPv4 source-routed packets.

Check the value of the all "accept_source_route" variables with the following command:

$ sysctl net.ipv4.conf.all.accept_source_route
net.ipv4.conf.all.accept_source_route = 0

If the returned line does not have a value of "0", a line is not returned, or the line is commented out, this is a finding.
Configure OL 9 to ignore IPv4 source-routed packets.

Add or edit the following line in a single system configuration file in the "/etc/sysctl.d/" directory:

net.ipv4.conf.all.accept_source_route = 0

Load settings from all system configuration files with the following command:

$ sudo sysctl --system
OL09-00-006021 SV-271865r1092307_rule
V-271866 CCI-000366 medium OL 9 must log IPv4 packets with impossible addresses. SRG-OS-000480-GPOS-00227
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.
Verify that OL 9 logs IPv4 martian packets.

Check the value of the accept source route variable with the following command:

$ sysctl net.ipv4.conf.all.log_martians
net.ipv4.conf.all.log_martians = 1

If the returned line does not have a value of "1", a line is not returned, or the line is commented out, this is a finding.
Configure OL 9 to log martian packets on IPv4 interfaces.

Add or edit the following line in a single system configuration file in the "/etc/sysctl.d/" directory:

net.ipv4.conf.all.log_martians=1

Load settings from all system configuration files with the following command:

$ sudo sysctl --system
OL09-00-006022 SV-271866r1092310_rule
V-271867 CCI-000366 medium OL 9 must log IPv4 packets with impossible addresses by default. SRG-OS-000480-GPOS-00227
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.
Verify that OL 9 logs IPv4 martian packets by default.

Check the value of the accept source route variable with the following command:

$ sysctl net.ipv4.conf.default.log_martians
net.ipv4.conf.default.log_martians = 1

If the returned line does not have a value of "1", a line is not returned, or the line is commented out, this is a finding.
Configure OL 9 to log martian packets on IPv4 interfaces by default.

Add or edit the following line in a single system configuration file in the "/etc/sysctl.d/" directory:

net.ipv4.conf.default.log_martians=1

Load settings from all system configuration files with the following command:

$ sudo sysctl --system
OL09-00-006023 SV-271867r1092313_rule
V-271868 CCI-000366 medium OL 9 must use reverse path filtering on all IPv4 interfaces. SRG-OS-000480-GPOS-00227
Enabling reverse path filtering drops packets with source addresses that should not have been able to be received on the interface on which they were received. It must not be used on systems that are routers for complicated networks but is helpful for end hosts and routers serving small networks.
Verify that OL 9 uses reverse path filtering on all IPv4 interfaces with the following commands:

$ sysctl net.ipv4.conf.all.rp_filter
net.ipv4.conf.all.rp_filter = 1

If the returned line does not have a value of "1", or a line is not returned, this is a finding.
Configure OL 9 to use reverse path filtering on all IPv4 interfaces. 

Add or edit the following line in a single system configuration file in the "/etc/sysctl.d/" directory:

net.ipv4.conf.all.rp_filter = 1

The system configuration files need to be reloaded for the changes to take effect. To reload the contents of the files, run the following command:

$ sudo sysctl --system
OL09-00-006024 SV-271868r1092316_rule
V-271869 CCI-000366 medium OL 9 must prevent IPv4 Internet Control Message Protocol (ICMP) redirect messages from being accepted. SRG-OS-000480-GPOS-00227
ICMP redirect messages are used by routers to inform hosts that a more direct route exists for a particular destination. These messages modify the host's route table and are unauthenticated. An illicit ICMP redirect message could result in a man-in-the-middle attack.

This feature of the IPv4 protocol has few legitimate uses. It must be disabled unless absolutely required.
Verify that OL 9 will not accept IPv4 ICMP redirect messages.

Check the value of the default "accept_redirects" variables with the following command:

$ sysctl net.ipv4.conf.default.accept_redirects
net.ipv4.conf.default.accept_redirects = 0

If the returned line does not have a value of "0", a line is not returned, or the line is commented out, this is a finding.
Configure OL 9 to prevent IPv4 ICMP redirect messages from being accepted.

Add or edit the following line in a single system configuration file in the "/etc/sysctl.d/" directory:

net.ipv4.conf.default.accept_redirects = 0

Load settings from all system configuration files with the following command:

$ sudo sysctl --system
OL09-00-006025 SV-271869r1092319_rule
V-271870 CCI-000366 medium OL 9 must not forward IPv4 source-routed packets by default. SRG-OS-000480-GPOS-00227
Source-routed packets allow the source of the packet to suggest routers forward the packet along a different path than configured on the router, which can be used to bypass network security measures.

Accepting source-routed packets in the IPv4 protocol has few legitimate uses. It must be disabled unless it is absolutely required, such as when IPv4 forwarding is enabled and the system is legitimately functioning as a router.
Verify that OL 9 does not accept IPv4 source-routed packets by default.

Check the value of the accept source route variable with the following command:

$ sysctl net.ipv4.conf.default.accept_source_route
net.ipv4.conf.default.accept_source_route = 0

If the returned line does not have a value of "0", a line is not returned, or the line is commented out, this is a finding.
Configure OL 9 to not forward IPv4 source-routed packets by default.

Add or edit the following line in a single system configuration file in the "/etc/sysctl.d/" directory:

net.ipv4.conf.default.accept_source_route = 0

Load settings from all system configuration files with the following command:

$ sudo sysctl --system
OL09-00-006026 SV-271870r1092322_rule
V-271871 CCI-000366 medium OL 9 must use a reverse-path filter for IPv4 network traffic, when possible, by default. SRG-OS-000480-GPOS-00227
Enabling reverse path filtering drops packets with source addresses that should not have been able to be received on the interface on which they were received. It must not be used on systems that are routers for complicated networks but is helpful for end hosts and routers serving small networks.
Verify that OL 9 uses reverse path filtering on IPv4 interfaces with the following commands:

$ sysctl net.ipv4.conf.default.rp_filter
net.ipv4.conf.default.rp_filter = 1

If the returned line does not have a value of "1", or a line is not returned, this is a finding.
Configure OL 9 to use reverse path filtering on IPv4 interfaces by default.

Add or edit the following line in a single system configuration file in the "/etc/sysctl.d/" directory:

net.ipv4.conf.default.rp_filter = 1

Load settings from all system configuration files with the following command:

$ sudo sysctl --system
OL09-00-006027 SV-271871r1092325_rule
V-271872 CCI-000366 medium OL 9 must not enable IPv4 packet forwarding unless the system is a router. SRG-OS-000480-GPOS-00227
Routing protocol daemons are typically used on routers to exchange network topology information with other routers. If this capability is used when not required, system network information may be unnecessarily transmitted across the network.
Verify that OL 9 is not performing IPv4 packet forwarding, unless the system is a router.

Check that IPv4 forwarding is disabled using the following command:

$ sysctl net.ipv4.conf.all.forwarding
net.ipv4.conf.all.forwarding = 0

If the IPv4 forwarding value is not "0" and is not documented with the information system security officer (ISSO) as an operational requirement, this is a finding.
Configure OL 9 to not allow IPv4 packet forwarding unless the system is a router.

Add or edit the following line in a single system configuration file in the "/etc/sysctl.d/" directory:

net.ipv4.conf.all.forwarding = 0

Load settings from all system configuration files with the following command:

$ sudo sysctl --system
OL09-00-006028 SV-271872r1092328_rule
V-271873 CCI-000366 medium OL 9 must not respond to Internet Control Message Protocol (ICMP) echoes sent to a broadcast address. SRG-OS-000480-GPOS-00227
Responding to broadcast (ICMP) echoes facilitates network mapping and provides a vector for amplification attacks.

Ignoring ICMP echo requests (pings) sent to broadcast or multicast addresses makes the system slightly more difficult to enumerate on the network.
Verify that OL 9 does not respond to ICMP echoes sent to a broadcast address.

Check the value of the "icmp_echo_ignore_broadcasts" variable with the following command:

$ sysctl net.ipv4.icmp_echo_ignore_broadcasts
net.ipv4.icmp_echo_ignore_broadcasts = 1

If the returned line does not have a value of "1", a line is not returned, or the retuned line is commented out, this is a finding.
Configure OL 9 to not respond to IPv4 ICMP echoes sent to a broadcast address.

Add or edit the following line in a single system configuration file in the "/etc/sysctl.d/" directory:

net.ipv4.icmp_echo_ignore_broadcasts = 1

Load settings from all system configuration files with the following command:

$ sudo sysctl --system
OL09-00-006030 SV-271873r1092331_rule
V-271874 CCI-000366 medium OL 9 must limit the number of bogus Internet Control Message Protocol (ICMP) response errors logs. SRG-OS-000480-GPOS-00227
Some routers will send responses to broadcast frames that violate RFC-1122, which fills up a log file system with many useless error messages. An attacker may take advantage of this and attempt to flood the logs with bogus error logs. Ignoring bogus ICMP error responses reduces log size, although some activity would not be logged.
Verify that OL 9 limits the number of bogus ICMP response errors logs.

The runtime status of the net.ipv4.icmp_ignore_bogus_error_responses kernel parameter can be queried by running the following command:

$ sysctl net.ipv4.icmp_ignore_bogus_error_responses 
net.ipv4.icmp_ignore_bogus_error_responses = 1

If "net.ipv4.icmp_ignore_bogus_error_responses" is not set to "1", this is a finding.
Configure OL 9 to not log bogus ICMP errors: 

Add or edit the following line in a single system configuration file in the "/etc/sysctl.d/" directory:

net.ipv4.icmp_ignore_bogus_error_responses = 1

Load settings from all system configuration files with the following command:

$ sudo sysctl --system
OL09-00-006031 SV-271874r1092612_rule
V-271875 CCI-000366 medium OL 9 must not send Internet Control Message Protocol (ICMP) redirects. SRG-OS-000480-GPOS-00227
ICMP redirect messages are used by routers to inform hosts that a more direct route exists for a particular destination. These messages contain information from the system's route table possibly revealing portions of the network topology.

The ability to send ICMP redirects is only appropriate for systems acting as routers.
Verify that OL 9 does not IPv4 ICMP redirect messages.

Check the value of the "all send_redirects" variables with the following command:

$ sysctl net.ipv4.conf.all.send_redirects
net.ipv4.conf.all.send_redirects = 0

If "net.ipv4.conf.all.send_redirects" is not set to "0" and is not documented with the information system security officer (ISSO) as an operational requirement or is missing, this is a finding.
Configure OL 9 to not allow interfaces to perform IPv4 ICMP redirects.

Add or edit the following line in a single system configuration file in the "/etc/sysctl.d/" directory:

net.ipv4.conf.all.send_redirects = 0

Load settings from all system configuration files with the following command:

$ sudo sysctl --system
OL09-00-006032 SV-271875r1092337_rule
V-271876 CCI-000366 medium OL 9 must not allow interfaces to perform Internet Control Message Protocol (ICMP) redirects by default. SRG-OS-000480-GPOS-00227
ICMP redirect messages are used by routers to inform hosts that a more direct route exists for a particular destination. These messages contain information from the system's route table possibly revealing portions of the network topology.

The ability to send ICMP redirects is only appropriate for systems acting as routers.
Verify that OL 9 does not allow interfaces to perform Internet Protocol version 4 (IPv4) ICMP redirects by default.

Check the value of the "default send_redirects" variables with the following command:

$ sysctl net.ipv4.conf.default.send_redirects
net.ipv4.conf.default.send_redirects=0

If "net.ipv4.conf.default.send_redirects" is not set to "0" and is not documented with the information system security officer (ISSO) as an operational requirement or is missing, this is a finding.
Configure OL 9 to not allow interfaces to perform IPv4 ICMP redirects by default.

Add or edit the following line in a single system configuration file in the "/etc/sysctl.d/" directory:

net.ipv4.conf.default.send_redirects = 0

Load settings from all system configuration files with the following command:

$ sudo sysctl --system
OL09-00-006033 SV-271876r1092641_rule
V-271877 CCI-000366 medium OL 9 must not accept router advertisements on all IPv6 interfaces. SRG-OS-000480-GPOS-00227
An illicit router advertisement message could result in a man-in-the-middle attack.
Note: If IPv6 is disabled on the system, this requirement is Not Applicable.

Verify that OL 9 does not accept router advertisements on all IPv6 interfaces, unless the system is a router.

Determine if router advertisements are not accepted by using the following command:

$ sysctl net.ipv6.conf.all.accept_ra
net.ipv6.conf.all.accept_ra = 0

If the "accept_ra" value is not "0" and is not documented with the information system security officer (ISSO) as an operational requirement, this is a finding.
Configure OL 9 to not accept router advertisements on all IPv6 interfaces unless the system is a router.

Add or edit the following line in a single system configuration file in the "/etc/sysctl.d/" directory:

net.ipv6.conf.all.accept_ra = 0

Load settings from all system configuration files with the following command:

$ sudo sysctl --system
OL09-00-006040 SV-271877r1092343_rule
V-271878 CCI-000366 medium OL 9 must ignore IPv6 Internet Control Message Protocol (ICMP) redirect messages. SRG-OS-000480-GPOS-00227
An illicit ICMP redirect message could result in a man-in-the-middle attack.
Note: If IPv6 is disabled on the system, this requirement is Not Applicable.

Verify that OL 9 ignores IPv6 ICMP redirect messages.

Check the value of the "accept_redirects" variables with the following command:

$ sysctl net.ipv6.conf.all.accept_redirects
net.ipv6.conf.all.accept_redirects = 0

If the returned line does not have a value of "0", a line is not returned, or the line is commented out, this is a finding.
Configure OL 9 to ignore IPv6 ICMP redirect messages.

Add or edit the following line in a single system configuration file in the "/etc/sysctl.d/" directory:

net.ipv6.conf.all.accept_redirects = 0

Load settings from all system configuration files with the following command:

$ sudo sysctl --system
OL09-00-006041 SV-271878r1092346_rule
V-271879 CCI-000366 medium OL 9 must not forward IPv6 source-routed packets. SRG-OS-000480-GPOS-00227
Source-routed packets allow the source of the packet to suggest that routers forward the packet along a different path than configured on the router, which can be used to bypass network security measures. This requirement applies only to the forwarding of source-routed traffic, such as when forwarding is enabled and the system is functioning as a router.
Note: If IPv6 is disabled on the system, this requirement is Not Applicable.

Verify that OL 9 does not accept IPv6 source-routed packets.

Check the value of the accept source route variable with the following command:

$ sysctl net.ipv6.conf.all.accept_source_route
net.ipv6.conf.all.accept_source_route = 0

If the returned line does not have a value of "0", a line is not returned, or the line is commented out, this is a finding.
Configure OL 9 to not forward IPv6 source-routed packets.

Add or edit the following line in a single system configuration file in the "/etc/sysctl.d/" directory:

net.ipv6.conf.all.accept_source_route = 0

Load settings from all system configuration files with the following command:

$ sudo sysctl --system
OL09-00-006042 SV-271879r1092349_rule
V-271880 CCI-000366 medium OL 9 must not enable IPv6 packet forwarding unless the system is a router. SRG-OS-000480-GPOS-00227
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.
Note: If IPv6 is disabled on the system, this requirement is Not Applicable.

Verify that OL 9 is not performing IPv6 packet forwarding, unless the system is a router.

Check that IPv6 forwarding is disabled using the following commands:

$ sysctl net.ipv6.conf.all.forwarding
net.ipv6.conf.all.forwarding = 0

If the IPv6 forwarding value is not "0" and is not documented with the information system security officer (ISSO) as an operational requirement, this is a finding.
Configure OL 9 to not allow IPv6 packet forwarding unless the system is a router.

Add or edit the following line in a single system configuration file in the "/etc/sysctl.d/" directory:

net.ipv6.conf.all.forwarding = 0

Load settings from all system configuration files with the following command:

$ sudo sysctl --system
OL09-00-006043 SV-271880r1092352_rule
V-271881 CCI-000366 medium OL 9 must not accept router advertisements on all IPv6 interfaces by default. SRG-OS-000480-GPOS-00227
An illicit router advertisement message could result in a man-in-the-middle attack.
Note: If IPv6 is disabled on the system, this requirement is Not Applicable.

Verify that OL 9 does not accept router advertisements on all IPv6 interfaces by default unless the system is a router.

Determine if router advertisements are not accepted by default by using the following command:

$ sysctl net.ipv6.conf.default.accept_ra
net.ipv6.conf.default.accept_ra = 0

If the "accept_ra" value is not "0" and is not documented with the information system security officer (ISSO) as an operational requirement, this is a finding.
Configure OL 9 to not accept router advertisements on all IPv6 interfaces by default unless the system is a router.

Add or edit the following line in a single system configuration file in the "/etc/sysctl.d/" directory:

net.ipv6.conf.default.accept_ra = 0

Load settings from all system configuration files with the following command:

$ sudo sysctl --system
OL09-00-006044 SV-271881r1092355_rule
V-271882 CCI-000366 medium OL 9 must prevent IPv6 Internet Control Message Protocol (ICMP) redirect messages from being accepted. SRG-OS-000480-GPOS-00227
ICMP redirect messages are used by routers to inform hosts that a more direct route exists for a particular destination. These messages modify the host's route table and are unauthenticated. An illicit ICMP redirect message could result in a man-in-the-middle attack.
Note: If IPv6 is disabled on the system, this requirement is Not Applicable.

Verify that OL 9 will not accept IPv6 ICMP redirect messages.

Check the value of the default "accept_redirects" variables with the following command:

$ sysctl net.ipv6.conf.default.accept_redirects
net.ipv6.conf.default.accept_redirects = 0

If the returned line does not have a value of "0", a line is not returned, or the line is commented out, this is a finding.
Configure OL 9 to prevent IPv6 ICMP redirect messages from being accepted.

Add or edit the following line in a single system configuration file in the "/etc/sysctl.d/" directory:

net.ipv6.conf.default.accept_redirects = 0

Load settings from all system configuration files with the following command:

$ sudo sysctl --system
OL09-00-006045 SV-271882r1092358_rule
V-271883 CCI-000366 medium OL 9 must not forward IPv6 source-routed packets by default. SRG-OS-000480-GPOS-00227
Source-routed packets allow the source of the packet to suggest that routers forward the packet along a different path than configured on the router, which can be used to bypass network security measures. This requirement applies only to the forwarding of source-routed traffic, such as when forwarding is enabled and the system is functioning as a router.

Accepting source-routed packets in the IPv6 protocol has few legitimate uses. It must be disabled unless it is absolutely required.
Note: If IPv6 is disabled on the system, this requirement is Not Applicable.

Verify that OL 9 does not accept IPv6 source-routed packets by default.

Check the value of the accept source route variable with the following command:

$ sysctl net.ipv6.conf.default.accept_source_route
net.ipv6.conf.default.accept_source_route = 0

If the returned line does not have a value of "0", a line is not returned, or the line is commented out, this is a finding.
Configure OL 9 to not forward IPv6 source-routed packets by default.

Add or edit the following line in a single system configuration file in the "/etc/sysctl.d/" directory:

net.ipv6.conf.default.accept_source_route = 0

Load settings from all system configuration files with the following command:

$ sudo sysctl --system
OL09-00-006046 SV-271883r1092361_rule
V-271884 CCI-002385 medium OL 9 must be configured to use TCP syncookies. SRG-OS-000420-GPOS-00186
Denial of service (DoS) is a condition when a resource is not available for legitimate users. When this occurs, the organization either cannot accomplish its mission or must operate at degraded capacity. 

Managing excess capacity ensures that sufficient capacity is available to counter flooding attacks. Employing increased capacity and service redundancy may reduce the susceptibility to some DoS attacks. Managing excess capacity may include, for example, establishing selected usage priorities, quotas, or partitioning.

Satisfies: SRG-OS-000420-GPOS-00186, SRG-OS-000142-GPOS-00071
Verify that OL 9 is configured to use IPv4 TCP syncookies.

Determine if syncookies are used with the following command:

Check the status of the kernel.perf_event_paranoid kernel parameter.

$ sysctl net.ipv4.tcp_syncookies
net.ipv4.tcp_syncookies = 1

Check that the configuration files are present to enable this kernel parameter.
Configure OL 9 to use TCP syncookies.

Add or edit the following line in a system configuration file in the "/etc/sysctl.d/" directory:

 net.ipv4.tcp_syncookies = 1

Load settings from all system configuration files with the following command:

$ sudo sysctl --system
OL09-00-006050 SV-271884r1092364_rule
V-271885 CCI-000172 medium OL 9 audit system must protect logon UIDs from unauthorized change. SRG-OS-000462-GPOS-00206
If modification of login user identifiers (UIDs) is not prevented, they can be changed by nonprivileged users and make auditing complicated or impossible.

Satisfies: SRG-OS-000462-GPOS-00206, SRG-OS-000475-GPOS-00220, SRG-OS-000057-GPOS-00027, SRG-OS-000058-GPOS-00028, SRG-OS-000059-GPOS-00029
Verify that OL 9 audit system configuration prevents unauthorized changes to logon UIDs with the following command:

$ sudo grep -i immutable /etc/audit/audit.rules
--loginuid-immutable

If the "--loginuid-immutable" option is not returned in the "/etc/audit/audit.rules", or the line is commented out, this is a finding.
Configure OL 9 auditing to prevent modification of login UIDs once they are set by adding the following line to /etc/audit/rules.d/audit.rules:

--loginuid-immutable

The audit daemon must be restarted for the changes to take effect.

$ sudo service auditd restart
OL09-00-008000 SV-271885r1092367_rule
V-271886 CCI-000162 medium OL 9 audit system must protect auditing rules from unauthorized change. SRG-OS-000057-GPOS-00027
Unauthorized disclosure of audit records can reveal system and configuration data to attackers, thus compromising its confidentiality.

Audit information includes all information (e.g., audit records, audit settings, audit reports) needed to successfully audit OL 9 system activity.

In immutable mode, unauthorized users cannot execute changes to the audit system to potentially hide malicious activity and then put the audit rules back. A system reboot would be noticeable, and a system administrator could then investigate the unauthorized changes.

Satisfies: SRG-OS-000057-GPOS-00027, SRG-OS-000058-GPOS-00028, SRG-OS-000059-GPOS-00029
Verify that OL 9 audit system configuration prevents unauthorized changes with the following command:

$ sudo grep "^\s*[^#]" /etc/audit/audit.rules | tail -1
-e 2

If the audit system is not set to be immutable by adding the "-e 2" option to the end of "/etc/audit/audit.rules", this is a finding.
Configure the audit system to set the audit rules to be immutable by adding the following line to end of "/etc/audit/rules.d/audit.rules"

-e 2

The audit daemon must be restarted for the changes to take effect.

$ sudo service auditd restart
OL09-00-008005 SV-271886r1092370_rule
V-271901 CCI-002470 medium OL 9 must only allow the use of DOD PKI-established certificate authorities for authentication in the establishment of protected sessions to OL 9. SRG-OS-000403-GPOS-00182
Untrusted certificate authorities (CA) can issue certificates, but they may be issued by organizations or individuals that seek to compromise DOD systems or by organizations with insufficient security controls. If the CA used for verifying the certificate is not a DOD-approved CA, trust of this CA has not been established.

The DOD will only accept PKI-certificates obtained from a DOD-approved internal or external certificate authority. Reliance on CAs for the establishment of secure sessions includes, for example, the use of SSL/TLS certificates.
Verify OL 9 only allows the use of DOD PKI-established certificate authorities using the following command:

$ trust list

pkcs11:id=%7C%42%96%AE%DE%4B%48%3B%FA%92%F8%9E%8C%CF%6D%8B%A9%72%37%95;type=cert
    type: certificate
    label: ISRG Root X2
    trust: anchor
    category: authority

If any nonapproved CAs are returned, this is a finding.
Configure OL 9 to only allow the use of DOD PKI-established certificate authorities.

For each untrusted CA, export the certificate to a file and add it to the blocklist:

$ trust dump --filter "pkcs11:id=%7C%42%96%AE%DE%4B%48%3B%FA%92%F8%9E%8C%CF%6D%8B%A9%72%37%95;type=cert" > /etc/pki/ca-trust/source/blocklist/ISRGRootX2

$ update-ca-trust 

Verify that the certificate is in the blocklist:

$ trust list --filter=blocklist
p11-kit: overriding trust for anchor in blocklist: ISRGRootX2
pkcs11:id=%7C%42%96%AE%DE%4B%48%3B%FA%92%F8%9E%8C%CF%6D%8B%A9%72%37%95;type=cert
    type: certificate
    label: ISRG Root X2
    trust: distrusted
    category: authority

pkcs11:id=%88%68%BF%E0%8E%35%C4%3B%38%6B%62%F7%28%3B%84%81%C8%0C%D7%4D;type=cert
    type: certificate
    label: Explicitly Distrust DigiNotar Root CA
    trust: distrusted
    category: authority
OL09-00-900140 SV-271901r1092415_rule