macOS 15 - Sequoia

The macOS system must enforce multifactor authentication for privilege escalation through the sudo command

Description

The system must be configured to enforce multifactor authentication when the sudo command is used to elevate privilege.All users must go through multifactor authentication to prevent unauthenticated access and potential compromise to the system.IMPORTANT: Modification of Pluggable Authentication Modules (PAM) now requires user authorization, or use of a Privacy Preferences Policy Control (PPPC) profile from MDM that authorizes modifying system administrator files or full disk access.NOTE: /etc/pam.d/sudo will be automatically modified to its original state following any update or major upgrade to the operating system.Satisfies: SRG-OS-000105-GPOS-00052, SRG-OS-000106-GPOS-00053, SRG-OS-000107-GPOS-00054, SRG-OS-000108-GPOS-00055, SRG-OS-000112-GPOS-00057, SRG-OS-000705-GPOS-00150

Check

C-268546r1034578_chk

Verify the macOS system is configured to enforce multifactor authentication for privilege escalation through the sudo command with the following command:/usr/bin/grep -Ec '^(auth\s+sufficient\s+pam_smartcard.so|auth\s+required\s+pam_deny.so)' /etc/pam.d/sudoIf the result is not "2", this is a finding.

Fix

F-72477r1034577_fix

Configure the macOS system to enforce multifactor authentication for privilege escalation through the sudo command with the following commands:/bin/cat > /etc/pam.d/sudo << SUDO_END# sudo: auth account password sessionauth sufficient pam_smartcard.soauth required pam_opendirectory.soauth required pam_deny.soaccount required pam_permit.sopassword required pam_deny.sosession required pam_permit.soSUDO_END/bin/chmod 444 /etc/pam.d/sudo/usr/sbin/chown root:wheel /etc/pam.d/sudo