Hashcat

The hard part of hashcat is not running it but picking the right mode (-m). Here are the ones that come up most on HTB; if unsure, use hashcat --identify or the hash identifier in our resources.

Platform
Linux · Windows · macOS (GPU)
Official site
hashcat.net/hashcat/
On HTB
24 machines
Install
sudo apt install hashcat

Hashcat cheat sheet

Your values Saved in this browser and applied to every cheatsheet.
15 commands

Most used modes

NTLM (Windows NT hash)
hashcat -m 1000 hash.txt /usr/share/wordlists/rockyou.txt
NetNTLMv2 (Responder)
hashcat -m 5600 hash.txt /usr/share/wordlists/rockyou.txt
Kerberoasting (TGS-REP RC4)
hashcat -m 13100 kerberoast.txt /usr/share/wordlists/rockyou.txt
AS-REP roasting
hashcat -m 18200 asrep.txt /usr/share/wordlists/rockyou.txt
sha512crypt ($6$, /etc/shadow)
hashcat -m 1800 hash.txt /usr/share/wordlists/rockyou.txt
bcrypt ($2y$, PHP web apps)
hashcat -m 3200 hash.txt /usr/share/wordlists/rockyou.txt

Attacks

Mask (Uppercase, lowercase and 4 digits)
hashcat -m 0 hash.txt -a 3 '?u?l?l?l?l?d?d?d?d'
Hashes with the username first (user:hash)
hashcat -m 1000 --username hashes.txt /usr/share/wordlists/rockyou.txt

In our cheatsheets

JWT analyser › Attacks

hashcat
hashcat -m 16500 jwt.txt /usr/share/wordlists/rockyou.txt

Windows and Active Directory privilege escalation › Active Directory

AS-REP roasting
impacket-GetNPUsers box.htb/ -usersfile usuarios.txt -no-pass -dc-ip 10.10.11.20 -format hashcat

Crack with hashcat -m 18200.

Active Directory in depth › Impacket

AS-REP roasting Attacker
impacket-GetNPUsers box.htb/usuario:'Password123!' -dc-ip 10.10.11.20 -request -format hashcat -outputfile asrep.txt

hashcat -m 18200

Hash identifier › Cracking

Wordlist
hashcat -m 0 hash.txt /usr/share/wordlists/rockyou.txt
Wordlist with rules
hashcat -m 0 hash.txt /usr/share/wordlists/rockyou.txt -r /usr/share/hashcat/rules/best64.rule
Show an already cracked password
hashcat -m 0 hash.txt --show
Let hashcat guess the type
hashcat hash.txt --identify

HTB machines where Hashcat is used

Taken from the chapters of IppSec videos where Hashcat shows up. The ▶ link jumps to the minute of that part.

Guides that use Hashcat