githubEdit

Kerberos Delegation


Service Ticket Cheatsheet

Service
Description
Ticket(s)

SMB

Remote filesystem access

CIFS

PsExec

Service Control Manager

CIFS

WinRM

Windows Remote Management

HTTP

WMI

Process execution

RPCSS, HOST, RestrictedKrbHost

RDP

Remote Desktop

TERMSRV, HOST

MSSQL

SQL Databases

MSSQLSvc


Unconstrained Delegation

Computer can request TGTs on behalf of any user who authenticates to it.

Find Unconstrained Delegation

ldapsearch (&(samAccountType=805306369)(userAccountControl:1.2.840.113556.1.4.803:=524288)) --attributes samaccountname

Note: Domain Controllers are always configured for unconstrained delegation.

Exploit

Move laterally to the unconstrained delegation host:

Monitor for incoming TGTs:

Inject captured TGT:


Constrained Delegation

Limited delegation via msDS-AllowedToDelegateTo attribute.

Find Constrained Delegation

Check Protocol Transition

Protocol transition requires TRUSTED_TO_AUTH_FOR_DELEGATION (16777216) flag.

PowerShell check:

Exploit (Protocol Transition Enabled)

Move laterally and dump computer TGT:

Perform S4U to impersonate any user:

Inject and access:

Exploit (Protocol Transition NOT Enabled)

Must use captured user service tickets (cannot freely impersonate).

Use /tgs instead of /impersonateuser:


Service Name Substitution

Swap service ticket SPN to access different services on the same account.

Find Delegation to Weak Service

Exploit (Substitute CIFS for TIME)

Multiple services at once:


S4U2self Computer Takeover

Use captured computer TGT to get service ticket as any user.

Trigger Authentication (SpoolSample/PetitPotam)

On unconstrained delegation host (high integrity):

From medium integrity beacon (domain user):

Use Captured Computer TGT

Computer accounts don't have admin access to themselves - use S4U2self:

Inject and access:


Resource-Based Constrained Delegation (RBCD)

Back-end service controls who can delegate to it via msDS-AllowedToActOnBehalfOfOtherIdentity.

Requirements

  1. Write access to msDS-AllowedToActOnBehalfOfOtherIdentity on target

  2. Control of a principal with an SPN set

Find Write Access (PowerView via SOCKS)

Identify SID Owner

Account with SPN Options

Option
Description

Computer account

Any computer you have SYSTEM on

Service account

If you have kerberoasted creds

Create new computer

msDS-MachineAccountQuota (default: 10)

Configure RBCD

Exploit

Dump TGT from controlled computer:

Perform S4U:

Inject and access:

Cleanup


Quick Reference

Delegation Type
Attribute
Attack Summary

Unconstrained

userAccountControl (524288)

Monitor for TGTs, steal and use

Constrained

msDS-AllowedToDelegateTo

S4U with computer TGT

Constrained (no PT)

Same

Need captured user service ticket

RBCD

msDS-AllowedToActOnBehalfOfOtherIdentity

Add controlled SPN, S4U

Last updated