Description
Can you find the flag? It is hidden in the HTML source of this page.
Solution
Walk me through it- Step 1View the page sourceOpen the challenge URL. Press Ctrl+U (or right-click > View Page Source) to see the raw HTML. Look for a script tag containing the password validation logic.
Learn more
When a web application validates a password purely in client-side JavaScript, the correct password must exist somewhere in the code the browser downloads. There is no server-side check to hide the secret.
- Step 2Find and concatenate the flag partsThe JavaScript will compare the user input to a string that is split into several variables or parts. Find each part in the source and concatenate them in order to form the complete flag.
Learn more
Look for lines like:
var part1 = 'picoCTF{',var part2 = '...', etc. Or the comparison may be:if (input === part1 + part2 + part3). Simply join the pieces.This challenge is the easiest demonstration that client-side validation provides zero real security - a user never even needs to type anything into the form; they just read the source.
Flag
picoCTF{...}
The password is split into string variables in the JavaScript source. Concatenate them in order to get the flag.