Bitzu

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

Single choice

Which login failure message best resists user enumeration?

  1. "No such user" or "Wrong password", depending on the case
  2. "Invalid user ID or password" in every failure case
  3. "Account locked" only for existing users
  4. "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.

Select all that apply

Which parameters define a lockout policy?

  1. The number of failures that triggers the lockout
  2. The visitor's screen resolution
  3. The time window in which failures are counted
  4. The TLS cipher preference order
  5. 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

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.

Download on the App StoreGet it on Google Play

More CPSA topics in this module