A developer stores user passwords using MD5 without salt. A data breach occurs. How does an attacker most efficiently crack these passwords, and why is salting specifically important?
- A.The attacker mounts a hash length extension attack: MD5 is a Merkle-Damgard construction, letting the attacker append data to a known hash without the password. A per-user salt blocks the extension by changing the internal state, an effect that all salted MD5 values keep, while a pepper adds nothing, with a slow hash like bcrypt making no difference to the attack at the login server
- B.The attacker intercepts the stored hashes on the wire through a man-in-the-middle position: all MD5 digests sent over HTTP are readable by any observer, a salt solves this by encrypting the digest before it is stored, with one shared salt per application kept in a configuration file on the web server that hosts the login page
- C.The attacker uses a precomputed rainbow table: a lookup table mapping hash values to their plaintext inputs. Without a salt, identical passwords produce identical hashes, allowing one lookup to crack all accounts with the same password. A unique salt per user makes precomputed tables infeasible by ensuring the same password produces different hashes for each user