CIS Amazon Linux 2023 Benchmark for Level 1 - Server
Rules and Groups employed by this XCCDF Profile
-
Add nodev Option to /var/log/audit
The <code>nodev</code> mount option can be used to prevent device files from being created in <code>/var/log/audit</code>. Legitimate character and block devices should exist only in the <code>/dev...Rule Medium Severity -
Add noexec Option to /var/log/audit
The <code>noexec</code> mount option can be used to prevent binaries from being executed out of <code>/var/log/audit</code>. Add the <code>noexec</code> option to the fourth column of <code>/etc/fs...Rule Medium Severity -
Add nosuid Option to /var/log/audit
The <code>nosuid</code> mount option can be used to prevent execution of setuid programs in <code>/var/log/audit</code>. The SUID and SGID permissions should not be required in directories containi...Rule Medium Severity -
Add nodev Option to /var/log
The <code>nodev</code> mount option can be used to prevent device files from being created in <code>/var/log</code>. Legitimate character and block devices should exist only in the <code>/dev</code...Rule Medium Severity -
Add noexec Option to /var/log
The <code>noexec</code> mount option can be used to prevent binaries from being executed out of <code>/var/log</code>. Add the <code>noexec</code> option to the fourth column of <code>/etc/fstab</c...Rule Medium Severity -
Add nosuid Option to /var/log
The <code>nosuid</code> mount option can be used to prevent execution of setuid programs in <code>/var/log</code>. The SUID and SGID permissions should not be required in directories containing log...Rule Medium Severity -
Add nodev Option to /var
The <code>nodev</code> mount option can be used to prevent device files from being created in <code>/var</code>. Legitimate character and block devices should exist only in the <code>/dev</code> di...Rule Medium Severity -
Add nosuid Option to /var
The <code>nosuid</code> mount option can be used to prevent execution of setuid programs in <code>/var</code>. The SUID and SGID permissions should not be required for this directory. Add the <code...Rule Medium Severity -
Add nodev Option to /var/tmp
The <code>nodev</code> mount option can be used to prevent device files from being created in <code>/var/tmp</code>. Legitimate character and block devices should not exist within temporary directo...Rule Medium Severity -
Add noexec Option to /var/tmp
The <code>noexec</code> mount option can be used to prevent binaries from being executed out of <code>/var/tmp</code>. Add the <code>noexec</code> option to the fourth column of <code>/etc/fstab</c...Rule Medium Severity -
Add nosuid Option to /var/tmp
The <code>nosuid</code> mount option can be used to prevent execution of setuid programs in <code>/var/tmp</code>. The SUID and SGID permissions should not be required in these world-writable direc...Rule Medium Severity -
Restrict Programs from Dangerous Execution Patterns
The recommendations in this section are designed to ensure that the system's features to protect against potentially dangerous program execution are activated. These protections are applied at the ...Group -
Restrict usage of ptrace to descendant processes
To set the runtime status of the <code>kernel.yama.ptrace_scope</code> kernel parameter, run the following command: <pre>$ sudo sysctl -w kernel.yama.ptrace_scope=1</pre> To make sure that the sett...Rule Medium Severity -
Disable Core Dumps
A core dump file is the memory image of an executable program when it was terminated by the operating system due to errant behavior. In most cases, only software developers legitimately need to acc...Group -
Disable core dump backtraces
The <code>ProcessSizeMax</code> option in <code>[Coredump]</code> section of <code>/etc/systemd/coredump.conf</code> specifies the maximum size in bytes of a core which will be processed. Core dump...Rule Medium Severity -
Disable storing core dump
TheStorage
option in[Coredump]
sectionof/etc/systemd/coredump.conf
can be set tonone
to disable storing core dumps permanently.Rule Medium Severity -
Enable ExecShield
ExecShield describes kernel features that provide protection against exploitation of memory corruption errors such as buffer overflows. These features include random placement of the stack and othe...Group -
Enable Randomized Layout of Virtual Address Space
To set the runtime status of the <code>kernel.randomize_va_space</code> kernel parameter, run the following command: <pre>$ sudo sysctl -w kernel.randomize_va_space=2</pre> To make sure that the se...Rule Medium Severity -
SELinux
SELinux is a feature of the Linux kernel which can be used to guard against misconfigured or compromised programs. SELinux enforces the idea that programs should be limited in what files they can a...Group -
Install libselinux Package
Thelibselinux
package can be installed with the following command:$ sudo dnf install libselinux
Rule High Severity -
Uninstall mcstrans Package
The <code>mcstransd</code> daemon provides category label information to client processes requesting information. The label translations are defined in <code>/etc/selinux/targeted/setrans.conf</cod...Rule Low Severity -
Uninstall setroubleshoot Package
The SETroubleshoot service notifies desktop users of SELinux denials. The service provides information around configuration errors, unauthorized intrusions, and other potential errors. The <code>se...Rule Low Severity -
Ensure SELinux Not Disabled in /etc/default/grub
SELinux can be disabled at boot time by an argument in <code>/etc/default/grub</code>. Remove any instances of <code>selinux=0</code> from the kernel arguments in that file to prevent SELinux from ...Rule Medium Severity -
Ensure No Daemons are Unconfined by SELinux
Daemons for which the SELinux policy does not contain rules will inherit the context of the parent process. Because daemons are launched during startup and descend from the <code>init</code> proces...Rule Medium Severity -
Ensure SELinux is Not Disabled
The SELinux state should be set to <code>enforcing</code> or <code>permissive</code> at system boot time. In the file <code>/etc/selinux/config</code>, add or correct the following line to configur...Rule High Severity -
Configure SELinux Policy
The SELinux <code>targeted</code> policy is appropriate for general-purpose desktops and servers, as well as systems in many other roles. To configure the system to use this policy, add or correct ...Rule Medium Severity -
Services
The best protection against vulnerable software is running less software. This section describes how to review the software which Amazon Linux 2023 installs on a system and disable software which i...Group -
Avahi Server
The Avahi daemon implements the DNS Service Discovery and Multicast DNS protocols, which provide service and host discovery on a network. It allows a system to automatically identify resources on t...Group -
Disable Avahi Server if Possible
Because the Avahi daemon service keeps an open network port, it is subject to network attacks. Disabling it can reduce the system's vulnerability to such attacks.Group -
Uninstall avahi Server Package
If the system does not need to have an Avahi server which implements the DNS Service Discovery and Multicast DNS protocols, the avahi-autoipd and avahi packages can be uninstalled.Rule Medium Severity -
Cron and At Daemons
The cron and at services are used to allow commands to be executed at a later time. The cron service is required by almost all systems to perform necessary maintenance tasks, while at may or may no...Group -
Enable cron Service
The <code>crond</code> service is used to execute commands at preconfigured times. It is required by almost all systems to perform necessary maintenance tasks, such as notifying root of system acti...Rule Medium Severity -
Verify Group Who Owns cron.d
To properly set the group owner of/etc/cron.d
, run the command:$ sudo chgrp root /etc/cron.d
Rule Medium Severity -
Verify Group Who Owns cron.daily
To properly set the group owner of/etc/cron.daily
, run the command:$ sudo chgrp root /etc/cron.daily
Rule Medium Severity -
Verify Group Who Owns cron.hourly
To properly set the group owner of/etc/cron.hourly
, run the command:$ sudo chgrp root /etc/cron.hourly
Rule Medium Severity -
Verify Group Who Owns cron.monthly
To properly set the group owner of/etc/cron.monthly
, run the command:$ sudo chgrp root /etc/cron.monthly
Rule Medium Severity -
Verify Group Who Owns cron.weekly
To properly set the group owner of/etc/cron.weekly
, run the command:$ sudo chgrp root /etc/cron.weekly
Rule Medium Severity -
Verify Group Who Owns Crontab
To properly set the group owner of/etc/crontab
, run the command:$ sudo chgrp root /etc/crontab
Rule Medium Severity -
Verify Owner on cron.d
To properly set the owner of/etc/cron.d
, run the command:$ sudo chown root /etc/cron.d
Rule Medium Severity -
Verify Owner on cron.daily
To properly set the owner of/etc/cron.daily
, run the command:$ sudo chown root /etc/cron.daily
Rule Medium Severity -
Verify Owner on cron.hourly
To properly set the owner of/etc/cron.hourly
, run the command:$ sudo chown root /etc/cron.hourly
Rule Medium Severity -
Verify Owner on cron.monthly
To properly set the owner of/etc/cron.monthly
, run the command:$ sudo chown root /etc/cron.monthly
Rule Medium Severity -
Verify Owner on cron.weekly
To properly set the owner of/etc/cron.weekly
, run the command:$ sudo chown root /etc/cron.weekly
Rule Medium Severity -
Verify Owner on crontab
To properly set the owner of/etc/crontab
, run the command:$ sudo chown root /etc/crontab
Rule Medium Severity -
Verify Permissions on cron.d
To properly set the permissions of/etc/cron.d
, run the command:$ sudo chmod 0700 /etc/cron.d
Rule Medium Severity -
Verify Permissions on cron.daily
To properly set the permissions of/etc/cron.daily
, run the command:$ sudo chmod 0700 /etc/cron.daily
Rule Medium Severity -
Verify Permissions on cron.hourly
To properly set the permissions of/etc/cron.hourly
, run the command:$ sudo chmod 0700 /etc/cron.hourly
Rule Medium Severity -
Verify Permissions on cron.monthly
To properly set the permissions of/etc/cron.monthly
, run the command:$ sudo chmod 0700 /etc/cron.monthly
Rule Medium Severity -
Verify Permissions on cron.weekly
To properly set the permissions of/etc/cron.weekly
, run the command:$ sudo chmod 0700 /etc/cron.weekly
Rule Medium Severity -
Verify Permissions on crontab
To properly set the permissions of/etc/crontab
, run the command:$ sudo chmod 0600 /etc/crontab
Rule Medium Severity
Node 2
The content of the drawer really is up to you. It could have form fields, definition lists, text lists, labels, charts, progress bars, etc. Spacing recommendation is 24px margins. You can put tabs in here, and can also make the drawer scrollable.