TMAegis
kerberos 관련 규칙 더 보기

TMA-KERBEROS-KEYTAB-PERMS

Ensure keytab files are owned by root and accessible only by their owner

높음레벨 1자동kerberos

설명

Keytabs contain long-term service keys usable to impersonate the service or decrypt its tickets. Checks /etc/krb5.keytab and the kadmind keytab (/etc/krb5kdc/kadm5.keytab or /var/kerberos/krb5kdc/kadm5.keytab): each existing file must be owned by root with no group or other permissions.

점검 방법

감사 방식: 셸 명령

shell
n=0; bad=0
for f in /etc/krb5.keytab /etc/krb5kdc/kadm5.keytab /var/kerberos/krb5kdc/kadm5.keytab; do
  [ -f "$f" ] || continue
  n=$((n+1))
  o=$(stat -Lc %U "$f") || exit 1
  [ "$o" = root ] || { echo "$f owned by $o"; bad=1; }
  [ -z "$(find -L "$f" -maxdepth 0 -perm /077)" ] || { echo "$f is accessible by group/other"; bad=1; }
done
[ "$n" -gt 0 ] && [ "$bad" -eq 0 ] && echo compliant
예상 출력
compliant

조치 방법

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

chown root:root <keytab> && chmod 600 <keytab> for each keytab listed. If a non-root service must read a keytab, give it a dedicated per-service keytab (ktutil) owned by that service account with mode 600 instead of opening /etc/krb5.keytab.

속성

운영 체제
모두
태그
kerberospermissionskeys
참고 자료
CIS MIT Kerberos / Linux Benchmark guidance - Keytab file permissions (verify section number for your release)

이 호스트 점검하기

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

shell
tmaegis scan --target kerberos