Overview
impacket-getST requests a Service Ticket (TGS) from the KDC. It supports S4U2Self and S4U2Proxy extensions, making it the primary tool for abusing constrained delegation and resource-based constrained delegation (RBCD).
Basic Usage
With Password
With NTLM Hash
With Kerberos (existing TGT)
S4U2Self
Request a service ticket on behalf of another user to the requesting account’s own SPN. This produces a forwardable ticket if the account is trusted for delegation.administrator to svc_sql) then S4U2Proxy (exchange it for a ticket to cifs/dc01.domain.local).
S4U2Proxy (Constrained Delegation)
When an account hasmsDS-AllowedToDelegateTo set, you can request a service ticket to the allowed SPN while impersonating any user.
With NTLM Hash
With AES Key
Full Constrained Delegation Attack Chain
Resource-Based Constrained Delegation (RBCD)
RBCD abusesmsDS-AllowedToActOnBehalfOfOtherIdentity on the target computer account.
Prerequisites
- Control over a computer account (or ability to create one via
addcomputer.py) - Write access to the target’s
msDS-AllowedToActOnBehalfOfOtherIdentity
Full Attack Chain
The -impersonate Flag
Specifies the user to impersonate via S4U2Self/S4U2Proxy. The impersonated user must not be in theProtected Users group or marked as Account is sensitive and cannot be delegated.
The -spn Flag
Specifies the target Service Principal Name. Common SPNs:| SPN | Use Case |
|---|---|
cifs/host | SMB access (psexec, smbclient, secretsdump) |
http/host | Web services, WinRM |
mssql/host | SQL Server access |
ldap/host | LDAP operations |
host/host | Generic host service |
Using the Resulting Ticket
The output.ccache file is named based on the impersonated user and target SPN:
Quick Reference
| Flag | Description |
|---|---|
-spn SPN | Target Service Principal Name |
-impersonate USER | User to impersonate via S4U |
-hashes LMHASH:NTHASH | Authenticate with NTLM hash |
-aesKey KEY | Authenticate with AES key |
-dc-ip IP | Domain controller IP address |
-k | Use Kerberos authentication |
-no-pass | Don’t ask for password |
-additional-ticket TICKET | Additional ticket for S4U2Proxy |
-force-forwardable | Force the ticket to be forwardable |