TMAegis베타
freebsd 관련 규칙 더 보기

FreeBSD

TMA-FREEBSD-4.3.6

Ensure sudo authentication timeout is configured correctly

높음레벨 1자동freebsd

설명

sudo caches used credentials for a default of 5 minutes. This is for ease of use when there are multiple administrative tasks to perform. The timeout can be modified to suit local security policies. Setting a timeout value reduces the window of opportunity for unauthorized privileged access to another user. Audit: any timestamp_timeout in sudoers must be 0-15 minutes (unset defaults to 5).

점검 방법

감사 방식: 셸 명령

shell
c=$(cat /usr/local/etc/sudoers /usr/local/etc/sudoers.d/* 2>/dev/null); [ -n "$c" ] || exit 1; r=compliant; for v in $(printf '%s\n' "$c" | grep -v "^[[:space:]]*#" | grep -oE "timestamp_timeout=-?[0-9]+" | cut -d= -f2); do if [ "$v" -lt 0 ] || [ "$v" -gt 15 ]; then r="timestamp_timeout=$v"; fi; done; echo "$r"
예상 출력
compliant

조치 방법

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

If the currently configured timeout is larger than 15 minutes, edit the file listed in the audit section with visudo -f <PATH TO FILE> and modify the entry timestamp_timeout= to 15 minutes or less as per your site policy. The value is in minutes. This particular entry may appear on its own, or on the same line as env_reset. See the following two examples: Defaults env_reset, timestamp_timeout=15 Defaults timestamp_timeout=15 Defaults env_reset

속성

운영 체제
모두
태그
freebsdhardening
참고 자료
CIS FreeBSD 14 Benchmark v1.0.1 - 4.3.6 Ensure sudo authentication timeout is configured correctly

이 호스트 점검하기

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

shell
tmaegis scan --target freebsd