Weak Password Hashing
A stolen hash table is only safe if the hashing is.
What Is Weak Password Hashing?
A fast, unsalted hash turns a stolen password table into working logins. You'll watch an attacker crack a leaked dump with a plain wordlist, spot how identical hashes reveal shared passwords, and sign in as a victim. Then you take the defender's seat: move the store from MD5 to a slow, salted hash with rehash-on-login, prove the same wordlist now recovers nothing, and force a reset because the already-cracked passwords are still out there.
What You'll Learn in Weak Password Hashing
- Explain why a fast general-purpose hash like <code>MD5</code> or <code>SHA-1</code> is wrong for passwords: a machine tests billions of guesses a second against it
- Recognize that without a per-account salt, identical passwords produce identical hashes, leaking password reuse and enabling precomputed and shared-work cracking
- Choose a slow, memory-hard, salted password hash (<code>argon2id</code>, <code>scrypt</code>, or <code>bcrypt</code>) and migrate legacy hashes transparently by rehashing on next sign-in
- Distinguish the two remediations a breach needs: rotating the hashing scheme protects future dumps, while a forced reset is the only thing that retires already-cracked passwords
- Audit a codebase for the same pattern wherever passwords or secrets are stored with a fast or unsalted hash
Weak Password Hashing — Training Steps
-
Size up the target
Bob makes his living breaking into people's accounts and taking whatever is inside them: private writing, money, anything he can sell or use. Today his target is Thurlwick, a private-journaling app where accounts hold things people would never want read. He already bought a credential dump of Thurlwick's user table on a forum. He starts at the front door, the sign-in page, before he opens what he bought.
-
Open the stolen table
Bob opens the leaked backup in a terminal and lists the user rows. Each account stores its password as a hash, but the hashes are short and were built with a fast, general-purpose function, and no account has anything mixed in to make it unique. Two rows catch his eye at once: their password hashes are character-for-character identical, which can only mean those two people chose the same password.
-
Run the wordlist
Bob points an offline cracker at the dumped hashes and feeds it an ordinary list of common passwords. Because the hashes are unsalted and fast, the tool tests the whole list against every row at once. In seconds it recovers the plaintext for most of the table, including the account he came for.
-
Sign in as the owner
Now Bob spends what he recovered. He opens Thurlwick's normal sign-in page and types the cracked email and password for the account he targeted. The app has no way to tell him apart from the real owner: the password is correct.
-
Inside her account
He is in. Thurlwick opens the owner's private journal to him exactly as it would to her: her contact details, her home address, and the entries she wrote believing only she would ever read them. A single weak design choice in how one password was stored handed a stranger her most private writing.
-
Knowledge check
-
The breach report
You own authentication at Thurlwick. Overnight, a customer account was opened by someone who never triggered a password reset or an email code. Security has traced it to a leaked copy of the user table and emailed you the details.
-
Open the password store
Passwords are hashed and checked in the authentication module. Open it and look at how a stored password is built.
-
Find the weak hash
The stored value is the wrong kind of hash for a password. Step through the flagged line to see why a dump of it cracks so easily.
-
Knowledge check
Security Framework Coverage
OWASP Top 10
- A04:2025 Cryptographic Failures
- A02:2021 Cryptographic Failures
OWASP ASVS
- V11.4.2 Hashing and Hash-based Functions
CWE
- CWE-916 Use of Password Hash With Insufficient Computational Effort
- CWE-328 Use of Weak Hash
- CWE-327 Use of a Broken or Risky Cryptographic Algorithm
CIS Controls
- CIS 16 Application Software Security
NIST CSF
- PR.AT-02 Individuals in specialized roles are provided with awareness and training so that they possess the knowledge and skills to perform relevant tasks with cybersecurity risks in mind
- PR.PS Platform Security
NICE Framework
- DD-WRL-003 Secure Software Development