Monday 21 November 2016

RC3 CTF - Logmein

This re challenge was pretty simple.

First of all I saw the following pseudo code of the binary file.
We can easily understand what is going on in the program by looking at the code.



We have to reach the CorrectPass function by giving the correct input i.e the flag.
I was particularly interested in the second if statement inside the for loop.

So I put a breakpoint  at that statement in GDB.



So the rdx and rdi values are being compared. After each true comparison we will get the char of the next comparison. So just make sure that you change your input according to the register values after each iteration.

Finally I found the flag to be:

RC3-2016-XORISGUD

Thanks for reading