CIDADAXSEC
← All topics
Practitioner

Authentication

Gaps in the login flow: unlimited brute force, password reset logic, and 2FA that can be skipped.

Material

Authentication bugs are rarely a single query. They sit in the order of steps that make up the login flow: the sequence of checks, the attempt limit, and the data reused between steps.

What the labs cover

  • Brute force: no rate limit, or a limit that can be bypassed by changing headers and IPs.
  • Logic flaw: a verification step can be skipped, for example a 2FA page reachable directly after the first step.
  • Password reset: weak tokens, tokens that never expire, or the Host header used to build the reset link.
  • User enumeration: different error messages for existing and non-existing usernames.

Prevention

  • Limit attempts per account and per IP, with a rising delay.
  • Keep login step state on the server, not in a parameter the client can edit.
  • Reset tokens: 128-bit random, single use, short expiry, and not derived from the Host header.
  • Identical error messages for existing and non-existing usernames.
The 2FA bypass lab is already available in Phase 1. Brute force and password reset labs come in Phase 2.

Labs in this topic

Labs run on a domain separate from this site, so a payload cannot reach your account session.

Authentication: 2FA bypassThe verification step can be skipped because login state is stored on the client.
LevelPractitioner
Not solved

Challenges in this category

Challenges from the PortSwigger Web Security Academy. The original labs run on PortSwigger domains, so the link opens there.