Monterey - Configure System to Audit All Log In and Log Out Events

Information

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.

Solution

[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
----

See Also

https://github.com/usnistgov/macos_security

Item Details

Category: ACCESS CONTROL, AUDIT AND ACCOUNTABILITY, MAINTENANCE

References: 800-53|AC-2(12), 800-53|AC-17(1), 800-53|AU-2, 800-53|AU-12, 800-53|AU-12c., 800-53|MA-4(1), CCE|CCE-90868-1, CCI|CCI-000067, CCI|CCI-000172

Plugin: Unix

Control ID: e73f733d049561fab7d2c98bc1216999853cbebb8190be404101545d13c6ce13