Rule-Based Attacks
What you'll learn: How to use mutation rules with wordlists to automatically generate password variations that mirror real-world user behavior.
The Core Idea
After dictionary attacks (using wordlists "as-is"), the next logical step is rule-based attacks. Instead of just trying "password123" from your wordlist, you apply transformation rules to generate variations like "Password123", "p@ssword123", or "password123!".
Think of it like a recipe book for passwords. You start with base ingredients (your wordlist) and apply recipes (rules) that mimic how humans actually modify passwords: capitalizing the first letter, substituting characters, adding years or symbols to the end.
How Rule-Based Attacks Work
Rule-based attacks use mutation rulesets that define transformations:
- Capitalization: "password" → "Password", "PASSWORD", "pAssWoRd"
- Character substitution: "password" → "p@ssw0rd" (a→@, o→0)
- Appends/Prepends: "password" → "password123", "password!", "2024password"
- Truncation: "password" → "pass", "passwd"
- Combination rules: "password" → "P@ssw0rd2024!"
Tools like Hashcat and John the Ripper support extensive rule engines. For example, Hashcat's best64.rule contains 64 commonly-successful transformations.
Why This Works
Users create "memorable" passwords by taking dictionary words and making simple modifications to meet complexity requirements. Rule-based attacks exploit this predictable human behavior, dramatically increasing cracking success rates without generating massive wordlists that would be impractical to store.
Practical Application
Instead of needing wordlists with every possible variation pre-computed, you maintain lean base wordlists and apply rules on-the-fly during the cracking process. This is computationally efficient and highly effective against real-world passwords.
Key Takeaway: Rule-based attacks amplify dictionary attacks by applying systematic transformations that mirror how humans modify base passwords, exploiting predictable patterns in password creation without requiring enormous pre-generated wordlists.