audit_flags_lo_configure Configure System to Audit All Log In and Log Out Events
All changes in this version
Title
Configure System to Audit All Log In and Log Out Events
Control
/usr/bin/awk -F':' '/^flags/ { print $NF }' /etc/security/audit_control | /usr/bin/tr ',' '\n' | /usr/bin/grep -Ec '^lo'
Discussion
The audit system _MUST_ be configured to record all attempts to log in and out of the system (lo).
Frequently, an attacker that successfully gains access to a system has only gained access to an account with limited privileges, such as a guest account or a service account. The attacker must attempt to change to another user account with normal or elevated privileges in order to proceed. Auditing both successful and unsuccessful attempts to switch to another user account (by way of monitoring login and logout events) mitigates this risk.
The information system monitors login and logout events.
Related controls
ac-17.1, ac-2.12, au-12, au-2, ma-4.1
Fix
[source,bash]
----
/usr/bin/grep -qE "^flags.*[^-]lo" /etc/security/audit_control || /usr/bin/sed -i.bak '/^flags/ s/$/,lo/' /etc/security/audit_control; /usr/sbin/audit -s
----