tools

Hashcat: Password Cracking with GPU, Hash, Modes and Rules

Hashcat: Password Cracking with GPU, Hash, Modes and Rules

Hashcat: GPU password cracking practical guide for NTLM, MD5, SHA, bcrypt hashes. Attack modes, mask patterns, wordlist rules and real techniques from CTF and pentest.

  • Posted on 2026-02-04
  • Reading time: 12 min

Hashcat: Ultimate Guide to GPU Password Cracking for Penetration Testing #

Hashcat is the world's fastest password cracking engine. When you capture a hash during a pentest (perhaps with Responder ), Hashcat is the tool that transforms it into cleartext passwords using the power of your GPU.

Forget John the Ripper, which takes hours. With Hashcat and a decent GPU, you can crack millions of passwords per second. In this guide, you'll learn how to use Hashcat like a real penetration tester: from scratch to cracking complex enterprise hashes with techniques that work on real targets.

Setup Lab: From Hardware to Operational Cracking #

Hardware Requirements #

Compatible GPUs:

  • NVIDIA (CUDA): GTX 1060 or better (RTX 3060+ recommended)
  • AMD (OpenCL): RX 580 or better (RX 6700+ recommended)
  • Apple Silicon: M1/M2/M3 (via Metal, limited performance)

Minimum RAM: 8GB (16GB recommended for large wordlists)

Storage: 50GB+ free for wordlist and rainbow tables

Installation on Kali Linux #

bash
# Update sistema
sudo apt update && sudo apt upgrade -y

# Installa Hashcat
sudo apt install hashcat

# Verifica versione
hashcat --version

Output:

text
v6.2.6

GPU Driver Installation #

NVIDIA (performance criticisms):

bash
# Verifica GPU riconosciuta
lspci | grep -i nvidia

# Installa driver NVIDIA
sudo apt install nvidia-driver nvidia-cuda-toolkit

# Reboot
sudo reboot

# Verifica CUDA funzionante
nvidia-smi

nvidia-smi output:

text
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 525.147.05   Driver Version: 525.147.05   CUDA Version: 12.0     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  NVIDIA GeForce ...  Off  | 00000000:01:00.0  On |                  N/A |
| 30%   45C    P8    15W / 170W |   1024MiB /  8192MiB |      0%      Default |
+-------------------------------+----------------------+----------------------+

AMD:

bash
# Installa driver OpenCL
sudo apt install mesa-opencl-icd

# Verifica OpenCL
clinfo | grep "Device Name"

Benchmark Test #

Before cracking, test GPU performance:

bash
hashcat -b

Output (example RTX 3060):

text
Hashmode: 0 - MD5
Speed.#1.........:  8523.4 MH/s

Hashmode: 1000 - NTLM
Speed.#1.........:  15234.7 MH/s

Hashmode: 2500 - WPA-EAPOL-PBKDF2
Speed.#1.........:    12345 H/s

Hashmode: 3200 - bcrypt
Speed.#1.........:     5432 H/s

Speed ​​legend:

  • MH / s = Millions of hashes/second (MD5, NTLM - fast)
  • kH/s = Thousands of hashes/second (SHA256, SHA512 - average)
  • H/s = Hash/second (bcrypt, scrypt, Argon2 - intentionally slow)

With RTX 3060 you test about 15 billion NTLMs per second.

Identify Hash Type #

Before cracking, you need to know what type of hash you have. Hashcat supports over 300 algorithms.

Hash Common Penetration Testing #

Hash TypeHashcat ModeExampleCommon Use
MD505f4dcc3b5aa765d61d8327deb882cf99Legacy web apps
NTLM10008846f7eaee8fb117ad06bdd830b7586cWindows (from Reply )
NTLMv25600admin::N46iSNekpT:08ca45b7d7ea58ee:...Windows challenge response
SHA11005baa61e4c9b93f3f0682250b6cf8331b7ee68fd8Git, legacy systems
SHA25614005e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8Linux shadow modern
bcrypt3200$2a$10$N9qo8uLOickgx2ZMRZoMyeIjZAgcfl7p92ldGxad68LJZdL17lhWySecure web apps
WPA222000WPA*02*hash*BSSID*STATION*ESSID...WiFi handshake

Automatic Identification #

Usa hashid o hash-identifier:

bash
# Installa hashid
pip3 install hashid

# Identifica hash
echo "5f4dcc3b5aa765d61d8327deb882cf99" | hashid

Output:

text
Analyzing '5f4dcc3b5aa765d61d8327deb882cf99'
[+] MD5 
[+] Domain Cached Credentials - MD4(MD4(($pass)).(strtolower($username)))

Or use online tools (but be careful not to upload hashes of real customers):

Attack Mode 0: Dictionary Attack #

The simplest attack: Try all the passwords in a wordlist.

Essential Wordlists #

RockYou (must-have):

bash
# Già inclusa in Kali, compressa
sudo gunzip /usr/share/wordlists/rockyou.txt.gz

# Dimensione: 133MB, 14.3 milioni password
wc -l /usr/share/wordlists/rockyou.txt
# Output: 14344392 /usr/share/wordlists/rockyou.txt

SecLists:

bash
cd /opt
sudo git clone https://github.com/danielmiessler/SecLists.git

CrackStation:

bash
wget https://crackstation.net/crackstation-human-only.txt.gz
gunzip crackstation-human-only.txt.gz
# 1.5GB, password più comuni

Cracking MD5 Hash (Base) #

Scenario: You have dumped MySQL database, passwords are MD5.

bash
# Hash MD5 di "password123"
echo -n "password123" | md5sum
# Output: 482c811da5d5b4bc6d497ffa98491e38

# Salva hash
echo "482c811da5d5b4bc6d497ffa98491e38" > hash.txt

# Cracka con RockYou
hashcat -m 0 -a 0 hash.txt /usr/share/wordlists/rockyou.txt

Parameters:

  • -m 0 = MD5 mode
  • -a 0 = Straight attack (dictionary)
  • hash.txt = file with hash
  • rockyou.txt = wordlist

Output during cracking:

text
hashcat (v6.2.6) starting...

OpenCL API (OpenCL 3.0) - Platform #1 [NVIDIA]
======================================================
* Device #1: NVIDIA GeForce RTX 3060, 8192 MB

Dictionary cache hit:
* Filename..: /usr/share/wordlists/rockyou.txt
* Passwords.: 14344392
* Bytes.....: 139921507
* Keyspace..: 14344385

482c811da5d5b4bc6d497ffa98491e38:password123

Session..........: hashcat
Status...........: Cracked
Hash.Mode........: 0 (MD5)
Time.Started.....: Wed Feb  5 14:23:45 2025
Time.Estimated...: Wed Feb  5 14:23:46 2025 (1 sec)
Speed.#1.........:  8523.4 MH/s
Recovered........: 1/1 (100.00%) Digests
Progress.........: 8523456/14344385 (59.42%)

Cracked in 1 second! Password found: password123

View Cracked Passwords #

bash
hashcat -m 0 hash.txt --show

Output:

text
482c811da5d5b4bc6d497ffa98491e38:password123

If you work in environments without a GPU or want to analyze specific formats in CPU mode, you can use the historical alternative John the Ripper , which is discussed in detail here: 👉 https://hackita.it/articoli/john-the-ripper

Hashcat remains superior in terms of speed thanks to GPU acceleration, but knowledge of both tools is essential in a real-world penetration testing context.

Cracking NTLM Hash (Windows) #

Scenario: Captured NTLM hash with Responder.

bash
# Hash NTLM di "Summer2024!"
echo "8846f7eaee8fb117ad06bdd830b7586c" > ntlm.txt

# Cracka con wordlist italiana
hashcat -m 1000 -a 0 ntlm.txt /opt/SecLists/Passwords/italian.txt

NTLM Performance: With RTX 3060 → about 15 GH/s → tests 15 billion passwords/second.

RockYou (14.3M passwords) runs out in less than 1 second.

Cracking NTLMv2 (Challenge-Response) #

NTLMv2 hashes captured by Responder have different format:

bash
# Esempio hash NTLMv2
echo "admin::CORP:1122334455667788:8C5D91E2F42AB3C5:010100..." > ntlmv2.txt

# Cracka (più lento di NTLM semplice)
hashcat -m 5600 -a 0 ntlmv2.txt rockyou.txt

NTLMv2 Performance: RTX 3060 → approximately 500 kH/s (500.000 hashes/second)

Much slower because it includes challenge-response. RockYou takes about 30 seconds.

Attack Mode 3: Brute Force with Mask #

When wordlists fail, you use mask attacks: you generate all possible combinations based on patterns.

Default Charset #

CharsetSymbolCharactersExample
Lowercase?lAZ?l?l?l?l = aaaa, aaab, … zzzz
Uppercase?uAZ?u?u?u?u = AAAA, AAAB, … ZZZZ
Digits?d0-9?d?d?d?d = 0000, 0001, … 9999
Special?s!@#$%…?s?s = !!, !@, …
All lowercase+num?l?da-z0-9combined
All printable?aa-zA-Z0-9 + specialEverything

Common Password Patterns #

Typical business passwords:

bash
# Estate2024!  (Stagione + Anno + !)
hashcat -m 1000 -a 3 hash.txt ?u?l?l?l?l?l?d?d?d?d!

# Admin123
hashcat -m 1000 -a 3 hash.txt ?u?l?l?l?l?d?d?d

# Welcome@2024
hashcat -m 1000 -a 3 hash.txt ?u?l?l?l?l?l?l?s?d?d?d?d

# Password1! (comune)
hashcat -m 1000 -a 3 hash.txt ?u?l?l?l?l?l?l?l?d!

Automatic Increment #

Test all lengths from minimum to maximum:

bash
# Password 6-8 caratteri lowercase+digits
hashcat -m 0 -a 3 hash.txt --increment --increment-min=6 --increment-max=8 ?l?l?l?l?l?l?l?l

Concrete example - 4-digit PIN:

bash
# Tutti i PIN da 0000 a 9999
hashcat -m 0 -a 3 hash.txt ?d?d?d?d

Keyspace: 10.000 combinations Time with RTX 3060: < 1 millisecond (8.5 GH/s for MD5)

Custom Charset #

Define custom charsets:

bash
# Solo vocali lowercase
hashcat -m 0 -a 3 hash.txt -1 aeiou ?1?1?1?1?1

# Hex characters (0-9a-f)
hashcat -m 0 -a 3 hash.txt -1 0123456789abcdef ?1?1?1?1?1?1?1?1

Practical example - Software serials:

bash
# Formato: XXXX-XXXX (X = 0-9A-F)
hashcat -m 0 -a 3 hash.txt -1 ?u?d ?1?1?1?1-?1?1?1?1

Mask File for Extended Campaigns #

Create files with multiple masks:

bash
nano masks.hcmask

Content:

text
?d?d?d?d
?d?d?d?d?d
?d?d?d?d?d?d
?l?l?l?l?d?d
?l?l?l?l?d?d?d
?u?l?l?l?l?d?d
?u?l?l?l?l?d?d?d
?u?l?l?l?l?d?d?d!
?u?l?l?l?l?l?d?d?d?d
?u?l?l?l?l?l?s?d?d?d?d

Execution:

bash
hashcat -m 1000 -a 3 hash.txt masks.hcmask

Hashcat tries all masks in sequence.

Attack Mode 6: Hybrid Wordlist + Mask #

Combine wordlist with mask: append/prepend characters to existing passwords.

Hybrid Attack: Wordlist + Suffix #

Scenario: Corporate password = common word + year.

bash
# Appende anno 2020-2025
hashcat -m 1000 -a 6 hash.txt rockyou.txt ?d?d?d?d

What does he do:

  • Law password from rockyou.txt
  • Generate: password2020, password2021,…, password9999
  • Law admin from rockyou.txt
  • Generate: admin2020, admin2021, ...

Hybrid Attack: Prefix + Wordlist #

bash
# Prepende carattere speciale + digit
hashcat -m 1000 -a 7 hash.txt ?s?d rockyou.txt

Generate:

  • !1password, !2password,…, !9password
  • @1admin, @2admin, ...

Real-world example - “Mandatory special character” policy:

Many companies force: "At least one special character." Users simply do: Password123!

bash
# Testa parole comuni + ! alla fine
hashcat -m 1000 -a 6 hash.txt common_passwords.txt !

Rules: Advanced Mutation Wordlist #

Rules are the secret of pros. They transform every password in the wordlist into dozens of variations.

Default Rule Base #

Hashcat includes optimized rulesets:

bash
ls -lh /usr/share/hashcat/rules/

Output:

text
best64.rule           # 64 regole migliori (veloce)
d3ad0ne.rule          # 33k regole (medio)
dive.rule             # 100k regole (lento, completo)
InsidePro-PasswordsPro.rule  # 727M regole (massiccio)

Apply Rules #

bash
# RockYou + best64 rules
hashcat -m 1000 -a 0 hash.txt rockyou.txt -r /usr/share/hashcat/rules/best64.rule

What best64 rules do:

  • password → Password (capitalize)
  • password → PASSWORD (uppercase)
  • password → p@ssword (leetspeak)
  • password → password123 (append digits)
  • password → drowssap (reverse)
  • password → Password! (capitalize + !)
  • … 58 additional variations

Multiplier effect: RockYou has 14.3M passwords → with best64 it becomes about 915M combinations to test.

Combining Multiple Rules #

bash
# Applica best64 + leetspeak + specifiche
hashcat -m 1000 -a 0 hash.txt rockyou.txt -r best64.rule -r leetspeak.rule

Custom Rules #

Create custom.rule:

bash
nano custom.rule

Content:

text
# Append anno corrente
$2$0$2$4

# Capitalize first + append !
c$!

# Leetspeak common
sa4 se3 si1 so0

# Duplicate
d

# Reverse + append 123
r$1$2$3

Syntax rules:

  • c = Capitalize first
  • $X = Append character X
  • ^X = Prepend character X
  • sXY = Substitute X with Y
  • d = Duplicate
  • r = Reverse
  • T0 = Toggle case
  • [ / ] = Rotate left/right

Apply custom rule:

bash
hashcat -m 1000 -a 0 hash.txt wordlist.txt -r custom.rule

Cracking Hash Complexes: bcrypt, SHA512crypt #

bcrypt (Very Slow by Design) #

bcrypt is designed to be slow (anti-bruteforce). It uses a cost factor (work factor).

Example bcrypt hash:

text
$2a$10$N9qo8uLOickgx2ZMRZoMyeIjZAgcfl7p92ldGxad68LJZdL17lhWy

Structure:

  • $2a$ = bcrypt algorithm
  • 10 = Cost factor (2^10 = 1024 iterations)
  • N9qo8uLOickgx2ZMRZoMye = Salt
  • IjZAgcfl7p92ldGxad68LJZdL17lhWy = Hash

Cracking:

bash
hashcat -m 3200 -a 0 bcrypt.txt rockyou.txt

bcrypt performance (cost 10): RTX 3060 → about 5.4 kH/s (5.400 hashes/second)

Time for RockYou: 14.3M passwords / 5.4k/s = about 44 minutes

For cost factor 12 (4x slower): about 3 hours

Workaround for bcrypt:

  • Use small, targeted wordlists
  • Apply only essential rules
  • Consider only likely passwords (no complete brute force)

SHA512crypt (Linux Shadow) #

bash
# Hash da /etc/shadow Linux
echo '$6$rounds=5000$salt$hash...' > shadow.txt

hashcat -m 1800 -a 0 shadow.txt rockyou.txt

Performance SHA512crypt: RTX 3060 → approx. 120 kH/s

Faster than bcrypt but slower than NTLM.

Performance Optimization #

Workload Tuning #

bash
# Performance massima (può bloccare GUI)
hashcat -m 1000 -a 0 hash.txt rockyou.txt -w 4

# Performance bilanciata (default)
hashcat -m 1000 -a 0 hash.txt rockyou.txt -w 3

# Performance bassa (sistema usabile)
hashcat -m 1000 -a 0 hash.txt rockyou.txt -w 2

Workload levels:

  • -w 1 = Low (usable PC, GPU at 20%)
  • -w 2 = Default (PC usable, GPU at 50%)
  • -w 3 = High (GUI lag, GPU at 90%)
  • -w 4 = Nightmare (system frozen, GPU at 100%)

Kernel Optimizer #

bash
# Auto-tune kernel (consigliato)
hashcat -m 1000 -a 0 hash.txt rockyou.txt -O

Flag -O Enables optimized kernels specifically for short passwords (≤32 chars). Typically increases speed by 20-40%.

Multiple GPU #

bash
# Usa solo GPU 1 e 2
hashcat -m 1000 -a 0 hash.txt rockyou.txt -d 1,2

# Info su GPU disponibili
hashcat -I

output -I:

text
OpenCL Info:
============

Platform ID #1
  Vendor  : NVIDIA Corporation
  Name    : NVIDIA CUDA
  Device ID #1
    Name             : NVIDIA GeForce RTX 3060
    Compute capability: 8.6
    
Platform ID #2
  Vendor  : AMD
  Name    : AMD Accelerated Parallel Processing
  Device ID #2
    Name             : AMD Radeon RX 6700

Use both:

bash
hashcat -m 1000 hash.txt rockyou.txt -d 1,2

Performance adds up: RTX 3060 (15 GH/s) + RX 6700 (12 GH/s) = 27 GH/s total.

Sessions and Restores #

Save/Restore Session #

Hashcat can be stopped and resumed:

bash
# Avvia con session name
hashcat -m 1000 -a 3 hash.txt ?a?a?a?a?a?a?a --session=mycrack

# Durante esecuzione, premi 'q' per quit (salva stato)

# Riprendi session
hashcat --session=mycrack --restore

Automatic Checkpoint #

Hashcat automatically saves state every 10 seconds to:

text
~/.hashcat/sessions/mycrack.restore

If your system/GPU crashes, you can pick up right where you left off.

Monitor Progress #

While running, press:

  • s = Status (show progress)
  • p = Pause
  • r = Resume
  • b = Bypass current word (debug)
  • q = Quit (save and exit)

Output status (press 's'):

text
Session..........: hashcat
Status...........: Running
Hash.Mode........: 1000 (NTLM)
Time.Started.....: Wed Feb  5 15:30:22 2025
Time.Estimated...: Wed Feb  5 15:45:12 2025 (14 mins, 50 secs)
Guess.Base.......: File (rockyou.txt)
Speed.#1.........:  15234.7 MH/s
Recovered........: 3/10 (30.00%)
Progress.........: 5234567890/14344385000 (36.47%)
Rejected.........: 12345/5234567890 (0.00%)
Restore.Point....: 5234560000/14344385000

Most Common Hashes in Penetration Testing — Top 30 Table #

This table presents the 30 most relevant hashes you'll encounter during real-world penetration testing. It's based on official documentation available at https://hashcat.net/wiki/doku.php?id=example_hashes and practical experience in enterprise engagement.

FashionAlgorithm/TypeHash ExampleWhere it isSafety
0MD55f4dcc3b5aa765d61d8327deb882cf99Legacy web app database, phpBB, vBulletinWeak
100SHA15baa61e4c9b93f3f0682250b6cf8331b7ee68fd8Git commits, legacy systemsWeak
1000NTLMb4b9b02e6f09a9bd760f388b67351e2bWindows SAM, Active DirectoryWeak
1100Domain Cached Credentials (DCC)4dd8965d1d476fa0d84ffea16e96b7...Windows cached credentialsMedium
1400SHA2565e884898da28047151d0e56f8dc6292...Modern Linux /etc/shadowMedium
1700SHA512b109f3bbbc244eb82441917ed06d618...Linux /etc/shadow enterpriseMedium
1800sha512crypt $6$, SHA512(Unix)$6$rounds=5000$salt$hash...Linux/Unix shadow fileHigh
2500WPA-EAPOL-PBKDF2hash$bssid$station$essid...WiFi WPA/WPA2 handshake (legacy)Medium
3200bcrypt $2*$, Blowfish (Unix)$2a$10$N9qo8uLOickgx2ZMRZoMy...Modern web apps (Laravel, Django)High
5500NetNTLMv1 / NetNTLMv1+ESSu4-netntlm::kNS:338d08f8e26...Windows NTLM auth legacyWeak
5600NetNTLMv2admin::N46iSNekpT:08ca45b7d7...Windows NTLM auth, Responder capturesMedium
13100Kerberos 5 TGS-REP etype 23$krb5tgs$23$*user$realm$...Kerberoasting attacks ADMedium
18200Kerberos 5 AS-REP etype 23$krb5asrep$23$user@domain...AS-REP roasting attacks ADMedium
16800WPA-PMKID-PBKDF2hash*bssid*station*essidWiFi WPA/WPA2 clientless attackMedium
22000WPA-PBKDF2-PMKID + EAPOLWPA*02*hash*mac*mac*essid...WiFi WPA/WPA2/WPA3 (new format)Medium
7500Kerberos 5 AS-REQ Pre-Auth$krb5pa$23$user$realm$...Kerberos pre-authMedium
13400KeepAss 1/2 AES$keepass$*2*60000*...KeePass database filesHigh
11300Bitcoin/Litecoin wallet.dat$bitcoin$96$hash...crypto walletsHigh
15700Ethereum Wallet, PBKDF2-HMAC-SHA256$ethereum$p*262144*...Ethereum keystoreHigh
1500desrypt, DES (Unix), Traditional DES48c/R8JAv757ALegacy Unix systemsWeak
3000LM299BD128C1101FD6Windows legacy (pre-Vista)Weak
400phppass, WordPress (MD5), phpBB3 (MD5)$P$9IQRaTwmfeRo7u...WordPress, Joomla, phpBBMedium
2611vBulletin <v3.8.5bf366348c53ddcfbd16e63edfdd1eee6:48vBulletin forumWeak
121SMF (Simple Machines Forum) > v1.1sha1:a94c0...SMF forumsWeak
124Django (SHA-1)sha1$salt$hashDjango web frameworkMedium
10000Django (PBKDF2-SHA256)pbkdf2_sha256$120000$salt...Modern DjangoHigh
16100TACACS +$tacacs-plus$0$hash...Cisco TACACS+ authMedium
8900scryptSCRYPT:1024:1:1:salt:hashLitecoin, TarsnapHigh
116007-Zip$7z$0$19$0$salt...7-Zip encrypted archivesMedium
9700MS Office ≤ 2003 $0/$1, MD5 + RC4$oldoffice$0$hash...Office doc legacyWeak

Footnotes:

  • Weak: Fast to crack with modern GPUs (MD5, SHA1, NTLM, LM)
  • Medium: Requires good wordlists or specific patterns (NetNTLMv2, WPA2, phpass)
  • High: Slow by design, requires weak passwords or targeted wordlists (bcrypt, scrypt, Argon2)

Advanced CTF Techniques #

Salted Hash #

Hashes with salt require specific format:

bash
# MD5 salted: hash:salt
echo "5f4dcc3b5aa765d61d8327deb882cf99:randomsalt" > salted.txt

# Mode 10 = md5($pass.$salt)
hashcat -m 10 -a 0 salted.txt rockyou.txt

# Mode 20 = md5($salt.$pass)
hashcat -m 20 -a 0 salted.txt rockyou.txt

Check correct mode with:

bash
hashcat --example-hashes | grep -i "md5.*salt" -A 5

Combinator Attack #

Combine two wordlists:

bash
# Crea firstname.txt
echo -e "john\nmary\ndavid" > first.txt

# Crea lastname.txt
echo -e "smith\njones\nbrown" > last.txt

# Combina
hashcat -m 0 -a 1 hash.txt first.txt last.txt

Generate:

  • johnsmith, johnjones, johnbrown
  • marysmith, maryjones, marybrown
  • davidsmith, davidjones, davidbrown

Real use: Password = first name + last name (common in companies).

Practical Penetration Testing Scenarios #

Scenario 1: Hash from Dumpato Database #

Situation: SQL injection on web app, dumped users table.

sql
SELECT username, password FROM users;

Output:

text
admin, 5f4dcc3b5aa765d61d8327deb882cf99
john, 482c811da5d5b4bc6d497ffa98491e38
mary, e10adc3949ba59abbe56e057f20f883e

Identify hash:

bash
echo "5f4dcc3b5aa765d61d8327deb882cf99" | hashid
# MD5

Crack all:

bash
# Crea file hash
cat > hashes.txt << EOF
5f4dcc3b5aa765d61d8327deb882cf99
482c811da5d5b4bc6d497ffa98491e38
e10adc3949ba59abbe56e057f20f883e
EOF

# Cracking con RockYou
hashcat -m 0 -a 0 hashes.txt rockyou.txt -o cracked.txt

Result:

bash
cat cracked.txt
5f4dcc3b5aa765d61d8327deb882cf99:password
482c811da5d5b4bc6d497ffa98491e38:password123
e10adc3949ba59abbe56e057f20f883e:123456

Credential spray on web app:

text
admin:password
john:password123
mary:123456

Scenario 2: NTLM from Responder #

Captured with Responder :

bash
cat /opt/Responder/logs/SMB-NTLMv2-SSP-192.168.1.50.txt

NTLMv2 Hash:

text
john.doe::CORP:1122334455667788:A4F2E8C9D1B6A3F7:01010000000000008B2...

Cracking:

bash
hashcat -m 5600 -a 0 ntlmv2.txt rockyou.txt -w 4 -O

If wordlist fails, try company mask:

bash
# Password policy: Stagione + Anno + carattere speciale
hashcat -m 5600 -a 3 ntlmv2.txt ?u?l?l?l?l?l?d?d?d?d?s

Generate: Spring2024!, Summer2024!, Winter2024!, etc.

Scenario 3: WiFi WPA2 Handshake #

Captured handshake with aircrack-ng:

bash
# Converti .cap in formato hashcat
hcxpcapngtool -o hash.hc22000 capture.cap

# Cracka WPA2 (mode 22000)
hashcat -m 22000 -a 0 hash.hc22000 rockyou.txt

WPA2 is slow (PBKDF2): RTX 3060 → about 120 kH/s

RockYou takes about 30 minutes.

Optimization with WiFi-specific wordlist:

bash
wget https://github.com/kennyn510/wpa2-wordlists/raw/master/Wordlists/wifi.txt
hashcat -m 22000 -a 0 hash.hc22000 wifi.txt

Common WiFi passwords: router name + year, street address, phone number.

Integration with Other Tools #

John the Ripper → Hashcat #

John uses his own format. Convert:

bash
# Hash craccato da John
john shadow.txt --format=sha512crypt

# Mostra in formato Hashcat
john shadow.txt --show

Copy hash and use with Hashcat for GPU acceleration.

Hashcat → Password Spray #

After cracking, use password spray:

bash
# Craccati 50 NTLM hash, ottieni 30 password
hashcat -m 1000 hashes.txt rockyou.txt --show > cracked.txt

# Estrai solo password
cut -d: -f2 cracked.txt > passwords.txt

# Spray con [SMBClient](/articoli/smbclient/)
for pwd in $(cat passwords.txt); do
    smbclient -L //target -U admin%$pwd
done

Export Potfile #

Hashcat maintains databases of cracked hashes:

bash
cat ~/.hashcat/hashcat.potfile

Output:

text
5f4dcc3b5aa765d61d8327deb882cf99:password
8846f7eaee8fb117ad06bdd830b7586c:Summer2024!
482c811da5d5b4bc6d497ffa98491e38:password123

Useful for multi-target campaigns: if the hash has already been cracked in the past, Hashcat recognizes it instantly.

Common Troubleshooting #

“No hashes loaded” - Incorrect Hash Format #

Error:

text
No hashes loaded

Cause: Hash format does not match mode.

Fix:

bash
# Identifica hash corretto
hashcat --example-hashes | grep -i ntlm

# Verifica formato richiesto
hashcat -m 1000 --example-hashes

NTLM hash must be: 32 hex characters, no spaces, no prefixes.

Correct:

text
8846f7eaee8fb117ad06bdd830b7586c

Incorrect:

text
NTLM:8846f7eaee8fb117ad06bdd830b7586c    # ha prefisso
8846f7ee e8fb117 ad06bdd830b7586c        # ha spazi

GPU Not Recognized #

Error:

text
No devices found/left

Fix NVIDIA:

bash
# Reinstalla driver
sudo apt purge nvidia-*
sudo apt autoremove
sudo apt install nvidia-driver-525 nvidia-cuda-toolkit
sudo reboot

# Verifica
nvidia-smi

Fix AMD:

bash
# Installa ROCm
sudo apt install rocm-opencl-runtime
sudo usermod -a -G video $USER
sudo reboot

Kernel Timeout / Watchdog #

Error:

text
Watchdog: Temperature abort trigger set to 90c

Reason:

  • GPU overheating
  • Unstable overclock
  • Insufficient PSU

Fix:

bash
# Limita workload
hashcat -m 1000 hash.txt wordlist.txt -w 2

# Limita kernel runtime
hashcat -m 1000 hash.txt wordlist.txt --kernel-accel=1 --kernel-loops=64

Out of Memory #

Error:

text
CUDA error: out of memory

Fix:

bash
# Riduci dimensione wordlist
head -n 1000000 rockyou.txt > small_rockyou.txt

# Oppure split e cracka a chunks
split -l 1000000 rockyou.txt chunk_
for file in chunk_*; do
    hashcat -m 0 hash.txt $file
done

Performance Comparison Table #

Hash Speed ​​for GPUs (Hashcat Benchmark) #

Hash TypeRTX 3060RTX 4090RX 6700 XTMax M1Defense Method
MD58.5 GH / s25 GH / s7.2 GH / s2.1 GH / sDo not use
SHA13.2 GH / s9.5 GH / s2.8 GH / s1.2 GH / sDo not use
SHA2561.2 GH / s3.8 GH / s1.1 GH / s450 MH / sDo not use
NTLM15 GH / s45 GH / s12 GH / s4.5 GH / sDo not use
NTLMv2500 kH/s1.5 MH / s420 kH/s180 kH/sSMB Signing
bcrypt (cost 10)5.4 kH/s15 kH/s4.8 kH/s2.1 kH/s✓ Safe
WPA2120 kH/s350 kH/s110 kH/s45 kH/sLong password
scrypt150 H / s450 H / s130 H / s60 H / s✓ Safe
Argon280 H / s220 H / s70 H / s35 H / s✓✓ Very safe

Description:

  • GH/s = Giga hash/second (billions)
  • MH/s = Mega hash/second (millions)
  • kH/s = Kilo hash/second (thousands)
  • H/s = Hash/second

Tempo Cracking RockYou (14.3M password) #

Hash TypeRTX 3060RTX 4090Dev Recommendation
MD5< 1 sec< 1 sec❌ Never use
NTLM< 1 sec< 1 sec❌ Never use
SHA256~10 sec~3 sec❌ Never use
bcrypt (10)~ 44 min~ 16 min✓ OK (cost 12+ better)
bcrypt (12)~3 hours~1 hour✓✓ Good
Argon2id~50 hours~18 hours✓✓✓ Excellent

Operational Checklist #

Pre-Cracking:

  • Hash correctly identified (hashid)
  • Mode Hashcat verified (--example-hashes)
  • Working GPU (nvidia-smi / clinfo)
  • Downloaded wordlists (RockYou, SecLists)
  • Sufficient disk space (>50GB for large wordlists)

During Cracking:

  • Session saved (--session=name)
  • Optimized Workload (-w 3 o -w 4)
  • Kernel optimized enabled (-O)
  • Monitored GPU temperature (< 85°C)
  • Progress verified periodically (awards s)

Post-Cracking:

  • Passwords displayed (--show)
  • Output saved (-o cracked.txt)
  • Backup Potfile (~/.hashcat/hashcat.potfile)
  • Passwords tested on real target
  • Documented for customer reporting

Best Practices:

  • Always start with wordlist before brute force
  • Use rule only after wordlist base fails
  • Mask attack only if you know the password pattern
  • Backup sessions every day for long campaigns
  • Do not share customer hashes with online services

Hashcat Technical FAQ #

How long does it take to crack a random 8-character password?

It depends on the charset:

  • Lowercase only (26^8): RTX 3060 → ~5 minutes (MD5)
  • Lowercase + digits (36^8): RTX 3060 → ~45 minutes (MD5)
  • Mixed alphanumeric (62^8): RTX 3060 → ~15 hours (MD5)
  • Full ASCII (95^8): RTX 3060 → unplayable (years)

For NTLM (faster): divide times by 2. For bcrypt: impossible to brute force completely.

Does Hashcat work without a GPU?

Yes, but extremely slow. CPU mode:

bash
hashcat -m 1000 hash.txt rockyou.txt --force

Intel i7 CPU: ~200 MH/s MD5 vs RTX 3060 GPU: 8.500 MH/s → 42x slower.

Can I crack hashes without salt if the application uses salt?

No. If application does hash(password + salt), you must provide salt:

bash
# Formato hash:salt
echo "5f4dcc3b5aa765d61d8327deb882cf99:randomsalt123" > hash.txt
hashcat -m 10 hash.txt wordlist.txt

Without the correct salt, hash will never match.

Is it worth buying an RTX 4090 for cracking?

It depends on the use:

  • Occasional (CTF, sporadic pentests): No, RTX 3060 sufficient
  • Professional (monthly pentests): Yes, ROI in time saved
  • Full-time red team: Absolutely, consider multi-GPU rigs

How to crack 1000 hashes at once?

Hashcat automatically handles:

bash
# File con 1000 hash (uno per riga)
hashcat -m 1000 1000_hashes.txt rockyou.txt

Identical performance to a single hash. Hashcat optimizes automatically.

Is the password “Tr0ub4dor&3” safe?

Against dictionary: Yes (made up word, leetspeak) Against brute force: Relatively (14 char, mixed case+special+digits) Against targeted attack: Depends

Better passphrase: correct horse battery staple (longer, safer).

Can Hashcat crack hashes without knowing the algorithm?

No. You must specify the correct mode. Use hashid for automatic identification, then manually check mode:

bash
hashid hash.txt
hashcat --help | grep -i "algoritmo_identificato"

Useful links:

Legal Disclaimer: Hashcat is a legal tool for password recovery, authorized penetration testing, and security research. Using it to crack other people's passwords without explicit written consent constitutes a criminal offense. Use only on your own hashes or in the context of a formally authorized security assessment.

#bcrypt #ntlm #hash

leave a message

I'm not a robot