Kerberos
TMA-KERBEROS-KADM5-ACL-PERMS
Ensure kadm5.acl is owned by root and not writable by group or others
ÉlevéeNiveau 1Automatiséekerberos
Description
kadm5.acl decides which principals may administer the Kerberos database; whoever can edit it can grant themselves full kadmin rights. Checks /etc/krb5kdc/kadm5.acl (Debian/Ubuntu) and /var/kerberos/krb5kdc/kadm5.acl (RHEL, default 600 root): owner root, no group or other write.
Méthode de vérification
Méthode d'audit: Commande shell
shell
n=0; bad=0
for f in /etc/krb5kdc/kadm5.acl /var/kerberos/krb5kdc/kadm5.acl; 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 /022)" ] || { echo "$f is group/other writable"; bad=1; }
done
[ "$n" -gt 0 ] && [ "$bad" -eq 0 ] && echo compliant- Sortie attendue
compliant
Méthode de correction
Méthode de correction: Commande shell
shell
for f in /etc/krb5kdc/kadm5.acl /var/kerberos/krb5kdc/kadm5.acl; do if [ -f "$f" ]; then chown root:root "$f" && chmod 600 "$f" || exit 1; fi; donePropriétés
- Systèmes d'exploitation
- Tous
- Étiquettes
- kerberoskdcpermissions
- Référence
- CIS MIT Kerberos / Linux Benchmark guidance - KDC configuration file permissions (verify section number for your release)
Vérifier cet hôte
Exécutez cette commande sur une machine que vous êtes autorisé à auditer. L'analyse est en lecture seule.
shell
tmaegis scan --target kerberos