Check: AZLX-23-002110
Amazon Linux 2023 STIG:
AZLX-23-002110
(in version v1 r1)
Title
Amazon Linux 2023 must audit uses of the "execve" system call. (Cat II impact)
Discussion
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
Check Content
Verify Amazon Linux 2023 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=b64 -S execve -C uid!=euid -F euid=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.
Fix Text
Configure Amazon Linux 2023 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=b64 -S execve -C uid!=euid -F euid=0 -k execpriv -a always,exit -F arch=b64 -S execve -C gid!=egid -F egid=0 -k execpriv To load the rules to the kernel immediately, use the following command: $ sudo augenrules --load
Additional Identifiers
Rule ID: SV-274086r1120246_rule
Vulnerability ID: V-274086
Group Title: SRG-OS-000326-GPOS-00126
Expert Comments
CCIs
| Number | Definition |
|---|---|
| CCI-002233 |
Prevent the organization-defined software from executing at higher privilege levels than users executing the software. |
| CCI-002234 |
Log the execution of privileged functions. |