Open the page's source (Ctrl+U): an HTML comment holds part 1. The page loads mycss.css and myjs.js; each ends with a comment holding parts 2 and 3. Concatenate them in that order.
| Platform | picoGym (picoCTF 2019) |
| Verified against | thomasbui's picoCTF 2019 writeup |
| Category | Web Exploitation |
| Difficulty | Beginner |
| Tools | browser curl |
A tiny site with two tabs, "How" and "What", that describe how it was made with HTML, CSS and JS — which is exactly where to look.
"Kishor Balan tipped us off that the following code may need inspection: ..." — provided: a link to the site
Stuck? Try a hint before reading the solution
A web page is more than its HTML.
Read the comments in the HTML source, mycss.css and myjs.js.
Open the page and press Ctrl+U (View page source). Near the bottom, there's a comment:
<!-- Html is neat. ... 1/3 of the flag: picoCTF{... -->
The source also shows the two files the page loads:
<link rel="stylesheet" type="text/css" href="mycss.css">
<script type="application/javascript" src="myjs.js"></script>
Click mycss.css in the source view (or request it directly). The last line is a CSS comment with the second part:
$ curl -s http://CHALLENGE/mycss.css | tail -n 3
/* ... part 2/3 of the flag: ... */
Same for myjs.js — the final comment holds the last part, ending with }:
$ curl -s http://CHALLENGE/myjs.js | tail -n 3
/* ... part 3/3 of the flag: ...} */
Join parts 1, 2 and 3 with no spaces to get the complete picoCTF{...}.
The flag is deliberately hidden — follow the method, you've earned it. 💪
Everything a website sends to your browser can be read — including what isn't displayed:
New to CTFs? Start here: beginner's guide to CTFs — what a CTF is, the categories, the tools and a step-by-step plan.
Discuss this writeup with the community on the CTFdojo Discord.
Join the Discord →