Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.bytejmp.com/llms.txt

Use this file to discover all available pages before exploring further.

Basic Syntax

hashcat -m <HASH_TYPE> -a <ATTACK_MODE> hash.txt wordlist.txt

Common Options

OptionDescription
-mHash type
-aAttack mode
-oOutput file
-rRules file
--forceIgnore warnings (CPU only)
--showShow cracked hashes
--leftShow uncracked hashes
-w 3Workload profile (1-4, higher = faster)
--potfile-disableDon’t save to potfile
--usernameHash file contains usernames
-OOptimized kernels (faster, limits password length)

Attack Modes

ModeNameExample
0Dictionaryhashcat -m 0 -a 0 hash.txt rockyou.txt
1Combinationhashcat -m 0 -a 1 hash.txt list1.txt list2.txt
3Brute-force / Maskhashcat -m 0 -a 3 hash.txt ?a?a?a?a?a?a
6Dictionary + Maskhashcat -m 0 -a 6 hash.txt rockyou.txt ?d?d?d
7Mask + Dictionaryhashcat -m 0 -a 7 hash.txt ?d?d?d rockyou.txt

Mask Charsets

CharsetMeaning
?lLowercase (a-z)
?uUppercase (A-Z)
?dDigits (0-9)
?sSpecial chars
?aAll printable (?l?u?d?s)
?bAll bytes (0x00-0xff)

Custom Charset

hashcat -m 0 -a 3 hash.txt -1 ?l?d ?1?1?1?1?1?1?1?1

Mask with Known Pattern

# Password1 to Password9999
hashcat -m 0 -a 3 hash.txt "Password?d?d?d?d"

# Summer2024! pattern
hashcat -m 0 -a 3 hash.txt "?u?l?l?l?l?l?d?d?d?d?s"

# Company name + digits
hashcat -m 0 -a 6 hash.txt company_names.txt "?d?d?d?d"

Common Hash Types

Linux

ModeHashExample
500MD5crypt$1$salt$hash
1800SHA-512crypt$6$salt$hash
7400SHA-256crypt$5$salt$hash
28400yescrypt$y$salt$hash
3200bcrypt$2*$rounds$hash

Windows

ModeHashExample
1000NTLMaad3b435...
3000LMLegacy
5600NetNTLMv2user::domain:challenge:hash:blob
5500NetNTLMv1Legacy

Kerberos

ModeHashExample
13100Kerberoast TGS (RC4)$krb5tgs$23$...
18200AS-REP Roast$krb5asrep$23$...
19600Kerberos AES128$krb5tgs$17$...
19700Kerberos AES256$krb5tgs$18$...

Web / Application

ModeHashExample
0MD55d41402abc4b2a76b9719d911017c592
100SHA1aaf4c61ddcc5e8a2dabede0f3b482cd9aea9434d
1400SHA256e3b0c44298fc1c149afbf4c8996fb924...
1700SHA512Full hash
400WordPress (phpass)$P$B...
3200bcrypt (Blowfish)$2a$...
16500JWTeyJhbG...
116007-Zip$7z$...

Database

ModeHashExample
300MySQL4.1+*hash
200MySQL323Legacy
1731MSSQL (2012/2014)0x0200...
12PostgreSQLmd5hash

Wireless

ModeHashExample
22000WPA-PBKDF2-PMKID+EAPOL.hc22000
2500WPA/WPA2 (legacy).hccapx
16800WPA-PMKID-PBKDF2PMKID

Other

ModeHashExample
1600Apache apr1apr1$apr1$salt$hash
1500DES (Unix)Legacy
7900Drupal7$S$...
13400KeePass$keepass$...
16600Electrum Wallet
22500MultiBit Classic

Rules

Rules modify wordlist entries on the fly (append digits, capitalize, etc.).

Built-in Rules

# Best rules (most efficient)
hashcat -m 1000 -a 0 hash.txt rockyou.txt -r /usr/share/hashcat/rules/best64.rule

# Comprehensive
hashcat -m 1000 -a 0 hash.txt rockyou.txt -r /usr/share/hashcat/rules/rockyou-30000.rule

# OneRuleToRuleThemAll
hashcat -m 1000 -a 0 hash.txt rockyou.txt -r /usr/share/hashcat/rules/OneRuleToRuleThemAll.rule

Common Rule Files

FileRulesSpeed
best64.rule64Fast
toggles1.rule15Fast
d3ad0ne.rule34,101Medium
rockyou-30000.rule30,000Medium
dive.rule99,092Slow
OneRuleToRuleThemAll.rule51,995Medium

Stack Multiple Rules

hashcat -m 1000 -a 0 hash.txt rockyou.txt -r rule1.rule -r rule2.rule

Custom Rule Syntax

FunctionDescriptionExample
:Do nothing
lLowercase allpassword
uUppercase allPASSWORD
cCapitalize firstPassword
tToggle casepASSWORD
$XAppend char Xpassword1
^XPrepend char X1password
dDuplicate wordpasswordpassword
rReversedrowssap
sXYReplace X with Yp@ssword
Write custom rule file:
echo -e 'c\nc$1\nc$!\nc$1$!' > custom.rule
hashcat -m 1000 -a 0 hash.txt rockyou.txt -r custom.rule

Common Cracking Workflows

NTLM (Windows)

hashcat -m 1000 hash.txt /usr/share/wordlists/rockyou.txt -r /usr/share/hashcat/rules/best64.rule

NetNTLMv2 (Responder)

hashcat -m 5600 hash.txt /usr/share/wordlists/rockyou.txt

Kerberoast

hashcat -m 13100 tgs_hashes.txt /usr/share/wordlists/rockyou.txt -r /usr/share/hashcat/rules/best64.rule

AS-REP Roast

hashcat -m 18200 asrep_hashes.txt /usr/share/wordlists/rockyou.txt

Linux Shadow (/etc/shadow)

hashcat -m 1800 shadow_hash.txt /usr/share/wordlists/rockyou.txt

Wi-Fi WPA2

hashcat -m 22000 capture.hc22000 /usr/share/wordlists/rockyou.txt

WordPress

hashcat -m 400 wp_hashes.txt /usr/share/wordlists/rockyou.txt

MD5 (Generic)

hashcat -m 0 md5_hashes.txt /usr/share/wordlists/rockyou.txt

Identify Hash Type

hashcat --identify hash.txt
# hashid
pip install hashid
hashid '$6$salt$hash'

# hash-identifier
hash-identifier

# haiti
gem install haiti
haiti '$6$salt$hash'

Useful Commands

Show Cracked

hashcat -m 1000 hash.txt --show

Resume Session

hashcat --restore
hashcat --session=mysession --restore

Benchmark

hashcat -b
hashcat -b -m 1000

Status While Running

Press s during execution for status.

GPU Setup

Hashcat uses GPU by default — massively faster than CPU. Needs proper drivers.

Check Detected Devices

hashcat -I
Shows all OpenCL/CUDA devices. If no GPU listed → driver issue.

Required Drivers

GPUDriver
NVIDIANVIDIA Driver 520+ (includes CUDA)
AMDROCm (Linux) or Adrenalin (Windows)
IntelIntel OpenCL Runtime

NVIDIA Setup (Linux)

# Check if NVIDIA driver installed
nvidia-smi

# Install on Kali/Debian
sudo apt install nvidia-driver nvidia-cuda-toolkit

# Reboot required
sudo reboot

NVIDIA Setup (Windows)

Download latest Game Ready or Studio driver from nvidia.com. CUDA included.

AMD Setup (Linux)

# ROCm (recommended for hashcat)
# Follow AMD ROCm installation guide for your distro
# https://rocm.docs.amd.com

# Verify
rocminfo
clinfo

Select Specific Device

# Use device 1 only
hashcat -m 1000 hash.txt wordlist.txt -d 1

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

# Force OpenCL
hashcat -m 1000 hash.txt wordlist.txt -D 2

# Force CUDA (NVIDIA only)
hashcat -m 1000 hash.txt wordlist.txt -D 2

Device Types (-D)

ValueType
1CPU
2GPU
3FPGA/DSP

Temperature Control

# Abort at 90°C (default)
hashcat --hwmon-temp-abort=90

# Disable temperature limit
hashcat --hwmon-disable

# Check temperature during run
# Press 's' for status

VM / Cloud GPU

# If running in VM, may need --force
hashcat --force -m 1000 hash.txt wordlist.txt

# AWS p3/p4 instances (NVIDIA Tesla)
# Install CUDA toolkit, then hashcat works normally
Running hashcat without GPU is extremely slow. A single NVIDIA RTX 4090 cracks ~160 billion MD5/sec vs ~50 million on CPU. Always use GPU.

Performance Tips

TipCommand
Use GPUDefault (auto-detected)
Optimized kernels-O (faster, max 32 chars)
High workload-w 3 or -w 4
Select GPU only-D 2
Multiple GPUs-d 1,2
Check devices-I
Benchmark GPU-b
Disable potfile--potfile-disable
Temp control--hwmon-temp-abort=95

Wordlists

# Kali default
/usr/share/wordlists/rockyou.txt

# SecLists
https://github.com/danielmiessler/SecLists

# CeWL (custom from website)
cewl https://target.com -d 3 -m 5 -w custom_wordlist.txt