1. Resources
  2. Detection rules
  3. Resource-Based Constrained Delegation Abuse

Resource-Based Constrained Delegation Abuse detection rules

An attacker who can write msDS-AllowedToActOnBehalfOfOtherIdentity on a computer lets an account they control impersonate any user to it, typically to become local administrator. Detected as a 5136 write to that attribute.

Platform
Active Directory
Severity
High
Log source
Windows Security event log
Last updated
MITRE ATT&CK technique
T1098Account Manipulation
Rule formats
Sigmaand queries for: SplunkMicrosoft SentinelIBM QRadar
What an attacker needs
Write access to msDS-AllowedToActOnBehalfOfOtherIdentity on the target object, and an account with an SPN whose credentials the attacker controls.
Impact
Administrative access to the target host as any non-protected user, and domain compromise when the target is a domain controller, a Tier 0 server or krbtgt.
Response
Remove the unauthorized entry from msDS-AllowedToActOnBehalfOfOtherIdentity on the target, disable the account the entry named, and disable or reset the account that wrote it.
Mitigation
Remove unnecessary write rights on computer objects, especially on domain controllers and Tier 0 servers, and set ms-DS-MachineAccountQuota to 0.
Event ID
5136

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-AllowedToActOnBehalfOfOtherIdentity on 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.

LevelHighStatusExperimentalLog sourceWindows Security event log
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.

LevelCriticalStatusExperimentalLog sourceWindows Security event log
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

Detection hypothesisSequence of eventsJoins two logs

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.

  1. A computer account is created: event 4741. Keep the new account's TargetSid and TargetUserName and the creator in SubjectUserName.
  2. Within 24 hours the attribute is written: event 5136 with AttributeLDAPDisplayName msDS-AllowedToActOnBehalfOfOtherIdentity and OperationType Value Added. Keep ObjectDN, AttributeValue and SubjectUserName.
  3. AttributeValue holds the security descriptor in SDDL form. Look in it for the SID from the first step.
  4. 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

Detection hypothesisSequence of eventsJoins two logs

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.

  1. RBCD is written on a computer: event 5136 with AttributeLDAPDisplayName msDS-AllowedToActOnBehalfOfOtherIdentity and OperationType Value Added. Resolve ObjectDN to the host and its account name.
  2. On that host, within 24 hours, find successful event 4624 with LogonType 3, AuthenticationPackageName Kerberos and a TransmittedServices value that is not a dash. Read TargetUserName, IpAddress and TransmittedServices.
  3. On the domain controllers in the same period, find successful event 4769 whose ServiceName is the account of that host and whose TransmittedServices is not a dash.
  4. 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:

  1. Remove the unauthorized entry from msDS-AllowedToActOnBehalfOfOtherIdentity on the target and disable the account the entry named.
  2. 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.
  3. 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.
  4. If the target was a domain controller or krbtgt, handle it as a domain compromise.
  5. Remove the access right that allowed the write to the target object.
  6. 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-MachineAccountQuota to 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

We respect your privacy

We use cookies to keep this site secure and working properly. With your permission, we also use optional cookies to understand usage and improve the experience. Cookie Policy

You can change your choice at any time.