Description
A login portal guards access to ctf-player@picoctf.org. The developer left something helpful in the HTML source - can you spot it?
Setup
Open the login page and view the HTML source.
Solution
Want to try it yourself first?
The guided walkthrough reveals hints one step at a time.
Step 1Find and decode the hidden comment
ObservationThe HTML source holds a comment full of garbled text that still keeps its word boundaries and letter frequency. Those are ROT13 hallmarks, so decoding it should reveal a developer note.View the page source and locate the ROT13-encoded HTML comment. Decode it with tr or an online ROT13 tool. The comment reveals a custom HTTP header that bypasses authentication.bashecho 'ABGR: Wnpx - grzcbenel olcnff: hfr urnqre K-Qri-Npprff: lrf' | tr 'A-Za-z' 'N-ZA-Mn-za-m'Expected output
NOTE: Jack - temporary bypass: use header X-Dev-Access: yes
What didn't work first
Tried: Try decoding the comment with base64 instead of ROT13.
Piping the text through base64 -d throws an invalid character error, because ROT13 output is not valid base64. The giveaway is that the ciphertext keeps its word boundaries and English letter frequency, where base64 produces a dense run of mixed alphanumerics with no spaces.
Tried: Copy the encoded comment and paste it into a Caesar cipher brute-forcer trying all 25 shifts.
Most Caesar brute-force tools dump all 25 shifts and leave you to spot the right one, which works but is slower than going straight to shift 13. Worse, some handle only one letter case and silently drop the other, mangling the output and hiding the phrase you want.
Learn more
ROT13 (rotate 13) is a simple substitution cipher that shifts each letter forward 13 positions in the alphabet. Because the alphabet has 26 letters, applying ROT13 twice returns the original text - encoding and decoding use the same operation. It is not a security mechanism; it is used to obscure text from casual reading (like spoiler tags on forums).
HTML comments (
<!-- ... -->) are sent to every browser that requests the page - they are visible to anyone who uses "View Source" or browser developer tools. Developers sometimes leave backdoor notes, API keys, internal URLs, or debug instructions in comments, assuming they are invisible because they don't render visually. This is a very common finding in bug bounty hunting.The
trcommand translates (replaces) characters. The patterntr 'A-Za-z' 'N-ZA-Mn-za-m'maps each letter to its ROT13 equivalent - A becomes N, B becomes O, and so on, wrapping around at Z. This is a standard one-liner for quick ROT13 decoding in the terminal.Step 2Send the login request with the bypass header
ObservationThe decoded comment names a custom header, X-Dev-Access: yes, as a temporary bypass. So send a POST login request with that header added via curl and skip authentication entirely.The decoded message says to include the header 'X-Dev-Access: yes'. Send the login POST request with this header added - authentication is bypassed and the flag is returned.bashcurl -X POST https://<host>/login -H 'X-Dev-Access: yes' -d 'email=ctf-player@picoctf.org&password=anything'What didn't work first
Tried: Try sending the bypass header as a GET request instead of POST.
A GET to /login usually returns the login form rather than processing credentials, so the server ignores the bypass header and no flag comes back. The decoded comment describes a login action, which is the POST that submits the form.
Tried: Add the custom header using browser developer tools Network tab instead of curl.
Developer tools let you inspect and replay requests, but not add arbitrary custom headers to a new form submission; the browser enforces CORS and form rules that strip unknown headers. Use curl, or a proxy like Burp Suite, where you control every header sent.
Learn more
Custom HTTP headers like
X-Dev-Accessare non-standard headers that applications sometimes use for internal communication, feature flags, or - as in this case - poorly implemented developer shortcuts. HTTP headers can be set to any arbitrary value by the client, so any authentication logic that trusts a client-supplied header without cryptographic verification is bypassed trivially.This class of vulnerability appears in real-world applications as "debug modes," "admin bypass headers," or internal IP allowlisting that trusts
X-Forwarded-For. The lesson is that the server can never trust any input from the client - headers, cookies, POST body, and URL parameters are all fully controlled by the person making the request.curl -Hadds a custom header to the request.-X POSTchanges the HTTP method, and-dsends URL-encoded form data in the request body. These three flags together replicate what a browser sends when you click a login button, while adding the extra bypass header the server is secretly checking for.
Interactive tools
- SQL Injection Payload GeneratorGenerate SQL injection payloads for auth bypass, UNION extraction, blind SQLi, NoSQL operator injection, and sqlmap commands. Supports MySQL, PostgreSQL, SQLite, and MSSQL.
Flag
Reveal flag
picoCTF{brut4_f0rc4_...}
Per-instance flag confirmed from multiple independent sources. Different users received different hex suffixes: ..., 83812a02. Format prefix is consistent across all instances.