Kerberoasting and Golden Ticket Attacks
Learn how Kerberoasting extracts crackable service ticket hashes offline and how Golden Ticket attacks grant unlimited Kerberos access using a compromised KRBTGT hash.
Kerberoasting and Golden Ticket Attacks is a free Cloud & IT Cert Prep lesson on CoddyKit — lesson 3 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the Cloud & IT Cert Prep learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.
Kerberos Service Ticket Architecture
To understand Kerberoasting and Golden Ticket attacks, you need a clear picture of Kerberos service ticket issuance. When a client wants to access a service (e.g., an SQL server), it presents its Ticket Granting Ticket (TGT) to the Domain Controller's Ticket Granting Service (TGS). The TGS issues a Service Ticket encrypted with the service account's password hash. The client presents this ticket to the service, which decrypts it with its own hash to verify authenticity. This design means service tickets are encrypted with the target service's credential — a critical detail that Kerberoasting exploits.
Kerberoasting: Offline Password Cracking
Kerberoasting is an attack that exploits the fact that any authenticated domain user can request a Kerberos service ticket for any service registered with an SPN (Service Principal Name). The attacker requests service tickets for accounts with SPNs, captures the encrypted ticket blobs, and then attempts to crack the service account password offline — without any further interaction with Active Directory or any account lockout risk. Service accounts often have weak passwords, old passwords that predate modern complexity requirements, or passwords that never expire, making them highly vulnerable to offline cracking.
# Step 1: Find accounts with SPNs (attack setup)
Get-ADUser -Filter {ServicePrincipalName -ne '$null'} -Properties ServicePrincipalName
# Step 2: Request service tickets (using Impacket GetUserSPNs.py)
# GetUserSPNs.py domain/user:password -dc-ip 192.168.1.1 -request
# Outputs $krb5tgs$ hashes ready for cracking with HashcatCracking Kerberos Tickets Offline
The captured service ticket hashes from Kerberoasting are encrypted with RC4-HMAC (NTLM hash) by default (for compatibility), which is faster to crack than AES-256 Kerberos tickets. An attacker feeds the captured $krb5tgs$23$ hashes into Hashcat or John the Ripper for offline dictionary and brute-force attacks. Common wordlists like RockYou plus rule sets can crack most weak service account passwords in minutes to hours on consumer GPU hardware. Once cracked, the attacker has the service account's plaintext password, which they can use to authenticate directly.
# Crack Kerberoasted hashes with Hashcat
hashcat -m 13100 kerberoast_hashes.txt rockyou.txt \
-r best64.rule \
--force
# Mode 13100 = Kerberos 5, etype 23 (RC4-HMAC service ticket)
# Mode 19600 = Kerberos 5, etype 17 (AES-128) - slower
# Mode 19700 = Kerberos 5, etype 18 (AES-256) - slowestDefending Against Kerberoasting
Kerberoasting mitigations target three areas: password strength — service accounts should have long, random passwords (25+ characters) that resist offline cracking even with GPU clusters; Group Managed Service Accounts (gMSA) — Windows automatically manages gMSA passwords (240-character random values rotated every 30 days), making Kerberoasting computationally infeasible; AES-only encryption — configure service accounts to require AES-256 tickets (msDS-SupportedEncryptionTypes), which crack exponentially slower than RC4; and detection — alert on unusual volume of TGS requests (Event ID 4769) for service accounts from non-standard workstations.
# Create a Group Managed Service Account (gMSA) - Kerberoasting immune
New-ADServiceAccount -Name 'svc-sql' \
-DNSHostName 'sqlserver.domain.com' \
-PrincipalsAllowedToRetrieveManagedPassword 'SQLServers'
# Install on the SQL server
Install-ADServiceAccount -Identity 'svc-sql'The KRBTGT Account: Guardian of Kerberos
The KRBTGT account is a special built-in Active Directory account whose password hash is used to sign and encrypt all Kerberos TGTs in the domain. The domain controller uses the KRBTGT hash to create TGTs and to validate incoming TGTs. This makes the KRBTGT hash the single most valuable credential in an Active Directory environment — anyone who possesses it can create arbitrary, fully valid Kerberos tickets for any user, including non-existent users, with any group membership, for any duration. The KRBTGT password has typically never been changed in many organizations, because the change process requires careful coordination.
# Check when KRBTGT password was last changed
Get-ADUser -Identity KRBTGT -Properties PasswordLastSet |
Select-Object Name, PasswordLastSet
# If PasswordLastSet is years ago, the domain is vulnerable to persistent Golden TicketsGolden Ticket Attack: Forging TGTs
A Golden Ticket attack creates a forged, fully valid Kerberos TGT using the compromised KRBTGT account's password hash. The attacker uses Mimikatz's kerberos::golden command to generate a TGT for any user (often a fake Administrator-like account) with any group memberships (typically including Domain Admins), with any validity period (commonly set to 10 years). This forged ticket is indistinguishable from a legitimate ticket to the domain controller, because it is cryptographically valid — it was signed with the real KRBTGT hash. A Golden Ticket provides complete, persistent, unlimited control over the domain.
# Mimikatz Golden Ticket creation (attacker perspective - for defender awareness)
# Requires: domain name, domain SID, KRBTGT hash, target username
# mimikatz# kerberos::golden \
# /domain:corp.example.com \
# /sid:S-1-5-21-1234567890-1234567890-1234567890 \
# /krbtgt:aabbccddeeff00112233445566778899 \
# /user:GoldenTicketUser \
# /groups:512,519 \
# /ticket:golden.kirbiWhy Golden Tickets Persist So Long
Golden Tickets are particularly dangerous because they persist even after the original attack is discovered and cleaned up. Changing the targeted user's password does nothing — the ticket was forged, not based on the user's real credentials. The only remediation is changing the KRBTGT password twice (once to invalidate existing tickets, once more because there are two KRBTGT keys at any time for rolling purposes). However, KRBTGT password changes require careful coordination: if changed improperly, it breaks Kerberos authentication domain-wide. Many organizations are reluctant to perform this remediation, leaving Golden Tickets valid indefinitely.
# KRBTGT password reset procedure (Microsoft New-KrbtgtKeys.ps1)
# Step 1: Reset KRBTGT password on primary DC
# Step 2: Wait for AD replication (typically 24-48 hours)
# Step 3: Reset KRBTGT password again to invalidate all old tickets
# Step 4: Verify Kerberos authentication working across all sites
# This invalidates ALL existing Kerberos tickets domain-wideSilver Ticket Attack: Service-Specific Forgery
A Silver Ticket is similar to a Golden Ticket but more limited in scope. It uses the target service account's hash (instead of KRBTGT) to forge a service ticket for that specific service only. For example, with an SQL server service account hash, an attacker can forge a service ticket granting them any access to that SQL server. Silver Tickets are harder to detect than Golden Tickets because they bypass the domain controller entirely — the forged ticket goes directly from attacker to service, with no KDC contact. Mitigation requires protecting service account hashes and monitoring for anomalous access patterns on sensitive services.
Obtaining the KRBTGT Hash: DCSync Attack
Attackers obtain the KRBTGT hash using the DCSync attack, which abuses Active Directory's legitimate domain replication protocol. The Directory Replication Service (DRS) allows domain controllers to sync AD data, including password hashes, between each other. An attacker with DCSync privileges (typically Domain Admin, Enterprise Admin, or any account with Replicating Directory Changes All permissions) can impersonate a domain controller and request hash replication for any account. Mimikatz's lsadump::dcsync command performs this attack entirely over the network — no code needs to run on the DC itself.
# DCSync to extract KRBTGT hash (attacker perspective)
# mimikatz# lsadump::dcsync /domain:corp.example.com /user:KRBTGT
# Output includes:
# Hash NTLM: <krbtgt NT hash>
# Hash SHA1: <krbtgt SHA1 hash>
# Key: <AES-256 key>
# Detection: Event ID 4662 from a non-DC source (replication event from workstation = suspicious)Detecting Golden and Silver Ticket Activity
Detecting Golden Ticket usage is challenging but possible by looking for anomalies in Kerberos ticket metadata: tickets with unusually long lifetimes (real tickets have 10-hour TGT lifetime; Golden Tickets are often set to 10 years); Event ID 4769 where the ticket encryption type is RC4 (0x17) when AES-256 (0x12) is the domain default; account names in tickets that do not exist in AD; and missing Event ID 4768 (TGT request) before Event ID 4769 (service ticket request) — Golden Tickets skip the TGT request phase since the TGT itself is forged. A Microsoft Sentinel or Defender for Identity rule can flag these patterns automatically.
# Detection: Golden Ticket indicator - no corresponding TGT request
# Normal flow: Event 4768 (TGT requested) -> Event 4769 (service ticket)
# Golden Ticket: Event 4769 WITHOUT preceding 4768 from same host
# Also alert on: TGT encryption type = RC4 in AES-only environments
# Splunk: index=windows EventCode=4769 TicketEncryptionType=0x17
# NOT [expected legacy systems]Preventing Kerberos-Based Attacks
A layered defense against Kerberos attacks: use gMSA for all service accounts to make Kerberoasting infeasible; enable AES-only encryption for all accounts, especially high-value service accounts, to maximize cracking difficulty; restrict DCSync privileges — audit accounts with replication permissions and remove any that should not have them; enable Microsoft Defender for Identity (formerly ATA) which provides Kerberos-aware threat detection including Golden Ticket, Kerberoasting, and DCSync alerts in real time; and implement a tiered administration model so that even if a Tier 2 account is compromised, it cannot be used to reach DC-level credentials.
# Audit DCSync-capable accounts (these should be very few)
Get-ADUser -Filter * -Properties 'msDS-AllowedToDelegateTo' |
Where {$_.DistinguishedName -notlike '*Domain Controllers*'}
# Check replication permission holders using PowerView:
# Get-ObjectAcl -DistinguishedName 'DC=domain,DC=com' \
# -ResolveGUIDs | \
# Where {$_.ActiveDirectoryRights -like '*ExtendedRight*'}Quick Check
Test your understanding of CompTIA Security+ (SY0-701) concepts from this lesson.
Lesson Recap
In this lesson you learned: Kerberoasting requests service tickets for SPN-registered accounts and cracks them offline — defeated by gMSA, strong passwords, and AES-only encryption, Golden Ticket attacks use the KRBTGT hash to forge unlimited TGTs providing persistent domain control that persists until the KRBTGT password is reset twice, and DCSync attacks replicate the KRBTGT hash over the network without running code on the DC — requiring strict DCSync privilege auditing. Next up we explore the MITRE ATT&CK framework for mapping attacker techniques to defenses.
Frequently asked questions
Is the “Kerberoasting and Golden Ticket Attacks” lesson free?
Yes — the full text of “Kerberoasting and Golden Ticket Attacks” is free to read here on the web, and the Cloud & IT Cert Prep course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the Cloud & IT Cert Prep course, upgrade to CoddyKit PRO.
What will I learn in “Kerberoasting and Golden Ticket Attacks”?
Learn how Kerberoasting extracts crackable service ticket hashes offline and how Golden Ticket attacks grant unlimited Kerberos access using a compromised KRBTGT hash. You practise Cloud & IT Cert Prep with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.
Do I need any experience to start Cloud & IT Cert Prep?
No prior experience is required. Cloud & IT Cert Prep on CoddyKit is structured for beginners through advanced learners; this is — lesson 3 of 4, so you can start here or from the beginning and move at your own pace.
How long does the “Kerberoasting and Golden Ticket Attacks” lesson take?
Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.
Can I write and run code in this Cloud & IT Cert Prep lesson?
Yes. Every Cloud & IT Cert Prep lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.
All lessons in this course
- APT Lifecycle: Initial Access to Persistence
- Lateral Movement: Pass-the-Hash and Pass-the-Ticket
- Kerberoasting and Golden Ticket Attacks
- MITRE ATT&CK Framework for Detection and Response