4 Dec 2026Security news updated around the clock

Kerberos

Kerberos is the ticket-based authentication protocol behind Active Directory. It proves identity with encrypted tickets instead of sending passwords.

ProtocolsAdvancedUpdated 27 min read

Overview

Kerberos is a network authentication protocol. It lets a user or a computer prove who it is to a service without sending a password across the network. Instead, a trusted third party called the Key Distribution Center (KDC) hands out encrypted tickets. The client shows a ticket to a service, and the service accepts it because only the KDC could have made it.

Kerberos version 5 is the default authentication protocol in Microsoft Active Directory (AD). Every domain controller runs a KDC. When someone logs on to a domain-joined Windows machine, opens a file share, or connects to an internal web application with single sign-on, Kerberos is almost always doing the work underneath. NTLM is the older fallback.

Kerberos sits at the application layer. The KDC listens on port 88 over both UDP and TCP. Most application protocols do not speak Kerberos directly. They carry Kerberos tokens inside SMB, LDAP, HTTP, or RPC, usually wrapped in SPNEGO (the negotiation layer that picks Kerberos or NTLM).

Defenders care for three reasons. First, the keys behind Kerberos are the keys to the domain. Whoever holds the key of the krbtgt account can forge access to anything. Second, many of the best-known Active Directory attacks (Kerberoasting, golden tickets, delegation abuse) are Kerberos abuse. Third, the protocol leaks useful metadata. Tickets are encrypted, but user names, service names, encryption types, and error codes travel in the clear. That makes Kerberos one of the richest sources for network detection.

History and evolution

Kerberos was built at MIT in the 1980s as part of Project Athena, a campus computing project. The name comes from Kerberos, the three-headed dog of Greek myth, for the three parties in every exchange: client, server, and KDC.

Versions 1 to 3 stayed inside MIT. Version 4 was released publicly in the late 1980s and saw wide academic use. It was tied to DES encryption and had design limits that later versions fixed.

Version 5 was first published as RFC 1510 in 1993. RFC 4120 replaced it in 2005 and is the current core specification. Version 5 added ASN.1 encoding, support for several encryption types, ticket forwarding and delegation, and cross-realm trust.

The encryption story matters most for security:

YearSpecificationChange
2005RFC 3961A framework that lets Kerberos use different encryption and checksum types
2005RFC 3962AES128 and AES256 encryption types
2006RFC 4757Documents the RC4-HMAC type that Windows had shipped since Windows 2000
2006RFC 4556PKINIT, which lets a certificate replace the password in the first exchange
2011RFC 6113FAST, which wraps pre-authentication in a protected tunnel (Microsoft calls it Kerberos armoring)
2012RFC 6649Deprecates DES and other weak types
2018RFC 8429Deprecates 3DES and RC4

Microsoft adopted Kerberos as the default for Active Directory with Windows 2000 and added extensions, documented in the MS-KILE specification. The most important extension is the Privilege Attribute Certificate (PAC), documented in MS-PAC, which carries the user's security identifier (SID) and group memberships inside the ticket.

Since 2020, Microsoft has shipped a series of Kerberos hardening updates in response to published attacks. They include fixes for the Bronze Bit flaw (CVE-2020-17049), the sAMAccountName spoofing flaws known as noPac (CVE-2021-42278 and CVE-2021-42287), and certificate mapping changes after Certifried (CVE-2022-26923). Many of these shipped in an audit mode first and moved to enforcement later, so patch level alone does not tell you whether a domain is protected. Check the enforcement settings too.

Where Kerberos is used in enterprise networks

In an Active Directory environment, Kerberos is used for:

  • Interactive logons to domain-joined Windows machines, and the network logons that follow
  • SMB file shares and admin shares, using cifs and host service names
  • LDAP queries and binds to domain controllers
  • Microsoft SQL Server, using MSSQLSvc service names
  • Web single sign-on with the HTTP Negotiate scheme on IIS, SharePoint, and many internal applications, using HTTP service names
  • Remote Desktop with Network Level Authentication, and Windows Remote Management
  • Secure dynamic DNS updates, using GSS-TSIG
  • Linux and macOS machines joined to the domain through SSSD or similar tools, plus NFSv4 with sec=krb5, SSH with GSSAPI, and Hadoop clusters

Kerberos traffic in a healthy domain is constant and predictable. Each user gets a ticket-granting ticket at logon and renews it during the day. Each new service they touch adds a service ticket request. This stable baseline is what makes anomalies stand out: a workstation that suddenly requests tickets for 80 services, or a client that asks for the weak RC4 cipher in an all-AES domain.

Architecture and components

ComponentWhat it isWhat it holds
PrincipalAny identity Kerberos knows aboutA name such as jdoe@CORP.LOCAL or MSSQLSvc/sql01.corp.local:1433
RealmThe administrative domainIn AD, the DNS domain name in capital letters, such as CORP.LOCAL
Key Distribution Center (KDC)The trusted third party. Logically two services: the Authentication Service (AS) and the Ticket-Granting Service (TGS)Access to every principal's long-term key. In AD, every domain controller runs a KDC and the database is Active Directory
krbtgt accountA special account whose key protects every ticket-granting ticket in the domainThe most sensitive key in the domain
Long-term keyA key tied to a principalFor users, derived from the password. For computers and managed service accounts, derived from a long random password
Ticket-granting ticket (TGT)A ticket for the TGS itselfProof of logon. Encrypted with the krbtgt key
Service ticketA ticket for one specific serviceEncrypted with the long-term key of the account that runs the service
Session keyA temporary key created by the KDC for one client and one serviceUsed to encrypt authenticators and, optionally, the application data
AuthenticatorA short, fresh message the client encrypts with the session keyThe client name and a timestamp. Proves the client holds the session key right now
Service Principal Name (SPN)A mapping from a service name to the account that runs itStored in the servicePrincipalName attribute of a user or computer account
Privilege Attribute Certificate (PAC)Microsoft authorization data inside the ticketUser SID, group SIDs, and signatures from the service key and the KDC key
KeytabA file that stores long-term keys on Linux and Unix servicesLets a service decrypt tickets without a password prompt

Two facts follow from this design. The KDC can decrypt every ticket, so a compromised domain controller is a compromised domain. And a ticket works for whoever holds it together with its session key. Kerberos tickets are bearer tokens.

How Kerberos works step by step

  1. AS-REQ. The client asks the Authentication Service for a ticket-granting ticket. It sends its user name, the realm, the target krbtgt/REALM, a random nonce, and the list of encryption types it supports. With pre-authentication on (the default), it also sends the current time encrypted with the user's long-term key, in a field called PA-ENC-TIMESTAMP.
  2. AS-REP. The KDC decrypts the timestamp with its copy of the user's key. If the time is within the allowed clock skew (5 minutes by default), the KDC creates a session key. It returns the TGT, encrypted with the krbtgt key, and a separate part, encrypted with the user's key, that holds the session key. The client can read the second part but not the TGT.
  3. TGS-REQ. When the client needs a service, it sends the TGT to the Ticket-Granting Service, along with a new authenticator encrypted with the TGT session key, and the SPN of the target service.
  4. TGS-REP. The KDC decrypts the TGT with the krbtgt key, checks the authenticator, and issues a service ticket. The service ticket is encrypted with the long-term key of the account behind that SPN. A new service session key comes back encrypted with the TGT session key.
  5. AP-REQ. The client sends the service ticket and a fresh authenticator to the service. In Windows this travels inside the application protocol, for example in an SMB Session Setup or an HTTP Authorization: Negotiate header.
  6. AP-REP. The service decrypts the ticket with its own key, extracts the session key, and checks the authenticator. If the client asked for mutual authentication, the service proves its own identity with an AP-REP.

Notice what the service does not do: it does not contact the KDC. It trusts the ticket because the ticket is encrypted with its own key. That one design choice explains why silver tickets work.

sequenceDiagram
  participant C as Client
  participant AS as KDC Authentication Service
  participant TGS as KDC Ticket-Granting Service
  participant S as Service
  C->>AS: AS-REQ with user name and encrypted timestamp
  AS->>C: AS-REP with TGT and session key
  C->>TGS: TGS-REQ with TGT, authenticator, and target SPN
  TGS->>C: TGS-REP with service ticket and service session key
  C->>S: AP-REQ with service ticket and authenticator
  S->>C: AP-REP for mutual authentication (optional)

Packet-level anatomy

Transport, ports, and discovery

PortProtocolUse
88UDP and TCPKDC traffic: AS and TGS exchanges
464UDP and TCPPassword changes (kpasswd)
749TCPAdministration in MIT Kerberos (kadmin)

Over TCP, every Kerberos message starts with a 4-byte length field (the record mark), followed by the ASN.1 message. Over UDP there is no length prefix. If a reply is too large for UDP, the KDC returns error 52 (KRB_ERR_RESPONSE_TOO_BIG) and the client retries over TCP. Users in many groups get large PACs, so their tickets usually travel over TCP. Windows also switches to TCP on its own when a message is bigger than a size threshold.

Clients find KDCs through DNS SRV records such as _kerberos._tcp.corp.local, and in AD also _kerberos._tcp.dc._msdcs.corp.local. A host that queries these records but is not domain-joined is worth a look.

Message types

Every message carries a msg-type number.

msg-typeMessageDirectionEncrypted part protected by
10AS-REQClient to KDCPre-authentication data uses the client's long-term key
11AS-REPKDC to clientTicket: krbtgt key. Client part: client's long-term key
12TGS-REQClient to KDCAuthenticator: TGT session key
13TGS-REPKDC to clientTicket: service account key. Client part: TGT session key
14AP-REQClient to serviceTicket: service key. Authenticator: service session key
15AP-REPService to clientService session key
20KRB-SAFEEitherIntegrity only
21KRB-PRIVEitherEncrypted application data
22KRB-CREDEitherUsed to forward tickets to another host
30KRB-ERRORKDC or service to clientNot encrypted

Encoding

Kerberos messages are ASN.1 structures encoded with DER (Distinguished Encoding Rules). Each top-level message has an APPLICATION tag: AS-REQ is [APPLICATION 10], AS-REP is [APPLICATION 11], a Ticket is [APPLICATION 1], an Authenticator is [APPLICATION 2], and the encrypted ticket body (EncTicketPart) is [APPLICATION 3]. Fields inside each structure carry context tags such as [0], [1], [2]. Wireshark and Zeek decode these tags into field names.

AS-REQ and TGS-REQ (KDC-REQ)

AS-REQ and TGS-REQ share one structure.

FieldType or encodingPurposeSecurity note
pvno [1]INTEGERProtocol version, always 5None
msg-type [2]INTEGER10 for AS-REQ, 12 for TGS-REQNone
padata [3]SEQUENCE OF PA-DATA, optionalPre-authentication and extra data. In AS-REQ, usually PA-ENC-TIMESTAMP (type 2). In TGS-REQ, PA-TGS-REQ (type 1), which carries the TGT and authenticator. Windows also sends PA-PAC-REQUEST (type 128)An AS-REQ with no PA-ENC-TIMESTAMP that still gets a ticket means pre-authentication is off for that account. The etype inside the encrypted timestamp shows which key the client used
req-body [4]KDC-REQ-BODYThe request itselfSee below
kdc-options [0]BIT STRINGFlags such as forwardable, renewable, canonicalizeUnusual flag combinations can identify attack tools
cname [1]PrincipalName, optionalClient name. Present in AS-REQVisible in clear text on the wire
realm [2]RealmThe realmA realm name in lower case or a short NetBIOS form can point to tooling
sname [3]PrincipalName, optionalTarget service. krbtgt/REALM for AS-REQ, the SPN for TGS-REQVisible in clear text, so you see every service each client asks for
till [5]KerberosTimeRequested end timeWindows clients send the fixed value 2037-09-13 02:48:05 UTC
nonce [7]UInt32Random number matched in the replyNone
etype [8]SEQUENCE OF Int32Encryption types the client supports, in order of preferenceA list containing only RC4 from a modern Windows host is a strong sign of tooling or a downgrade
additional-tickets [11]SEQUENCE OF Ticket, optionalUsed for user-to-user and S4U2Proxy delegationIts presence marks delegation traffic

AS-REP and TGS-REP (KDC-REP)

FieldType or encodingPurposeSecurity note
pvno [0]INTEGERAlways 5None
msg-type [1]INTEGER11 for AS-REP, 13 for TGS-REPNone
padata [2]SEQUENCE OF PA-DATA, optionalIn AS-REP, PA-ETYPE-INFO2 tells the client the encryption type and salt for its keyThe salt reveals the exact casing of the principal name used for key derivation
crealm [3]RealmClient realmNone
cname [4]PrincipalNameClient nameNone
ticket [5]TicketThe TGT or service ticketIts encrypted part is what Kerberoasting cracks
enc-part [6]EncryptedDataSession key, nonce, times, and flags for the clientIn AS-REP this is encrypted with the user's key, which is what AS-REP roasting cracks

Ticket and EncTicketPart

The outer Ticket is [APPLICATION 1] with four fields: tkt-vno (5), realm, sname, and enc-part. Only enc-part is encrypted. The service name in sname sits outside the encryption, which is why some delegation attacks can change it.

Inside enc-part, the EncTicketPart holds:

FieldPurposeSecurity note
flags [0]Ticket flags: forwardable, forwarded, renewable, pre-authent, and othersForged tickets often carry flag sets that real KDCs never issue
key [1]The session keyHolding the ticket plus this key means holding the identity
crealm [2] and cname [3]The clientIn a forged ticket these can name any account
authtime [5], starttime [6], endtime [7], renew-till [8]Validity timesGolden tickets made with default tool settings often last 10 years. Real AD tickets last 10 hours
authorization-data [10]In AD, the PAC, wrapped in AD-IF-RELEVANT with ad-type 128 (AD-WIN2K-PAC)The PAC states group memberships. Whoever can encrypt the ticket can write any PAC

All encrypted fields use the EncryptedData structure: etype [0] (which algorithm), kvno [1] (the key version number, optional), and cipher [2] (the ciphertext). The etype and kvno values are readable without decryption.

Encryption types

etypeNameHow the key is madeStatus
17aes128-cts-hmac-sha1-96PBKDF2 with HMAC-SHA1, 4,096 iterations, salt built from realm and principal nameSupported in AD
18aes256-cts-hmac-sha1-96Same as 17, with a 256-bit keyThe preferred type in modern AD
23rc4-hmacThe NT hash of the password (MD4), no saltDeprecated by RFC 8429. Still enabled in many domains
1 and 3des-cbc-crc, des-cbc-md5DESDeprecated. Disabled by default since Windows 7 and Windows Server 2008 R2

The difference between 18 and 23 is the difference between slow and fast offline cracking. With RC4 the key is the NT hash, so a stolen NT hash can request tickets directly, and a captured ticket can be cracked quickly. With AES, the key derivation is salted and iterated, which slows cracking considerably but does not save a weak password.

Common KRB-ERROR codes

CodeNameMeaningDetection value
6KDC_ERR_C_PRINCIPAL_UNKNOWNThe client name does not existBursts mean user enumeration
7KDC_ERR_S_PRINCIPAL_UNKNOWNThe service name does not existCan mean scanning for SPNs or a broken application
14KDC_ERR_ETYPE_NOSUPPNo encryption type in commonCommon after hardening if old clients remain
18KDC_ERR_CLIENT_REVOKEDAccount disabled, locked, or expiredSpikes can follow a password spray
23KDC_ERR_KEY_EXPIREDPassword expiredMostly noise
24KDC_ERR_PREAUTH_FAILEDWrong password in pre-authenticationMany accounts failing from one source means password spraying
25KDC_ERR_PREAUTH_REQUIREDThe normal first reply when a client sends no pre-authenticationNormal at low volume. If an account never gets this reply, pre-authentication is off for it. Zeek does not log this error by default (see the detection section)
37KRB_AP_ERR_SKEWClock difference too largeTime synchronization problems
52KRB_ERR_RESPONSE_TOO_BIGReply too large for UDPNormal. The client retries over TCP
68KDC_ERR_WRONG_REALMRequest belongs to another realmNormal in multi-domain forests

Example decoded AS-REQ

This is an illustrative AS-REQ from a Windows client, laid out the way Wireshark shows it.

Kerberos
    Record Mark: 247 bytes                      (TCP only)
    as-req
        pvno: 5
        msg-type: krb-as-req (10)
        padata: 2 items
            PA-DATA pA-ENC-TIMESTAMP
                padata-value
                    etype: eTYPE-AES256-CTS-HMAC-SHA1-96 (18)
                    cipher: 9c41e2...                (current time, encrypted with the user's AES key)
            PA-DATA pA-PAC-REQUEST
                include-pac: True
        req-body
            kdc-options: 40810010 (forwardable, renewable, canonicalize, renewable-ok)
            cname
                name-type: kRB5-NT-PRINCIPAL (1)
                cname-string: jdoe
            realm: CORP.LOCAL
            sname
                name-type: kRB5-NT-SRV-INST (2)
                sname-string: krbtgt, CORP.LOCAL
            till: 2037-09-13 02:48:05 (UTC)
            nonce: 1883947582
            etype: 18, 17, 23, ...

The same exchange appears in Zeek's kerberos.log as one line per request, with fields such as request_type (AS or TGS), client, service, success, error_msg, cipher, till, forwardable, and renewable. An illustrative TGS line for a Kerberoasting request looks like this:

request_type=TGS  client=jdoe/CORP.LOCAL  service=MSSQLSvc/sql01.corp.local:1433  success=T  cipher=rc4-hmac  forwardable=T

Configuration in practice

Domain Kerberos policy

These settings live in the Default Domain Policy under Account Policies, Kerberos Policy.

SettingDefaultRecommendedWhy
Maximum lifetime for user ticket (TGT)10 hours10 hours or lessLimits how long a stolen TGT works
Maximum lifetime for user ticket renewal7 days7 days or lessLimits how long a stolen TGT can be renewed
Maximum lifetime for service ticket600 minutes600 minutes or lessMust not exceed the TGT lifetime
Maximum tolerance for computer clock synchronization5 minutes5 minutesLarger values weaken replay protection
Enforce user logon restrictionsEnabledEnabledMakes the KDC check account restrictions on every service ticket

Encryption types

SettingDefaultRecommendedWhy
Group Policy: Network security, Configure encryption types allowed for KerberosNot definedAES128, AES256, and future types, after testingRemoves RC4 and DES from clients and servers that apply the policy
Account attribute msDS-SupportedEncryptionTypesNot set on most user accounts0x18 (AES128 and AES256) on service accountsStops the KDC from issuing RC4 tickets for that account
Accounts with old passwordsCommonReset the passwordAccounts whose password has not changed since the domain reached the Windows Server 2008 functional level may have no AES keys at all

The bit values in msDS-SupportedEncryptionTypes are: DES-CBC-CRC 0x1, DES-CBC-MD5 0x2, RC4 0x4, AES128 0x8, AES256 0x10. AES only is 0x18.

Account and group settings

SettingDefaultRecommendedWhy
"Do not require Kerberos preauthentication" (userAccountControl flag 0x400000)OffOff on every account, with an alert on changeWhen on, anyone can request crackable material for that account
"Account is sensitive and cannot be delegated" (flag 0x100000)OffOn for all privileged accountsStops the account's tickets from being delegated
Protected Users groupEmptyAll administratorsMembers cannot use NTLM, DES, or RC4, cannot be delegated, and get a 4-hour TGT by default
ms-DS-MachineAccountQuota100By default any user can create 10 computer accounts, which several delegation attacks need
krbtgt passwordSet at domain creationReset twice on a schedule and after any suspected compromiseOld krbtgt keys keep forged tickets valid
Kerberos armoring (FAST), KDC and client policiesNot configuredSupported, then required where all clients can use itProtects pre-authentication from offline attacks and some downgrades

Linux clients

On Linux, /etc/krb5.conf holds the equivalent settings. A hardened example:

[libdefaults]
    default_realm = CORP.LOCAL
    dns_lookup_kdc = true
    rdns = false
    ticket_lifetime = 10h
    renew_lifetime = 7d
    permitted_enctypes = aes256-cts-hmac-sha1-96 aes128-cts-hmac-sha1-96

Ticket caches on Linux are often files such as /tmp/krb5cc_<uid>. Anyone who can read that file can reuse the tickets inside it, so file permissions and cache type (kernel keyring versus file) matter.

Security model and common misconfigurations

Kerberos rests on four assumptions:

  1. The KDC is trusted and its database is secret.
  2. Long-term keys stay secret. For users that means strong passwords.
  3. Clocks are synchronized, because authenticators use timestamps to stop replay.
  4. A ticket plus its session key is proof of identity. Kerberos does not bind tickets to a machine, and in AD the client address field is normally empty.

Most real-world Kerberos compromises break one of these assumptions through configuration, not cryptography. The most common problems in enterprise domains:

  • Service accounts with SPNs and short, years-old passwords, often in privileged groups
  • Accounts with pre-authentication turned off, usually for an old application nobody remembers
  • Unconstrained delegation on servers other than domain controllers
  • RC4 still allowed domain-wide, and old accounts with no AES keys
  • A krbtgt password that has not changed since the domain was built (check pwdLastSet on the account)
  • Administrators outside the Protected Users group and not marked as sensitive
  • ms-DS-MachineAccountQuota left at 10, combined with write access on computer objects
  • Certificate templates in Active Directory Certificate Services (AD CS) that let users request certificates for other identities

Attacks against Kerberos

User enumeration and password spraying

How it works: the attacker sends AS-REQ messages for a list of user names. A non-existent name returns error 6. An existing name returns error 25 (pre-authentication required). For spraying, the attacker adds a PA-ENC-TIMESTAMP encrypted with a guessed password. A wrong guess returns error 24.

Prerequisites: network access to port 88 on a domain controller. No account is needed for enumeration.

Tools: Kerbrute and similar scripts.

ATT&CK: T1110.003 (Password Spraying).

On the wire and in logs: many AS-REQs from one source across many user names, with high rates of errors 6 or 24. Failed pre-authentication logs as Event 4771 (failure code 0x18), not as the familiar 4625. Teams that only watch 4625 miss Kerberos spraying entirely.

AS-REP roasting

How it works: for accounts with pre-authentication turned off, the attacker sends an AS-REQ with no pre-authentication data. The KDC returns an AS-REP whose enc-part is encrypted with the user's key. The attacker cracks it offline.

Prerequisites: a list of user names, and at least one account with "Do not require Kerberos preauthentication" set.

Tools: Rubeus, Impacket GetNPUsers.py. Hashcat mode 18200 cracks the result.

ATT&CK: T1558.004 (AS-REP Roasting).

On the wire and in logs: a successful AS-REP with no preceding error 25 and no PA-ENC-TIMESTAMP in the request. On the domain controller, Event 4768 with Pre-Authentication Type 0. The domain controller event is the more reliable signal: by default, Zeek leaves error 25 out of kerberos.log, so the missing-error check only works on the wire after the change described under Log sources.

Kerberoasting

How it works: any domain user requests service tickets for accounts that have SPNs, then cracks the encrypted ticket part offline to recover the service account password. See the full Kerberoasting entry for mechanics and defenses.

Prerequisites: any domain account.

Tools: Rubeus, Impacket GetUserSPNs.py. Hashcat modes 13100 (RC4), 19600 (AES128), and 19700 (AES256).

ATT&CK: T1558.003 (Kerberoasting).

On the wire and in logs: one client sending TGS-REQs for many SPNs in a short window, often asking for RC4 only. On domain controllers, bursts of Event 4769 with Ticket Encryption Type 0x17.

Pass-the-ticket

How it works: the attacker steals TGTs or service tickets from memory on a compromised Windows host (from the LSASS process) or from cache files on Linux, then loads them into their own session. Because tickets are bearer tokens, they work from any machine.

Prerequisites: local administrator or SYSTEM on a host where the victim has logged on, or read access to their ticket cache.

Tools: Mimikatz, Rubeus.

ATT&CK: T1550.003 (Pass the Ticket).

On the wire and in logs: TGS-REQs for a user from a host that never sent an AS-REQ for that user during the ticket lifetime. This "TGS without a matching AS" check is one of the most useful network detections for stolen tickets.

Overpass-the-hash (pass-the-key)

How it works: with a stolen NT hash or AES key, the attacker builds a valid PA-ENC-TIMESTAMP and asks for a real TGT. No password is needed. With an NT hash, this only works if RC4 is allowed for the account.

Prerequisites: the user's NT hash or AES key, usually dumped from memory.

Tools: Rubeus asktgt, Mimikatz.

On the wire and in logs: AS-REQs whose encrypted timestamp uses RC4 (etype 23) for accounts that normally use AES. On the domain controller, Event 4768 with Ticket Encryption Type 0x17 for a user who usually shows 0x12.

Golden ticket

How it works: with the krbtgt key, the attacker forges a TGT for any user with any group memberships and any lifetime. The KDC accepts it because it is encrypted with the right key. Variants called diamond and sapphire tickets start from a real TGT and modify or replace its PAC, which leaves a normal AS exchange behind and is harder to spot.

Prerequisites: the krbtgt key, usually obtained through DCSync (T1003.006) or a copy of the NTDS.dit database.

Tools: Mimikatz, Rubeus, Impacket ticketer.py.

ATT&CK: T1558.001 (Golden Ticket).

On the wire and in logs: TGS-REQs that use a TGT no domain controller issued (no AS-REQ for that user from that host). Ticket lifetimes far longer than domain policy. Accounts in the PAC that do not exist or do not match the ticket's client name. Domain controllers patched for CVE-2021-42287 check a field called PAC_REQUESTOR, which defeats forgeries for non-existent accounts. Forgeries for real accounts still work.

Silver ticket

How it works: with the long-term key of a service account or computer account, the attacker forges a service ticket for that service directly. The KDC is never involved, because services check tickets with their own key.

Prerequisites: the service account's key, or the computer account hash for cifs, host, and similar services on that machine.

Tools: Mimikatz, Impacket ticketer.py.

ATT&CK: T1558.002 (Silver Ticket).

On the wire and in logs: an AP-REQ to a service with no matching TGS-REQ from that client to any domain controller. On the target server, logon events (Event 4624, logon type 3, Kerberos) with no matching Event 4769 on any domain controller.

Delegation abuse

Kerberos delegation lets a service act on behalf of a user. Each of the three forms has an attack path, all under ATT&CK T1558 (Steal or Forge Kerberos Tickets) and related techniques.

  • Unconstrained delegation: users who connect to the server send a copy of their TGT with the service ticket. An attacker who compromises that server collects those TGTs. Combined with authentication coercion (forcing a domain controller to connect, for example through the print spooler), this yields a domain controller's TGT and then full domain compromise.
  • Constrained delegation (S4U2Self and S4U2Proxy): an account allowed to delegate to listed SPNs can request tickets as any user to those SPNs. Because the service name sits outside the ticket encryption, the attacker can often swap the service class, for example from http to cifs on the same host. CVE-2020-17049 (Bronze Bit) let attackers bypass the protection on non-forwardable tickets until it was patched.
  • Resource-based constrained delegation (RBCD): if an attacker can write the msDS-AllowedToActOnBehalfOfOtherIdentity attribute on a computer object and controls any account with an SPN (easy when ms-DS-MachineAccountQuota is 10), they can impersonate administrators to that computer.

On the wire and in logs: TGS-REQs with additional-tickets (S4U2Proxy) from accounts that do not normally delegate. Event 4769 with the Transited Services field filled in. Directory changes to delegation attributes (Event 5136), and new computer accounts created by ordinary users (Event 4741).

Certificate abuse through PKINIT

How it works: PKINIT lets a certificate replace the password in the AS exchange. An attacker who obtains a certificate for another user, usually through a misconfigured AD CS template, gets that user's TGT. With the same certificate they can also recover the user's NT hash. Certificates keep working after the victim changes their password.

Prerequisites: a vulnerable certificate template, or control over a principal that can request certificates for others.

Tools: Certipy, Rubeus, Certify.

ATT&CK: T1649 (Steal or Forge Authentication Certificates).

On the wire and in logs: AS-REQs with PKINIT pre-authentication from accounts that normally use passwords. On the domain controller, Event 4768 with certificate fields filled in. On the certificate authority, issuance events (4886 and 4887) for templates and requesters that do not match normal use.

sAMAccountName spoofing (noPac)

How it works: an attacker creates a computer account, renames it to the name of a domain controller without the trailing $, requests a TGT, renames it back, and then asks for a service ticket with S4U2Self. The KDC cannot find the renamed account, appends $, finds the real domain controller account, and issues a ticket for it. The result is domain administrator access from an ordinary account.

Prerequisites: a normal domain account, the ability to create or modify a computer account, and unpatched domain controllers (CVE-2021-42278 and CVE-2021-42287, patched in November 2021).

ATT&CK: T1068 (Exploitation for Privilege Escalation).

On the wire and in logs: computer accounts renamed so their names lack the trailing $ (Events 4742 and 4781), followed shortly by S4U2Self requests.

Detection engineering

Log sources

SourceEvent or fieldWhat to look for
Domain controller Security log4768, TGT requestedTicket Encryption Type (0x12 normal, 0x17 worth a look), Pre-Authentication Type (0 means none, 2 is encrypted timestamp, 15 or 16 is PKINIT, 138 is an armored FAST logon), failure codes such as 0x6
Domain controller Security log4769, service ticket requestedService Name, Ticket Encryption Type, Transited Services, failure codes
Domain controller Security log4771, pre-authentication failedFailure code 0x18 (bad password) across many accounts from one IP
Domain controller Security log4770, ticket renewedRenewals far beyond policy
Member servers4624 logon type 3 with KerberosService logons with no matching 4769 at any domain controller
Directory changes5136, 4738, 4741, 4742, 4781Delegation attributes, the pre-authentication flag, new and renamed computer accounts
Zeek kerberos.logrequest_type, client, service, success, error_msg, cipher, tillBursts, RC4, unusual lifetimes, error patterns. By default Zeek does not log the pre-authentication-required error (it is listed in KRB::ignored_errors). Remove it from that set to see error 25 replies, at the cost of higher log volume
Zeek conn.logConnections to port 88Port 88 traffic from hosts that are not domain members, or to hosts that are not domain controllers

Turn on the advanced audit subcategories "Kerberos Authentication Service" and "Kerberos Service Ticket Operations" for both success and failure on every domain controller. Without them, most of the events above never exist.

Example detections

Kerberoasting burst over Zeek data, as pseudo-SQL:

SELECT orig_h, client, COUNT(DISTINCT service) AS spns
FROM kerberos_log
WHERE request_type = 'TGS'
  AND cipher = 'rc4-hmac'
  AND success = true
  AND ts > now() - INTERVAL '10 minutes'
GROUP BY orig_h, client
HAVING COUNT(DISTINCT service) >= 10;

Expected false positives: vulnerability scanners and inventory tools that touch many services, and old applications that still need RC4. Exclude them by source address after review.

AS-REP roasting, as Sigma-style YAML:

title: Kerberos TGT issued without pre-authentication
logsource:
  product: windows
  service: security
detection:
  selection:
    EventID: 4768
    PreAuthType: '0'
    Status: '0x0'
  condition: selection
falsepositives:
  - Accounts that are meant to have pre-authentication disabled. Fix those rather than tune them out.
level: high

Password spraying over Kerberos, as Sigma-style YAML:

title: Kerberos pre-authentication failures across many accounts
logsource:
  product: windows
  service: security
detection:
  selection:
    EventID: 4771
    Status: '0x18'
  condition: selection | count(TargetUserName) by IpAddress > 20
timeframe: 15m
falsepositives:
  - A misconfigured application cycling through stale credentials
level: medium

Stolen or forged TGT, as a network heuristic:

For each TGS-REQ (client C, user U, time T):
  if no AS-REQ for U from C succeeded between T minus the TGT lifetime and T,
  and C is not a known jump host or terminal server,
  then raise an alert: TGS without a matching AS.

Expected false positives: TGTs obtained from a domain controller your sensor cannot see, and long-lived sessions that span sensor restarts. Make sure the sensor covers every domain controller before trusting this rule.

Prevention and hardening

In order of impact:

  1. Give every service account a long random password, or move it to a Group Managed Service Account. This removes most of the value of Kerberoasting.
  2. Find and clear "Do not require Kerberos preauthentication" on every account, and alert when anyone sets it.
  3. Move to AES. Set msDS-SupportedEncryptionTypes to 0x18 on service accounts, reset passwords on accounts with no AES keys, then disable RC4 by policy after testing.
  4. Remove unconstrained delegation from everything except domain controllers. Mark privileged accounts as sensitive and add administrators to Protected Users.
  5. Set ms-DS-MachineAccountQuota to 0 and limit who can create computer accounts and write delegation attributes.
  6. Reset the krbtgt password twice on a regular schedule. Many organizations use 180 days. Wait at least the maximum ticket lifetime plus replication time between the two resets.
  7. Keep domain controllers fully patched and check that hardening updates are in enforcement mode, not only installed.
  8. Review AD CS certificate templates. Remove templates that let a requester supply another identity and also allow client authentication.
  9. Turn on Kerberos armoring (FAST) once all clients support it.
  10. Use a tiered administration model so privileged TGTs never sit in memory on ordinary workstations.
  11. Turn on Kerberos auditing on every domain controller and send the events to your SIEM.
  12. Allow port 88 to domain controllers only from networks that need it, and watch port 88 traffic from anywhere else.

Incident response and remediation

When compromise involving Kerberos is suspected:

  1. Scope. Build a timeline from Events 4768, 4769, and 4771 on all domain controllers, and from kerberos.log on your network sensors. Identify the accounts, hosts, and services involved.
  2. Contain the hosts. Isolate machines where tickets were stolen or tools ran, and purge their ticket caches (klist purge on Windows) or reboot them.
  3. Reset compromised accounts. For user and service accounts, set new long random passwords. For computer accounts used in silver tickets, reset the machine account password.
  4. If the krbtgt key may be exposed, reset krbtgt twice. A planned double reset waits between the two changes so normal sessions are not broken. In an active golden ticket incident, resetting twice in quick succession ends attacker access faster, at the cost of forcing everyone to log on again.
  5. Remove delegation abuse. Clear unexpected values in msDS-AllowedToActOnBehalfOfOtherIdentity and msDS-AllowedToDelegateTo, and delete computer accounts the attacker created.
  6. Revoke certificates. Certificates obtained through AD CS abuse keep working after password resets. Revoke them at the certificate authority and fix the template.
  7. Hunt for persistence. Check for new DCSync rights (Replicating Directory Changes permissions) on unexpected accounts, changes to AdminSDHolder, new SPNs added to privileged accounts, and pre-authentication flags flipped off.
  8. Watch for return. Keep the detections above at high priority for several weeks, since attackers often come back through access you have not found yet.

Real-world cases

  • CVE-2020-17049, Bronze Bit: a flaw in how the KDC checked the forwardable flag in S4U2Proxy let attackers abuse constrained delegation even for protected accounts. Microsoft fixed it in 2020 and later moved the fix to enforcement.
  • CVE-2021-42287, noPac: together with CVE-2021-42278, this let any domain user impersonate a domain controller. Public exploit code appeared in December 2021, shortly after the patches, and the technique became a common step in intrusions against unpatched domains.
  • CVE-2022-26923, Certifried: by changing a computer account's DNS host name, a domain user could get a certificate for a domain controller and then a TGT through PKINIT. The fix changed how domain controllers map certificates to accounts.
  • Mimikatz: the open-source tool that made golden tickets, silver tickets, and pass-the-ticket practical for both attackers and red teams. Its Kerberos features remain the reference implementation many detections are tested against.

Kerberos in the news

News stories tagged with Kerberos. This list updates on its own while the page is open.

    No news stories are tagged with this topic yet.

    Frequently asked questions

    Which ports does Kerberos use?

    The KDC uses port 88 over both UDP and TCP. Password changes use port 464. Windows switches to TCP for large messages, which is common for users in many groups. Application traffic carries Kerberos inside its own protocol, such as SMB on 445 or LDAP on 389.

    Is Kerberos traffic encrypted?

    The sensitive parts are. Tickets, authenticators, and session keys are encrypted. But user names, service names, the realm, encryption types, flags, and error codes travel in clear text, which is exactly what network detection uses.

    Why do so many domains still allow RC4?

    Compatibility. Old applications, old devices, and accounts whose passwords have not changed in years may lack AES support or AES keys. Find them with Event 4769 filtered on encryption type 0x17, fix them, then disable RC4 by policy.

    What is the difference between a golden ticket and a silver ticket?

    A golden ticket is a forged TGT made with the krbtgt key. It grants access to any service in the domain. A silver ticket is a forged service ticket made with one service account's key. It only works for that service, but it never touches a domain controller, which makes it harder to see.

    How often should the krbtgt password be reset?

    On a regular schedule, which many organizations set at 180 days, and immediately after any suspected compromise. Always reset it twice, because the domain accepts both the current and the previous key.

    Can Kerberos authentication be relayed like NTLM?

    Classic NTLM-style relay does not apply directly, because a service ticket only works for the service it was issued for. Kerberos relay techniques do exist against services that do not require signing or channel binding, such as LDAP without signing. Requiring LDAP signing and channel binding closes most of that path.

    References and further reading

    Found a technical error in this entry? Tell us and we will fix it.