kavklaw@llm $ cat password-cracking-guide.md
β±οΈ 25 min read Β· From hash identification to GPU-accelerated cracking β break every password
*2john)rockyou.txt comes with Kali at /usr/share/wordlists/rockyou.txt (may need to gunzip it first)Kali Linux: Both John and Hashcat come preinstalled. You're good to go.
Debian/Ubuntu:
sudo apt install john hashcat hashid
# rockyou.txt: download from https://github.com/brannondorsey/naive-hashcat/releases
GPU vs CPU: Hashcat shines on GPUs β a modern GPU cracks MD5 at ~50 billion hashes/sec vs ~50 million on CPU. If you're running in a VM without GPU passthrough, hashcat falls back to CPU mode (use --force to suppress warnings). In that case, John is often the better choice since it's built for CPU cracking. For serious GPU cracking, install hashcat on a bare-metal host or use cloud GPU instances.
Found a hash (a scrambled version of a password) and need to crack it NOW? Follow this quick flow. You first identify what type of hash it is, then try common passwords against it until you find a match:
# Step 1: Identify the hash
hashid 'e99a18c428cb38d5f260853678922e03'
# Output: [+] MD5
# Step 2: Try rockyou with hashcat (GPU-accelerated)
hashcat -m 0 hash.txt /usr/share/wordlists/rockyou.txt
# -m 0 = MD5 (see hash type table below)
# Or with John (auto-detects hash type)
john hash.txt --wordlist=/usr/share/wordlists/rockyou.txt
# Step 3: If wordlist fails, try with rules
hashcat -m 0 hash.txt /usr/share/wordlists/rockyou.txt -r /usr/share/hashcat/rules/best64.rule
# Step 4: Show cracked passwords
hashcat -m 0 hash.txt --show
john hash.txt --show
Before cracking hashes, you need to understand what they are and why they exist.
A hash function is a one-way mathematical function that converts any input into a fixed-length output. The key properties are:
echo -n "password" β 5f4dcc3b5aa765d61d8327deb882cf99
echo -n "password1" β 7c6a180b36896a65c4c200547eae19c18
echo -n "Password" β dc647eb65e6711e155375218212b3964
Tiny changes β completely different hashes. This is the avalanche effect in action.
If a database stores passwords in plaintext and gets breached, every user's password is immediately exposed. By storing only the hash, a breach reveals hashes β which attackers must still crack. This buys time for users to change passwords and limits the damage. Even the system administrators can't see the actual passwords; they only compare hashes during login.
When websites store passwords, they (should) store the hash, not the plaintext. When you log in, they hash your input and compare it to the stored hash. If they match, you're in.
Password cracking works by hashing candidate passwords and comparing them to the target hash. If hash("password123") == target_hash, you've found the password. We can't reverse the hash, but we can try millions of candidates per second until we find a match.
Not all hash algorithms are created equal, and this directly affects your cracking strategy. "Fast" hashes like MD5 and SHA-1 were designed for data integrity (checksums on files), not password storage. A modern GPU can compute 54 billion MD5 hashes per second β meaning short or common passwords fall in seconds. This is why MD5 is terrible for passwords: it's too fast to crack.
"Slow" hashes like bcrypt, scrypt, and Argon2 were designed specifically for password storage. They intentionally waste CPU time with each computation β bcrypt achieves only about 30,000 hashes per second on the same GPU. A 6-character brute force that takes seconds for MD5 would take months for bcrypt. When you encounter bcrypt, don't waste time on brute force; use small, targeted wordlists.
Before learning the specific tool commands, understand the three fundamental cracking strategies:
A salt is random data added to the password before hashing. This means the same password produces different hashes for different users:
# Without salt:
hash("password") β 5f4dcc3b... (same for ALL users with "password")
# With salt:
hash("password" + "x7k9m2") β a1b2c3d4... (unique per user)
hash("password" + "q3r8t5") β e5f6g7h8... (different salt = different hash)
Salting prevents:
Before you can crack a hash, you need to know what type it is. Here are the tools and techniques:
# hashid identifies hash types from the format
hashid 'e99a18c428cb38d5f260853678922e03'
# [+] MD5
# [+] MD4
# [+] Double MD5
hashid '$2b$12$LJ3m4ys3kCfS5p3/q.z4j.z2nHhVwE1TcP5q'
# [+] bcrypt
hashid '5f4dcc3b5aa765d61d8327deb882cf99:salt123'
# [+] MD5 with salt
# Interactive hash identification tool
hash-identifier
# Paste the hash, get possible types
# Less accurate than hashid but comes pre-installed on Kali
# Let hashcat identify the hash
hashcat --identify hash.txt
# Shows possible hash modes and their -m numbers
Learn to recognize hash formats visually:
| Pattern | Type | Example |
|---|---|---|
| 32 hex chars | MD5 or NTLM | e99a18c428cb38d5f260853678922e03 |
| 40 hex chars | SHA-1 | a94a8fe5ccb19ba61c4c0873d391e987982fbbd3 |
| 64 hex chars | SHA-256 | 5e884898da28047151d0e56f8dc62927... |
| 128 hex chars | SHA-512 | ba3253876aed6bc22d4a6ff53d840... |
Starts with $1$ | MD5crypt (Linux) | $1$salt$BkGKhATF... |
Starts with $2b$ / $2a$ | bcrypt | $2b$12$LJ3m4ys3... |
Starts with $5$ | SHA-256crypt (Linux) | $5$rounds=5000$salt$hash... |
Starts with $6$ | SHA-512crypt (Linux) | $6$salt$hash... |
Contains :: segments | NetNTLMv2 | user::domain:challenge:hash:blob |
$krb5asrep$ | Kerberos AS-REP | $krb5asrep$23$user@domain:hash... |
$krb5tgs$ | Kerberos TGS | $krb5tgs$23$*user$domain$spn*$... |
$6$rounds=5000$salt$hashvalue.... What type of hash is this?$6$ prefix identifies SHA-512crypt, common on many Linux systems. Many modern distributions now default to yescrypt ($y$). $1$ = MD5crypt, $5$ = SHA-256crypt, $6$ = SHA-512crypt, $2b$ = bcrypt. The rounds=5000 specifies iteration count (making brute force slower). In hashcat, use -m 1800 for SHA-512crypt. These are found in /etc/shadow.hash("password") is always the same β attackers can pre-compute billions of hashes once and look up any hash instantly (rainbow tables). With salt, hash("password" + "x7k9m") produces a unique result for each user. You must crack each hash individually, and rainbow tables become useless because every salt creates a different lookup table.*2john utilities extract hashes from file formats into a crackable format. ssh2john extracts the passphrase hash from encrypted SSH keys. Other essential utilities: zip2john (ZIP files), pdf2john (PDFs), keepass2john (KeePass databases), office2john (Office documents). These are often the critical bridge between "found an encrypted file" and "cracked the password."Here's a reference table of hash types you'll encounter most in CTFs and engagements:
| Hash Type | Hashcat Mode (-m) | John Format | Speed | Where Found |
|---|---|---|---|---|
| MD5 | 0 | raw-md5 | Very Fast | Old web apps, CTFs |
| SHA-1 | 100 | raw-sha1 | Very Fast | Git, older apps |
| SHA-256 | 1400 | raw-sha256 | Fast | Modern apps, tokens |
| SHA-512 | 1700 | raw-sha512 | Fast | Modern apps |
| NTLM | 1000 | nt | Very Fast | Windows SAM/AD |
| NetNTLMv2 | 5600 | netntlmv2 | Fast | Responder captures |
| bcrypt | 3200 | bcrypt | Very Slow | Modern web apps |
| MD5crypt | 500 | md5crypt | Slow | Old Linux /etc/shadow |
| SHA-512crypt | 1800 | sha512crypt | Very Slow | Modern Linux /etc/shadow |
| Kerberos TGS | 13100 | krb5tgs | Slow | Kerberoasting (extracting crackable hashes from Windows Active Directory) |
| AS-REP | 18200 | krb5asrep | Slow | AS-REP Roasting (similar to Kerberoasting, targets accounts without pre-authentication) |
| WPA/WPA2 | 22000 | wpapsk | Very Slow | WiFi handshakes |
| MySQL 5.x | 300 | mysql-sha1 | Very Fast | MySQL databases |
| MSSQL 2012+ | 1731 | mssql12 | Fast | SQL Server |
π‘ Pro Tip: The full hashcat hash type list is at hashcat.net/wiki β Example Hashes. Bookmark it. It shows example hashes for every type, which helps with identification.
John the Ripper is a versatile, CPU-based password cracker. It's great for auto-detecting hash types, cracking diverse formats, and working without a GPU.
# Basic usage β John auto-detects hash type
john hash.txt
# Specify wordlist
john hash.txt --wordlist=/usr/share/wordlists/rockyou.txt
# Force a specific hash format
john hash.txt --format=raw-md5 --wordlist=/usr/share/wordlists/rockyou.txt
# Show cracked passwords
john hash.txt --show
# Show all supported formats
john --list=formats | tr ',' '\n'
# Show format details
john --list=format-details --format=raw-md5
John comes with utilities to extract hashes from various file formats:
# Extract hash from password-protected ZIP
zip2john protected.zip > zip_hash.txt
john zip_hash.txt --wordlist=/usr/share/wordlists/rockyou.txt
# Extract hash from password-protected RAR
rar2john protected.rar > rar_hash.txt
john rar_hash.txt --wordlist=/usr/share/wordlists/rockyou.txt
# Extract hash from SSH private key (passphrase)
ssh2john id_rsa > ssh_hash.txt
john ssh_hash.txt --wordlist=/usr/share/wordlists/rockyou.txt
# Extract hash from KeePass database
keepass2john database.kdbx > keepass_hash.txt
john keepass_hash.txt --wordlist=/usr/share/wordlists/rockyou.txt
# Extract hash from PDF
pdf2john protected.pdf > pdf_hash.txt
# Extract hash from Office documents
office2john protected.docx > office_hash.txt
# Extract hash from 7-Zip
7z2john protected.7z > 7z_hash.txt
# Extract hash from /etc/shadow (combine with /etc/passwd first)
unshadow /etc/passwd /etc/shadow > combined.txt
john combined.txt --wordlist=/usr/share/wordlists/rockyou.txt
π‘ Pro Tip: John's*2johnutilities are irreplaceable. Found a password-protected ZIP in a CTF?zip2john. Found an encrypted SSH key?ssh2john. These are often the critical step between "I found a file" and "I'm in."
# Single crack mode β uses info from the hash file (usernames, etc.)
john hash.txt --single
# Wordlist mode β dictionary attack
john hash.txt --wordlist=/usr/share/wordlists/rockyou.txt
# Incremental mode β brute force all combinations
john hash.txt --incremental
# Incremental with character set
john hash.txt --incremental=digits # Numbers only
john hash.txt --incremental=alpha # Letters only
# External mode β custom cracking logic
john hash.txt --external=filter_name
Hashcat is the fastest password cracker around. It uses your GPU to try candidates in parallel β a single modern GPU can burn through billions of MD5 hashes per second.
# Basic usage
hashcat -m 0 hash.txt /usr/share/wordlists/rockyou.txt
# -m 0 = MD5 (hash mode number)
# Essential flags:
# -m Hash mode (see table above)
# -a Attack mode (0=wordlist, 1=combinator, 3=mask, 6=hybrid)
# -o Output file for cracked hashes
# -r Rules file
# --show Display cracked passwords from potfile
# --force Force run even with warnings (use on VMs)
# -w Workload profile (1=low, 2=default, 3=high, 4=nightmare)
# Attack modes:
# -a 0 Straight/wordlist (default)
# -a 1 Combinator (word1 + word2)
# -a 3 Mask/brute force
# -a 6 Hybrid wordlist + mask
# -a 7 Hybrid mask + wordlist
# Show cracked passwords
hashcat -m 0 hash.txt --show
# Show status during cracking
# Press 's' while hashcat is running
# Restore interrupted session
hashcat --restore
# List all supported hash types
hashcat --help | grep -i "hash modes"
# During cracking, hashcat shows:
Session..........: hashcat
Status...........: Running
Hash.Mode........: 0 (MD5)
Hash.Target......: hash.txt
Time.Started.....: Thu Jan 25 14:30:00 2024
Time.Estimated...: Thu Jan 25 14:32:00 2024
Kernel.Feature...: Pure Kernel
Guess.Base.......: File (/usr/share/wordlists/rockyou.txt)
Guess.Queue......: 1/1 (100.00%)
Speed.#1.........: 5234.2 MH/s (7.52ms) @ Accel:512 Loops:1
# β 5.2 BILLION MD5 hashes per second!
Recovered........: 0/1 (0.00%) Digests
Progress.........: 1044480/14344385 (7.28%)
Rejected.........: 0/1044480 (0.00%)
Restore.Point....: 1044480/14344385 (7.28%)
The most common attack type. Try every word in a dictionary. Most passwords in the real world can be cracked with a good wordlist.
# Basic wordlist attack β hashcat
hashcat -m 0 -a 0 hash.txt /usr/share/wordlists/rockyou.txt
# Basic wordlist attack β john
john hash.txt --wordlist=/usr/share/wordlists/rockyou.txt
# Essential wordlists:
# rockyou.txt β 14 million passwords (THE classic)
# /usr/share/seclists/Passwords/Common-Credentials/10-million-password-list-top-1000000.txt
# /usr/share/seclists/Passwords/Leaked-Databases/
# /usr/share/seclists/Passwords/darkweb2017-top10000.txt
# Multiple wordlists β just run multiple sessions
hashcat -m 0 hash.txt wordlist1.txt
hashcat -m 0 hash.txt wordlist2.txt
# Or combine them
cat wordlist1.txt wordlist2.txt | sort -u > combined.txt
hashcat -m 0 hash.txt combined.txt
Rules transform wordlist entries to match common password patterns. Instead of just trying "password", rules also try "Password", "password1", "p@ssword", "PASSWORD!", etc.
# Hashcat with rules
hashcat -m 0 hash.txt /usr/share/wordlists/rockyou.txt -r /usr/share/hashcat/rules/best64.rule
# Popular rule files:
# best64.rule β 64 rules, great speed/coverage balance
# rockyou-30000.rule β 30,000 rules, very thorough
# d3ad0ne.rule β 34,000 rules, aggressive
# dive.rule β 99,000 rules, exhaustive
# OneRuleToRuleThemAll.rule β community favorite, excellent coverage
# John with rules
john hash.txt --wordlist=/usr/share/wordlists/rockyou.txt --rules=best64
# John built-in rule sets
john hash.txt --wordlist=wordlist.txt --rules=Single # Username mangling
john hash.txt --wordlist=wordlist.txt --rules=Wordlist # Common transformations
john hash.txt --wordlist=wordlist.txt --rules=Extra # More transformations
john hash.txt --wordlist=wordlist.txt --rules=Jumbo # Everything
# Hashcat rule syntax (also used by john):
# l = lowercase all
# u = uppercase all
# c = capitalize first letter
# t = toggle case of all
# $X = append character X
# ^X = prepend character X
# r = reverse
# d = duplicate
# sXY = replace X with Y
# Example rules for the word "password":
l β password (lowercase)
u β PASSWORD (uppercase)
c β Password (capitalize)
$1 β password1 (append 1)
$1$2$3 β password123 (append 123)
^1 β 1password (prepend 1)
sa@ β p@ssword (replace a with @)
sa@ so0 β p@ssw0rd (leet speak)
c $! β Password! (capitalize + append !)
d β passwordpassword (duplicate)
# Writing custom rules β create a file with one rule per line:
# my_rules.rule:
c $1
c $!
c $1$2$3
sa@ so0 si!
$2$0$2$4
$2$0$2$5
π‘ Pro Tip: Rules are multiplicative. A 14-million-word rockyou.txt with best64.rule (64 rules) generates 896 million candidates. With dive.rule (99,000 rules), that's 1.4 TRILLION candidates. Start with best64, then escalate to larger rule sets if needed.
Mask attacks let you define patterns for brute force, which is way smarter than trying every possible combination. The syntax looks weird at first, but it's actually simple once you see the pattern: each ? followed by a letter represents one character position.
# Hashcat mask attack basics
hashcat -m 0 -a 3 hash.txt ?a?a?a?a?a?a
# ?a = all printable ASCII characters (95 chars)
# This tries all 6-character combinations
# Character sets:
# ?l = lowercase letters (a-z) 26 chars
# ?u = uppercase letters (A-Z) 26 chars
# ?d = digits (0-9) 10 chars
# ?s = special characters (!@#$%^&*...) 33 chars
# ?a = all of the above 95 chars
# ?b = all bytes (0x00-0xff) 256 chars
# Smart masks based on common patterns:
# "Password1" pattern: Ulllllllld
hashcat -m 0 -a 3 hash.txt ?u?l?l?l?l?l?l?l?d
# "password123" pattern: lllllllllddd
hashcat -m 0 -a 3 hash.txt ?l?l?l?l?l?l?l?l?d?d?d
# "P@ssw0rd!" pattern with custom charsets
hashcat -m 0 -a 3 hash.txt -1 '?l?d?s' ?u?1?1?1?1?1?1?1
# -1 defines custom charset 1 as lowercase + digits + special
# 4-digit PIN
hashcat -m 0 -a 3 hash.txt ?d?d?d?d
# Incrementing length (try 1-8 characters)
hashcat -m 0 -a 3 hash.txt ?a?a?a?a?a?a?a?a --increment --increment-min 1
# Understanding the keyspace:
# ?d?d?d?d = 10^4 = 10,000 combinations
# ?l?l?l?l?l?l = 26^6 = 308 million combinations
# ?a?a?a?a?a?a = 95^6 = 735 billion combinations
# ?a?a?a?a?a?a?a?a = 95^8 = 6.6 quadrillion combinations
# At 5 billion MD5/sec (modern GPU):
# ?d?d?d?d?d?d β instant
# ?l?l?l?l?l?l β 0.06 seconds
# ?a?a?a?a?a?a β 2.5 minutes
# ?a?a?a?a?a?a?a β 3.9 hours
# ?a?a?a?a?a?a?a?a β 15 days
# ?a?a?a?a?a?a?a?a?a β 4 years
# For bcrypt at 30,000 hashes/sec:
# ?d?d?d?d?d?d β 33 seconds
# ?l?l?l?l?l?l β 2.8 hours
# ?a?a?a?a?a?a β 283 days
# β Bcrypt was DESIGNED to be slow to crack
Combinator attacks join words from two wordlists. Useful when passwords are two concatenated words like "soccerball" or "bluefish".
# Hashcat combinator attack
hashcat -m 0 -a 1 hash.txt wordlist1.txt wordlist2.txt
# Tries: word1_from_list1 + word1_from_list2
# word1_from_list1 + word2_from_list2
# word2_from_list1 + word1_from_list2
# ... every combination
# Example: animals.txt + colors.txt
# bluecat, bluedog, redcat, reddog, ...
# Hybrid attack: wordlist + mask (append pattern)
hashcat -m 0 -a 6 hash.txt /usr/share/wordlists/rockyou.txt ?d?d?d
# Tries: password000, password001, ..., password999
# admin000, admin001, ..., admin999
# ... for every word in the list
# Hybrid attack: mask + wordlist (prepend pattern)
hashcat -m 0 -a 7 hash.txt ?d?d?d /usr/share/wordlists/rockyou.txt
# Tries: 000password, 001password, ...
# John combinator (using rules)
# Create a rule that appends another word
john hash.txt --wordlist=wordlist.txt --rules='Az"[0-9][0-9]"'
# 1. Use John's *2john to extract hashes
ssh2john id_rsa > hash.txt
# 2. Identify with hashid or hashcat
hashid -m hash.txt # -m shows hashcat mode number
# 3. Crack with hashcat (GPU) if available
hashcat -m MODE hash.txt /usr/share/wordlists/rockyou.txt -r /usr/share/hashcat/rules/best64.rule
# 4. Fall back to John (CPU) if no GPU
john hash.txt --wordlist=/usr/share/wordlists/rockyou.txt --rules=best64
GPU cracking with hashcat requires proper driver setup. Here's how to get it working:
# Check your GPU
lspci | grep -i vga
nvidia-smi # For NVIDIA GPUs
# Install NVIDIA drivers (Ubuntu/Kali)
sudo apt install nvidia-driver-535
# Reboot after installation
# Verify hashcat sees the GPU
hashcat -I
# Shows available devices (GPU, CPU)
# Benchmark your setup
hashcat -b
# Shows speed for every hash type on your hardware
# Sample benchmark output (RTX 3080):
# MD5 : 54000 MH/s (54 billion/sec)
# SHA-256 : 8000 MH/s
# NTLM : 95000 MH/s
# bcrypt : 30000 H/s β note: H/s not MH/s!
# SHA-512crypt : 400000 H/s
# Workload profiles (-w)
# -w 1 = Low (desktop still usable)
# -w 2 = Default
# -w 3 = High (desktop may lag)
# -w 4 = Nightmare (desktop unusable, maximum speed)
# Using specific devices
hashcat -d 1 -m 0 hash.txt wordlist.txt # GPU only
hashcat -d 1,2 -m 0 hash.txt wordlist.txt # Multiple GPUs
β οΈ Important: If you're running Kali in a VM (VirtualBox/VMware), you won't have GPU access by default. You need PCI passthrough for GPU cracking in VMs. Alternatively, install hashcat on your Windows/Linux host with bare-metal GPU access, or use cloud GPU instances (AWS, Google Cloud).
Generic wordlists work for generic passwords, but targeted wordlists work for targeted passwords. CeWL builds custom wordlists from your target's website.
# Basic CeWL usage β spider the target website
cewl http://target.htb -d 3 -m 5 -w target_words.txt
# -d 3 = follow links 3 levels deep
# -m 5 = minimum word length 5
# -w = output file
# Include email addresses
cewl http://target.htb -d 3 -m 5 -w words.txt -e --email_file emails.txt
# CeWL with authentication
cewl http://target.htb --auth_type basic --auth_user admin --auth_pass password123
# Generate username list from names found
cewl http://target.htb -d 2 -m 3 --lowercase -w names.txt
# Combine CeWL output with mutations
# Use hashcat rules on CeWL wordlist for maximum coverage
hashcat -m 0 hash.txt target_words.txt -r /usr/share/hashcat/rules/best64.rule
# CUPP β Common User Password Profiler
# Interactive tool that builds wordlists from personal info
cupp -i
# Asks for: name, birthdate, partner name, pet name, etc.
# Generates targeted password candidates
# Mentalist β GUI-based wordlist generator
# Visual rule creation and wordlist generation
# Crunch β generate wordlists by pattern
crunch 8 8 -t @@@@2024 -o wordlist.txt
# @ = lowercase letter
# Generates: aaaa2024, aaab2024, ..., zzzz2024
π‘ Pro Tip: In CTFs, passwords are often related to the box theme, company name, or characters in the story. A box called "Skynet" might use passwords like "skynet2024", "SkyNet!", or "t800judgment". Build a small custom wordlist with these words and mutate with rules.
Rainbow tables are pre-computed hash-to-password lookup tables. Instead of hashing each candidate during cracking, you look up the hash in a table.
The concept is simple: pre-compute millions of hashβpassword mappings and store them in a table. When cracking, just look up the target hash β instant result.
Limitations:
Online rainbow table lookups: CrackStation, hashes.com, cmd5.org
# Generate your own with rtgen (rarely needed)
rtgen md5 loweralpha-numeric 1 8 0 1000 1000 0
In practice, modern GPUs are so fast that rainbow tables are rarely worth the storage space for common hash types. Just use hashcat.
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β PASSWORD CRACKING DECISION FLOW β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β β
β Found a hash β
β β β
β βΌ β
β Identify type βββΆ hashid / hashcat --identify β
β β β
β βΌ β
β Online lookup βββΆ CrackStation / hashes.com (2 sec) β
β β miss β
β βΌ β
β rockyou.txt βββββΆ hashcat -m MODE hash.txt rockyou.txt β
β β miss β
β βΌ β
β + Rules βββββββββΆ -r best64.rule β -r rockyou-30000 β
β β miss β
β βΌ β
β Custom wordlist βΆ CeWL β target-specific + rules β
β β miss β
β βΌ β
β Mask attack βββββΆ ?u?l?l?l?l?l?d?d (common patterns) β
β β miss β
β βΌ β
β Hybrid attacks ββΆ wordlist + ?d?d?d (last resort) β
β β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Here's a systematic approach to cracking any hash you encounter:
# Use multiple identification methods
hashid 'the_hash_value'
# Cross-reference with hashcat's example hashes page
# Look at the format (length, prefix, structure)
# Check online databases first
# Paste hash into crackstation.net or hashes.com
# If it's a common password with a common hash, instant result
# Try rockyou.txt without rules
hashcat -m MODE hash.txt /usr/share/wordlists/rockyou.txt
# Escalate with rules
hashcat -m MODE hash.txt /usr/share/wordlists/rockyou.txt -r /usr/share/hashcat/rules/best64.rule
hashcat -m MODE hash.txt /usr/share/wordlists/rockyou.txt -r /usr/share/hashcat/rules/rockyou-30000.rule
# Build from the target
cewl http://target.htb -d 3 -m 5 -w custom.txt
hashcat -m MODE hash.txt custom.txt -r /usr/share/hashcat/rules/dive.rule
# Common password patterns
hashcat -m MODE -a 3 hash.txt ?u?l?l?l?l?l?l?d?d # Word + 2 digits
hashcat -m MODE -a 3 hash.txt ?u?l?l?l?l?l?l?d?d?d?s # Word + 3 digits + special
hashcat -m MODE -a 3 hash.txt ?d?d?d?d?d?d # 6-digit PIN
# Wordlist + numbers appended
hashcat -m MODE -a 6 hash.txt /usr/share/wordlists/rockyou.txt ?d?d?d
hashcat -m MODE -a 6 hash.txt /usr/share/wordlists/rockyou.txt ?d?d?d?d
hashcat -m MODE -a 6 hash.txt /usr/share/wordlists/rockyou.txt ?s
β Mistake #1: Wrong hash mode in hashcat.
Using-m 0(MD5) when the hash is actually NTLM (-m 1000) means hashcat will never crack it. Always identify the hash type first. If unsure, try multiple modes.
β Mistake #2: Not using rules.
A plain wordlist attack with rockyou.txt covers 14 million candidates. With best64.rule, you get 896 million. Rules are free performance β always use at least best64.rule.
β Mistake #3: Forgetting John's *2john utilities.
Found a password-protected file? Don't try to crack it directly. Extract the hash first withzip2john,ssh2john,pdf2john, etc. Then crack the extracted hash.
β Mistake #4: Brute forcing bcrypt.
bcrypt is intentionally slow (~30,000 H/s on a GPU vs 54 billion H/s for MD5). Brute force is not feasible for bcrypt. Use targeted wordlists with small rule sets. If it's not in rockyou with basic rules, you're probably not cracking it.
β Mistake #5: Not checking online databases first.
CrackStation and hashes.com have billions of pre-cracked hashes. A 2-second lookup might save you hours of GPU time. Always check online first for unsalted hashes.
β Mistake #6: Running hashcat in a VM without GPU passthrough.
Hashcat in a VM defaults to CPU mode, which is 100x slower than GPU. Either set up GPU passthrough, install hashcat on the host OS, or use cloud instances.
β Mistake #7: Not saving your potfile.
Hashcat saves cracked hashes to~/.hashcat/hashcat.potfile. Don't delete it! If you encounter the same hash later, hashcat instantly returns the result from the potfile.
Best for: Hash extraction (*2john tools are unmatched), auto-detection of hash types, CPU-only environments, and cracking exotic/mixed-format hash files.
Best for: Maximum cracking speed with GPU acceleration, mask attacks, session management for long-running cracks, and large-scale hash files.
-m 0 sets the hash mode to MD5. The wordlist path follows the hash file. -r specifies the rules file with its full path. Rules transform each wordlist entry β best64.rule applies 64 transformations per word (capitalize, append numbers, leet speak, etc.), turning 14 million candidates into 896 million. Always use at least best64 β it's free performance with minimal time cost.*2john family of hash extractors β no other tool does this as well. John also auto-detects hash types, handles mixed-format hash files, and works great on CPU. Use Hashcat when you have a GPU and need maximum speed, mask attacks, or session management for long-running cracks. The typical workflow: extract hashes with John's utilities, then crack with Hashcat on GPU.e99a18c428cb38d5f260853678922e03. Before firing up hashcat, what should you try first?e99a18c428cb38d5f260853678922e03 is MD5 of "abc123" β CrackStation would return this instantly.-a) appends a mask pattern to every word in a wordlist? (e.g., testing "password000" through "password999")-a 6 is the hybrid wordlist+mask mode. It appends the mask pattern to every word: hashcat -m 0 -a 6 hash.txt rockyou.txt ?d?d?d tries password000, password001, ..., admin000, admin001, etc. -a 7 does the reverse (mask + wordlist = prepends). -a 0 is plain wordlist, -a 1 combines two wordlists, and -a 3 is pure mask/brute force.