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.
# In case secretsdump.py was used remotely
$ sudo python krbrelayx.py -aesKey 00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff
# In case secretsdump.py was used locally
$ sudo python krbrelayx.py --krbhexpass <PLAIN_PASSWORD_HEX> --krbsalt MEGACORP.LOCALhostsrv01.megacorp.local