πŸ›‘οΈ Methodology Checklist

  • Primary wordlist: rockyou.txt (/usr/share/wordlists/rockyou.txt)
  • Target-specific wordlist: CeWL from target website cewl http://[TARGET] -d 3 -m 6 > custom.txt
  • Combine with rule: hashcat -m [MODE] hash.txt rockyou.txt -r best64.rule
  • John rules: john --rules=Jumbo --wordlist=rockyou.txt hash.txt
  • Cupp for personalised wordlist (social engineering context)
  • Known policy/pattern? Mask attack: hashcat -a 3 -m [MODE] hash.txt ?u?l?l?l?l?d?d?s (or crunch to a file)
  • SecLists password lists for specific services
  • Try top 10 most common passwords before full wordlist

🎯 Operational Context

Use when: Basic rockyou wordlist exhausted β€” apply Hashcat rules to generate mutations (capitalizations, substitutions, appended numbers) from base wordlists. Think Dumber First: hashcat -a 0 -m [MODE] hash.txt rockyou.txt -r /usr/share/hashcat/rules/best64.rule generates 64 mutations per word = 900M+ candidates from rockyou. This covers most corporate passwords. Use dive.rule for deeper coverage. Skip when: Hash is bcrypt with high cost factor β€” rule expansion makes an already slow attack exponentially worse.


⚑ Tactical Cheatsheet

CommandTactical Outcome
cewl https://[DOMAIN] -d 4 -m 6 --lowercase -w target.wordlistSpider website to build targeted wordlist
hashcat --force base_words.txt -r custom.rule --stdout | sort -u > mutated_list.txtTest rules β€” generate mutations without cracking
hashcat -a 0 -m [ID] hash.txt wordlist.txt -r /usr/share/hashcat/rules/best64.ruleAttack with built-in best64 ruleset
hashcat -a 1 passlist.txt passlist.txt --stdout > combined.txtCombinator: join wordlist with itself
hashcat -a 0 -m [ID] hash.txt combined.txt -r custom.ruleAttack combined list with custom rules
hashcat -a 3 -m [ID] hash.txt ?u?l?l?l?l?d?d?sMask attack β€” generate candidates by pattern (no wordlist)
hashcat -a 6 -m [ID] hash.txt rockyou.txt ?d?d?d?dHybrid: dictionary word + trailing digits
crunch 8 8 abcdef0123456789 -o cs.txtcrunch: write a charset/pattern wordlist to a file
ls /usr/share/hashcat/rules/List built-in rule files

πŸ”¬ Deep Dive & Workflow

Psychology of Passwords β€” Why Users Are Predictable

Even under strict complexity policies, users make predictable choices:

  • Base on personal info (OSINT target): name, birth year, pet, hometown, employer
  • Capitalize the first letter: Password
  • Append year or digits: Password2023
  • Substitute letters: P@ssw0rd! (l33t speak)
  • Combine two words to meet length: baseball1998

This predictability is what makes targeted cracking far more efficient than pure brute-force.

Hashcat Rule Syntax

Rules transform each wordlist candidate at runtime:

FunctionDescriptionExample
:Do nothingword β†’ word
lLowercase allWord β†’ word
uUppercase allword β†’ WORD
cCapitalize firstword β†’ Word
sXYReplace X with Yso0 β†’ replaces o with 0
$XAppend character X$! β†’ word!
^XPrepend character X^1 β†’ 1word

Writing a Custom Rule File

# custom.rule contents
:          # keep word as-is
c          # capitalize first letter
so0        # substitute o β†’ 0
$!         # append !
c so0      # capitalize + substitute
c $!       # capitalize + append !
c so0 $!   # all three

Test the mutations (no cracking, just see output):

hashcat --force base_words.txt -r custom.rule --stdout | sort -u > mutated_list.txt
head mutated_list.txt

CeWL β€” Website-Based Wordlist Generation

CeWL spiders a site and extracts unique words β€” highly targeted for organization-specific terms:

cewl https://www.company.com -d 4 -m 6 --lowercase -w company.wordlist
  • -d 4 β€” spider 4 levels deep
  • -m 6 β€” minimum word length of 6 characters
  • --lowercase β€” normalize for consistent matching

Then pair with a complexity rule:

hashcat -a 0 -m 1000 hash.txt company.wordlist -r /usr/share/hashcat/rules/best64.rule

Targeted Profiling Attack β€” Full Workflow

Scenario: crack hash for a specific user from OSINT data.

# 1. Build base wordlist from OSINT (name, company, city, pets, dates)
cat > passlist.txt << EOF
San
Francisco
August
1998
Nexura
Bella
Maria
baseball
EOF
 
# 2. Check minimum length requirement (e.g., policy = 12 chars)
# Single keywords like "Bella" = 5 chars β†’ fail
# Need combinator: "baseball" + "1998" = 12 chars β†’ try
 
# 3. Generate combined candidates
hashcat -a 1 passlist.txt passlist.txt --stdout > combined.txt
# "baseball1998", "NexuraBella", "MariaAugust", etc.
 
# 4. Apply complexity rules
hashcat -a 0 -m 1000 hash.txt combined.txt -r custom.rule

Mask & Pattern Attacks β€” When You Know the Shape

When you know the password policy or a likely pattern (e.g. β€œcapital word + 4 digits + symbol”, or β€œSeason+Year”), don’t grind a dictionary β€” generate exactly those candidates. Much smaller keyspace, much faster.

hashcat mask attack (-a 3) β€” generate candidates inline, no wordlist file. Built-in charsets:

MaskCharset
?l / ?ulower / upper a–z
?ddigits 0–9
?sspecials !"#$%…
?aall printable (?l?u?d?s)
# 8 chars: 1 upper, 5 lower, 2 digits  β†’ "Summer12"-shaped
hashcat -a 3 -m [MODE] hash.txt ?u?l?l?l?l?l?d?d
 
# Known prefix + variable suffix (corporate "Welcome"/company name + year/symbol)
hashcat -a 3 -m [MODE] hash.txt Welcome?d?d?d?d
hashcat -a 3 -m [MODE] hash.txt [COMPANY]@?d?d?d?d
 
# Custom charset (-1 = upper+lower) with length increment
hashcat -a 3 -m [MODE] hash.txt -1 ?u?l --increment ?1?1?1?1?1?1?1?1

Hybrid attacks β€” bolt a mask onto dictionary words (the classic Password2025! shape):

hashcat -a 6 -m [MODE] hash.txt rockyou.txt ?d?d?d?d   # word + 4 trailing digits
hashcat -a 7 -m [MODE] hash.txt ?d?d?d?d rockyou.txt   # 4 leading digits + word

crunch β€” write a pattern/charset wordlist to a file (for tools that need a list: hydra, john, nxc spraying). Placeholders: @=lower, ,=upper, %=digit, ^=symbol.

crunch 8 8 abcdef0123456789 -o charset8.txt    # all 8-char combos of a charset
crunch 6 6 -t Pass%^ -o pat.txt                # "Pass" + 1 digit + 1 symbol
crunch 9 9 -t Spring%^^ -o spring.txt          # "Spring" + 1 digit + 2 symbols

maskprocessor (mp64) β€” crunch-like, but with hashcat mask syntax, straight to a file:

mp64 'Welcome?d?d?d?d' > welcome_years.txt

Derive the mask from the policy. If the policy is β€œβ‰₯8 chars, 1 upper, 1 digit, 1 symbol,” most users do the minimum: Word123! β†’ mask ?u?l?l?l?d?d?d?s. Match the mask to the policy and you catch the compliant-but-lazy majority that rockyou misses. Mask keyspace grows fast β€” keep masks tight and prefer hybrid (-a 6/7) over pure -a 3 past ~8 chars.

Worked Example β€” β€œSeason + Year” (the most common corporate pattern)

Seasons are a tiny fixed set, so this is a hybrid attack, not a pure mask: a seasons wordlist + a mask for the year and symbol.

# 1. Seasons base (both cases)
printf 'Spring\nSummer\nAutumn\nFall\nWinter\nspring\nsummer\nautumn\nfall\nwinter\n' > seasons.txt
 
# 2. Hybrid: season + 4-digit year + symbol  β†’  Summer2024!, Winter2023@, ...
hashcat -a 6 -m [MODE] hash.txt seasons.txt ?d?d?d?d?s
#    also worth a run without the trailing symbol:
hashcat -a 6 -m [MODE] hash.txt seasons.txt ?d?d?d?d

Tighten to realistic years β€” ?d?d?d?d tries 0000–9999; a recent calendar range is far smaller and near-instant. Generate to a file:

for s in Spring Summer Autumn Fall Winter; do for y in $(seq 2018 2025); do
  printf '%s%s\n%s%s!\n' "$s" "$y" "$s" "$y"; done; done > season_year.txt

KeePass / finicky hashes: if hashcat balks (e.g. the 13400 Salt-value exception β€” see Attacking_KeePass), generate the list with hashcat and crack with John:

hashcat -a 6 seasons.txt ?d?d?d?d?s --stdout > season_year.txt
john --wordlist=season_year.txt kp.hash && john --show kp.hash

Built-In Rulesets Priority

  1. best64.rule β€” start here, covers most real-world patterns
  2. dive.rule β€” larger, more aggressive (slower)
  3. rockyou-30000.rule β€” designed to pair with rockyou wordlist
  4. Custom rules β€” when you have OSINT on the specific target

πŸ› οΈ Troubleshooting & Edge Cases

ProblemCauseFix
Rules not improving crack rateWrong rules for targetFor corporate: OneRuleToRuleThemAll.rule; for personal: best64 + Clem9669; for AD: corporate.rule
Rule file not foundDefault hashcat rules pathCheck: /usr/share/hashcat/rules/ on Kali; download from hashcat GitHub if missing
Combination of wordlist + rules too largeMemory exhaustedUse -S (slow candidates mode) or pipe through hashcat stdin for streaming
Hashcat mask attack syntax wrongCharacter set formatExample 8-char: hashcat -a 3 -m [MODE] hash.txt ?u?l?l?l?l?l?d?d for one upper, 5 lower, 2 digits
Prince attack not availablePRINCE rule not in hashcatUse princeprocessor separately: pp.bin wordlist.txt | hashcat -a 0 -m [MODE] hash.txt -

πŸ“ Reporting Trigger

Finding Title: Password Mutation Rules Crack Complexity-Compliant Passwords Impact: Hashcat rule-based attacks crack passwords that technically meet complexity requirements (uppercase, number, special char) but follow predictable mutation patterns (e.g., Password1!, Welcome@1), rendering complexity policies ineffective without passphrase enforcement. Root Cause: Password policy enforces complexity without prohibiting predictable mutation patterns. Users systematically apply minimal complexity to memorable base words. Recommendation: Implement passphrase-based password policy (4+ random words, 20+ chars) over traditional complexity rules. Deploy password breach checking that detects rule-predictable patterns. Consider hardware MFA tokens to reduce password-only authentication risk.