Join our Newsletter — 33% off our NHI Course
Home› Guides› MIT Kerberos KDC Hardening: Securing krb5kdc, kadmin, Keytabs…
Guide Identity & Access Management (IAM)

MIT Kerberos KDC Hardening: Securing krb5kdc, kadmin, Keytabs and Replica Propagation

PDF for newsletter subscribers · free to read online

← All guides
By NHI Mgmt Group, under the editorial direction of Lalit Choda Updated 27 November 2026 14 min read
On this page

An MIT Kerberos KDC holds the long-term key of every principal in the realm, so one compromised KDC host, stash file or over-broad kadmin ACL hands an attacker the whole realm. This guide is a hardening checklist for MIT krb5 KDCs on Linux and Unix: the krb5kdc and kadmind daemons, the kadm5.acl file, encryption types, the master key stash, service keytabs and replica propagation with kprop and iprop. It is written for Unix and Linux administrators who run their own realm, including the MIT KDC underneath many FreeIPA and Hadoop estates. Active Directory Kerberos is covered in the Kerberos Security Guide; this page does not repeat it. Option names below were checked against the MIT krb5-latest documentation in November 2026, when the current release was krb5-1.22.3; names and defaults change between releases, so confirm them against the documentation for the version you run.

Key takeaways

  • The KDC is a tier zero asset. MIT's own installation guide says to run KDCs on secured, dedicated hardware with limited access, because root on the KDC host exposes the whole principal database.
  • kadm5.acl decides who can rewrite the realm. The first matching line wins, the wildcard * grants everything except key extraction, and e (extract keys) must never be granted broadly.
  • Weak and deprecated enctypes must leave the database, not just the config. RFC 8429 deprecated 3DES and RC4 in 2018; check krbtgt, kadmin/history, K/M and service principals for legacy keys and rotate them out.
  • The stash file and keytabs are the keys to everything. The stash holds the master key that decrypts the database, and every keytab is a password-equivalent credential for a non-human identity.
  • Propagation is a trust path. kpropd.acl and the kiprop principals decide who can overwrite a replica's database, so restrict them and the propagation ports to named KDC hosts only.

KDC architecture and threat model

An MIT realm has one primary KDC running krb5kdc (ticket issuing, port 88 UDP and TCP) and kadmind (administration, port 749), plus replica KDCs that run krb5kdc and kpropd and receive copies of the database. The principal database is encrypted with the master key (principal K/M), and the master key is normally written to a stash file so the KDC can start unattended. Clients and services authenticate with long-term keys derived from passwords (users) or random keys held in keytabs (hosts and services).

AssetDefault location or portWhat an attacker gainsPrimary control
Principal databaseLOCALSTATEDIR/krb5kdc/principalEvery long-term key (offline, once decrypted)Dedicated host, file permissions, encrypted backups
Stash file (master key)key_stash_file, default LOCALSTATEDIR/krb5kdc/.k5.REALMAbility to decrypt the database and any dump of itRoot-only permissions, no copies outside KDCs, master key rollover
krbtgt/REALM keyIn the databaseForged TGTs for any principal (golden ticket, ATT&CK T1558.001)Strong enctypes, periodic krbtgt key change
kadmindPort 749, acl_fileCreate principals, reset passwords, extract keysLeast-privilege kadm5.acl, network restriction
Service keytabs/etc/krb5.keytab and per-service filesImpersonate the service, forge service tickets to itPermissions, rotation, no RC4 or 3DES keys
Propagation channelkprop 754/tcp, iprop_portPush or receive a full databasekpropd.acl, kiprop principals, firewall rules

The relevant ATT&CK technique family is T1558 Steal or Forge Kerberos Tickets, including T1558.004 AS-REP Roasting against principals that do not require pre-authentication, and T1110 Brute Force against user principals. Stolen keytabs are used as valid accounts (T1078).

Host hardening for krb5kdc

MIT warns that a KDC which also serves files, FTP or the web, or acts as a general client, can expose the database if an attacker gains root through another service. Treat the host like a domain controller.

  1. Dedicate the host: no other network services, no interactive users beyond KDC administrators, no general-purpose agents with remote command execution unless they are part of your tier zero tooling.
  2. Restrict listeners: kdc_listen and kdc_tcp_listen default to the wildcard address on port 88. Bind them to the service interface. On replicas set kadmind_listen = "" if kadmind is not needed there, and firewall 749 on the primary to administrative networks only.
  3. Harden the operating system baseline: apply a CIS Benchmark or STIG for the distribution (see the CIS Benchmarks Guide), enable SELinux or AppArmor in enforcing mode, and keep krb5 packages patched from the distribution or MIT security advisories.
  4. Keep time accurate: Kerberos depends on synchronised clocks across the primary and replicas. Use authenticated time sources and alert on drift.
  5. Control administrative access: require administrators to reach the KDC from a privileged access workstation through a bastion, and follow the Unix and Linux Privileged Access Guide for sudo and root controls.
  6. Protect anonymous and PAC behaviour: if anonymous PKINIT is enabled, set restrict_anonymous_to_tgt = true so anonymous principals can reach only the TGS. Leave reject_bad_transit at its default of true for cross-realm trust.

Securing kadmin and ACLs

The kadm5.acl file (path set by acl_file, default LOCALSTATEDIR/krb5kdc/kadm5.acl) uses the format principal permissions [target_principal [restrictions]]. Lowercase letters grant and uppercase letters deny. The first line that matches an actor and target controls access, so order the file from most specific to most general. Changes take effect only when kadmind restarts. Since release 1.16 the ACL file can run alongside other authorisation modules, where it can grant but not deny.

Permission letters and least-privilege use

LetterOperationWho should have it
aAdd principals or policiesRealm administrators; provisioning service scoped to a target pattern
cChange passwordsHelpdesk role, scoped to user principals only, never to */admin or service principals
dDelete principals or policiesRealm administrators
eExtract principal keysNobody by default; grant per host or service pattern only when keytab extraction is required
iInquire about principals or policiesAdministrators, helpdesk, audit tooling
lList all principals or policiesAdministrators and audit tooling (can only be granted globally)
mModify principals or policiesRealm administrators
pPropagate the database (incremental propagation)kiprop/hostname principals only
sExplicitly set a principal's keyRealm administrators, rarely
x or *Shorthand for admcilsp (everything except e)A small, named set of */admin principals
  • Avoid the default pattern for everyone: the common */admin@REALM * line gives every admin instance full rights. Replace it with named principals per role, and add a helpdesk line such as helpdesk/admin@REALM ci */*@REALM only after a more specific deny line for */admin and service principals, because the first match wins.
  • Use restrictions on add and modify lines: restrictions such as -maxlife 9h, -policy and +flag or -flag force values on principals a provisioning account creates, so automation cannot create long-lived or unpoliced principals.
  • Lock down key extraction: set the lockdown_keys attribute on krbtgt, kadmin and other high-value principals so their keys cannot be extracted even by an account holding e.
  • Treat admin principals as privileged NHIs and humans: require pre-authentication, use a separate */admin instance per person, and keep the kadmin keytab (used by kadmind) readable by root only.

Encryption types and policies

MIT classes des-cbc-crc, des-cbc-md4, des-cbc-md5 and arcfour-hmac-exp as weak, and des3-cbc-sha1 and arcfour-hmac as deprecated, in line with RFC 8429 (Best Current Practice, October 2018). Single DES support was removed in release 1.18. Since 1.21 the KDC will not issue des3-cbc-sha1 or arcfour-hmac session keys unless allow_des3 or allow_rc4 is set to true, and MIT states that des3-cbc-sha1 will be disabled by default and then removed in future releases.

SettingWhereHardened valueNote
supported_enctypeskdc.conf [realms]aes256-cts-hmac-sha1-96:normal aes128-cts-hmac-sha1-96:normal, plus the SHA-2 types (aes256-cts-hmac-sha384-192, aes128-cts-hmac-sha256-128) where all clients support themControls keys generated for new and changed principals
master_key_typekdc.conf [realms]aes256-cts-hmac-sha1-96 (the default)Old realms may still have a legacy master key
allow_weak_cryptokrb5.conf [libdefaults]false (default since 1.8)Never set true without a written risk acceptance
allow_des3, allow_rc4krb5.conf [libdefaults]false (default since 1.21)Set true only for a time-boxed interoperability exception
permitted_enctypeskrb5.conf [libdefaults]DEFAULT -des3 -rc4 or an explicit AES listSince 1.18 also the default for the tkt and tgs enctype lists
default_tkt_enctypes, default_tgs_enctypeskrb5.conf [libdefaults]UnsetStale values can block stronger types

Removing legacy keys from the database

  1. Run kdb5_util tabdump keyinfo to list principals that still hold weak or deprecated keys.
  2. Check getprinc krbtgt/REALM. If its first key is legacy, change it with change_password -randkey -keepold krbtgt/REALM, wait for tickets issued under the old key to expire (at least max_life, longer if renewable tickets are used), then run purgekeys for older key versions.
  3. Upgrade the kadmin/history principal and the K/M master key using the database procedures, and other kadmin principals with change_password -randkey.
  4. Rotate service keytabs with k5srvutil change, then k5srvutil delold after the old tickets expire. RC4 inside Windows interoperability is covered in Kerberos RC4 Deprecation.
  5. Force user password changes with modify_principal -pwexpire so new keys are generated under the current supported_enctypes.

Password and lockout policies

Attach a policy to every user principal. Set dict_file in kdc.conf, because without it, or without an assigned policy, no dictionary check happens. Lockout uses the policy fields maxfailure, failurecountinterval and lockoutduration, and works only for principals with +requires_preauth; MIT also recommends -allow_svr on user principals so their keys cannot be attacked offline through service tickets. Lockout counters are not replicated, so a limit of 10 across four KDCs allows up to 40 guesses; size the threshold with that in mind. Lockout also makes targeted denial of service easy, so alert on lockouts rather than treating them as a complete defence.

Keytab protection and rotation

A keytab holds a principal's long-term keys and works like a stored password: anyone who can read it can authenticate as that service and forge service tickets to it. Most keytabs belong to non-human identities, which is why they need an owner, an inventory and a rotation schedule like any other machine credential. Host-side handling (ownership, gssproxy, rotation with k5srvutil, adcli and ipa-getkeytab) is covered in depth in the Linux Service Accounts and Keytab Management Guide; the KDC-side controls are these.

  • Extract on the target host: MIT prefers running ktadd on the host that will use the keytab. If you must extract remotely, write to a temporary file, copy it over an encrypted channel and delete the temporary copy.
  • Restrict who can extract: grant e only for specific target patterns such as host/*@REALM to a provisioning principal, never globally.
  • Use randkey for services: create service principals with addprinc -randkey so no human-chosen password exists.
  • File permissions: 0600, owned by root or the single service account that needs it. No keytabs in configuration management repositories, container images or shared home directories.
  • Rotate on a schedule and on events: rotate when a host is rebuilt, when an administrator with access leaves, and at a fixed interval. Use -keepold style overlap (k5srvutil change then delold) so services keep working.
  • Protect the kadmind and kiprop keytabs: kadmind and kpropd read keys from local keytabs; these are as sensitive as the stash.

Master key stash protection

The stash is created with kdb5_util create -s (or kdb5_util stash). Without it the KDC prompts for the master key at every start and cannot restart unattended, so most sites keep it; protect it accordingly.

  • Permissions: root-only, 0600, on local disk of the KDC. Exclude it from general backup jobs and keep any escrow copy offline under dual control.
  • Keep it off replicas you do not trust as tier zero: replicas need a stash to run, so every replica host must meet the same hardening bar as the primary.
  • Roll the master key after suspected exposure: use add_mkey -s, propagate, stash on each replica, use_mkey, update_princ_encryption and finally purge_mkeys.
  • Treat database dumps as sensitive: kdb5_util dump output is a full copy of the realm. Encrypt dump files at rest, restrict their storage location and delete temporary dumps after propagation.

Replica propagation security

Full propagation sends a kdb5_util dump with kprop -f to kpropd on each replica (port 754/tcp by default). kpropd accepts dumps only from host principals listed in kpropd.acl (default LOCALSTATEDIR/krb5kdc/kpropd.acl). Incremental propagation (iprop_enable = true) has replicas poll the primary's kadmind at iprop_port every iprop_replica_poll (default two minutes), authenticating as kiprop/hostname, which must hold the p permission in kadm5.acl on the primary.

ControlFull propagation (kprop)Incremental propagation (iprop)
Who may send or pullHost principals named in kpropd.acl on each replicakiprop/hostname principals with p in kadm5.acl
NetworkAllow 754/tcp only from the primary (and standby primary)Allow iprop_port only from replicas to the primary
Keys in usehost/kdc keytab on each KDCkiprop/hostname keys in the default keytab
Files not propagatedkrb5.conf, kdc.conf, kadm5.acl and the stash must be copied by hand over a protected channel
Failure mode to watchCron job left running on an old primary after failoverPolicy changes trigger full resync; replica stuck in resync
  • Keep kpropd.acl minimal: list only KDC host principals. If roles can swap, list every KDC on every KDC, and nothing else.
  • Run kpropd standalone when iprop is enabled (required) and do not expose it through a general inetd.
  • Check state with kproplog on replicas, and monitor that the replica serial number tracks the primary.
  • Remove decommissioned KDCs from kpropd.acl, kadm5.acl and the database (delete their host and kiprop principals) on the same day.

Logging and monitoring

The kdc.conf [logging] section sets destinations for kdc, admin_server and default; without it MIT logs to syslog. Send KDC and kadmind logs from every KDC to a central log platform that KDC administrators cannot alter. Since 1.17 the KDC flags deprecated enctypes in its logs, which makes legacy key use searchable.

  • kadmind activity: alert on principal creation, deletion, key extraction (ktadd), password resets for */admin, krbtgt and kiprop principals, and policy changes.
  • KDC requests: watch for bursts of failed pre-authentication from one source, AS requests for principals without pre-authentication, and requests naming deprecated enctypes.
  • File integrity: monitor kdc.conf, kadm5.acl, kpropd.acl, the stash file and keytabs for changes.
  • Propagation health: alert when a replica falls behind or when kpropd receives a connection from an unexpected address.

Useful measures: percentage of principals holding only AES keys (target 100%); number of principals with e or * in kadm5.acl; age of the oldest service keytab key version; days since the last krbtgt key change; replica propagation lag; and lockout events per week per realm. For the AD side of event monitoring see the Kerberos and NTLM Event Detection Guide.

Framework mapping

Control areaNIST SP 800-53 Rev. 5NIST CSF 2.0CIS Controls v8.1
kadm5.acl least privilegeAC-3, AC-6PR.AA-05Control 6
Principal and keytab lifecycleAC-2, IA-5PR.AA-01Control 5
Enctypes and master keySC-12, SC-13PR.DS-01Control 3
Host baseline and listenersCM-7PR.PS-01Control 4
KDC and kadmind loggingAU-2, AU-6, AU-12DE.CM-03Control 8

Practitioner checklist

  • Run every KDC on a dedicated, hardened host reachable only from administrative networks.
  • Rewrite kadm5.acl with named roles, specific-before-general ordering, no global e, and restrictions on provisioning accounts; restart kadmind.
  • Set lockdown_keys on krbtgt, kadmin and kiprop principals.
  • Run kdb5_util tabdump keyinfo and remove every DES, 3DES and RC4 key, including on krbtgt, K/M and kadmin/history.
  • Confirm allow_weak_crypto, allow_des3 and allow_rc4 are false on KDCs and clients.
  • Restrict the stash file and keytabs to root (0600), keep stash copies offline, and encrypt database dumps.
  • Limit kpropd.acl and kiprop principals to current KDCs, and firewall 754/tcp and iprop_port to KDC addresses.
  • Apply password and lockout policies with +requires_preauth and -allow_svr on user principals, and set dict_file.
  • Forward KDC and kadmind logs centrally and alert on key extraction, admin principal changes and propagation failures.
  • Schedule krbtgt and service key rotation, and record each NHI keytab with an owner.

Standards and references

Related NHI Mgmt Group resources: Kerberos Security Guide · Linux Service Accounts and Keytab Management Guide · Unix and Linux Privileged Access Guide · Kerberos RC4 Deprecation · SSSD and Linux Active Directory Integration Guide

PDF for subscribers

Take this guide with you

Every section, table and checklist in one PDF, with links to the sources and related guides. Subscribe to our weekly NHI & AI Identity Journal and we’ll email you a download link.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

PDF Downloads for Newsletter Subscribers

Get the guide

Enter your details and we’ll email you a download link.

The full guide is free to read online. The PDF is a thank you for subscribing.

Fill in all fields marked * and tick both boxes to continue.