golden ticket mimikatz:
once an attacker has gained privileged access to AD, they can use mimikatz to extract the krbtgt account password hash. in addition with that domain name and domain sid is also needed.
again using mimikatz attacker can generate golden ticket. then attacker use ptt-pass the ticket attack to load the ticket into memory and associates the ticket with the current session. resulting providing them access to any resources connected to AD.
to get the sid:
whoami /user
or
wmic useraccount where name='mahim.firoj' get name,sid
or
wmic useraccount get name,sid
S-1-5-21-3779264222-3071962926-1152741993-3068
from the above sid we need to remove last rid part which is 3068
S-1-5-21-3779264222-3071962926-1152741993
in order to get krbtgt password hash you need elevated permission in AD. you have to be domain admin. we have setup our environment so we can use dcsync with this account and grant permission in AD domain object. more specifically this account steveholt has the access of Replication Directory Changes or Replication Directory Changes all (DS-Replication-Get-Changes or DS-Replication-Get-Changes-All).
https://www.thehacker.recipes/ad/movement/credentials/dumping/dcsync
https://www.thehacker.recipes/ad/movement/kerberos/forged-tickets#golden-ticket
https://www.youtube.com/watch?v=f6SleGakcE0
once you have that permission on the corresponding account then you are good to go. this attack allow attacker for lateral movement. not allow for privilege escalation.
now we have everything we need to create the golden ticket.
from the system (domain not joined) you are trying to attack, and the username steveholt does not have any membership of any powerful domain group. also the user is normal user.
so if user tries:
C:\Users\SteveHolt>pushd \\jefflab-dc03\c$
Access is denied. (he will get access denied message).
now the ticket has been created.
this command will load the tickeet into memory.
now command prompt will appear.
now he can access. now he has the complete domain admin level access. this token does not expire easily.
Avi
Comments
Post a Comment