Skip to content

Lesson 7 of 13 · 18m

Delegation Abuse: The Feature That Forwards Your TGT

Unconstrained, constrained, and resource-based constrained delegation — what each actually forwards and how attackers turn each into impersonation.

Delegation exists so a front-end service can act as the user behind it — the IIS app that reaches SQL as the caller, the print server that reaches the file share. The feature works by forwarding proof of the user's identity downstream. Every delegation variant forwards a different proof, and each is a distinct impersonation primitive for an attacker who controls the delegated host.

Unconstrained delegation: the TGT lands in LSASS

Set TRUSTED_FOR_DELEGATION (bit 0x80000) on a computer or service account and the KDC embeds a copy of the user's TGT inside the service ticket sent to that host. The host stores it in LSASS. From that moment, anyone who can dump LSASS on that host — local admin via Mimikatz sekurlsa::tickets — has the TGT of every user who authenticated, including the DA who logged in once to "check something."

The kill chain: compromise an unconstrained host → trigger printer bug against a DC → DC's machine account TGT arrives → DCSync. This exact pattern is in SpecterOps' "Another Word on Delegation" and was the classic 2018–2021 escalation in engagements. Find unconstrained hosts with:

Get-ADComputer -Filter {TrustedForDelegation -eq $true}

DCs legitimately have the bit; anything else is a finding. The wrong mental model: "delegation is a service-account permission." It is a promise that the host will hold user TGTs — the host becomes a credential store.

Constrained delegation: S4U2proxy without the TGT

Constrained delegation (msDS-AllowedToDelegateTo listing allowed SPNs, TRUSTED_TO_AUTH_FOR_DELEGATION bit 0x1000000) forwards nothing — the host can instead request a service ticket for a user to the listed services only, via S4U2self/S4U2proxy. Two flavors matter:

  • With protocol transition (the TrustedToAuthForDelegation flag): the host can invoke S4U2self for any user without their TGT — proof is just a name. Compromise that service account, request cifs/target as Administrator, get in.
  • Without protocol transition (useKerberosOnly): needs the user's actual service ticket first — still abusable but requires the caller to authenticate.

The S4U2proxy ticket is also marked "forwardable," which historically let attackers bounce it to other services on the same host regardless of the allowlist (service name isn't validated — the SPN check is on the target account, not the exact service string). So MSSQLSvc/host:1433 in the allowlist effectively grants cifs/host and ldap/host too.

Resource-based constrained delegation (RBCD)

RBCD flips direction: the target resource declares who may impersonate users to it, via msDS-AllowedToActOnBehalfOfOtherIdentity (a security descriptor in a binary blob). Whoever can write that attribute on a host — admins, the account itself, anything with GenericWrite/WriteProperty — can grant RBCD to an attacker computer and pull service tickets as any user. Relay a machine account to LDAP, write RBCD on it, S4U as admin. That is the relay chain from the previous lesson ending here.

What actually limits it

  • Inventory all three: TrustedForDelegation, msDS-AllowedToDelegateTo, and readable msDS-AllowedToActOnBehalfOfOtherIdentity — BloodHound collects all of them. Get-ADObject -Filter {msDS-AllowedToActOnBehalfOfOtherIdentity -like '*'} surfaces RBCD grants directly.
  • Protected Users blocks unconstrained delegation for member accounts — they cannot be delegated to hosts, and their tickets won't forward.
  • Mark sensitive accounts Account is sensitive and cannot be delegated (userAccountControl bit 0x100000).
  • Disable spooler on DCs — remove the TGT-arrival vector that makes unconstrained hosts lethal.
  • New estates: prefer gMSA + RBCD scoped tightly, and treat any non-DC TrustedForDelegation host as an incident, not a config.

One caveat on auditing RBCD: msDS-AllowedToActOnBehalfOfOtherIdentity is a binary security descriptor — read it with Get-ADComputer x -Properties msDS-AllowedToActOnBehalfOfOtherIdentity then decode, or let BloodHound render it as AllowedToAct edges. Stale RBCD grants on decommissioned service hosts are common and equally exploitable; the right answer is delete, not document.

Was this lesson helpful?

Sign in to rate

Keep reading

Related articles from the SudoSecurity blog.