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, ande(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).
| Asset | Default location or port | What an attacker gains | Primary control |
|---|---|---|---|
| Principal database | LOCALSTATEDIR/krb5kdc/principal | Every long-term key (offline, once decrypted) | Dedicated host, file permissions, encrypted backups |
| Stash file (master key) | key_stash_file, default LOCALSTATEDIR/krb5kdc/.k5.REALM | Ability to decrypt the database and any dump of it | Root-only permissions, no copies outside KDCs, master key rollover |
| krbtgt/REALM key | In the database | Forged TGTs for any principal (golden ticket, ATT&CK T1558.001) | Strong enctypes, periodic krbtgt key change |
| kadmind | Port 749, acl_file | Create principals, reset passwords, extract keys | Least-privilege kadm5.acl, network restriction |
| Service keytabs | /etc/krb5.keytab and per-service files | Impersonate the service, forge service tickets to it | Permissions, rotation, no RC4 or 3DES keys |
| Propagation channel | kprop 754/tcp, iprop_port | Push or receive a full database | kpropd.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.
- 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.
- Restrict listeners:
kdc_listenandkdc_tcp_listendefault to the wildcard address on port 88. Bind them to the service interface. On replicas setkadmind_listen = ""if kadmind is not needed there, and firewall 749 on the primary to administrative networks only. - 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.
- Keep time accurate: Kerberos depends on synchronised clocks across the primary and replicas. Use authenticated time sources and alert on drift.
- 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.
- Protect anonymous and PAC behaviour: if anonymous PKINIT is enabled, set
restrict_anonymous_to_tgt = trueso anonymous principals can reach only the TGS. Leavereject_bad_transitat 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
| Letter | Operation | Who should have it |
|---|---|---|
| a | Add principals or policies | Realm administrators; provisioning service scoped to a target pattern |
| c | Change passwords | Helpdesk role, scoped to user principals only, never to */admin or service principals |
| d | Delete principals or policies | Realm administrators |
| e | Extract principal keys | Nobody by default; grant per host or service pattern only when keytab extraction is required |
| i | Inquire about principals or policies | Administrators, helpdesk, audit tooling |
| l | List all principals or policies | Administrators and audit tooling (can only be granted globally) |
| m | Modify principals or policies | Realm administrators |
| p | Propagate the database (incremental propagation) | kiprop/hostname principals only |
| s | Explicitly set a principal's key | Realm 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 ashelpdesk/admin@REALM ci */*@REALMonly 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,-policyand+flagor-flagforce values on principals a provisioning account creates, so automation cannot create long-lived or unpoliced principals. - Lock down key extraction: set the
lockdown_keysattribute on krbtgt, kadmin and other high-value principals so their keys cannot be extracted even by an account holdinge. - 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.
| Setting | Where | Hardened value | Note |
|---|---|---|---|
supported_enctypes | kdc.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 them | Controls keys generated for new and changed principals |
master_key_type | kdc.conf [realms] | aes256-cts-hmac-sha1-96 (the default) | Old realms may still have a legacy master key |
allow_weak_crypto | krb5.conf [libdefaults] | false (default since 1.8) | Never set true without a written risk acceptance |
allow_des3, allow_rc4 | krb5.conf [libdefaults] | false (default since 1.21) | Set true only for a time-boxed interoperability exception |
permitted_enctypes | krb5.conf [libdefaults] | DEFAULT -des3 -rc4 or an explicit AES list | Since 1.18 also the default for the tkt and tgs enctype lists |
default_tkt_enctypes, default_tgs_enctypes | krb5.conf [libdefaults] | Unset | Stale values can block stronger types |
Removing legacy keys from the database
- Run
kdb5_util tabdump keyinfoto list principals that still hold weak or deprecated keys. - Check
getprinc krbtgt/REALM. If its first key is legacy, change it withchange_password -randkey -keepold krbtgt/REALM, wait for tickets issued under the old key to expire (at leastmax_life, longer if renewable tickets are used), then runpurgekeysfor older key versions. - Upgrade the kadmin/history principal and the K/M master key using the database procedures, and other kadmin principals with
change_password -randkey. - Rotate service keytabs with
k5srvutil change, thenk5srvutil deloldafter the old tickets expire. RC4 inside Windows interoperability is covered in Kerberos RC4 Deprecation. - Force user password changes with
modify_principal -pwexpireso new keys are generated under the currentsupported_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
ktaddon 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
eonly for specific target patterns such ashost/*@REALMto a provisioning principal, never globally. - Use randkey for services: create service principals with
addprinc -randkeyso 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
-keepoldstyle overlap (k5srvutil changethendelold) 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,stashon each replica,use_mkey,update_princ_encryptionand finallypurge_mkeys. - Treat database dumps as sensitive:
kdb5_util dumpoutput 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.
| Control | Full propagation (kprop) | Incremental propagation (iprop) |
|---|---|---|
| Who may send or pull | Host principals named in kpropd.acl on each replica | kiprop/hostname principals with p in kadm5.acl |
| Network | Allow 754/tcp only from the primary (and standby primary) | Allow iprop_port only from replicas to the primary |
| Keys in use | host/kdc keytab on each KDC | kiprop/hostname keys in the default keytab |
| Files not propagated | krb5.conf, kdc.conf, kadm5.acl and the stash must be copied by hand over a protected channel | |
| Failure mode to watch | Cron job left running on an old primary after failover | Policy 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 area | NIST SP 800-53 Rev. 5 | NIST CSF 2.0 | CIS Controls v8.1 |
|---|---|---|---|
| kadm5.acl least privilege | AC-3, AC-6 | PR.AA-05 | Control 6 |
| Principal and keytab lifecycle | AC-2, IA-5 | PR.AA-01 | Control 5 |
| Enctypes and master key | SC-12, SC-13 | PR.DS-01 | Control 3 |
| Host baseline and listeners | CM-7 | PR.PS-01 | Control 4 |
| KDC and kadmind logging | AU-2, AU-6, AU-12 | DE.CM-03 | Control 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_keyson krbtgt, kadmin and kiprop principals. - Run
kdb5_util tabdump keyinfoand remove every DES, 3DES and RC4 key, including on krbtgt, K/M and kadmin/history. - Confirm
allow_weak_crypto,allow_des3andallow_rc4are 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_portto KDC addresses. - Apply password and lockout policies with
+requires_preauthand-allow_svron user principals, and setdict_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
- MIT Kerberos: Installing KDCs
- MIT Kerberos: kadm5.acl
- MIT Kerberos: kdc.conf
- MIT Kerberos: Encryption types
- MIT Kerberos: Database administration
- MIT Kerberos: Account lockout
- MIT Kerberos: kpropd
- IETF: RFC 8429 Deprecate Triple-DES (3DES) and RC4 in Kerberos
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