How the attack works
With resource-based constrained delegation (RBCD) the target resource decides who may delegate to it: its msDS-AllowedToActOnBehalfOfOtherIdentity attribute holds a security descriptor listing the accounts allowed to request service tickets to it on behalf of other users (Kerberos S4U2Self and S4U2Proxy). Unlike classic constrained delegation, setting it needs no domain-level privilege, only write access to the target object.
An attacker with that write access (GenericAll, GenericWrite, WriteAccountRestrictions, or a relayed machine authentication to LDAP) adds an account they control, often a computer account they created with the default machine account quota. The controlled account then obtains service tickets to the target as any user, for example a domain administrator, and gains administrative access to that host. Set on a domain controller or on krbtgt, the same attribute becomes a domain-wide backdoor.
What an attacker needs
- Write access to
msDS-AllowedToActOnBehalfOfOtherIdentityon the target computer (or user) object. - An account with an SPN whose credentials the attacker controls, commonly a new computer account created through
ms-DS-MachineAccountQuota.
Impact
Administrative access to the target host as any non-protected user. When the target is a domain controller, a Tier 0 server or krbtgt, it leads to domain compromise and persistence that survives password resets of the impersonated accounts.
Detection rules
Resource-Based Constrained Delegation Configured on an Object
Detects a value written to msDS-AllowedToActOnBehalfOfOtherIdentity, which grants the listed accounts the right to impersonate any user to the target object through Kerberos S4U. Few environments configure RBCD, so writes to this attribute deserve review. Requires Audit Directory Service Changes and a SACL that audits writes to the attribute on computer objects.
title: Resource-Based Constrained Delegation Configured on an Object
id: f5e7ed3b-50ef-4471-a75a-407b6a6a4ec7
status: experimental
description: >-
Detects a value written to msDS-AllowedToActOnBehalfOfOtherIdentity, which
grants the listed accounts the right to impersonate any user to the target
object through Kerberos S4U. Few environments configure RBCD, so writes to
this attribute deserve review. Requires Audit Directory Service Changes and a
SACL that audits writes to the attribute on computer objects.
references:
- https://attack.mitre.org/techniques/T1098/
- https://learn.microsoft.com/en-us/windows/win32/adschema/a-msds-allowedtoactonbehalfofotheridentity
- https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-10/security/threat-protection/auditing/event-5136
author: Forestall
date: 2026-11-10
tags:
- attack.persistence
- attack.privilege-escalation
- attack.t1098
logsource:
product: windows
service: security
detection:
selection:
EventID: 5136
AttributeLDAPDisplayName: msDS-AllowedToActOnBehalfOfOtherIdentity
OperationType:
- '%%14674'
- 'Value Added'
condition: selection
falsepositives:
- Services deliberately configured for RBCD (for example some file server, SQL Server or web application front ends). Document them and exclude by ObjectDN.
level: high
False positives
- Services deliberately configured for RBCD (for example some file server, SQL Server or web application front ends). Document them and exclude by ObjectDN.
Resource-Based Constrained Delegation Configured on a Domain Controller or krbtgt
Detects msDS-AllowedToActOnBehalfOfOtherIdentity written on a computer object in the Domain Controllers OU or on the krbtgt account. Delegation to a domain controller lets the delegated account act as any user against it, and RBCD on krbtgt is a known domain persistence backdoor; neither has a common legitimate use. Requires Audit Directory Service Changes and a SACL on these objects.
title: Resource-Based Constrained Delegation Configured on a Domain Controller or krbtgt
id: c4205f68-179e-43b3-b0f1-e3aa62830239
status: experimental
description: >-
Detects msDS-AllowedToActOnBehalfOfOtherIdentity written on a computer object
in the Domain Controllers OU or on the krbtgt account. Delegation to a domain
controller lets the delegated account act as any user against it, and RBCD on
krbtgt is a known domain persistence backdoor; neither has a common legitimate
use. Requires Audit Directory Service Changes and a SACL on these objects.
references:
- https://attack.mitre.org/techniques/T1098/
- https://learn.microsoft.com/en-us/windows/win32/adschema/a-msds-allowedtoactonbehalfofotheridentity
- https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-10/security/threat-protection/auditing/event-5136
author: Forestall
date: 2026-11-10
tags:
- attack.persistence
- attack.privilege-escalation
- attack.t1098
logsource:
product: windows
service: security
detection:
selection:
EventID: 5136
AttributeLDAPDisplayName: msDS-AllowedToActOnBehalfOfOtherIdentity
OperationType:
- '%%14674'
- 'Value Added'
selection_tier0_target:
- ObjectDN|contains: ',OU=Domain Controllers,'
- ObjectDN|startswith: 'CN=krbtgt,'
condition: selection and selection_tier0_target
falsepositives:
- None expected. If domain controllers live outside the default Domain Controllers OU, add their OU to selection_tier0_target.
level: critical
False positives
- None expected. If domain controllers live outside the default Domain Controllers OU, add their OU to selection_tier0_target.
Detection logic
Patterns that need more than one event, a baseline or knowledge of your own environment. Each is a hypothesis to build and tune in your SIEM, not a ready rule.
RBCD entry that names a computer account created shortly before
The usual way to abuse RBCD is to create a computer account with the default machine account quota and list it in the attribute of the target. A computer account created and then named in a write to msDS-AllowedToActOnBehalfOfOtherIdentity within hours is that chain. A planned delegation names a front-end service account that has existed for some time.
- A computer account is created: event 4741. Keep the new account's
TargetSidandTargetUserNameand the creator inSubjectUserName. - Within 24 hours the attribute is written: event 5136 with
AttributeLDAPDisplayNamemsDS-AllowedToActOnBehalfOfOtherIdentity andOperationTypeValue Added. KeepObjectDN,AttributeValueandSubjectUserName. AttributeValueholds the security descriptor in SDDL form. Look in it for the SID from the first step.- A match is the finding. It is urgent when the creator and the writer are the same account, or when the target is a domain controller or a Tier 0 server.
Events47415136
LimitsA computer account that is created for a new front-end service and then given delegation on purpose looks the same and should have a change record. An attacker can also list an existing account with an SPN, which this does not see. The 24 hours are a starting point, and the write is logged only with a SACL on the target object.
Delegated logon on a host shortly after RBCD was written on its account
RBCD is used by requesting service tickets to the target on behalf of a user, and the target then logs a network logon of that user. Microsoft documents that event 4624 lists Transited Services when the logon came from an S4U logon process, and that event 4769 lists them when constrained delegation was used. Such logons on the host whose attribute was just written, for an administrator of the host or a privileged user, show the delegation in use.
- RBCD is written on a computer: event 5136 with
AttributeLDAPDisplayNamemsDS-AllowedToActOnBehalfOfOtherIdentity andOperationTypeValue Added. ResolveObjectDNto the host and its account name. - On that host, within 24 hours, find successful event 4624 with
LogonType3,AuthenticationPackageNameKerberos and aTransmittedServicesvalue that is not a dash. ReadTargetUserName,IpAddressandTransmittedServices. - On the domain controllers in the same period, find successful event 4769 whose
ServiceNameis the account of that host and whoseTransmittedServicesis not a dash. - Report the impersonated users who administer the host or belong to privileged groups.
Events513646244769
LimitsFront-end services that already delegated to the host produce the same logons, so compare with the delegations that existed before the change. It needs the Security log of the target host. Microsoft does not document which account each field of event 4769 names during delegation, so read the account and the transited services together. The 24 hours are a starting point.
Triage
- Decode the SDDL in AttributeValue to find the SID allowed to delegate, and resolve it to an account; a recently created computer account is a strong indicator.
- Check who made the change (SubjectUserName) and from where (correlate SubjectLogonId with 4624); a computer account as writer suggests an NTLM relay.
- Look for 4769 service ticket requests to the target from the delegated account shortly after the change.
- If unexplained, clear the attribute, remove the delegated account and review access on the target host.
Response
Once the attack is confirmed:
- Remove the unauthorized entry from msDS-AllowedToActOnBehalfOfOtherIdentity on the target and disable the account the entry named.
- Disable or reset the account that wrote the attribute. If the writer was a computer account, look for the relay behind it and isolate the address the write came from.
- If the delegated account requested service tickets to the target, treat the target host as compromised with administrator rights. Isolate it and reset the credentials that were used on it.
- If the target was a domain controller or krbtgt, handle it as a domain compromise.
- Remove the access right that allowed the write to the target object.
- Search all user and computer objects for other values of the attribute that name the same account, and delete the unauthorized computer account once the evidence is preserved.
Mitigation
- Remove unnecessary write rights on computer objects (GenericAll, GenericWrite, WriteAccountRestrictions), especially on domain controllers and Tier 0 servers.
- Set
ms-DS-MachineAccountQuotato 0 and delegate computer joins to a dedicated group. - Mark privileged accounts "Account is sensitive and cannot be delegated" or add them to Protected Users so they cannot be impersonated.
- Enforce LDAP signing and channel binding to block relayed writes, and clear the attribute on objects that do not need RBCD.
Frequently asked questions
Why does resetting the password of the impersonated administrator not close the hole?
The delegation is stored on the target computer, not on the user who is impersonated. As long as the attacker's account is listed in msDS-AllowedToActOnBehalfOfOtherIdentity, it can obtain service tickets to that host as any user who is not protected against delegation. Clear the attribute and disable the listed account.
What does it mean when a computer account wrote the attribute?
It suggests an NTLM relay, in which the authentication of a machine is forwarded to LDAP and used for the write. Correlate SubjectLogonId with event 4624 to find where the session came from. Enforcing LDAP signing and channel binding on domain controllers blocks such relayed writes.
Which users can still be impersonated through RBCD?
Any user except those marked Account is sensitive and cannot be delegated and the members of Protected Users. Marking privileged accounts that way keeps a configured delegation from being used to act as an administrator on the target host.
What has to be audited before a write to this attribute is logged?
The subcategory Audit Directory Service Changes must be enabled on domain controllers, and the computer objects need an audit entry (SACL) for writes to the attribute. For the critical rule the audit entry must also cover the objects in the Domain Controllers OU and the krbtgt account.
References
- MITRE ATT&CK T1098: Account Manipulation
- Kerberos constrained delegation overview (resource-based constrained delegation)
- ms-DS-Allowed-To-Act-On-Behalf-Of-Other-Identity attribute
- Event 5136: A directory service object was modified
- Event 4741: A computer account was created
- Event 4624: An account was successfully logged on (Transited Services for S4U logons)
- Event 4769: A Kerberos service ticket was requested (Transited Services for constrained delegation)