OneStopList

Gods and goddesses

How Kerberos Authentication Works

Updated November 24, 2026

Kerberos authentication works by using a trusted third-party service called the Key Distribution Center (KDC) to issue encrypted time-stamped tickets that let users and services prove their identity to each other without sending passwords over the network. This ticket-granting system, developed at MIT in the 1980s, is the default authentication protocol in Windows Active Directory and is widely used in Unix and cloud environments. Here’s a detailed look at its components, the step-by-step flow, and the practical issues you might encounter.

Background: Why Kerberos Was Created

Before Kerberos, network authentication often relied on sending passwords in plaintext or using shared secret keys that an attacker could intercept. In 1983, MIT’s Project Athena needed a way for students to access multiple campus workstations securely. The result was Kerberos, named after the three-headed dog from Greek mythology that guards the underworld—fitting because the protocol uses three heads of security: authentication, authorization, and audit. The first public version (Kerberos 4) appeared in the late 1980s, and Kerberos 5 (RFC 4120) became the standard in 1993. Today, it is the backbone of Windows domain logons and is also used by many non-Microsoft systems, including macOS, Linux, and various network appliances.

Core Components and Terminology

  • Key Distribution Center (KDC): The trusted server that issues tickets. It has two parts: the Authentication Server (AS) and the Ticket-Granting Server (TGS).
  • Client: The user or service requesting access (e.g., a workstation user trying to log in).
  • Service Server: The resource the client wants to access (e.g., a file server or a database).
  • Ticket-Granting Ticket (TGT): A long-lived ticket (typically 8–24 hours) that proves the client has already authenticated once.
  • Service Ticket: A short-lived ticket (often 10 minutes to a few hours) that grants access to a specific service.
  • Authenticator: A timestamped message from the client that proves it holds the session key, preventing replay attacks.
  • Realm: A logical boundary of Kerberos trust, usually matching a DNS domain (e.g., EXAMPLE.COM).

How Kerberos Authentication Works: Step-by-Step

The process is often described in three phases: initial authentication, ticket acquisition, and service access. Here’s the full flow:

  1. Initial Request (AS-REQ): The client sends a request to the Authentication Server (AS) containing its username and a timestamp encrypted with the user’s password-derived key. The AS looks up the user’s password hash in its database.
  2. Ticket-Granting Ticket Issued (AS-REP): If the password hash matches, the AS creates a TGT. The TGT contains the user’s identity, a session key, and an expiry time. It is encrypted with the KDC’s secret key (not the user’s password). The AS also sends a copy of the session key encrypted with the user’s password hash. Only the client can decrypt this second part, proving the AS is legitimate.
  3. Service Ticket Request (TGS-REQ): When the client wants to access a service, it sends the TGT and an authenticator (client name + timestamp) encrypted with the session key to the Ticket-Granting Server (TGS). The TGS decrypts the TGT with its own key, checks the authenticator, and verifies the client’s identity.
  4. Service Ticket Issued (TGS-REP): The TGS creates a service ticket that contains the client’s identity and a new service session key. This ticket is encrypted with the service server’s secret key. The TGS also sends the service session key encrypted with the client’s TGT session key.
  5. Service Access (AP-REQ): The client sends the service ticket and a fresh authenticator (encrypted with the service session key) to the service server. The service decrypts the ticket with its own key, verifies the authenticator, and optionally checks the client’s IP address (though this is often disabled for flexibility).
  6. Mutual Authentication (AP-REP): If mutual authentication is required, the service sends back a timestamp encrypted with the service session key. The client decrypts it, confirming the service is genuine.

After this, the client and service share a session key that can be used to encrypt subsequent communication (if the application supports it).

Time Synchronization and Replay Protection

Kerberos relies heavily on timestamps. Every authenticator contains a timestamp, and the receiving side checks that it is within a certain window (typically 5 minutes) of its own clock. This prevents an attacker from capturing a valid authenticator and replaying it later. Therefore, all clients and servers must have their clocks synchronized, usually via NTP (Network Time Protocol). If a client’s clock skews more than the allowed limit, authentication fails with a “clock skew too great” error. This is one of the most common Kerberos issues in real environments.

Kerberos vs. Other Authentication Methods

Compared to simple password authentication, Kerberos offers several advantages: passwords are never sent over the network, session keys are short-lived, and mutual authentication prevents man-in-the-middle attacks. However, it is more complex to set up and requires a trusted KDC. Here’s how it stacks up against other common methods:

  • LDAP (with simple bind): Sends passwords in plaintext unless TLS is used. Kerberos is far more secure but LDAP is often used for directory lookups.
  • OAuth 2.0 / OpenID Connect: These are authorization frameworks for web APIs, not full authentication protocols. Kerberos is better for internal enterprise services; OAuth is better for third-party app access.
  • RADIUS: Used for network access (VPN, Wi-Fi). RADIUS can use Kerberos as a backend, but it’s a different protocol.
  • Public Key Cryptography (e.g., TLS certificates): Strong but requires certificate management. Kerberos is simpler for user authentication because it uses passwords or smart cards.

Common Problems and Troubleshooting

When Kerberos fails, the symptoms are often cryptic. Here are the most frequent issues and their causes:

  • “KDC_ERR_PREAUTH_FAILED”: The user’s password is wrong, or the password hash in the KDC database is corrupted.
  • “KDC_ERR_TGT_REVOKED”: The TGT has expired or was revoked. Usually just re-authenticate.
  • “Clock skew too great”: The client and KDC clocks differ by more than the configured maximum (often 5 minutes). Fix by syncing NTP.
  • “Service not found”: The service principal name (SPN) is not registered correctly in Active Directory. Use setspn to check or add SPNs.
  • “KRB_AP_ERR_MODIFIED”: The service ticket was modified in transit, often due to a wrong service password or multiple service accounts with the same SPN.
  • “Cannot connect to KDC”: Network issues, DNS misconfiguration, or the KDC is down. Check firewall and DNS SRV records.

Security Considerations and Best Practices

Kerberos is strong, but it has known weaknesses. The KDC is a single point of failure—if it is compromised, all tickets are compromised. Also, if an attacker steals a TGT (e.g., via a memory dump on a client), they can impersonate the user until it expires. To mitigate risks:

  • Use strong password policies and enable pre-authentication (which is default in Windows).
  • Implement smart card or certificate-based authentication for high-security environments.
  • Keep the KDC and domain controllers patched and isolated.
  • Use AES encryption for Kerberos tickets (RC4 is deprecated).
  • Monitor for “overpass-the-hash” or “pass-the-ticket” attacks using SIEM tools.
  • Limit the lifetime of TGTs and service tickets to the minimum required.

Frequently Asked Questions

Q: Is Kerberos the same as Active Directory?
No. Active Directory (AD) uses Kerberos as its default authentication protocol, but AD is a directory service that also handles policies, DNS, and LDAP. Kerberos is just the authentication mechanism inside AD.

Q: Can Kerberos work over the internet?
Yes, but it requires careful configuration. You’d need to expose the KDC (usually port 88) and ensure time sync. However, it’s more common to use a VPN or a federated solution like SAML for internet-facing services.

Q: What happens if the KDC is down?
Users cannot get new TGTs, so they cannot log in (unless they have cached credentials). Existing TGTs and service tickets continue to work until they expire. That’s why redundancy (multiple domain controllers) is critical.

Q: Why is Kerberos called “three-headed”?
It refers to the three heads of the mythological dog Cerberus (though the protocol’s name is spelled “Kerberos” after the Greek). The three heads represent the three parties: client, server, and KDC.

Q: Does Kerberos encrypt all network traffic?
No. Kerberos only handles authentication. It provides session keys that applications can use for encryption, but whether the actual data is encrypted depends on the application (e.g., SMB uses Kerberos for auth and then can encrypt file transfers).

Q: Can I use Kerberos for SSH?
Yes, with GSSAPI (Generic Security Services Application Program Interface). Many SSH clients and servers support Kerberos authentication, allowing single sign-on in a domain.

Related

How pages are sourced and corrected: Sources and editorial policy.