CPSA ยท Web application assessment: recon, access control and input
Authentication mechanism pitfalls
Weak passwords, user enumeration, lockout, recovery flows and credential transport.
Key points
- Weak passwords: weak or short ones allowed.
- User enumeration: different messages or timing for unknown user versus wrong password; recovery revealing if an account exists.
- Guessing: unlimited attempts, or abusable lockout.
- Transport: credentials over plain HTTP.
- Good practice: generic failure messages, per-account throttling, long passphrases allowed, neutral recovery wording, TLS on login and all authenticated pages.
Source: https://cheatsheetseries.owasp.org/cheatsheets/Authentication_Cheat_Sheet.html
Practice questions
Which login failure message best resists user enumeration?
- "No such user" or "Wrong password", depending on the case
- "Invalid user ID or password" in every failure case
- "Account locked" only for existing users
- "User exists, try another password"
Show answer
Answer: B. "Invalid user ID or password" in every failure case
One generic message for both unknown user and wrong password gives the attacker no signal. Messages that say which part was wrong let an attacker confirm valid usernames.
Which parameters define a lockout policy?
- The number of failures that triggers the lockout
- The visitor's screen resolution
- The time window in which failures are counted
- The TLS cipher preference order
- How long the lockout lasts
Show answer
Answer: A. The number of failures that triggers the lockout, C. The time window in which failures are counted, E. How long the lockout lasts
A policy needs a failure threshold, an observation window and a lockout duration. Screen resolution and the TLS cipher order are unrelated to counting failed logins.
True or false: counting failed logins only per source IP address is enough to stop password guessing against an account.
Show answer
Answer: False
False. An attacker can rotate addresses, so failures should be tracked per account (with sensible limits to avoid locking real users out).
Practice 8 questions on this topic in Bitzu
Short lessons, instant explanations and spaced review of what you get wrong. Free on iOS and Android.
