SV-274112r1120324_rule
V-274112
SRG-OS-000037-GPOS-00015
AZLX-23-002245
CAT II
10
Configure Amazon Linux 2023 so that the audit system generates an audit event for any successful/unsuccessful use of the "sudo" command by adding or updating the following rule in the "/etc/audit/rules.d/audit.rules" file:
-a always,exit -F path=/usr/bin/sudo -F perm=x -F auid>=1000 -F auid!=unset -k priv_cmd
To load the rules to the kernel immediately, use the following command:
$ sudo augenrules --load
Verify Amazon Linux 2023 is configured to audit the execution of the "sudo" command with the following command:
$ sudo auditctl -l | grep '/usr/bin/sudo\b'
-a always,exit -S all -F path=/usr/bin/sudo -F perm=x -F auid>=1000 -F auid!=-1 -F key=priv_cmd
If the command does not return a line, or the line is commented out, this is a finding.
V-274112
False
AZLX-23-002245
Verify Amazon Linux 2023 is configured to audit the execution of the "sudo" command with the following command:
$ sudo auditctl -l | grep '/usr/bin/sudo\b'
-a always,exit -S all -F path=/usr/bin/sudo -F perm=x -F auid>=1000 -F auid!=-1 -F key=priv_cmd
If the command does not return a line, or the line is commented out, this is a finding.
M
5700