Skip to Content
Hashcat GPU-accelerated password cracking with hash modes and attack strategies

Hashcat: GPU Password Cracking

Cracking password hashes with Hashcat. Hash modes, attack modes, rules, performance flags and the hashes you meet on internal tests.

Nov 6, 2025
Updated Nov 22, 2026
15 min read

Introduction

Hashcat is a GPU password cracker. It supports more than 350 hash types and several attack modes: wordlist, mask, combinator and hybrid. On a test it is what you reach for once you have NTLM hashes, Kerberos tickets or a captured NetNTLMv2 response.

Hashcat is open-source and licensed under the MIT license. It runs on Linux, Windows, and macOS, with support for AMD, NVIDIA, and Intel GPUs through OpenCL and CUDA.

Installation

Install Hashcat

Install Hashcat
# Kali Linux (pre-installed)
hashcat --version

# Ubuntu/Debian
sudo apt install hashcat

# From source
git clone https://github.com/hashcat/hashcat.git
cd hashcat
make
sudo make install

Verify GPU support

Verify GPU support
# Check available OpenCL/CUDA devices
hashcat -I

# Should show your GPU(s)
# Backend Device ID #1
#   Name: NVIDIA GeForce RTX 3080

Test with a simple hash

Test the install with a simple hash
# Create test MD5 hash
printf '%s' "password123" | md5sum | cut -d' ' -f1 > test.hash

# Crack with wordlist
hashcat -m 0 test.hash /usr/share/wordlists/rockyou.txt

Common hash modes

Hashcat picks the hash type with a numeric mode (-m). These are the ones that come up most:

Password hashes

Hash typeModeCategory
MD50Raw Hash
SHA1100Raw Hash
SHA2-2561400Raw Hash
SHA2-5121700Raw Hash
NTLM1000Operating System
bcrypt3200Operating System

Windows & Active Directory

Hash typeModeUse case
NTLM1000Windows local accounts
NetNTLMv15500Network authentication
NetNTLMv25600Network authentication
Domain Cached Credentials (DCC)1100Cached domain creds
Domain Cached Credentials 2 (DCC2)2100Cached domain creds

Kerberos

Hash typeModeAttack
Kerberos 5 AS-REP (etype 23)18200AS-REP Roasting
Kerberos 5 TGS-REP (etype 23)13100Kerberoasting
Kerberos 5 etype 17 TGS-REP19600TGS-REP cracking
Kerberos 5 etype 18 Pre-Auth19900Pre-Auth cracking

Application hashes

Hash typeModeApplication
KeePass13400Password manager
1Password cloudkeychain8200Password manager
LastPass6800Password manager
BitLocker22100Full disk encryption
VeraCrypt13711+Disk encryption

Use hashcat --help | grep -i <keyword> to find a mode. The full list has more than 350 formats.

Hash identification

Identify the hash type before you crack it.

Using hash-identifier

# Interactive mode
hash-identifier

# Paste your hash when prompted
# Example: 5f4dcc3b5aa765d61d8327deb882cf99

Using hashid

# More accurate than hash-identifier
hashid '$2a$10$N9qo8uLOickgx2ZMRZoMyeIjZAgcfl7p92ldGxad68LJZdL17lhWy'

# Output:
# Analyzing '$2a$10$N9qo8uLOickgx2ZMRZoMyeIjZAgcfl7p92ldGxad68LJZdL17lhWy'
# [+] Blowfish(OpenBSD)
# [+] Woltlab Burning Board 4.x
# [+] bcrypt

Using Hashcat directly

# Let hashcat identify the hash
hashcat --identify hash.txt

# Shows all possible hash types

Online hash analyzer

For an odd hash the local tools can't place, TunnelsUp Hash Analyzer shows likely types with examples. Don't paste client hashes into a third-party site.

Attack modes

The attack mode is set with -a.

Mode 0: straight (wordlist)

Tries each word in the list, optionally run through rules.

Wordlist attack with rules
# Basic wordlist attack
hashcat -m 1000 -a 0 ntlm.hash /usr/share/wordlists/rockyou.txt

# With rules to mutate passwords
hashcat -m 1000 -a 0 ntlm.hash /usr/share/wordlists/rockyou.txt -r /usr/share/hashcat/rules/best64.rule

# Multiple rule files
hashcat -m 1000 -a 0 ntlm.hash wordlist.txt -r best64.rule -r toggles.rule

Mode 3: brute force (mask)

Tries every combination the mask allows, one character set per position.

Mask attacks
# 8-character lowercase
hashcat -m 0 -a 3 md5.hash ?l?l?l?l?l?l?l?l

# 6-8 characters, all types
hashcat -m 0 -a 3 md5.hash ?a?a?a?a?a?a?a?a --increment --increment-min 6 --increment-max 8

# Common pattern: capital + lowercase + digits
hashcat -m 0 -a 3 md5.hash ?u?l?l?l?l?d?d?d?d

Built-in character sets:

  • ?l - abcdefghijklmnopqrstuvwxyz
  • ?u - ABCDEFGHIJKLMNOPQRSTUVWXYZ
  • ?d - 0123456789
  • ?h - 0123456789abcdef (hex)
  • ?s - Special characters (!@#$%^&*)
  • ?a - All of the above

Mode 1: combinator

Joins every word in the first list with every word in the second.

# Combine two wordlists
hashcat -m 0 -a 1 hash.txt words1.txt words2.txt

# Example: "password" + "123" = "password123"

Modes 6 and 7: hybrid

Appends (mode 6) or prepends (mode 7) a mask to each wordlist entry.

Hybrid attacks
# Wordlist + mask (e.g., "password" + "123")
hashcat -m 0 -a 6 hash.txt wordlist.txt ?d?d?d

# Mask + wordlist (e.g., "123" + "password")
hashcat -m 0 -a 7 hash.txt ?d?d?d wordlist.txt

Rules

A rule turns one wordlist entry into one or more candidates: capitalise it, append a year, swap letters for digits.

Pre-built rules

# Best64 - highly effective, balanced
hashcat -m 1000 hash.txt wordlist.txt -r /usr/share/hashcat/rules/best64.rule

# Dive - more aggressive
hashcat -m 1000 hash.txt wordlist.txt -r /usr/share/hashcat/rules/dive.rule

# Leetspeak
hashcat -m 1000 hash.txt wordlist.txt -r /usr/share/hashcat/rules/leetspeak.rule

# Combine multiple rules
hashcat -m 1000 hash.txt wordlist.txt -r best64.rule -r toggles.rule

Test a rule

--stdout prints the candidates instead of cracking, so you can see what a rule does:

Preview rule output
# Test rule transformations
echo "password" | hashcat --stdout -r custom.rule

# Example output with best64.rule:
# password
# Password
# PASSWORD
# password1
# password123
# drowssap (reversed)

Write a custom rule

Create a custom rule file
# Example custom.rule
cat > custom.rule << EOF
# Capitalize first letter
c
# Append year
$2 $0 $2 $3
# Append common suffix
$! $!
# Leetspeak substitution
sa@ so0 se3
EOF

# Use custom rule
hashcat -m 1000 hash.txt wordlist.txt -r custom.rule

Start with best64.rule. It is 64 rules picked for how many real passwords they crack, and it runs fast.

Practical examples

NTLM hashes

Crack NTLM hashes from a SAM dump
# Windows NTLM hash format
# Example: Administrator:500:aad3b435b51404eeaad3b435b51404ee:8846f7eaee8fb117ad06bdd830b7586c:::

# Extract just the NTLM hash (second part after third colon)
echo "8846f7eaee8fb117ad06bdd830b7586c" > ntlm.hash

# Crack with wordlist and rules
hashcat -m 1000 ntlm.hash /usr/share/wordlists/rockyou.txt -r /usr/share/hashcat/rules/best64.rule --force

# Optimized for NTLM (fast hash)
hashcat -m 1000 ntlm.hash /usr/share/wordlists/rockyou.txt -O -w 3

Kerberoasting (TGS-REP)

Kerberoasting
# Crack Kerberos TGS-REP tickets (from impacket GetUserSPNs.py)
hashcat -m 13100 tgs.hash /usr/share/wordlists/rockyou.txt --force

# With rules for service accounts
hashcat -m 13100 tgs.hash wordlist.txt -r best64.rule

AS-REP Roasting

AS-REP roasting
# Crack AS-REP responses (from impacket GetNPUsers.py)
hashcat -m 18200 asrep.hash /usr/share/wordlists/rockyou.txt --force

NetNTLMv2 from Responder

Crack NetNTLMv2 from Responder
# Format: username::domain:challenge:HMAC-MD5:blob
hashcat -m 5600 netntlmv2.hash /usr/share/wordlists/rockyou.txt -r best64.rule

# High workload profile for faster cracking
hashcat -m 5600 netntlmv2.hash /usr/share/wordlists/rockyou.txt -w 3

Multiple hash files

# Crack multiple hashes at once
cat hash1.txt hash2.txt hash3.txt > all_hashes.txt
hashcat -m 1000 all_hashes.txt /usr/share/wordlists/rockyou.txt

# Remove cracked hashes from file
hashcat -m 1000 all_hashes.txt /usr/share/wordlists/rockyou.txt --remove

Performance

Workload profiles

# -w 1: Low (2ms, minimal impact)
# -w 2: Default (12ms, balanced)
# -w 3: High (96ms, desktop unresponsive)
# -w 4: Nightmare (480ms, headless systems)

hashcat -m 1000 hash.txt wordlist.txt -w 3

Optimized kernels

# Enable optimized kernels (limits password length)
hashcat -m 1000 hash.txt wordlist.txt -O

# Combine with workload profile
hashcat -m 1000 hash.txt wordlist.txt -O -w 3

Device selection

# Use specific GPU
hashcat -m 1000 hash.txt wordlist.txt -d 1

# Use multiple GPUs
hashcat -m 1000 hash.txt wordlist.txt -d 1,2,3

# Check device info
hashcat -I

Sessions

Sessions
# Name session for resume capability
hashcat -m 1000 hash.txt wordlist.txt --session mysession

# Resume interrupted session
hashcat --session mysession --restore

# Status of running session
hashcat --session mysession --status

Other techniques

Hex-encoded output

Hashcat prints a plaintext as $HEX[...] when it contains a colon or non-printable characters:

Decode hex-encoded passwords
# Hashcat output: 2e208ad146efda5bc44869025e06544a:$HEX[7261626269743a29]

# Decode hex to plaintext
echo -n '7261626269743a29' | xxd -r -p && echo
# Output: rabbit:)

Show results and benchmark

# Show cracked passwords
hashcat -m 1000 hash.txt --show

# Show remaining uncracked hashes
hashcat -m 1000 hash.txt --left

# Benchmark hash mode
hashcat -b -m 1000

# Get detailed status
hashcat -m 1000 hash.txt wordlist.txt --status --status-timer=5

Potfile

Hashcat writes every cracked hash to a potfile and skips hashes already in it:

# Default location: ~/.local/share/hashcat/hashcat.potfile
# (or $XDG_DATA_HOME/hashcat/; older releases used ~/.hashcat/)

# Use custom potfile
hashcat -m 1000 hash.txt wordlist.txt --potfile-path custom.pot

# Disable potfile
hashcat -m 1000 hash.txt wordlist.txt --potfile-disable

# Compare hash with potfile
hashcat -m 1000 hash.txt --show

Loopback mode

Loopback feeds cracked plaintexts back in as new candidates:

# Enable loopback
hashcat -m 1000 hashes.txt wordlist.txt --loopback

# Cracked passwords become new candidates with rules applied

Flag reference

# Essential flags
-m, --hash-type         # Hash type (see mode list)
-a, --attack-mode       # 0=straight, 1=combination, 3=brute-force
-r, --rules-file        # Apply rules from file
-w, --workload-profile  # 1-4, performance level
-O, --optimized-kernel  # Enable optimized kernels
-d, --backend-devices   # Select GPU(s)

# Output control
-o, --outfile          # Write cracked passwords to file
--show                 # Display cracked passwords
--left                 # Display uncracked hashes
--username             # Parse username from hash file

# Session management
--session              # Name for resumable sessions
--restore              # Resume previous session
--status               # Show status during cracking

# Advanced
--increment            # Increment mask length
--increment-min        # Start mask length
--increment-max        # End mask length
--force                # Ignore warnings
--remove               # Remove hash after cracking
--quiet                # Suppress output

Scenarios

Scenario 1: SAM database

Scenario 1: SAM database
# Extract hashes from SAM
secretsdump.py -sam SAM -system SYSTEM LOCAL

# Crack NTLM hashes
hashcat -m 1000 ntlm_hashes.txt /usr/share/wordlists/rockyou.txt -r best64.rule -O -w 3

# Try brute-force for remaining hashes (8 chars max)
hashcat -m 1000 ntlm_hashes.txt -a 3 ?a?a?a?a?a?a?a?a --increment --increment-min 6

Scenario 2: Kerberoasting

Scenario 2: Kerberoasting
# Get service tickets
GetUserSPNs.py domain.local/user:password -dc-ip 10.10.10.10 -request

# Crack TGS-REP tickets
hashcat -m 13100 tickets.txt /usr/share/wordlists/rockyou.txt -r best64.rule --force

# Service accounts often use weak passwords
hashcat -m 13100 tickets.txt common_passwords.txt

Scenario 3: mask built from the password policy

If you know the password policy, or the pattern most users follow (here one uppercase, six lowercase, two digits), build the mask from it:

Scenario 3: mask from the policy
# Create mask matching policy
hashcat -m 1000 hash.txt -a 3 ?u?l?l?l?l?l?l?d?d

# Or with hybrid approach
hashcat -m 1000 hash.txt -a 6 wordlist.txt ?d?d

Troubleshooting

Out of memory

# Reduce workload profile
hashcat -m 1000 hash.txt wordlist.txt -w 2

# Use segment size limit
hashcat -m 1000 hash.txt wordlist.txt -c 32

GPU not detected

# Check OpenCL/CUDA installation
hashcat -I

# Force specific backend
hashcat --backend-devices 1 -m 1000 hash.txt wordlist.txt

# Update GPU drivers
# NVIDIA: https://www.nvidia.com/drivers
# AMD: https://www.amd.com/support

Hash format errors

# Some hashes need specific formatting
# Check example hashes: https://hashcat.net/wiki/doku.php?id=example_hashes

# Use --example-hashes to see format
hashcat -m 1000 --example-hashes

References

MITRE ATT&CK Techniques

Official documentation

Community resources

Next steps

Only crack hashes you are authorized to crack. Cracked client passwords are sensitive data: store and delete them as the rules of engagement say.

On this page