Information
Record events affecting the modification of user or group information, including that of passwords and old passwords if in use.
- /etc/gshadow - encrypted password for each group
- /etc/shadow - system user passwords
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/gshadow -p wa -k identity
-w /etc/shadow -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
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-230404r1017210_rule, Rule-ID|SV-230407r1017213_rule, Rule-ID|SV-258228r991572_rule, Rule-ID|SV-258231r1069375_rule, Rule-ID|SV-260629r958368_rule, Rule-ID|SV-260632r958368_rule, Rule-ID|SV-269131r1050013_rule, Rule-ID|SV-269134r1050016_rule, Rule-ID|SV-270686r1066547_rule, Rule-ID|SV-270687r1066550_rule
Control ID: 3057f8d7694df97f404a51f821163c79282188c34000c4242e24d44a0b9ebb29