A AD://SECURITY
Kerberos Service Ticket
cifs/fileserver.contoso.com
🛡
cname:  alice@CONTOSO.COM
realm:  CONTOSO.COM
flags:  FORWARDABLE, RENEWABLE, PRE-AUTH
enctype: aes256-cts-hmac-sha1-96 (18)
endtime: 2026-05-01 18:42:11Z
KDC
SIGNED

Kerberos in Active Directory, Visualized

Tickets, TGTs, the KDC, AS-REQ to TGS-REP, delegation, and every attack you've heard of (Kerberoasting, AS-REP roasting, Golden & Silver, S4U) — built up step by step with motion and diagrams.

↓ Scroll to begin
Module 01 · Foundations

What is Kerberos?

Kerberos is a network authentication protocol that lets a user prove who they are to a service without ever sending their password over the wire — using tickets handed out by a trusted third party. In Active Directory, every Domain Controller is that trusted party.

🔐

No passwords on the wire

Your password (or rather, a key derived from it) stays on your machine. Only encrypted blobs travel across the network.

🎟️

Tickets, not credentials

Once you've authenticated once, you carry a Ticket Granting Ticket (TGT) and use it to request short-lived service tickets — like an event wristband.

🔒

Mutual auth, by default

Both client and server can prove their identity to each other in the same exchange. No more "did I really connect to the real server?"

// the one-line mental model
ClientKDC: "I am Alice, here's proof. Give me a ticket."
KDCClient: "Verified. Here's a TGT — bring this back when you want a service ticket."
ClientKDC: "Got TGT. I want to talk to cifs/fileserver."
KDCClient: "Here's a service ticket for fileserver, encrypted to its key."
ClientService: "Hi, here's the ticket the KDC gave me."
Service: // decrypts ticket with its own key, sees Alice is verified, lets her in
___ ___ ___ / \ / \ / \ | @ @ | | @ @ | | @ @ | \_-_/ \_-_/ \_-_/ \________|________/ | | ___________ / \ / CERBERUS \ / guards the \ / gates \ /___________________\ three heads: client · KDC · service
Module 02 · Cast of characters

The three actors

Kerberos is named after the three-headed dog from Greek mythology — and the protocol has three roles to match. In Active Directory, the KDC role lives on every Domain Controller.

👤

Client (Principal)

The user or computer that wants to access something. Identified by a principal name like alice@CONTOSO.COM. Holds a long-term key derived from the user's password.
🛡

KDC (Key Distribution Center)

The trusted third party. Knows everyone's long-term keys. In AD: every Domain Controller. Has two sub-services: the AS (Authentication Service) and the TGS (Ticket Granting Service).
🏠

Service (Server)

What the client wants to access — a file share, SQL Server, web app, etc. Identified by a Service Principal Name (SPN) like cifs/fs01.contoso.com. Has its own long-term key.

The KDC's two halves

The AS handles initial authentication: takes your password proof and hands you a TGT.
The TGS handles ongoing requests: takes your TGT and hands you tickets for individual services. Both run in the same process on a Windows DC, but conceptually they're separate.

What's a "principal"?

Anything Kerberos can authenticate — a user, a computer, or a service. Each principal has a long-term secret (a hash, technically) that the KDC also knows. That shared secret is the foundation of every ticket exchange.

Module 03 · The math underneath

Symmetric, not asymmetric

Unlike TLS or AD certificates, classic Kerberos is built almost entirely on symmetric crypto: each principal shares a secret key with the KDC, and the KDC uses that as glue to introduce parties to each other. Modern Kerberos adds optional asymmetric extensions (PKINIT for smart cards), but the core flow is symmetric.

🔐 Symmetric (the default)

One key, used to both encrypt and decrypt. The KDC and the principal each hold the same key. Fast, but it means the KDC literally knows everyone's keys — protect that database.

Used for: every ticket, every authenticator, every session key in vanilla Kerberos.

🔑 Asymmetric (PKINIT)

Public/private key pairs — used for smart-card and certificate-based logon. The user proves possession of a private key (on a smart card, TPM, or virtual smart card) and the KDC validates the matching cert.

Used for: smart card logon, Windows Hello for Business, Azure AD-joined hybrid scenarios.

How your password becomes a key

Kerberos doesn't store or transmit passwords. It stores a key derived from the password through a one-way function. For modern AES enctypes, that derivation uses PBKDF2 with the realm and username as salt.

Input
password: "P@ssw0rd2026!"
salt: "CONTOSO.COMalice"
iterations: 4096

PBKDF2-SHA1
Output (long-term key)
7b 3f 9c d2 4e 81 a0 6f
5c 2b ee 91 47 c8 0a 3d
1f 6e 88 4b ...

This long-term key (and never the password itself) is what the workstation holds in memory and what the KDC has stored. Kerberos exchanges then use this key to encrypt the very first piece of evidence the user is who they claim to be.

Module 04 · The whole exchange

From login to file share, ticket by ticket

There are six messages in a complete Kerberos exchange. Step through them with the buttons below.

CLIENT alice's workstation holds: long-term key KDC (DC) AS + TGS holds: every key SERVICE cifs/fs01 holds: its service key 1. AS-REQ — pre-auth + identity 2. AS-REP — TGT + session key 🎟️ TGT cached good for ~10h 3. TGS-REQ — TGT + SPN requested 4. TGS-REP — service ticket + key 5. AP-REQ — service ticket + auth 6. AP-REP — mutual auth complete ✓ alice is now authenticated to fileserver — encrypted SMB session begins
Step 1 — AS-REQ. Alice logs in. Her workstation sends an AS-REQ to the KDC saying "I am alice@CONTOSO.COM and I want to talk to krbtgt/CONTOSO.COM." It includes a pre-authentication blob: the current timestamp encrypted with Alice's long-term key. If she typed the wrong password, this blob won't decrypt and the KDC rejects her.
Module 05 · What's actually inside

Ticket anatomy

A Kerberos ticket has two parts: a section the service can read, and a section only the client can read. Same blob, two different decryption keys. This split is the core trick that lets a third party introduce two strangers.

🔒 Encrypted to the SERVICE's key

flags: FORWARDABLE, RENEWABLE, PRE_AUTH
key: <session key for client↔service>
cname: alice@CONTOSO.COM
crealm: CONTOSO.COM
authtime: 2026-05-01 08:42:11
starttime: 2026-05-01 08:42:11
endtime: 2026-05-01 18:42:11
renew-till: 2026-05-08 08:42:11
PAC: <Privilege Attribute Certificate>
user SID, group SIDs, claims…
Service decrypts this with its own long-term key, then trusts whatever the KDC put inside — including the group memberships in the PAC. That's how the file server knows Alice is in "Finance-RW" without ever asking AD itself.

🔑 Encrypted to the CLIENT's key

key: <same session key as on the left>
last-req: 2026-05-01 08:42:11
nonce: 0x4e1f9c2a
key-expiration: 2026-05-15
flags: (mirror of service's flags)
authtime: 2026-05-01 08:42:11
endtime: 2026-05-01 18:42:11
srealm: CONTOSO.COM
sname: cifs/fs01.contoso.com
Client decrypts this with the long-term key derived from her password — that's how she pulls out the session key. She then uses that same session key to build an authenticator that proves possession.

What is the PAC?

The Privilege Attribute Certificate is a Microsoft extension stuffed into every AD ticket. It carries the user's SID, all of their group SIDs, and other authorization data — signed by the KDC. The service trusts it without re-querying AD on every request. PAC vulnerabilities (sAMAccountName spoofing, CVE-2021-42278/42287) live here.

What is the authenticator?

A small structure containing the client's name and the current time, encrypted with the session key. The service decrypts it using the session key (which was inside the ticket) and checks that the timestamp is within ~5 minutes. If it is, the client has proven they actually possess the session key — not just a stolen ticket from yesterday.

Module 06 · Hands-on

Try it: decode a service ticket

This is what klist, Rubeus describe, or Wireshark with a session key would show you. Edit the fields and see the decoded ticket update.

⚙️ Build a ticket

These are the fields a TGS would populate.

📋 Decoded output


    
Module 07 · Encryption types

EncTypes: the good, the legacy, and the catastrophic

Kerberos supports a menu of cipher suites. Choosing the wrong one (or letting the KDC fall back to it) is one of the most common AD weaknesses pentesters find.

EncType (etype) Algorithm Status Notes
1, 3 — DES-CBC
DES + CRC / MD5 Disabled Removed in modern Windows. If you find it enabled, that itself is a finding.
23 — RC4-HMAC
RC4 + HMAC-MD5 Deprecated Key is the user's NTLM hash. Tickets crackable offline (Kerberoasting). Disable wherever possible.
17 — AES128-CTS-HMAC-SHA1
AES-128 CTS + SHA-1 Acceptable Modern default. Key derived via PBKDF2.
18 — AES256-CTS-HMAC-SHA1
AES-256 CTS + SHA-1 Preferred Strongest widely-supported option. Should be the only one used in modern AD.
19, 20 — AES-SHA2
AES + SHA-256/384 Emerging Added in newer Windows / MIT Kerberos. Not yet ubiquitous in AD.

Why RC4 is the attacker's best friend

When a service ticket is encrypted with RC4-HMAC, the encryption key is the service account's NTLM hash. Anyone with a valid TGT can request that ticket, take the encrypted blob offline, and brute-force the password by guessing & encrypting candidate hashes until one matches. That's Kerberoasting in one paragraph.

How to enforce AES

On user / computer / gMSA accounts, set msDS-SupportedEncryptionTypes to allow only 0x18 (AES128 + AES256) and not 0x17 (RC4). Domain-wide, set the GPO "Network security: Configure encryption types allowed for Kerberos". Watch for breakage with old Linux/Java clients first.

Module 08 · Delegation

Delegation: when services impersonate you

Sometimes a frontend service (a web app, say) needs to access a backend service (SQL Server) as the user, not as itself. Kerberos handles this through three flavors of delegation — each with very different attack surface.

👤

User

alice@contoso

🌐

Web App

trusted for delegation

💾

SQL Backend

sees alice, not webapp

⚠️ Unconstrained

The frontend gets a copy of the user's TGT and can request tickets for anything, anywhere, on the user's behalf. If a Domain Admin ever connects to a server with this flag, their TGT sits in that server's memory — ripe for theft. Should not exist in 2026 networks.

Constrained (S4U2Proxy)

The frontend is told which services it can delegate to (a list on its AD object). Better, but still trust-based: an attacker who controls the frontend account can hop to anything in the allowed list as any user.

Resource-Based (RBCD)

The backend says "I'll accept delegation from these accounts" — flipping who's in control. Configured via msDS-AllowedToActOnBehalfOfOtherIdentity. Still abusable: if you can write to that attribute on a target, you can pivot.

// S4U2Self + S4U2Proxy — the actual flow for constrained delegation
1. User authenticates to webapp (any auth method — can even be NTLM).
2. Webapp wants to call sql/backend as the user.
3. S4U2Self: webapp asks the KDC for a service ticket to itself, in the user's name. KDC returns one (used as proof of identity).
4. S4U2Proxy: webapp hands that ticket back to the KDC and asks for a ticket to sql/backend, in the user's name.
5. KDC checks webapp's msDS-AllowedToDelegateTo list, sees sql/backend, issues the ticket.
6. Webapp uses that ticket to talk to SQL as the user. SQL sees the user's PAC, not webapp's.
Module 09 · Offensive perspective

The greatest hits: Kerberos attacks

If you've spent time on Hack The Box, Proving Grounds, or pentest engagements against AD, you've met these. Every one of them exploits a specific design choice in the protocol or a misconfiguration on top of it.

Credential extraction

AS-REP Roasting

Some accounts have "Do not require Kerberos pre-authentication" set. Without pre-auth, anyone can ask the KDC for an AS-REP for that account — and the AS-REP contains a blob encrypted with the user's password-derived key.

GetNPUsers.py contoso.com/ -usersfile users.txt -no-pass
Defense: never set DONT_REQUIRE_PREAUTH. Audit accounts where it's set. Use a long passphrase if it's truly required (rare).
Credential extraction

Kerberoasting

Any authenticated user can request service tickets for any SPN in the domain. If the service runs as a user account (not a managed service account), the ticket is encrypted with that account's password-derived key — crackable offline, especially if RC4 is allowed.

GetUserSPNs.py contoso.com/alice -request
hashcat -m 13100 hashes.txt rockyou.txt
Defense: use Group Managed Service Accounts (gMSA) with auto-rotated 240-byte passwords. Disable RC4. Audit accounts with SPNs that aren't gMSAs.
Forged ticket

Golden Ticket

If you have the krbtgt account's hash (typically from a DC compromise), you can forge a TGT for any user, with any group memberships, valid for any duration. Total domain compromise. Persistence mechanism par excellence.

mimikatz # kerberos::golden /user:fake /domain:contoso.com /sid:S-1-5-21-... /krbtgt:HASH /id:500 /ptt
Defense: rotate the krbtgt password twice, 24h apart, after any DC compromise (and on a schedule). Detect: anomalous TGT lifetimes, TGTs without a preceding AS-REQ, unusual SIDs in PAC.
Forged ticket

Silver Ticket

Same idea as Golden, but forged with a service account's hash — producing a TGS for that one service. Stealthier (no KDC interaction) but limited in scope. Often the first step after Kerberoasting cracks an account.

mimikatz # kerberos::golden /user:fake /domain:contoso.com /sid:... /target:sql01.contoso.com /service:MSSQLSvc /rc4:HASH /ptt
Defense: enforce PAC validation (DCs must be reachable to verify), monitor for service tickets that never had a corresponding TGS-REQ, prefer gMSAs.
Delegation abuse

Unconstrained Delegation Capture

Compromise a server with unconstrained delegation, then coerce a privileged account to authenticate to it (PrinterBug, PetitPotam). The privileged user's TGT lands in your memory — pass-the-ticket onward.

Rubeus monitor /interval:5
SpoolSample.exe DC01 victim01
Defense: remove unconstrained delegation entirely (use RBCD or constrained instead). Add sensitive accounts to "Protected Users" group. Patch coercion bugs.
Delegation abuse

RBCD Abuse

If you have write access to a target computer's msDS-AllowedToActOnBehalfOfOtherIdentity attribute, you can configure your own controlled account as a "trusted delegate" and then S4U2Self / S4U2Proxy your way to arbitrary user impersonation on that target.

Set-DomainObject -Identity TARGET$ -Set @{'msDS-AllowedToActOnBehalfOfOtherIdentity'=$SD}
Rubeus s4u /user:attacker$ /rc4:HASH /impersonateuser:Administrator /msdsspn:cifs/target /ptt
Defense: tightly control who can write computer object attributes. Audit changes to msDS-AllowedToActOnBehalfOfOtherIdentity. Remove "Authenticated Users" from the default machine quota (ms-DS-MachineAccountQuota = 0).
Lateral movement

Pass-the-Ticket (PtT)

Tickets are just files (or LSA cache entries). Dump them from a compromised host with mimikatz / Rubeus, copy them to your attacker box, inject them into your session, and you're authenticated as the original user — no password needed.

Rubeus dump /service:krbtgt
Rubeus ptt /ticket:doIFh...
Defense: Credential Guard, Protected Users group (no NTLM/RC4, shorter ticket lifetimes), tier-0 admin segregation, monitor LSASS access.
Forgery via PKI

Shadow Credentials & ESC1–ESC15

If AD CS is misconfigured, you can pivot from low-priv to TGT-as-anyone via PKINIT. Certify and Certipy enumerate the well-known ESC paths — ESC1 (vulnerable template), ESC8 (NTLM relay to web enrollment), and others.

certipy find -u alice -p Pass -dc-ip 10.0.0.10
certipy req -u alice -ca CONTOSO-CA -template VulnTpl -upn administrator
Defense: harden AD CS templates (disable ENROLLEE_SUPPLIES_SUBJECT, require manager approval, restrict enrollment ACLs). Apply CVE-2022-26923 patches (strong cert mapping). Audit with Certify / Locksmith.
Module 10 · Blue team

Defending the KDC

Kerberos in AD is a 30-year-old protocol carrying every authentication in the enterprise. You can't replace it overnight, but you can shrink the attack surface dramatically.

Disable RC4 everywhere

Set the "Configure encryption types allowed for Kerberos" GPO to allow only AES128 + AES256 + Future. Set msDS-SupportedEncryptionTypes = 0x18 on accounts. Hunt for 4769 events with TicketEncryptionType=0x17.

Use Group Managed Service Accounts

gMSAs have 240-byte randomly-generated passwords that the KDC rotates automatically every 30 days. They're the cure for Kerberoasting. Convert standard service accounts wherever the application supports it.

Rotate krbtgt regularly

The krbtgt account signs every TGT — if its hash leaks, every TGT in your domain forever is forgeable. Rotate the password (twice, 24h apart) on a schedule and immediately after any tier-0 incident.

Protected Users group

Members get: no NTLM, no RC4, no DES, no unconstrained delegation as a target, 4-hour TGT lifetime (no renew), no cached creds. The right place for tier-0 admins.

Eliminate unconstrained delegation

Run Get-ADComputer -LDAPFilter "(userAccountControl:1.2.840.113556.1.4.803:=524288)" — anything that comes back is a coercion target. Replace with constrained or RBCD.

Tier the admins

Tier-0 (DCs, AD CS, ADFS) admins log on only to tier-0. They never RDP into a workstation, never read email on their admin account. This single control would have prevented most Golden Ticket attacks.

High-value events to monitor

Event ID What it means Why you care
4768 TGT requested (AS-REQ) RC4 etype = AS-REP roasting target. No pre-auth = misconfigured account.
4769 Service ticket requested (TGS-REQ) RC4 etype on a non-machine SPN = Kerberoasting attempt. Anomalous SPN = recon.
4770 TGT renewed Tickets renewed beyond max lifetime = forgery.
4771 Pre-auth failure Spray attacks, bad-passwords-from-script.
4624 / 4634 Logon / logoff LogonType=3 from unexpected hosts, especially with Authentication Package=Kerberos.
4742 Computer account changed Sudden delegation flag changes = RBCD abuse.
Module 11 · Where you'll see it

What Kerberos actually does in your AD

If you've ever logged into a Windows machine joined to a domain, you've already used Kerberos. Here's where else it shows up.

👤 Interactive logon

The first thing winlogon does after you press Ctrl+Alt+Del — an AS-REQ to the nearest DC.

💾 SMB / file shares

Connecting to \\fileserver\share triggers a TGS-REQ for cifs/fileserver.

📁 SQL Server

Trusted/Integrated SQL connections use Kerberos for MSSQLSvc/host:port SPNs.

🔗 LDAP / LDAPS

Domain joins, Group Policy fetch, AD admin tools — all over Kerberos-bound LDAP.

📧 Exchange / Outlook

Outlook authenticates to Exchange via Kerberos when on the corporate network (Modern Auth elsewhere).

📱 RDP

NLA-protected RDP uses Kerberos to pre-authenticate before the desktop session is ever created.

🌐 Internal HTTPS / Web SSO

IIS & reverse proxies use SPNEGO/Kerberos for transparent SSO to intranet apps.

🔐 Smart card logon

PKINIT extension — the user's smart card cert validates instead of a password during AS-REQ.

🧾 Cross-forest trusts

Tickets get re-signed by referral KDCs as you cross trust boundaries — the basis of multi-domain SSO.

Quick reference

Glossary

Terms you'll see in MS-KILE, klist output, Wireshark dissectors, and incident reports.

KDC
Key Distribution Center — the Kerberos server. In AD, every Domain Controller.
AS
Authentication Service — the part of the KDC that issues TGTs.
TGS
Ticket Granting Service — the part of the KDC that issues service tickets.
TGT
Ticket Granting Ticket — your "I'm authenticated" wristband, encrypted to krbtgt.
ST
Service Ticket — a per-service ticket issued by the TGS, encrypted to that service.
SPN
Service Principal Name — how a service is identified, e.g. http/web01.contoso.com.
UPN
User Principal Name — how a user is identified, e.g. alice@contoso.com.
Realm
The Kerberos word for "domain". Conventionally written in UPPERCASE.
krbtgt
Special account whose key signs every TGT. Compromise = total domain compromise.
PAC
Privilege Attribute Certificate — MS extension carrying SIDs and group memberships in the ticket.
PKINIT
Public-Key extension for Kerberos — lets a cert authenticate the user (smart card logon).
S4U2Self
"Service for User to Self" — a service asks the KDC for a ticket to itself, in a user's name.
S4U2Proxy
"Service for User to Proxy" — a service uses an S4U2Self ticket to get a ticket to another service.
RBCD
Resource-Based Constrained Delegation — backend chooses which accounts may delegate to it.
etype / enctype
Encryption type — RC4 (23), AES128 (17), AES256 (18) are the ones you'll see.
Pre-authentication
Encrypted timestamp sent in AS-REQ to prove the user knows their password before the KDC replies.
Authenticator
Small encrypted blob the client builds to prove possession of the ticket's session key.
gMSA
Group Managed Service Account — AD-managed service account with auto-rotated 240-byte password.
Mimikatz / Rubeus
Industry-standard tools (offensive & defensive) for inspecting and abusing Kerberos.
Forwardable / Renewable
Ticket flags controlling whether a ticket can be passed on or extended past its lifetime.
Skew
Allowable clock difference (default 5 min) between client and KDC. Bigger skew = replay window.