If we unzip the file, we get the following content:
So letโs open the binary with Ghidra:
We can inspect the main function. Basically, if we input 69 or 069 that will lead to the correct door:
Now, no matter what input you enter because it does not work. So it was time to apply a buffer overflow attack. Itโs time to create a python script. During the decompiled source code inspection, I saw the escape_plan function, which shows the flag:
So I first needed the address of that function:
So its address is 0x401255. I tried different offsets to rip the register and inject the address of the function. The offset is 56. The script is:
It worked!, so it was time to create a script for the remote version: