Dictionary Attacks: Wordlist-Based Password Cracking
Learn how dictionary attacks use wordlists to crack passwords, how to create effective wordlists, and strategies to defend against wordlist-based attacks.
The 14 Million Passwords That Cracked Everything
In 2009, the social gaming company RockYou stored 32 million user passwords in plaintext. When hackers breached the database, they walked away with 14.3 million unique passwords — "123456," "password," "qwerty," and thousands of other real passwords people actually used. This leaked dataset became the Rosetta Stone of password cracking, and the RockYou wordlist remains the starting point for dictionary attacks today.
A dictionary attack is a password cracking technique that uses a pre-compiled list of words (a wordlist) to guess passwords. Unlike pure brute force which tries every possible combination, dictionary attacks are far more efficient because they target the most commonly used passwords.
Prerequisites
Before studying dictionary attacks, you should understand:
Why Dictionary Attacks Work
Studies consistently show that the most common passwords are dictionary words, names, and simple patterns:
# Top 10 most common passwords (2025-2026)
1. 123456
2. password
3. qwerty
4. admin
5. letmein
6. welcome
7. monkey
8. sunshine
9. master
10. 123456789
Essential Wordlists
Built-in GO KALI Wordlists
# RockYou (most famous wordlist)
ls -la /usr/share/wordlists/rockyou.txt.gz
# 14 million passwords from the 2009 RockYou breach
# Extract: gunzip /usr/share/wordlists/rockyou.txt.gz
# SecLists (comprehensive collection)
ls /usr/share/seclists/Passwords/
# Common passwords
/usr/share/seclists/Passwords/Common-Credentials/10k-most-common.txt
# Leaked passwords collection
/usr/share/seclists/Passwords/Leaked-Databases/
# Default credentials
/usr/share/seclists/Passwords/Default-Credentials/
Specialized Wordlists
# Keyboard walks
# qwerty, asdfgh, zxcvbn, 1qaz2wsx
# Leet speak conversions
# p@ssw0rd, 5ecur1ty, h4ck3r
# Date combinations
# 1990-2026, 0101-1231
# Sports teams
# yankees, lakers, patriots, redsox
# Pop culture
# starwars, harrypotter, twilight, avengers
Creating Custom Wordlists
Using Crunch (Pattern-Based)
# Generate all 8-char lowercase passwords
crunch 8 8 abcdefghijklmnopqrstuvwxyz -o 8char.txt
# Generate with pattern (prefix + 4 digits)
crunch 8 8 -t pass@@@@ -o pass_words.txt
# Year-based passwords
crunch 10 10 -t Welcome@@@ -o welcome_words.txt
# Company email pattern
# Example: "KaliGo" variations
crunch 6 10 -p KaliGo kaligo KALIGO KaliGo1 KALIGO1
Using CeWL (Website Scraping)
# Generate wordlist from a website
cewl https://target.com -w target_words.txt
# Min/max word length
cewl -m 5 -w words.txt https://target.com
# Include meta data
cewl --meta -w words.txt https://target.com
# Follow links (depth)
cewl -d 2 -w deeper_words.txt https://target.com
Using KWProcessor (Keyboard Walks)
# Generate keyboard walk patterns
kwp -s 1 -o keyboard_walks.txt
# Base64 encode output
kwp -s 1 | base64 > encoded_walks.txt
Using Custom Scripts
#!/usr/bin/env python3
# generate-wordlist.py — Create targeted wordlist
import itertools
import sys
def generate_wordlist(base_words, numbers=True, special=True, years=True):
words = set()
for word in base_words:
words.add(word)
words.add(word.lower())
words.add(word.upper())
words.add(word.capitalize())
# Append numbers
if numbers:
for i in range(100):
words.add(f"{word}{i:02d}")
# Append years
if years:
for year in range(1990, 2027):
words.add(f"{word}{year}")
# Add special chars
if special:
words.add(f"{word}!")
words.add(f"{word}@")
words.add(f"{word}#")
words.add(f"{word}$")
# Leet speak
leet = str.maketrans('aeiost', '43105t')
words.add(word.translate(leet))
return words
if __name__ == "__main__":
base = ['admin', 'password', 'welcome', 'summer', 'company', 'security']
wordlist = generate_wordlist(base)
for word in sorted(wordlist):
print(word)
Wordlist Management
Merging and Deduplicating
# Merge multiple wordlists
cat wordlist1.txt wordlist2.txt > combined.txt
# Deduplicate
sort -u combined.txt > unique.txt
# Count unique words
wc -l unique.txt
# Filter by length
awk 'length($0) >= 8 && length($0) <= 16' wordlist.txt > filtered.txt
Wordlist Analysis
# Find most common patterns
sort wordlist.txt | uniq -c | sort -rn | head -20
# Find longest words
awk '{ print length, $0 }' wordlist.txt | sort -rn | head -10
# Find shortest words
awk '{ print length, $0 }' wordlist.txt | sort -n | head -10
# Character distribution
fold -w1 wordlist.txt | sort | uniq -c | sort -rn | head -20
Optimizing Dictionary Attacks
With Rules
Rules multiply wordlist effectiveness by generating variations of each word:
# Hashcat with best64 rules
hashcat -m 1000 ntlm.txt rockyou.txt -r best64.rule
# John with rules
john --wordlist=rockyou.txt --rules hashes.txt
# Common rule patterns:
# c$d$d$d — Capitalize + append 3 digits
# s@a s0o s$s — Leet speak substitutions
# l — Lowercase all
# u — Uppercase all
Markov-Based Attacks
# Hashcat Markov generator
hashcat --markov-disable # Disable Markov (default)
hashcat --markov-classic # Use Markov mode
# John's incremental mode uses Markov chains
john --incremental hashes.txt
Real-World Examples
RockYou Breach (2009): 32 million passwords leaked from RockYou. The wordlist has become the universal starting point for dictionary attacks, containing 14.3 million unique passwords.
LinkedIn Breach (2012): 6.5 million unsalted SHA-1 hashes cracked quickly using dictionary attacks because passwords lacked salts.
Ashley Madison (2015): Despite using bcrypt, attackers cracked millions of passwords using targeted dictionary attacks based on common patterns.
Common Mistakes
Not enough words: A small wordlist misses many passwords. Use comprehensive wordlists.
Not using rules: Plain dictionary attacks are far less effective than rule-based attacks.
Default wordlists only: RockYou is a starting point. Supplement with custom and targeted wordlists.
No deduplication: Duplicate entries waste processing time.
Best Practices
Related Tools
Related Articles
Summary
Dictionary attacks use wordlists of common passwords and their variations. They are far more efficient than pure brute force because they target real-world password patterns. Success depends on wordlist quality, rule effectiveness, and understanding the target's password creation habits.
Knowledge Check
Frequently Asked Questions
Continue Learning
John the Ripper Guide: Password Cracking Fundamentals
Learn to use John the Ripper for CPU-based password cracking including wordlist attacks, incremental mode, rule-based cracking, and hash format handling.
Security · IntermediateHashcat Tutorial Kali Linux: GPU-Accelerated Password Recovery & Mask Attack Guide
Comprehensive Hashcat tutorial for Kali Linux. Learn GPU-accelerated password recovery, attack modes (-a 0, -a 3 mask attacks), rules, and hash modes cheat sheet.
Security · IntermediateCredential Stuffing: Automated Account Takeover Attacks
Learn about credential stuffing attacks that use leaked credentials from data breaches to automate account takeover across different services.
Security · IntermediatePassword Auditing: Assessing Organizational Password Strength
Learn how to perform password auditing in organizations, including hash extraction, cracking methodology, analysis, and remediation strategies.
Related Security Tools
Hydra
Hydra is a parallelized login cracker that supports numerous protocols including FTP, HTTP, HTTPS, SMB, SSH, and many more. It performs rapid dictionary attacks against login pages and services to test password strength.
Password AttacksCeWL
CeWL is a custom word list generator that spiders a target URL and creates a wordlist from the content. Great for targeted password attacks.
Password AttacksCrunch
Crunch is a wordlist generator where you can specify a standard character set or a custom one. It can generate all possible combinations.
Password AttacksCUPP
CUPP (Common User Passwords Profiler) creates custom wordlists based on target personal information like names, birthdays, nicknames, pets, and keywords.