NetworkMiner is one of the best tools around for extracting credentials, such as usernames and passwords, from PCAP files.
The credential extraction feature is primarily designed for defenders, in order to analyze
credential theft and
lateral movement by adversaries inside your networks.
But the credential extraction feature is also popular among penetration testers.
In this blog post I will demo how Kerberos hashes can be extracted from captured network traffic with NetworkMiner, and how these hashes can be cracked in order to retrieve the clear text passwords.
Installing NetworkMiner in Kali Linux
I’m using a clean install of
Kali Linux 2019.3, on which I have installed NetworkMiner by following the step-by-step instructions in our guide for
installing NetworkMiner in Ubuntu, Fedora and Arch Linux.
Extracting Kerberos Hashes from PCAP
There is a capture file in
Wireshark’s sample captures called krb-816.cap.
This capture file contains Kerberos traffic from a Windows XP machine, as two user accounts perform a domain logon.
Let’s download that PCAP file and open it in NetworkMiner.
The “Credentials” tab contains the extracted Kerberos hashes.
Right-click on the first
Paste the password to a text file, either using a text editor or directly from a shell.
Note: You’ll need to do press
You can now try to crack the hash, for example by running John the Ripper (JtR) or hashcat.
Yay! We now know that the password of user “des” was “123”.
Let’s try to recover the password of the user “u5” as well, but this time we’ll use the
Apparently the password for user u5 was “123” as well.
If you wanna replace JtR with hashcat, then make sure to use the following hash modes:
- $krb5pa$23$: hashcat -m 7500
- $krb5tgs$23$: hashcat -m 13100
- $krb5asrep$23$: hashcat -m 18200
For other hash types, please see the hashcat example hashes.
Running the Command Line version of NetworkMiner
The commercial version of NetworkMiner comes with a command line tool called
You can extract the Kerberos hashes from a PCAP file and save them to a CSV file using NetworkMinerCLI like this:
NetworkMinerCLI has now created a set of CSV files, one for each type/class of information found in the capture file.
In this case we want the
in which the hashes and passwords are in column 5:
*** This is a Security Bloggers Network syndicated blog from NETRESEC Network Security Blog authored by Erik Hjelmvik. Read the original post at: http://www.netresec.com/?page=Blog&month=2019-11&post=Extracting-Kerberos-Credentials-from-PCAP