Information
Once an attacker establishes access to a system, the attacker often attempts to create a persistent method of reestablishing access. One way to accomplish this is for the attacker to modify an existing account. Auditing account modification actions provides logging that can be used for forensic purposes.
Satisfies: SRG-OS-000239-GPOS-00089, SRG-OS-000303-GPOS-00120
Solution
Navigate to and open:
/etc/audit/rules.d/audit.STIG.rules
Add the following lines:
-w /etc/passwd -p wa -k passwd
-w /etc/shadow -p wa -k shadow
-w /etc/group -p wa -k group
-w /etc/gshadow -p wa -k gshadow
At the command line, run the following command to load the new audit rules:
# /sbin/augenrules --load
Note: A new 'audit.STIG.rules' file is provided for placement in '/etc/audit/rules.d' that contains all rules needed for auditd.
Note: An older 'audit.STIG.rules' may exist if the file exists and references older 'GEN' SRG IDs. This file can be removed and replaced as necessary with an updated one.