Secrets

Challenge Overview

We have several pages hidden. Can you find the one with the flag?

The website is running here.

Solution

wget -m http://saturn.picoctf.net:53932/

This created a folder with all of the things linked to the orginal page.

I then went into secerets, cd secrets , then assets, cd assets, then output the index.css file cat index.css. There was nothing of interest here.

From here I just used curl to go through the website pages, here was the list of command I went through until I found the page.

  • curl -s http://saturn.picoctf.net:53932/
  • curl -s http://saturn.picoctf.net:53932/secret/assets
  • curl -s http://saturn.picoctf.net:53932/secret/
  • curl -s http://saturn.picoctf.net:53932/secret/hidden/file.css
  • curl -s http://saturn.picoctf.net:53932/secret/hidden/
  • curl -s http://saturn.picoctf.net:53932/secret/hidden/superhidden/xdfgwd.html
  • curl -s http://saturn.picoctf.net:53932/secret/hidden/superhidden/

The last command had the flag located on the page. Also it is good to note that when there is a "/" after "secret", "hidden", or "superhidden" it is automatically assuming index.html and directing there. If there was no "/" after then it would not work correctly.

Now that the flag is there with curl, I used grep to get just the flag.

grep -oE "picoCTF{.*?}" --color=none

-E is extended regular expressions.

-o makes it only print the matched parts.

Inside of the known picoCTF{} is .*? which is regex used to say anything inside of the brackets is also part of the grep. Additionally, by default grep highlights anything found in red. To make the text just a normal color when found I used "--color=none".

Flag: picoCTF{succ3ss_@h3n1c@10n_51b2...}