For this challenge, we are given the following clue and a ELF binary:
After some preliminary poking at the file, I execute it in the terminal to see what it does. I see that it waits for input from the user and replies with “EWWWW DUMBBB” and exits:
Next I load it into my debugger and inspect the code:
I see that there is cmp performed and it results in a jmp to the failure message:
I modify the jmp and fill it with NOPs:
I then provide some random input and watch for its response:
It looks like a scrambled flag. Most likely a simple shift cipher… maybe a ROT (rotation). I head over to rot13.com and decode it:
A quick Google search tells me that Reddit is the front page of the internet, so I search for entries related to vishwactf on reddit:
I see that there is a comment indicating that another comment has been deleted:
AI hop in my time machine at Archive.org and go down memory lane:
I now have what appears to be a ciphered flag with a clue. The part about the “18th century French scholars” tells me to try decrypting it as a Vigenere cipher. I head over to dcode.fr and try it out. The automatic decryption failed, so after some contemplating, I try “VISHWACTF” as the key and I get the flag:
After a little poking around, I look for a robots.txt entry:
Interesting! Now I follow the clue and look for a robots directory:
I click the link on the page for the source code and I get this:
After reviewing the code, I see that the PHP is looking for an input parameter “php_is_hard” and it runs “preg_replace()” on it and evaluates the output of that.
Analyzing this code, I see that it takes my input and looks for all instances of “suzuki_harumiya” and removes it. Then it compares the resulting string to “suzuki_harumiya”. If it is true, then it runs the “open_up()” function.
I see that I can simply manipulate my input to “ssuzuki_harumiyauzuki_harumiya” and the script will remove the single instance of “suzuki_harumiya” in it and the resulting string will, in fact, be “suzuki_harumiya”. When I feed that input, I get this: