macOS
TMA-MACOS-5.11
Ensure Logging Is Enabled for Sudo
AltaNivel 1Automatizadamacos
Descripción
In order to properly monitor the use of the sudo command, logs events for any use of sudo should be captured in the unified log.
Cómo se verifica
Método de auditoría: Comando de shell
shell
out=$(/usr/bin/sudo -V 2>/dev/null) || exit 1
printf '%s\n' "$out" | /usr/bin/grep -c "Log when a command is allowed by sudoers" || true- Salida esperada
1
Cómo se corrige
Método de corrección: Guía o parche de infraestructura
Terminal: sudo /usr/sbin/visudo -f /etc/sudoers.d/<configuration file name>.
Propiedades
- Sistemas operativos
- macos-26
- Etiquetas
- macossystem-access
- Referencia
- CIS Apple macOS 26 Tahoe Benchmark v1.1.0 - 5.11 Ensure Logging Is Enabled for Sudo
Verificar este host
Ejecute esto en un equipo que tenga permiso para auditar. El escaneo es de solo lectura.
shell
tmaegis scan --target macos