A login page replies "No such user" for unregistered names and "Wrong password" for registered ones. Logs show one IP submitting thousands of names, each once with a dummy password. Which change best removes the information the attacker is collecting?
Show the answer
Correct answerD. Return one identical generic error for every failed login
AWhy not this: Lockout counts failures per account; the attacker still learns valid names from the differing messages.
BWhy not this: Session expiry limits stolen-session use and has no bearing on what the login errors disclose.
CWhy not this: MFA protects accounts after the password step but the page still reveals which usernames exist.
DWhy this is right: A uniform error gives the attacker no way to tell valid usernames from invalid ones, so the list cannot be built.
The attacker is using the differing error messages to learn which usernames exist, which is user enumeration. A single generic error stops the page revealing valid accounts. Lockout limits guessing against one account but does not hide which names are valid.