Overview
Substitute the service name in a TGS ticket to access alternative services on the same host. This technique leverages the fact that service tickets are often valid for multiple services running under the same account context.Syntax
Required Parameters
Base64-encoded ticket data or path to .kirbi file
New service name to substitute
Optional Parameters
Save modified ticket to file
Pass-the-ticket (inject modified ticket)
Examples
Service Substitution Concepts
Same Account Services
Same Account Services
Service Context:
- Services running under same account can often be substituted
- Machine account services (HOST, CIFS, HTTP, etc.)
- Service account with multiple SPNs
- Shared service account contexts
- CIFS → HOST (file access to admin access)
- HTTP → LDAP (web access to directory access)
- HOST → CIFS (admin access to file access)
- Any service → WSMAN (PowerShell remoting)
Use Cases
Privilege Escalation
Privilege Escalation
Access Expansion:
- Convert file access to administrative access
- Escalate web service access to directory access
- Enable remote administration from basic services
- Access database services from web services
- Use existing service tickets for different access methods
- Expand attack surface with minimal additional authentication
- Leverage service account relationships
- Access services not directly targeted
Common Service Mappings
Machine Account Services
Machine Account Services
Windows Machine Services:Service Relationships:
- Most machine services run under SYSTEM/machine account
- Tickets are often interchangeable
- Different services provide different access methods
- Substitution leverages shared service context
Integration Workflows
Access Expansion
Access Expansion
Complete Workflow:
Service Chaining
Service Chaining
Multi-Service Access:
Technical Considerations
Substitution Requirements
Substitution Requirements
Valid Substitutions:
- Services must run under same account context
- Target host must support the substituted service
- Service must be registered and available
- Account must have appropriate permissions
- Cannot substitute across different service accounts
- Host must actually run the target service
- Service-specific permissions still apply
- Some services may have additional validation
Service Discovery
Target Service Identification
Target Service Identification
Service Enumeration:
- LDAP queries for registered SPNs
- Network service discovery
- Port scanning for active services
- Service account analysis
- Identify high-value services on target hosts
- Map service account relationships
- Find services with elevated privileges
- Discover administrative service access