GO KALI FREE
IntermediateSecurity

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.

#Dictionary Attacks#Wordlists#Password Cracking#RockYou#Password Security

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:

  • **Brute Force Fundamentals** — Password cracking concepts
  • **Hashes Explained** — How passwords are stored
  • **Password Security Guide** — Password creation patterns
  • **Hashcat Guide** — Tool used for dictionary attacks
  • 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}
    quot;) # 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

  • **Start with comprehensive wordlists** — RockYou + SecLists
  • **Apply rules** — Rules multiply wordlist effectiveness by 10-100x
  • **Create targeted wordlists** — Based on target info (company, industry, location)
  • **Use multiple attack strategies** — Dictionary first, then rules, then masks
  • **Optimize wordlist size** — Filter by length, remove duplicates
  • **Combine sources** — Merge multiple wordlists for maximum coverage
  • Related Tools

  • **Crunch** — Wordlist generator
  • **CeWL** — Website wordlist generator
  • **KWProcessor** — Keyboard walk generator
  • **rsmangler** — Wordlist mangling tool
  • **bopscrk** — Smart personal wordlist generator
  • Related Articles

  • Hashcat Guide
  • John the Ripper Guide
  • Brute Force Fundamentals
  • Rainbow Tables
  • 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

  • Why are dictionary attacks more efficient than brute force?
  • What is the RockYou wordlist and why is it significant?
  • How do rules improve dictionary attack success rates?
  • What tools can create custom targeted wordlists?
  • Why should wordlists be deduplicated?
  • Frequently Asked Questions

    What is a dictionary attack?

    A dictionary attack cracks passwords by testing words from a pre-compiled wordlist against a hash. It is far more efficient than brute force because most people use common words, names, and patterns as passwords rather than random character combinations.

    What is the RockYou wordlist?

    RockYou is the most famous password wordlist, containing 14.3 million unique passwords from the 2009 RockYou data breach. It is the standard starting point for dictionary attacks and is included in Kali Linux at `/usr/share/wordlists/rockyou.txt.gz`.

    How do rules improve dictionary attacks?

    Rules generate password variations from base words — capitalization, leet speak (p@ssw0rd), appended digits (password123), and special characters (password!). Using rules with `best64.rule` increases success rates by 10-100x compared to plain wordlist attacks.

    How do I create a custom targeted wordlist?

    Use CeWL to scrape words from a target website, Crunch for pattern-based generation, or KWProcessor for keyboard walks. Python scripts can combine company names, years, and common substitutions. Custom wordlists based on target research are far more effective than generic ones.

    What tools perform dictionary attacks?

    [Hashcat](/articles/hashcat-guide) mode `-a 0` and [John the Ripper](/articles/john-ripper-guide) `--wordlist` are the primary tools. Both support rules, multiple wordlists, and advanced filtering. See our tool guides for detailed command examples and optimization tips.

    Why are dictionary attacks more efficient than brute force?

    Studies show the top 10,000 passwords cover about 40% of all user passwords. Dictionary attacks target these high-probability passwords first, cracking most accounts in minutes rather than the hours or days required for full brute force over the same keyspace.

    How do I optimize a wordlist for better results?

    Deduplicate entries with `sort -u`, filter by length with `awk`, and analyze patterns with `sort | uniq -c | sort -rn`. Combine multiple sources, remove unlikely entries, and ensure coverage of the target's language and common password patterns.

    What are Markov-based dictionary attacks?

    Markov chains analyze password probability distributions to generate likely character sequences. Hashcat's `--markov-classic` and John's incremental mode use this approach to prioritize statistically probable passwords over exhaustive dictionary coverage.

    Can dictionary attacks crack bcrypt passwords?

    Yes, but much slower than fast hashes. Bcrypt's deliberate slowness means dictionary attacks take hours instead of seconds for the same wordlist. Targeted, smaller wordlists are essential for practical bcrypt cracking within reasonable timeframes.