Skip to main content

IntroToBurp picoCTF 2024 Solution

Intercept the OTP submission in a proxy and rename the otp field, so the server never finds it and skips verification altogether.

Published: April 3, 2024Updated: August 25, 2026

Description

Try here to find the flag

Burp proxy

Launch Burp Suite Community Edition (or your preferred MITM proxy) and its embedded browser.

Browse to the provided URL (http://titan.picoctf.net:<PORT_FROM_INSTANCE>/) through the proxy.

bash
http://titan.picoctf.net:<PORT_FROM_INSTANCE>/

Solution

Want to try it yourself first?

The guided walkthrough reveals hints one step at a time.

Walk me through it
The Burp Suite for picoCTF guide walks the proxy setup, Repeater workflow, and keyboard shortcuts this challenge depends on. The Web Challenges and Real-World Bug Patterns guide catalogs the proxy-tampering bug class this OTP bypass falls under, with a chapter on client-side validation that doesn't exist on the server.
  1. Step 1Register with dummy data
    Observation
    The landing page shows a registration form before anything else. Create a throwaway account so the server issues a session and moves you to the next surface.
    Fill out the first form with any values and submit. This leads to the OTP verification page.
    Learn more

    Burp Suite is an industry-standard web application security testing platform made by PortSwigger. Its core feature is an intercepting proxy that sits between your browser and the target server, letting you read, pause, and modify every HTTP/HTTPS request and response in real time.

    When you use Burp's embedded Chromium browser, all traffic is automatically routed through the proxy without any certificate trust issues. This is the fastest way to get started, since configuring an external browser to trust Burp's self-signed CA can take extra steps.

    In real-world penetration testing, the registration step is always done first so you have a valid session to work with. Even throwaway credentials give the server enough state to present the next attack surface - in this case, the OTP form.

  2. Step 2Intercept the OTP submission and mangle the field name
    Observation
    The OTP form validates in the browser before submitting. Intercept the POST in Burp and rename the otp parameter, so the server-side lookup finds nothing and skips the check.
    Turn Intercept ON in Burp's Proxy tab, enter any value in the OTP field, and submit. In the captured request body you will see otp=999 (or whatever you typed). Change the field name from otp to something like otgp so the parameter is otgp=999. The server-side code never finds the otp field, skips the check, and grants access.
    bash
    (Intercepted request body) ...&otgp=999&...
    What didn't work first

    Tried: Delete the otp field's value entirely, sending otp= with an empty string, instead of renaming the field.

    An empty string still counts as a present OTP, and most servers answer with 'Invalid OTP'. The bypass needs the field name itself gone, so the lookup returns null and the check never runs. Renaming it keeps the otp key out of the body entirely.

    Tried: Modify the request in the browser's DevTools Network tab using 'Edit and Resend' instead of setting up Burp.

    Firefox's Edit and Resend replays a copy of the request outside the page's flow, so the session and redirect handling the form relies on are not reproduced, and Chrome has no equivalent at all. Burp pauses the real request in flight and lets you rewrite the raw body before it reaches the server, which is what this needs.

    Learn more

    Mangling the field name is a different bypass from clearing the value. Here the server-side OTP check looks up a specific parameter name (otp). When you rename it to otgp, the lookup returns null or an empty string, and if the server code does not enforce that the field was present with a non-null value, it skips the check entirely and grants access.

    This is why proxy interception bypasses any client-side validation: the browser's JavaScript runs its checks before submission, but Burp captures the request after JS has signed off, sitting as an HTTP proxy between your browser and the server. You can mutate the body freely; the server only sees your modified request.

    This is called an OTP bypass and is a well-documented class of authentication vulnerability. Related bugs include accepting any OTP value, not expiring OTPs after use, or not rate-limiting brute-force attempts.

    • Intercept mode in Burp pauses each request so you can edit the raw body or headers before forwarding.
    • The otp= parameter appears in the POST body in application/x-www-form-urlencoded format.
    • Renaming the field tests whether the server validates that the specific named field was provided at all.
  3. Step 3Forward the tampered request
    Observation
    The body already carries the renamed field, so forwarding it now reaches the server with no otp key at all.
    Forward the modified request to the server. Because the otp field name is missing, the server skips the OTP check and the response contains the flag immediately.
    Learn more

    Forwarding in Burp sends the (now modified) HTTP request to the actual server and lets you see the real response. When authentication logic is missing an empty-value check, the server returns whatever is normally shown after successful verification - in this challenge, the flag.

    This attack demonstrates why server-side validation is essential. Client-side checks (JavaScript that prevents form submission with an empty field) are trivially bypassed by any proxy tool. The server must independently verify that the OTP field is present, non-empty, and matches the expected value.

    In production systems, robust OTP implementations use time-based algorithms (TOTP, RFC 6238) and enforce server-side expiration and attempt limits, making this type of bypass impossible.

Interactive tools
  • URL Encoder / DecoderEncode and decode URL-encoded (percent-encoded) strings. Useful for web exploitation challenges involving query parameters, form data, and HTTP headers.
  • JWT DecoderDecode JSON Web Tokens and inspect the header, payload, and signature. Useful for web exploitation challenges.

Flag

Reveal flag

picoCTF{#0TP_Bypvss_SuCc3$S_3e3d...}

Tampering with the OTP parameter yields the flag immediately.

Key takeaway

An authentication check that lives only in client-side JavaScript is a UI convenience, not a security control. A proxy can drop or rewrite fields after the browser validates them, exposing server logic that assumed the field arrived present and well-formed. OTP bypasses, role escalation, and price tampering all share that root cause: the server never verifies what the client claims it sent. Validate on the server and treat every incoming field as untrusted.

Related reading

Useful tools for Web Exploitation

Where to go next