TMAegis베타
macos 관련 규칙 더 보기

macOS

TMA-MACOS-5.4

Ensure the Sudo Timeout Period Is Set to Zero

높음레벨 1자동macos

설명

The sudo command allows the user to run programs as the root user. Working as the root user allows the user an extremely high level of configurability within the system. This control, along with the control to use a separate timestamp for each tty, limits the window where an unauthorized user, process, or attacker could utilize legitimate credentials that are valid for longer than required. Audit: Requires a 0.0 minute sudo timestamp timeout and /etc/sudoers.d owned by root:wheel. Run as root.

점검 방법

감사 방식: 셸 명령

shell
v=$(/usr/bin/sudo -V 2>/dev/null) || exit 1
c=$(printf '%s\n' "$v" | /usr/bin/grep -c "Authentication timestamp timeout: 0.0 minutes")
o=$(/usr/bin/stat -f '%Su:%Sg' /etc/sudoers.d 2>/dev/null)
if [ "$c" -ge 1 ] && [ "$o" = root:wheel ]; then echo compliant; else echo "timeout-zero=$c owner=$o"; fi
예상 출력
compliant

조치 방법

조치 방식: 가이드 또는 인프라 패치

Terminal: sudo /usr/sbin/visudo -f /etc/sudoers.d/<configuration file name> ; sudo /usr/sbin/chown -R root:wheel /etc/sudoers.d/.

속성

운영 체제
macos-26
태그
macossystem-access
참고 자료
CIS Apple macOS 26 Tahoe Benchmark v1.1.0 - 5.4 Ensure the Sudo Timeout Period Is Set to Zero

이 호스트 점검하기

감사 권한이 있는 시스템에서 실행하세요. 스캔은 읽기 전용입니다.

shell
tmaegis scan --target macos