☼
⌃
☰

Password Cracking Methodology

Table of Contents

A structured approach to cracking password hashes, from identification through to tool selection and wordlist strategy.

Related: Hashcat Passwords Dictionary Attack Mask Attack Brute Force Attack

1. Identify the Hash

Before cracking, identify the hash type. Tools:

SHELL
hashid hash.txt
SHELL
hash-identifier

Common hash types and their Hashcat modes:

Hash Type Mode Example Length
MD5 0 32 chars
SHA1 100 40 chars
SHA256 1400 64 chars
NTLM 1000 32 chars
NTLMv2 5600 varies
bcrypt 3200 60 chars
Kerberoast 13100 varies
AS-REP Roast 18200 varies
WPA2 22000 varies

2. Choose a Strategy

Start fast and escalate complexity only if needed:

  1. Common wordlist (rockyou.txt) — covers most CTF hashes
  2. Wordlist with rules — mutates words with common substitutions
  3. Targeted wordlist — built from OSINT about the target
  4. Mask attack — structured brute force with known patterns
  5. Full brute force — last resort, impractical for strong hashes

3. Wordlists

Wordlist Use Case
/usr/share/wordlists/rockyou.txt General purpose, CTFs
SecLists/Passwords/ Targeted and specialised
CeWL generated Target-specific from website

Generate a target-specific wordlist with CeWL:

SHELL
cewl http://target.com -d 2 -m 5 -w wordlist.txt

4. Cracking

Dictionary attack

SHELL
hashcat -m <mode> hash.txt /usr/share/wordlists/rockyou.txt

Dictionary with rules

SHELL
hashcat -m <mode> hash.txt /usr/share/wordlists/rockyou.txt -r /usr/share/hashcat/rules/best64.rule

Mask attack

SHELL
# ?u=uppercase ?l=lowercase ?d=digit ?s=special
# Example: Password1! pattern
hashcat -m <mode> hash.txt -a 3 ?u?l?l?l?l?l?l?d?s

Show cracked passwords

SHELL
hashcat -m <mode> hash.txt --show

Tips

  • Always try rockyou.txt first — it cracks the majority of CTF hashes immediately.
  • Use best64.rule before escalating to mask attacks — it covers common mutations like Password → P@ssw0rd.
  • bcrypt is slow to crack by design — GPU matters significantly here. Consider whether cracking is the right approach.
  • NTLM hashes from a domain environment are often reused — try cracked passwords against other services and accounts.
  • Keep a personal wordlist of passwords you encounter during engagements — patterns repeat.