Use this when protecting service accounts from Kerberoasting.
Kerberoasting
Kerberoasting requests service tickets for accounts with SPNs and cracks them offline to recover service account passwords. Use gMSAs or long random passwords, AES encryption and monitor unusual ticket requests.
1. Kerberoasting: request service tickets and crack the service account password offline.
2. Defend: gMSA, long passwords, AES only.
3. Detect RC4 TGS requests (4769, 0x17).
4. Honeypot SPN accounts.
5. Remove unused SPNs.
attacker → TGS request for SPN → offline cracking
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Common mistakes Narrow the fault
- Service accounts with RC4 and short passwords.
- No monitoring of 4769 with RC4 encryption type.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
- Any user can request service tickets for SPN accounts.
- Weak service passwords crack offline.
- gMSAs make Kerberoasting useless.
Get-ADUser -Filter {ServicePrincipalName -like '*'} -Properties ServicePrincipalName,msDS-SupportedEncryptionTypes— roastable accountsGet-WinEvent -FilterHashtable @{LogName='Security';Id=4769} | ? {$_.Properties[5].Value -eq '0x17'}— RC4 service ticket requests- Password length of SPN accounts — 25+ chars
ReferenceWhy it matters1 section · depth on demand
Detection and prevention
- Find exposed accounts: user accounts with SPNs.
- Use gMSAs, or passwords of 25+ random characters.
- Enforce AES for service accounts and disable RC4 where possible.
- Detect: event 4769 with ticket encryption 0x17 (RC4), or one user requesting many service tickets in a short time.
- Honey account with an SPN that nobody should use raises a high-confidence alert.
ReferenceHow it works2 sections · depth on demand
How the attack works
Any domain user can request a service ticket (TGS) for an account with an SPN. Part of the ticket is encrypted with the service account's password hash, so the attacker cracks it offline. RC4 tickets (etype 23) crack much faster than AES. Tools: Rubeus kerberoast, GetUserSPNs.py. Event 4769 with Ticket Encryption Type 0x17 is a strong signal.
In depth
Kerberoasting requests Kerberos service tickets for accounts with service principal names (SPNs). Part of each ticket is encrypted with the service account's password-derived key, so any domain user can request tickets and attempt to crack weak service account passwords offline.
Mitigation:
| Control | Effect |
|---|---|
| gMSA / dMSA | 120+ character random passwords, uncrackable |
| Long random passwords (25+ chars) for remaining accounts | Cracking infeasible |
| AES-only encryption types | Removes the faster RC4 path |
| Least privilege for service accounts | Limits impact if cracked |
| Remove unused SPNs | Fewer targets |
Detection: unusual volumes of TGS requests (event 4769) from one account, especially with RC4 encryption (type 0x17), or requests for many different SPNs in a short time. Honey SPNs on decoy accounts give high-confidence alerts.
ReferenceConfiguration & state1 section · depth on demand
Commands
Get-ADUser -Filter {ServicePrincipalName -like '*'} -Properties ServicePrincipalName,msDS-SupportedEncryptionTypes,PasswordLastSet
Set-ADUser svc-sql -Replace @{'msDS-SupportedEncryptionTypes'=24} # AES128+AES256
Documented example, not captured output. A honeypot account with an SPN and no real use gives a high-fidelity Kerberoasting alert (event 4769 for that account).
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Active Directory Security → Kerberoasting. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://learn.microsoft.com/en-us/windows/security/ · confidence 94%