Cookie Robot
You know what to do, collect them all.
Initial Recon
As the title suggested, first check out robots.txt
:
Now head over to cookie.php
:
Nothing interesting, but again, the name of the page is a huge hint. Using Inspect Element, we can check document.cookie
and find out that we have cookies:
The Piece=1
cookie implies that there are more, so we can refresh the page. As expected, we get another cookie.
Dumping all the cookies
We can create a super simple python script to dump them all:
The Piece
cookies go up to 39
before starting again from 0
, so we assume there are 39. We now dump all 39 of them and save them to a file.
Decoding
As they are hex, we first attempt some hex decoding, but that is unsuccessful. The next idea is to check if they are valid hashes, which they are! It appears as if each cookie is simply a hash of a letter of the flag, and we can dump all of the hashes here.
Now we can save this in cracked
and use some basic bash to isolate the individual letters and print them all out.
And we get the output
This looks a lot like ROT13, and once decoded from it we get the flag.
Flag: BSDCTF{C00k135_ar3_b35t_pl4c3_70_ch3ck}
Last updated
Was this helpful?