Search Source (Medium)

  • Challenge Link: https://play.picoctf.org/practice/challenge/295?category=1&difficulty=2&page=2
  • Challenge Description: The developer of this website mistakenly left an important artifact in the website source, can you find it?
  • Hints:
    1. How could you mirror the website on your local machine so you could use more powerful tools for searching?

Solution

This your standard website, we can use inspect element but eventually we see that our flag is not located here. But it is most likely hidden in some directory and it will be very tedious to find it manually.

front

We can use wget with the recursive feature that downloads the page you asked for, then follows links on that page, and then follows links on those pages, and it keeps going until it hits a limit.

wget -r http://saturn.picoctf.net:65159
wget

After we downloaded all those files, looking through those files one by one is very tedious, so we can use grep to look for specific key words to find our flag.

grep -r pico saturn.picoctf.net:65159
grep
picoCTF{1nsp3ti0n_0f_w3bpag3s_587d12b8}

Sources

  • N/A