Information
Record events affecting the modification of user or group information, including that of passwords and old passwords if in use.
- /etc/security/opasswd - storage of old passwords if the relevant PAM module is in use
Unexpected changes to these files could be an indication that the system has been compromised and that an unauthorized user is attempting to hide their activities or compromise additional accounts.
Satisfies: SRG-OS-000062-GPOS-00031, SRG-OS-000004-GPOS-00004, SRG-OS-000037-GPOS-00015, SRG-OS-000042-GPOS-00020, SRG-OS-000062-GPOS-00031, SRG-OS-000304-GPOS-00121, SRG-OS-000392-GPOS-00172, SRG-OS-000462-GPOS-00206, SRG-OS-000470-GPOS-00214, SRG-OS-000471-GPOS-00215, SRG-OS-000239-GPOS-00089, SRG-OS-000240-GPOS-00090, SRG-OS-000241-GPOS-00091, SRG-OS-000303-GPOS-00120, SRG-OS-000304-GPOS-00121, SRG-OS-000476-GPOS-00221
Solution
- Edit or create a file in the /etc/audit/rules.d/ directory, ending in .rules extension, with the relevant rules to monitor events that modify user/group information.
Example:
# printf "
-w /etc/security/opasswd -p wa -k identity
" >> /etc/audit/rules.d/50-identity.rules
- Merge and load the rules into active configuration:
# augenrules --load
- Check if reboot is required:
# if [[ $(auditctl -s | grep "enabled") =~ "2" ]]; then printf "Reboot required to load rules\n"; fi
Impact:
/etc/security/opasswd only exists if pam_pwhistory is in use; the watch rule is harmless if the file is absent.
Item Details
Category: AUDIT AND ACCOUNTABILITY
References: 800-53|AU-3, 800-53|AU-3(1), 800-53|AU-7, 800-53|AU-12, 800-53|AU-12a., CSCv7|4.8, Rule-ID|SV-230405r1017211_rule, Rule-ID|SV-258229r958434_rule, Rule-ID|SV-260630r958368_rule, Rule-ID|SV-269132r1050014_rule, Rule-ID|SV-270688r1066553_rule
Control ID: 9a3e2ba0e6c46dde91b73c4d39a3682296710c89e9fe178f72608c6bb608f778