Writeup
Pwn
English
Curious
First, put chal
into IDA
It can be observed that this challenge can utilize an FMT leak to obtain an address, and then utilize a One Gadget to gain shell access. Therefore, it is necessary to leak the address of the libc
Next, let's take a look at the conditions for the One Gadget
If you carefully examine the asm of main
, you can notice that at the end, there are xor rsi, rsi
and xor rdx, rdx
instructions. Therefore, the conditions for the One Gadget boil down to requiring rbp - 0x78
to be writable. Since we've already leaked the libc address, we can directly use an address from the writable segment of libc to write to rbp
Solve Script :