Password Cracking Fundamentals
What you'll learn: How passwords are stored, what hash functions protect them, and the core principles behind offline password cracking attacks.
Understanding Password Storage
When systems store passwords, they rarely save them in plain text (doing so would be catastrophic if the database is compromised). Instead, they use hash functions—one-way mathematical algorithms that convert your password into a fixed-length string. For example, "password123" might become 482c811da5d5b4bc6d497ffa98491e38 (MD5 hash). The same input always produces the same hash, but you theoretically cannot reverse the hash back to the original password.
Hash Types and Algorithms
Common hash types include:
- MD5: Fast but cryptographically broken (128-bit)
- SHA-1: Deprecated for security use (160-bit)
- SHA-256/SHA-512: Modern, stronger alternatives
- bcrypt/scrypt/Argon2: Deliberately slow, designed to resist cracking
Salted hashes add random data before hashing, making identical passwords produce different hashes—this defeats rainbow table attacks (precomputed hash databases).
Offline Cracking Principles
Offline password cracking happens when an attacker obtains a database of password hashes (like those you might extract during post-exploitation phases). The attacker then attempts to recreate the original password by:
- Hashing candidate passwords using the same algorithm
- Comparing the result to the stolen hash
- Repeating until a match is found
Think of it like trying keys on a lock you've taken home—you have unlimited time and attempts.
Cracking methods include dictionary attacks (common words), brute force (every combination), and hybrid approaches (words plus numbers). Success depends on password complexity, hash algorithm strength, and computational resources.
Key Takeaway: Passwords are stored as one-way hashes; offline cracking exploits this by systematically hashing guesses until a match is found, with success rates depending on hash algorithm strength and password complexity.