1/ Basic recon
So, we imagine that FAILED means fail and WIN is the winning message, right?
That's all we need to know!
Yes. gdb? nope. asm? nope. reversing capabilities? nope. Lazinest? A lot.
2/ Hey, you like surprises and python?you know angr, right? If not, check this awesome program. It can explore binaries, instrument them, modify them on the fly, explore all paths, and all by itself!
It blews my minds me on this:
Basically we tell angr to open the binary, and explore it (like fuzzing, but better :) ) until it found the word "WIN" in the standard output. And then, we print the standard input which generates this output. Sounds crazy?
And, as you guess, in only 7 minutes, without any prior knowledge:
Without the bug, angr would have found the good flag, but it remains impressive: the angr solution works. The only thing to know is that the binary prints WIN for victory, which could be found with a strings command..
Ready? Prepare yourself!