This lab looks at the technique of forging a cracked TGS Kerberos ticket in order to impersonate another user and escalate privileges from the perspective of a service the TGS was cracked for.
This lab builds on the explorations in T1208: Kerberoasting where a TGS ticket got cracked.
I will be using mimikatz to create a Kerberos Silver Ticket - forging/rewriting the cracked ticket with some new details that benefit me as an attacker.
Below is a table with values supplied to mimikatz explained and the command itself:
SID of the current user who is forging the ticket. Retrieved with
server hosting the attacked service for which the TGS ticket was cracked
service type being attacked
NTLM hash of the password the TGS ticket was encrypted with.
Forging the user name. This is the user name that will appear in the windows security logs - fun.
Forging user's RID - fun
Instructs mimikatz to inject the forged ticket to memory to make it usable immediately
Getting our user's SID as explained in the first step in the above table:
Issuing the final mimikatz command to create our forged (silver) ticket:
attacker@victimmimikatz # kerberos::golden /sid:S-1-5-21-4172452648-1021989953-2368502130-1105 /domain:offense.local /ptt /id:1155 /target:dc-mantvydas.offense.local /service:http /rc4:a87f3a337d73085c45f9416be5787d86 /user:beningnadmin
Checking available tickets in memory with
klist - note how the ticket shows our forged username
benignadmin and a forged user id:
Note in the above mimikatz window the
Group IDs which our fake user
benignadmin is now a member of due to the forged ticket:
Group Policy Creator Owners
Initiating a request to the attacked service with a TGS ticket - note that the authentication is successfull:
attacker@victimInvoke-WebRequest -UseBasicParsing -UseDefaultCredentials http://dc-mantvydas.offense.local
Note a network logon from
benignadmin as well as forged RIDs:
It is better not to use user accounts for running services on them, but if you do, make sure to use really strong passwords! Computer accounts generate long and complex passwords and they change frequently, so they are better suited for running services on. Better yet, follow good practices such as using Group Managed Service Accounts for running more secure services.