Skip to main content
Delegation solves the double-hop problem: when a user authenticates to Service A via Kerberos, Service A cannot forward that Kerberos identity to Service B on its own. The TGT never left the client. Delegation was designed to fix this, and each type has a different trust model and attack surface.

S4U Extensions

Two Kerberos extensions underpin all constrained delegation abuse:
S4U2Self and S4U2Proxy authentication flow diagram

S4U2Self and S4U2Proxy flow: how a service obtains a forwardable ticket on behalf of a user and uses it to access a third service

S4U2Self (Service-for-User-to-Self): Allows a service to request a forwardable service ticket to itself on behalf of any user, without that user’s password or prior authentication. Requires the account to have an SPN and TRUSTED_TO_AUTH_FOR_DELEGATION set.
S4U2Proxy (Service-for-User-to-Proxy): Allows a service to use a forwardable TGS (from S4U2Self or a real user auth) to request a ticket to a third service. On classic constrained delegation, the KDC validates the target SPN against msDS-AllowedToDelegateTo. On RBCD, it validates the source against msDS-AllowedToActOnBehalfOfOtherIdentity on the target.
Windows AD delegation tab showing unconstrained and constrained delegation options

How unconstrained and constrained delegation appear in Active Directory Users and Computers (Delegation tab)

userAccountControl Bitmask

Every AD object has a userAccountControl bitmask controlling account behaviour. Delegation-relevant flags:

SeEnableDelegationPrivilege

Normally only Domain Admins can set delegation flags. This privilege grants that ability to non-admin accounts. If a low-priv user has it, they can configure delegation on any account they control without DA — then immediately exploit it.

Unconstrained Delegation

Unconstrained delegation flow

Unconstrained delegation: the KDC embeds the user's full TGT in the service ticket. Service A extracts and caches it, then can impersonate the user against anything.

The service can impersonate the user against any service in the domain. Set via the TRUSTED_FOR_DELEGATION flag on the account. When a user authenticates to an unconstrained delegation host, the KDC embeds their full TGT in the service ticket. The host extracts and caches it in LSASS. Attack goal: coerce a privileged account (usually the DC machine account) into authenticating to the compromised host, extract its TGT, then DCSync. Requirements:
  • Compromised account with TRUSTED_FOR_DELEGATION set (a computer or service account)
  • Account has an SPN (machine accounts always do)
  • DNS write access to register an A record for your attacker listener
  • Ability to coerce outbound auth from a privileged account (PetitPotam, printerbug, etc.)
Accounts in the Protected Users group and accounts flagged sensitive and cannot be delegated have their TGTs excluded. Exception: the native Administrator (RID 500) bypasses this even if added to Protected Users.

Enumeration

Exploitation (krbrelayx)

The most reliable approach from Linux. You add an SPN to the compromised account pointing at your attacker host, register a DNS record for it, then coerce the DC to authenticate. krbrelayx captures the incoming AP-REQ and extracts the embedded TGT.

Exploitation (Rubeus, Windows)

Cleanup


Constrained Delegation

Constrained delegation flow

Constrained delegation: Service A can only impersonate users to the specific SPNs listed in msDS-AllowedToDelegateTo. With protocol transition (T2A4D), it can also use S4U2Self to get a forwardable ticket for any user without their password.

The account has msDS-AllowedToDelegateTo set to a specific list of SPNs it can delegate to. There are two sub-variants depending on whether protocol transition is enabled. Requirements:
  • Controlled account with TRUSTED_TO_AUTH_FOR_DELEGATION set — enables S4U2Self, without it the impersonation ticket cannot be generated
  • msDS-AllowedToDelegateTo populated with a valid SPN — the SPN must be registered in AD, the KDC rejects S4U2Proxy if it can’t find the target account
  • Valid credentials for the delegating account (password, hash, or TGT) — needed to request the initial TGT to kick off the chain
  • Without protocol transition: need a controlled SPN account to generate a forwardable ticket via RBCD first, then feed it into S4U2Proxy

Enumeration

With Protocol Transition (T2A4D flag set)

TRUSTED_TO_AUTH_FOR_DELEGATION is set on the account. The service can call S4U2Self to obtain a forwardable ticket for any user without that user authenticating first, then feed it into S4U2Proxy.

Without Protocol Transition

S4U2Self cannot produce a forwardable ticket on its own. Workaround: configure RBCD from the constrained delegation account to an attacker-controlled account, use that RBCD path to get a forwardable ticket, then feed it back into S4U2Proxy.

altservice: SPN Substitution

If delegation rights exist to a low-value SPN (e.g., time/target), substitute it for a useful one. The KDC only checks the PAC at ticket-use time, not whether the SPN matches the allowed list.

RBCD (Resource-Based Constrained Delegation)

RBCD flow

RBCD inverts the trust model: the target resource controls who can delegate to it via msDS-AllowedToActOnBehalfOfOtherIdentity. No Domain Admin needed to configure it — write access on the target object is enough.

Instead of the source account controlling where it can delegate, the target resource defines which accounts it trusts to impersonate users to it. Set via msDS-AllowedToActOnBehalfOfOtherIdentity on the target. Requires only write access to that attribute — no Domain Admin. Requirements:
  • Write access on the target object’s msDS-AllowedToActOnBehalfOfOtherIdentity (GenericAll, GenericWrite, WriteProperty, or WriteDACL)
  • A controlled account with an SPN: machine account (MachineAccountQuota > 0) or existing user/computer with an SPN
  • If MachineAccountQuota = 0: use an existing SPN account or the SPN-less U2U path below
  • DC functional level: Windows Server 2012+

Enumeration

Standard Attack Chain

SPN-less User (MachineAccountQuota = 0)

When you can’t create a machine account and have no existing SPN account, use a sacrificial user account via U2U (User-to-User authentication). This overwrites the account’s NT hash, so it becomes unusable for normal auth afterwards — restore it immediately.

Via NTLM Relay

If you can relay an incoming NTLM auth from a privileged account, write RBCD directly during the relay without needing separate write access.

Unconstrained vs Constrained


Protections

References

S4U2Pwnage

harmj0y’s deep-dive into S4U2Self and S4U2Proxy abuse, the original research behind most constrained delegation and RBCD attack chains

The Most Dangerous User Right You've Never Heard Of

harmj0y on SeEnableDelegationPrivilege: why it matters, how to find it, and what an attacker can do with it

Kerberos Delegations - The Hacker Recipes

Comprehensive delegation reference covering unconstrained, constrained, and RBCD with attack chains and tooling