We can Forge our own Kerberos Tickets, without the need to harvesting them, using both OverPass the Hash or Pass the Key Techniques
These approaches convert the following hashes/keys for a domain joined user into a full Ticket Granting Ticket (TGT)
RC4_HMAC (NTLM Hash)
AES128_CTS_HMAC_SHA1
AES256_CTS_HMAC_SHA1
In this case, the Pass the Key technique can makes use of all Kerberos Keys with the exception of the NTLM Hash (RC4-HMAC), which is used in the OverPass the Hash technique
Harvesting Kerberos eKeys from LSASS.exe
To forge the Kerberos Tickets, the user’s hashes are needed, at least one of them
Once we have Read Privileges on a KeyTab file, we could use one of the Kerberos Keys stored in that file to encrypt a generated Timestamp and send it as an AS_REQ packet to the Authentication Service (AS) of the Key Distribuction Center (KDC)
There are tools that carry out the above process, such as kinit
Identifying the Kerberos Principal of a Keytab
First, for a given KeyTab file, we should know with which Kerberos Principal are related the Kerberos Keys stored within this file
We can perform this task using klist
klist -k -t <KEYTAB_FILE>
TGT Request (AS_REQ) using a Keytab
Kinit
kinit -k -t <KEYTAB_FILE> <KPRINCIPAL>
e.g.
kinit -k -t ./test.keytab test@TEST.LOCAL
After that, a CCache file should be generated, usually in the /tmp directory
Note that, the requested TGT is injected directly into the current session
To list the information related to the Credential Cache file containing the requested TGT proceed as follows
Once a TGT is obtained, just use the KRB5CCNAME env parameter to inject the TGT into the session, as indicated [[PASS THE TICKET#Ticket Injection - Linux#KRB5CCNAME|here]], and be able to use tools that implement Pass the Ticket
OverPass the Hash | Pass the Key + TGT Injection - Current LUID
All in One
Elevated Privileges not needed
TGT Injected into the Current Logon Session
It performs [[OVERPASS THE HASH#OverPassing The Hash#Rubeus|OverPass the Hash]] or Pass the Key with the provided Kerberos Principal (User Account) and Key/Hash
The Pass the Ticket is carried out using the /ptt parameter
It injects the TGT contained within the received AS_REP in the Current Logon Session
Injecting a TGT into the memory space of a specific LUID involves writing to the LSASS.exe process
Elevated privileges are required when the process performing the injection is running under an Access Token which is not associated with the Target LUID
This is because it implies writing to memory regions of lsass.exe that are not tied to the caller’s own security context
On the other hand, elevated privileges are not required when a process injects a TGT into the memory space of a LUID that is associated with its own Access Token
Rubeus without /luid parameter
Elevated privileges not needed
The TGT injection into Created Logon Session Type 9 is performed from the process (cmd.exe, powershell.exe…) whose Acces Token is associated with that LUID