Golden/Silver Ticket Attack with Mimikatz
Mimikatz is a popular and powerful post-exploitation tool, most commonly used for dumping user credentials inside an Active Directory network. Here we use it to create a silver ticket.
A silver ticket can sometimes be better suited to an engagement than a golden ticket because it is a little more discreet. If stealth and staying undetected matter, a silver ticket is probably the better option, but the approach to creating one is exactly the same. The key difference between the two is that a silver ticket is limited to the service that is targeted, whereas a golden ticket has access to any Kerberos service.
A specific use case for a silver ticket: you want to access the domain's SQL server but your current compromised user does not have access to it. You can find an accessible service account to get a foothold by kerberoasting that service, dump the service hash, then impersonate its TGT to request a service ticket for the SQL service from the KDC, giving you access to the domain's SQL server.
KRBTGT Overview
To understand how these attacks work you need to know the difference between a KRBTGT and a TGT. A KRBTGT is the service account for the KDC, the Key Distribution Center that issues all of the tickets to clients. If you impersonate this account and create a golden ticket from the KRBTGT, you give yourself the ability to create a service ticket for anything you want. A TGT is a ticket to a service account issued by the KDC and can only access the service the TGT is from, like the SQLService ticket.
Golden/Silver Ticket Attack Overview
A golden ticket attack works by dumping the ticket-granting ticket of any user on the domain, preferably a domain admin. For a golden ticket you dump the krbtgt ticket; for a silver ticket you dump any service or domain admin ticket. This provides the service/domain admin account's SID (security identifier, a unique identifier for each user account) as well as the NTLM hash. You then use these details inside a Mimikatz golden ticket attack to create a TGT that impersonates the given service account information.
Dump the krbtgt Hash
Navigate to the directory Mimikatz is in and run it, then dump the hash and SID.
cd downloads && mimikatz.exe
privilege::debug
lsadump::lsa /inject /name:krbtgt
cd downloads && mimikatz.exe- navigate to the directory Mimikatz is in and run Mimikatz.privilege::debug- ensure this outputs [privilege '20' ok].lsadump::lsa /inject /name:krbtgt- dumps the hash as well as the security identifier needed to create a golden ticket. To create a silver ticket, change the/name:to dump the hash of either a domain admin account or a service account such as the SQLService account.
Create a Golden/Silver Ticket
Kerberos::golden /user:Administrator /domain:controller.local /sid: /krbtgt: /id:
This is the command for creating a golden ticket. To create a silver ticket, put a service NTLM hash into the krbtgt slot, the SID of the service account into sid, and change the id to 1103.
This is a demo of creating a golden ticket; it is up to you to create a silver ticket.
Use the Golden/Silver Ticket to Access Other Machines
misc::cmd
misc::cmd opens a new elevated command prompt with the given ticket in Mimikatz.
Access the machines that you want. What you can reach depends on the privileges of the user whose ticket you took. If you took the ticket from krbtgt you have access to the ENTIRE network, hence the name golden ticket. Silver tickets only reach what the user can reach; if it is a domain admin it can access almost the entire network, though it is slightly less elevated than a golden ticket.
This attack will not work without other machines on the domain, but I challenge you to configure this on your own network and try these attacks out.
Golden Ticket Demo
Again using the same tool as the previous task, but this time to create a golden ticket.
We first dump the hash and SID of the krbtgt user, then create a golden ticket and use that golden ticket to open a new command prompt, giving us access to any machine on the network.
Mimikatz is already on the machine.
Dump the krbtgt Hash
cd downloads && mimikatz.exe
privilege::debug
lsadump::lsa /inject /name:krbtgt
cd downloads && mimikatz.exeprivilege::debug- ensure this outputs [privilege "20" ok].lsadump::lsa /inject /name:krbtgt- dumps the hash and security identifier of the Kerberos Ticket Granting Ticket account, allowing you to create a golden ticket.
Take note of what is outlined in red; you'll need it to create the golden ticket.
Create a Golden Ticket
kerberos::golden /user: /domain: /sid: /krbtgt: /id:
Use the Golden Ticket to Access Other Machines
misc::cmd
misc::cmd opens a new command prompt with elevated privileges to all machines.
You now have another command prompt with access to all other machines on the network.
Because TryHackMe does not currently support networks, you will be unable to access other machines, but I encourage you to add other machines to this domain controller yourself and try these attacks out.