Active Directory.
Use the stolen Kerberos ticket to move laterally instead of using NTLM hash for it.
Kerberos
TGT
: Ticket Granting Ticket, first ticket obtained on Kerberos system. Grants the permission to obtain TGS.
TGS
: Ticket Granting Service, requested by users who want to use a service. Allows the services to verify user’s identity.
For example, user wants to access MSSQL DB:
- Request TGT
- Receives TGT
- Request TGS to KDC, presenting TGT
- Receives TGS for MSSQL DB access.
For PtT attack, attacker either needs TGS or TGT.
Needs a local administrator privilege as well to harvest Kerberos ticket.
Mimikatz
sekurlsa::tickets /export
exports list of files with extension .kirbi
, which contains the tickets.
Rubeus
Pass the Key
PtK converts a hash/key for a domain joined user into a full TGT.
To create these fake tickets, we need user’s hash.
We can use Mimikatz sekurlsa::ekeys
to dump all users Kerberos encryption keys.
We can have access to AES256_HMAC and RC4_HMAC keys as such:
Now we are ready for PtH attack using Mimikatz and Rubeus.
Mimikatz - PtH
Below will create a new cmd.exe windows that we can use to access any service we want in the context of the target user.
Rubeus - PtK
We can use module asktgt
.
PtT
With the Kerberos tickets obtained from the method above, we can go do PtT.
Now import the ticket into the current session using .kirbi file from the the disk.
We can PtT using mimikatz as well: