~ / blog / authentication-labs

PortSwigger Authentication Labs
Walkthrough & Field Notes

A growing, screenshot-led notebook on authentication failures: how each weakness is identified, how the attack is shaped in Burp Suite, and which response detail turns a guess into a reliable exploit.

What This Covers

PortSwigger authentication labs documented as they are solved, from credential enumeration to multi-factor access-control failures.

Series Status

Active notebook · Labs 01–02 complete · more walkthroughs will be added with their original evidence.

Tools Used
Burp SuiteProxyIntruderRepeaterBrowser
Method
  • Establish a baseline before comparing responses.
  • Change one credential dimension at a time.
  • Use status, length, body text, and redirects as evidence—not intuition.
02
Authentication track in progress This page will grow lab by lab without losing the original solve trail.
Last updated
02 Jul 2026

The testing method

Authentication testing becomes much cleaner when each request answers one question. For this lab, the attack is split into two passes: first discover a valid username while the password stays deliberately wrong, then hold that username steady while testing passwords.

Find the identityFuzz only the username and compare the server’s rejection messages.
Find the secretFix the confirmed username and identify the password response outlier.
Verify the sessionFollow the successful redirect and confirm access to the account.
01
Apprentice · Solved

Username enumeration via different responses

Goal: enumerate a valid username, brute-force its password, and access the account page.

Pass 1 — isolate the username signal

I captured a failed login request and sent it to Intruder. The password remained a known-bad constant while the username parameter received a candidate wordlist. Most attempts returned the normal invalid-username response and the same response length.

The payload att was the exception. Its response was two bytes longer and the body said Incorrect password. That wording is the application admitting that the username exists: the password was checked only after the identity passed validation.

01
Response outlier

att produced length 3354, while the surrounding candidates produced 3352. The body changed to “Incorrect password.”

Burp Suite Intruder results showing the username att as a response-length outlier and an Incorrect password message
The first useful difference: att reaches password validation, while invalid usernames stop earlier. Status code alone is not enough here; the body text and length expose the account.

Pass 2 — hold the username steady

With the username confirmed, I moved the Intruder payload position to the password parameter and kept username=att fixed. This removes username behavior from the comparison, so any new outlier belongs to the password check.

The password george returned 302 Found while the failures stayed on 200 OK. The response also set a session cookie and redirected to /my-account?id=att. Together, those signals are much stronger than a length difference: the application has created an authenticated session.

02
Authentication outlier

george changed the status to 302, set a session cookie, and supplied a Location: /my-account?id=att header.

Burp Suite Intruder results showing george returning a 302 redirect for the confirmed username att
The password hit is unambiguous: 302 Found plus a fresh session cookie and an account-page redirect. Sorting by status code surfaces it immediately.

Pass 3 — verify the solve in the browser

I logged in with the discovered credentials and reached the account page for att. The Academy banner marked the lab as solved, which closes the loop from response anomaly to confirmed account access.

PortSwigger Web Security Academy account page confirming the username enumeration lab is solved
Final verification on the target: the authenticated account page is visible and Web Security Academy reports the lab as solved.
Lab result

Username found, password found, session verified.

The real vulnerability is not the weak credential itself. It is the login endpoint revealing whether an account exists through observably different failure responses.

What Lab 01 teaches

Generic errors need to be genuinely generic. Matching the visual design is not enough if the wording, byte length, timing, or redirect behavior still changes between “unknown user” and “wrong password.”

Compare several response dimensions. The username was found through body content and length; the password was found through status, headers, and session behavior. A single-column workflow would have missed part of the story.

Split compound problems into controlled passes. Testing usernames and passwords simultaneously creates noise. Fixing one dimension makes the other observable and produces evidence that is easy to explain and reproduce.


02
Apprentice · Solved

2FA simple bypass

Goal: access Carlos’s account with his password but without supplying the required two-factor verification code.

Step 1 — complete only the password check

I started with the known credentials carlos / montoya and captured the login request. This completes the first authentication factor and causes the application to create a session that is supposed to remain restricted until the second factor succeeds.

01
Partially authenticated session

The request submits valid credentials to POST /login. The resulting session should identify Carlos while still requiring 2FA before any protected account resource is released.

Burp Suite showing the first-factor login request for Carlos with the known password montoya
The first factor is valid: username=carlos&password=montoya. The vulnerability appears after this request, when the session enters the application’s pre-2FA state.

Step 2 — request the protected account page directly

Instead of continuing to the verification form, I reused the same session cookie and requested GET /my-account?id=carlos directly. The server returned the protected account page even though no 2FA code had been submitted.

The bypass works because the application treats the second factor as a step in the browser’s expected navigation rather than an authorization condition on the account endpoint. Changing the URL skips the step, and the server fails to challenge the session again.

02
Missing server-side enforcement

/my-account?id=carlos accepts the pre-2FA session. The endpoint checks that the first factor succeeded, but not that the second factor was completed.

Burp Suite showing a direct GET request to the Carlos account page using the session created before 2FA verification
The decisive request contains no verification code—only the existing session cookie and a direct path to Carlos’s account.

Step 3 — confirm account access

Loading the direct request opened Carlos’s account page and Web Security Academy marked the lab as solved. This verifies that the second factor was not merely hidden or bypassed in the interface; it was absent from the server-side access decision.

PortSwigger Web Security Academy confirming the 2FA simple bypass lab is solved on Carlos's account page
Carlos’s account is accessible and the lab is solved without ever submitting a two-factor code.
Lab result

Password accepted, 2FA skipped, account accessed.

Multi-factor authentication only protects a session when every protected endpoint verifies the completed authentication state on the server.

What Lab 02 teaches

Navigation order is not access control. Redirecting a browser to a 2FA form does not matter if the protected destination remains directly reachable.

Track authentication state explicitly. A pre-2FA session and a fully authenticated session must be distinguishable, and sensitive routes must reject the former.

Test destination endpoints independently. When reviewing multi-step authentication, request the final account page after every intermediate stage. The missing check often lives there, not in the verification form itself.

Series queue

More authentication labs will land here.

Each new solve will get its own numbered section, screenshots, response clues, and concise takeaways while this page remains the single entry point for the track.

Move through the archive

Companion hubTryHackMe Lab Notes2026-07-02 · Growing collection Previous postPortSwigger SSTI Labs Write-Up2026-06-14 · ~58 min read
← Back to all posts