BaselineWatch
Desk

APPL-15-000190 The macOS system must configure sudo to log events.

DISA STIG library V1R8
All changes in this version
first version loaded CAT II

Maps to AU-12 via CCI-000172

Title

The macOS system must configure sudo to log events.

Control

Verify the macOS system is configured to log privilege escalation with the following command: /usr/bin/sudo /usr/bin/sudo -V | /usr/bin/grep -c "Log when a command is allowed by sudoers" If the result is not "1", this is a finding.

Discussion

Sudo must be configured to log privilege escalation. Without logging privilege escalation, it is difficult to identify attempted attacks because no audit trail is available for forensic investigation.

Related controls

CCI-000172

Fix

Configure the macOS system to log privilege escalation with the following command: /usr/bin/find /etc/sudoers* -type f -exec sed -i '' '/^Defaults[[:blank:]]*\!log_allowed/s/^/# /' '{}' \; /bin/echo "Defaults log_allowed" >> /etc/sudoers.d/mscp