illustration✦✦

unravel

Illustration · Signal
tool

Hashcat: password recovery on GPUs

Tests how quickly password hashes can be cracked using graphics cards.

Curated by Signal · 10/5/2026

Original: hashcat.net ↗License: MITRepository ↗

What it is

Hashcat recovers plaintext from password hashes using the CPU or, much faster, the GPU. Security teams use it to audit how weak their users' passwords really are. Run it only on hashes you are authorized to test, such as your own accounts or an authorized assessment.

Basic syntax

hashcat -m <hash-type> -a <attack-mode> <hashfile> <wordlist-or-mask>

-m sets the hash algorithm, -a sets the attack mode (0 = wordlist, 3 = brute-force mask).

Common hash type numbers (-m)

0      MD5
100    SHA1
1400   SHA256
1700   SHA512
1000   NTLM (Windows)
3200   bcrypt
500    Unix crypt (MD5)
13100  Kerberos 5 TGS-REP

Dictionary attack (mode 0)

# Basic wordlist attack
hashcat -m 0 -a 0 hashes.txt rockyou.txt

# Multiple wordlists combined
hashcat -m 0 -a 0 hashes.txt wordlist1.txt wordlist2.txt

Rule-based attacks

# Apply a rule file to mutate wordlist entries (capitalize, add numbers, etc.)
hashcat -m 0 -a 0 hashes.txt rockyou.txt -r rules/best64.rule

# Use hashcat's built-in rule set
hashcat -m 0 -a 0 hashes.txt rockyou.txt -r /usr/share/hashcat/rules/best64.rule

Mask attack (brute-force with a pattern)

# 8 characters, all lowercase
hashcat -m 0 -a 3 hashes.txt ?l?l?l?l?l?l?l?l

# 6 digits, like a PIN
hashcat -m 0 -a 3 hashes.txt ?d?d?d?d?d?d

# Mixed: capital letter, 5 lowercase, 2 digits
hashcat -m 0 -a 3 hashes.txt ?u?l?l?l?l?l?d?d

Mask symbols: ?l lowercase, ?u uppercase, ?d digit, ?s symbol, ?a all characters.

Combinator attack (mode 1)

# Combine two wordlists, word1+word2
hashcat -m 0 -a 1 hashes.txt wordlist1.txt wordlist2.txt

Hybrid attacks

# Wordlist + mask appended (e.g. word123)
hashcat -m 0 -a 6 hashes.txt rockyou.txt ?d?d?d

# Mask + wordlist appended (e.g. 123word)
hashcat -m 0 -a 7 hashes.txt ?d?d?d rockyou.txt

Managing sessions

# Name a session so it can be resumed
hashcat -m 0 -a 0 hashes.txt rockyou.txt --session=audit1

# Resume a previous session
hashcat --session=audit1 --restore

# Pause with 'p', quit with 'q' while running

Viewing results

# Show cracked passwords found so far
hashcat -m 0 hashes.txt --show

# Show only passwords not yet cracked
hashcat -m 0 hashes.txt --left

# Write cracked results to a file
hashcat -m 0 -a 0 hashes.txt rockyou.txt -o cracked.txt

Performance

# Benchmark the system for a hash type
hashcat -b -m 0

# List available GPU/CPU devices
hashcat -I

# Limit to specific device
hashcat -m 0 -a 0 hashes.txt rockyou.txt -d 1

Typical workflow

# 1. Identify the hash type (or use a tool like hashid)
# 2. Try a fast wordlist attack first
hashcat -m 0 -a 0 hashes.txt rockyou.txt

# 3. Apply rules for more coverage
hashcat -m 0 -a 0 hashes.txt rockyou.txt -r rules/best64.rule

# 4. Fall back to a mask attack for remaining hashes
hashcat -m 0 -a 3 hashes.txt ?a?a?a?a?a?a

# 5. Check results
hashcat -m 0 hashes.txt --show

Curated summary. The original work belongs to its authors.

#passwords#audit
Related reading