πKerberos "Double Hop" Problem
π― HTB Academy: Active Directory Enumeration & Attacks
π Overview
The Kerberos "Double Hop" Problem is a critical authentication limitation that occurs when attempting to use Kerberos authentication across two or more network hops. This problem frequently arises during lateral movement operations, particularly when using WinRM/PowerShell remoting, and can significantly impact penetration testing and red team operations. Understanding and overcoming this limitation is essential for successful Active Directory exploitation and lateral movement.
π Attack Chain Context
Complete Active Directory Compromise Timeline:
Privileged Access β Double Hop Problem β Lateral Movement Solutions β Infrastructure Control
(WinRM Access) (Authentication) (Credential Workarounds) (Domain Domination)Prerequisites from Previous Modules:
Privileged access achieved: WinRM/PSRemote rights discovered via BloodHound
Valid domain credentials: Obtained through various attack vectors
Remote access established: Initial connection to target hosts
Multi-hop requirements: Need to access additional resources from compromised hosts
π§ Technical Fundamentals
Kerberos vs. NTLM Authentication
Kerberos Ticket-Based Authentication
Tickets are NOT passwords: Signed pieces of data from KDC stating resource access rights
Resource-specific: Each ticket grants access to a specific resource/service
Non-transferable: Tickets cannot be reused for different services without proper delegation
Time-limited: Tickets have expiration times and renewal periods
Delegation-dependent: Require specific delegation configurations for multi-hop scenarios
NTLM Hash-Based Authentication
Hash storage: NTLM hash stored in session memory after authentication
Reusable: Hash can be used for subsequent authentication attempts
Session-persistent: Available for duration of user session
Multi-hop capable: Can authenticate to multiple resources without additional configuration
The Core Problem Explained
What Happens During Kerberos Authentication
Initial Authentication: User authenticates to KDC, receives TGT (Ticket Granting Ticket)
Service Request: User requests TGS (Ticket Granting Service) ticket for specific service
Service Access: TGS ticket sent to target service for authentication
Session Establishment: Service validates ticket and grants access
Why the Double Hop Fails
Critical Issue: When connecting via WinRM/PowerShell remoting:
TGS ticket sent: Allows access to the immediate target (Host A)
TGT ticket NOT sent: Cannot request new TGS tickets for additional resources (Host B)
No credential caching: Password/hash not stored in remote session memory
Authentication failure: Subsequent resource access denied
π Practical Demonstration
Scenario Setup
Attack Host: Parrot/Kali Linux (domain-external)
Target Host A: DEV01 (domain-joined, WinRM accessible)
Target Host B: DC01 (Domain Controller, PowerView target)
Credentials:
INLANEFREIGHT\backupadmwith Remote Management Users group membership
Problem Manifestation
1. WinRM Connection Establishment
2. Credential Analysis with Mimikatz
Critical Observation: Mimikatz output shows NO credentials for backupadm user:
Process Verification: WinRM processes running as backupadm:
3. Ticket Analysis
4. PowerView Failure Demonstration
π οΈ Workaround Solutions
π§ Workaround #1: PSCredential Object Method
Applicable Scenarios
Evil-WinRM sessions: Works perfectly with Linux attack hosts
Non-interactive sessions: No GUI access required
Command-by-command basis: Credentials passed with each PowerView command
Flexibility: Can be used with any PowerShell cmdlet supporting
-Credentialparameter
Implementation Steps
1. Establish WinRM Session:
2. Create PSCredential Object:
3. Execute Commands with Credentials:
4. Verification of Failure Without Credentials:
Advantages of PSCredential Method
β Works with Evil-WinRM: Perfect for Linux-based attack hosts
β No GUI required: Fully command-line compatible
β Flexible application: Can be used with any credential-supporting cmdlet
β Immediate solution: No service restarts or configuration changes required
Limitations of PSCredential Method
β Command-by-command: Must specify credentials with each command
β Tool compatibility: Some tools may not support
-Credentialparameterβ Verbose syntax: Increases command complexity
π§ Workaround #2: Register PSSession Configuration Method
Applicable Scenarios
GUI access available: RDP or physical console access to Windows host
Administrative privileges: Ability to register PSSession configurations
Persistent sessions: Long-term enumeration without repeated credential passing
Tool compatibility: Works with tools that don't support
-Credentialparameter
Prerequisites
Windows attack host or compromised domain-joined machine
GUI access via RDP
Administrative privileges on the host
PowerShell console (not Evil-WinRM)
Implementation Steps
1. Initial WinRM Connection:
2. Verify Double Hop Problem:
3. Register New PSSession Configuration:
4. Restart WinRM Service:
5. Connect Using Named Configuration:
6. Verify Ticket Availability:
7. Successful Domain Enumeration:
Advantages of PSSession Configuration Method
β Persistent solution: No need to pass credentials with each command
β Tool compatibility: Works with all PowerShell tools and modules
β Native authentication: Proper Kerberos ticket caching
β Performance: Faster execution without repeated authentication
Limitations of PSSession Configuration Method
β GUI requirement: Cannot be used with Evil-WinRM
β Administrative privileges: Requires ability to register PSSession configurations
β Service restart: Requires WinRM service restart
β Platform limitation: Does not work from Linux PowerShell due to Kerberos limitations
π― Attack Scenarios and Use Cases
Common Double Hop Scenarios
Scenario 1: Linux Attack Host β Windows Target β Domain Controller
Solution: PSCredential Object method via Evil-WinRM
Scenario 2: Windows Attack Host β Jump Host β Internal Servers
Solution: PSSession Configuration or PSCredential Object method
Scenario 3: Compromised Workstation β Domain Controller β Trust Domains
Solution: Depends on delegation configuration and trust relationship
Real-World Impact Examples
PowerView Domain Enumeration
BloodHound Data Collection
Credential Dumping Operations
π Technical Deep Dive
Unconstrained Delegation Exception
When Double Hop Problem Doesn't Occur
If unconstrained delegation is enabled on a server:
TGT ticket forwarded: User's TGT sent along with TGS request
Credential caching: Target server caches user's TGT
Impersonation capability: Server can request TGS tickets on user's behalf
Attack opportunity: Unconstrained delegation servers are high-value targets
Identifying Unconstrained Delegation
Constrained Delegation Scenarios
Service-Specific Delegation
Limited scope: Delegation only to specific services
Protocol transition: May allow protocol changes (Kerberos to NTLM)
S4U2Self/S4U2Proxy: Service for User extensions enable constrained delegation
Resource-Based Constrained Delegation (RBCD)
Target-controlled: Delegation configured on target resource
Modern approach: Newer delegation method in Windows 2012+
Attack vector: Can be abused if target object permissions allow modification
π Alternative Solutions and Advanced Techniques
CredSSP (Credential Security Support Provider)
Implementation
Security Considerations
Credential exposure: Sends credentials to remote server
Security risk: Credentials cached on target system
Use with caution: Only in trusted environments
Port Forwarding Solutions
SSH Tunneling
Chisel/SocksOverRDP
Process Injection Techniques
Token Impersonation
Sacrificial Process Method
Create process: Start new process as target user
Inject payload: Insert shellcode or .NET assembly
Inherit context: Process runs with target user's full credentials
π‘οΈ Detection and Defensive Measures
Monitoring Double Hop Workarounds
PSSession Configuration Detection
CredSSP Usage Detection
PowerShell Logging Enhancement
Script Block Logging
Module Logging
Network Monitoring
Kerberos Traffic Analysis
AS-REQ/AS-REP: Initial authentication requests
TGS-REQ/TGS-REP: Service ticket requests
Unusual patterns: Multiple service ticket requests from single host
Cross-subnet authentication: Unexpected Kerberos traffic patterns
WinRM Traffic Monitoring
Port 5985/5986: Monitor WinRM HTTP/HTTPS traffic
SOAP XML analysis: Examine WinRM command content
Session duration: Identify long-running remote sessions
π Advanced Attack Chains
Double Hop in Complex Scenarios
Multi-Domain Trust Exploitation
Challenges:
Cross-domain authentication: Different Kerberos realms
Trust relationship dependencies: Transitive vs. non-transitive trusts
Delegation configurations: Per-domain delegation settings
Cloud Hybrid Environments
Considerations:
Authentication protocols: Kerberos vs. SAML vs. OAuth
Credential synchronization: Password hash sync vs. pass-through authentication
Hybrid identity: On-premises accounts with cloud access
Automation and Scripting
Automated Workaround Implementation
PowerShell Empire Integration
π Key Takeaways
Technical Understanding
Kerberos vs. NTLM: Fundamental difference in credential handling
Ticket mechanics: TGT vs. TGS ticket usage and limitations
Authentication delegation: Constrained, unconstrained, and resource-based delegation
Network protocols: WinRM, RDP, and their authentication mechanisms
Practical Solutions
PSCredential Object: Universal solution for Evil-WinRM and command-line scenarios
PSSession Configuration: Persistent solution for GUI-accessible Windows hosts
Alternative methods: CredSSP, port forwarding, and process injection techniques
Tool compatibility: Understanding which tools support which workarounds
Operational Considerations
Attack platform: Linux vs. Windows attack host capabilities
Target environment: Domain topology and delegation configurations
Detection risk: Monitoring and logging considerations
Persistence vs. stealth: Balancing effectiveness with operational security
Professional Application
Red team operations: Realistic attack simulation with proper lateral movement
Penetration testing: Comprehensive domain exploitation methodology
Security assessment: Understanding authentication boundaries and limitations
Incident response: Recognizing double hop exploitation techniques
π Complete mastery of Kerberos "Double Hop" Problem - from technical understanding through practical workarounds to advanced attack chains - representing essential Active Directory lateral movement expertise for enterprise penetration testing!
Last updated