// Crack the Gate 1
Web Exploitation · Easy · CyLab Security Academy (picoMini by CMU-Africa)
// Summary
A login page is given with no password. The page's hidden code, which any visitor's browser receives, contains a developer's note scrambled with a simple letter shift. Unscrambled, it says that adding a specific label to the login request1 skips the password check. Browsers do not let users add custom labels, so the request is sent from a command-line tool with the label attached, and the site lets it through. Comparable to a note taped inside a shop window saying "staff: say 'dev access' at the door and the guard waves you in."
// Objective
Given: a login page. No password is given.
Asked: the flag, format academy{...}, behind the login.
Type: implied.
// Recon
Ctrl+U (view source) — HTML comment2: <!-- ABGR: Wnpx - grzcbenel olcnff: hfr urnqre "K-Qri-Npprff: lrf" -->
ROT133-decode the comment — NOTE: Jack - temporary bypass: use header4 "X-Dev-Access: yes"
// Deduction
- No password is given → the way in is something the site exposes → read the page source5.
- The comment is letter-shifted text in a note's shape (
ABGR:lines up withNOTE:) → ROT13 → decode it. - The bypass is an HTTP header → a browser form cannot add custom headers → send the login request by hand with curl6.
// Solve
- Run:
Result: the flag in the response body.curl -X POST <challenge-url>/login \ -H "X-Dev-Access: yes" \ -H "Content-Type: application/json" \ -d '{"email":"<email>","password":"<any>"}'
The email used is not recorded.
// Answer
Plain: the flag is what the site shows to someone who is logged in. It was reached by using the developer's shortcut instead of a password.
Technical: the login handler returns the flag when the request carries X-Dev-Access: yes, regardless of the password. The header was taken from a ROT13-encoded comment in the served HTML.
// Root cause
Flaw: a developer authentication bypass7 is left in production and documented in client-visible HTML.
CWE: CWE-615, sensitive information in source code comments; CWE-288, authentication bypass using an alternate path.
Fix: remove debug bypasses before deployment; strip comments from served HTML; never base authentication on a client-supplied header.
Real-world impact: anyone who views the page source can log in as a user without a password and read or change that account.
// Transfer
- Login with no credentials given → view source first.
- Text in a note's shape that reads as gibberish → try ROT13 / Caesar (CyberChef).
- The server trusts a header → curl or Burp Repeater; the browser cannot set it.
// Index
- 1HTTP requestThe message a browser sends to a website asking for a page or submitting a form.
- 2HTML commentA note in a page's code (
<!-- ... -->) that the browser does not display but anyone can read in the source. - 3ROT13Replacing each letter with the one 13 places later in the alphabet. It hides nothing; applying it again restores the text.
- 4HeaderA labelled line attached to a request (e.g.
X-Dev-Access: yes) that the server can read. - 5Page sourceThe code behind a web page, sent to every visitor's browser.
Ctrl+Ushows it. - 6curlA command-line tool that sends a request exactly as written, including any headers.
- 7Authentication bypassGetting past a login check without valid credentials.