Leaky Pipes [Pwn]
Last updated
Last updated
The challenge provided us with a nc
connection to the server hosting the binary and the binary itself. So, without launching Ghidra or IDA, we can use the following tool to disassemble the binary.
The disassembled file is as follows:
The vulnerability present in the binary is within the printf
function, the complete detail on this vulnerability can be found on my old blog here:
With that explanation, no script is needed here. By connecting to the instance given to us, we can just insert a 100 %x
's and expect the binary to leak out information from the stack.
Now, all we need to do is to swap the endianness of the output and convert the output from hex. However, no flag appeared. So, referring to my old blog post, there may be some "bad bytes".
By removing some of the characters from the start of the hex output, we finally got the flag!