Delegation Misconfiguration Discovery
Kerberos delegation allows a service to authenticate to another service on behalf of a user. When misconfigured, delegation gives attackers a path to impersonate any domain user, including Domain Admins, to targeted services. Three delegation types exist with different risk levels:
Unconstrained Delegation: service receives a full TGT for any user that authenticates to it. Highest impact — coercing a DC to authenticate gives you the DC's TGT.
Constrained Delegation: service can request tickets only to a specific set of SPNs. If
TRUSTED_TO_AUTH_FOR_DELEGATIONis set (protocol transition), it can impersonate any user, including those that never authenticated to it.Resource-Based Constrained Delegation (RBCD): the resource (not the requester) defines who can delegate to it. If you have GenericWrite on a computer, you can configure RBCD yourself.
Unconstrained delegation
Any computer or user with unconstrained delegation receives a copy of the authenticating user's TGT. Domain controllers always have unconstrained delegation — finding non-DC computers with this setting is the vulnerability. Coerce a DC to authenticate to the target host and extract the DC's TGT from LSASS.
dNSHostName: print01.corp.local operatingSystem: Windows Server 2019 Standard userAccountControl: WORKSTATION_TRUST_ACCOUNT, TRUSTED_FOR_DELEGATION dNSHostName: fileserver.corp.local operatingSystem: Windows Server 2016 Standard
dnshostname: print01.corp.local operatingsystem: Windows Server 2019
A non-DC computer with unconstrained delegation is a coercion target. Force a DC to authenticate to it (with Coercer or PrinterBug), then extract the DC's TGT with Rubeus or Mimikatz. See Unconstrained Delegation Abuse.
Constrained delegation
Accounts with msDS-AllowedToDelegateTo set can request service tickets on behalf of users to a specific list of SPNs. If the account also has TRUSTED_TO_AUTH_FOR_DELEGATION (protocol transition), it can impersonate any user, including Domain Admins, to those services without the user ever authenticating first.
sAMAccountName: svc-mssql msDS-AllowedToDelegateTo: MSSQLSvc/sql01.corp.local:1433 userAccountControl: TRUSTED_TO_AUTH_FOR_DELEGATION <-- protocol transition sAMAccountName: WEB01$ msDS-AllowedToDelegateTo: http/intranet.corp.local
TRUSTED_TO_AUTH_FOR_DELEGATION in userAccountControl means protocol transition is enabled — the account can impersonate any user (including Domain Admins) to the listed SPNs. Without it, delegation only works when the target user authenticates first. Protocol transition is the more dangerous variant. See Constrained Delegation Abuse.
Resource-based constrained delegation (RBCD)
RBCD is configured on the resource — the msDS-AllowedToActOnBehalfOfOtherIdentity attribute on a computer object specifies which accounts can delegate to it. If this attribute is already set on a machine, an attacker who controls the listed account can impersonate Domain Admin to that computer. If you have write access to this attribute (via GenericWrite on the computer), you can configure RBCD yourself.
If msDS-AllowedToActOnBehalfOfOtherIdentity is already set on a machine pointing to a user-controlled account, the attack is immediately actionable: use S4U2Self + S4U2Proxy to get a service ticket as Domain Admin. If GenericWrite on a computer is found via ACL enumeration, you can set RBCD yourself and then exploit it. See Constrained Delegation Abuse for the S4U chain.
References
-
BloodyAD (GitHub)github.com/CravateRouge/bloodyAD (opens in new tab)
get search with UAC LDAP bit filters for all three delegation types
-
PowerSploit / PowerView (GitHub)github.com/PowerShellMafia/PowerSploit (opens in new tab)
-UnconstrainedDelegation, -TrustedToAuth flags and Get-DomainObjectAcl for RBCD write detection
-
NetExec / nxc (GitHub)github.com/Pennyw0rth/NetExec (opens in new tab)
--trusted-for-delegation flag for unconstrained delegation sweep
Was this helpful?
Your feedback helps improve this page.