SV-248791r958412_rule
V-248791
SRG-OS-000037-GPOS-00015
OL08-00-030490
CAT II
10
Configure the audit system to generate an audit event for any use of the "chmod", "fchmod", and "fchmodat" syscalls by adding or updating the following line to "/etc/audit/rules.d/audit.rules":
-a always,exit -F arch=b32 -S chmod,fchmod,fchmodat -F auid>=1000 -F auid!=unset -k perm_chng
-a always,exit -F arch=b64 -S chmod,fchmod,fchmodat -F auid>=1000 -F auid!=unset -k perm_chng
The audit daemon must be restarted for the changes to take effect. To restart the audit daemon, run the following command:
$ sudo service auditd restart
Verify OL 8 generates an audit record for any use of the "chmod","fchmod", and "fchmodat" syscalls by running the following command to check the file system rules in "/etc/audit/audit.rules":
$ sudo grep chmod /etc/audit/audit.rules
-a always,exit -F arch=b32 -S chmod,fchmod,fchmodat -F auid>=1000 -F auid!=unset -k perm_chng
-a always,exit -F arch=b64 -S chmod,fchmod,fchmodat -F auid>=1000 -F auid!=unset -k perm_chng
If the command does not return an audit rule for "chmod", "fchmod", and "fchmodat", or any of the lines returned are commented out, this is a finding.
Note: The "-k" allows for specifying an arbitrary identifier, and the string after it does not need to match the example output above.
V-248791
False
OL08-00-030490
Verify OL 8 generates an audit record for any use of the "chmod","fchmod", and "fchmodat" syscalls by running the following command to check the file system rules in "/etc/audit/audit.rules":
$ sudo grep chmod /etc/audit/audit.rules
-a always,exit -F arch=b32 -S chmod,fchmod,fchmodat -F auid>=1000 -F auid!=unset -k perm_chng
-a always,exit -F arch=b64 -S chmod,fchmod,fchmodat -F auid>=1000 -F auid!=unset -k perm_chng
If the command does not return an audit rule for "chmod", "fchmod", and "fchmodat", or any of the lines returned are commented out, this is a finding.
Note: The "-k" allows for specifying an arbitrary identifier, and the string after it does not need to match the example output above.
M
5416