✳ The reference desk / In practice

Kerberos

A network sign-in protocol built on tickets from a trusted key distribution center. A client proves its identity once, receives a ticket-granting ticket, and uses it to get a ticket for each service.

Kerberos network authentication protocol

What it means

Kerberos lets a client sign in to many services without sending its password to any of them. Everyone trusts one server, the key distribution center, or KDC. Sign-in takes three exchanges. First the client proves it knows its password and receives a ticket-granting ticket. Second it presents that ticket and asks for a ticket to one service. Third it presents the service ticket to the service, with a fresh timestamp. The service checks the ticket with its own key and does not contact the KDC. Kerberos is the default sign-in protocol in Active Directory. It depends on synchronized clocks and on well-guarded keys.

See the idea / Identity

In Kerberos, a service sees a ticket, never a password.

Follow the antenna scheduler through the three Kerberos exchanges. Then see why a recorded request fails when it is sent again later.

Meridian’s antenna scheduler signs in to the antenna controller. The key distribution center, or KDC, runs two services. The authentication server, or AS, checks the first sign-in. The ticket-granting server, or TGS, issues tickets for single services. Clocks may differ by five minutes at most, the usual default. Compare a normal sign-in with a recorded request sent again nine minutes later.

Kerberos: Follow the antenna scheduler through the three Kerberos exchanges. Then see why a recorded request fails when it is sent again later. The chapter text below describes every state.Meridian domain · KerberosScheduler signs in to controllerScheduler · the clientSends encrypted timestampIts password is never sentKDC · authentication serverChecking the timestampSeals the TGT with the krbtgt keyKDC · ticket-granting serverNo request yetSeals it with the controller’s keyAntenna controllerNo ticket seenClock limit: 5 minutesFIRST REQUEST TO THE KDC

01 / 04

Ask the AS

The scheduler sends the AS a timestamp encrypted with its password-derived key. The AS returns a ticket-granting ticket, or TGT, and a session key.

More about this step

The messages are KRB_AS_REQ and KRB_AS_REP. The encrypted timestamp is called pre-authentication. It shows the scheduler knows its password without sending it. The TGT is encrypted with the key of the KDC’s own account, krbtgt, so the scheduler cannot read or change it. The session key comes back encrypted with the scheduler’s key.

Keep in mindOne client, one service and one realm. Inside the five-minute window a service relies on a record of requests it has already seen, which is not shown. Ticket lifetimes, renewal, the optional reply that proves the service to the client, and delegation are left out. A weak service account password or a stolen krbtgt key defeats this exchange without breaking any step of it.

Read the visual, step by step

Normal sign-in

  1. Ask the AS. The scheduler sends the AS a timestamp encrypted with its password-derived key. The AS returns a ticket-granting ticket, or TGT, and a session key. The messages are KRB_AS_REQ and KRB_AS_REP. The encrypted timestamp is called pre-authentication. It shows the scheduler knows its password without sending it. The TGT is encrypted with the key of the KDC’s own account, krbtgt, so the scheduler cannot read or change it. The session key comes back encrypted with the scheduler’s key.
  2. Ask the TGS. The scheduler presents the TGT to the TGS and names the controller. The TGS returns a service ticket that only the controller can decrypt. The messages are KRB_TGS_REQ and KRB_TGS_REP. The password is not used again. The service ticket is encrypted with the controller’s own key and holds a new session key for the scheduler and the controller to share.
  3. Show ticket. The scheduler sends the controller the service ticket and an authenticator. The authenticator is a fresh timestamp encrypted with the ticket’s session key. The message is KRB_AP_REQ. The ticket says who the scheduler is. The authenticator shows that the sender holds the session key inside the ticket and made the request just now.
  4. Decide. The controller decrypts the ticket with its own key and finds the authenticator’s timestamp 2 seconds old. It accepts the scheduler without contacting the KDC. The controller trusts the ticket because only the KDC and the controller hold the key that encrypted it. Two seconds is well inside the five-minute limit. What the scheduler may do on the controller is a separate authorization decision.

Replay after 9 minutes

  1. Ask the AS. The scheduler sends the AS a timestamp encrypted with its password-derived key. The AS returns a ticket-granting ticket, or TGT, and a session key. The messages are KRB_AS_REQ and KRB_AS_REP. The encrypted timestamp is called pre-authentication. It shows the scheduler knows its password without sending it. The TGT is encrypted with the key of the KDC’s own account, krbtgt, so the scheduler cannot read or change it. The session key comes back encrypted with the scheduler’s key.
  2. Ask the TGS. The scheduler presents the TGT to the TGS and names the controller. The TGS returns a service ticket that only the controller can decrypt. The messages are KRB_TGS_REQ and KRB_TGS_REP. The password is not used again. The service ticket is encrypted with the controller’s own key and holds a new session key for the scheduler and the controller to share.
  3. Show ticket. The scheduler sends its service ticket and authenticator to the controller. An attacker on the network records both as they pass. The attacker cannot read either one. The ticket is encrypted with the controller’s key and the authenticator with the session key. The attacker can only keep the bytes and send them again. The controller accepts this original request, as in the normal sign-in.
  4. Replay. Nine minutes later the attacker sends the recorded request. The authenticator’s timestamp is older than the five-minute limit, so the controller refuses it. The controller returns the error KRB_AP_ERR_SKEW. The check works only if the clocks agree, which is why Kerberos needs time synchronization. The ticket itself was still valid. The stale authenticator is what failed.

One client, one service and one realm. Inside the five-minute window a service relies on a record of requests it has already seen, which is not shown. Ticket lifetimes, renewal, the optional reply that proves the service to the client, and delegation are left out. A weak service account password or a stolen krbtgt key defeats this exchange without breaking any step of it.

Flow references: RFC 4120: The Kerberos Network Authentication Service (V5)

AN ILLUSTRATIVE SCENARIO

A recorded request, sent too late

Meridian's antenna scheduler signs in to the antenna controller with Kerberos. An attacker on the network records the scheduler's final request, which holds the service ticket and a timestamp. Nine minutes later the attacker sends the recording to the controller. The timestamp is older than the five-minute limit, so the controller refuses it. The ticket was valid. The stale timestamp was not.

Put it to work

  1. Synchronize every clock in the domain to one time source, and alert when a server drifts toward the allowed difference.
  2. Give every service account a long random password, because part of each service ticket can be attacked offline by guessing that password.
  3. Guard the domain controllers and the krbtgt account closely, and watch the KDC logs for unusual ticket requests.

How to check your work

From an ordinary test account, request a ticket for a test service and confirm the KDC logged it. Set a test machine's clock ten minutes off and confirm sign-in fails. Check that your service accounts have long random passwords.

Connect the ideas

  • Authentication

    The act of verifying a claimed identity with authenticators such as passwords, passkeys, or certificates.

  • SSO

    A pattern where one authentication to an identity provider is reused across multiple applications.

  • Session

    State linking multiple requests; an authenticated session associates later requests with a previously authenticated identity until it expires or is revoked.

  • Identity

    The record an organization uses for a person, device, or workload that can be authenticated.

Explore a field lesson

Find your next idea.

Tip: press / to open search. Escape closes this window.