Title here
Summary here
This challenge is solved by my teammate, Jin_707
. This writeup is written by Jin_707
.
From the challenge title we can see it is a classic Ret2Win challenge. Source code was given too so we can see that there is a buffer of 64 bytes and the vulnerable function gets. gets()
function is famous because it accepts user input without upper bound, which often leads to bof. So, this challenge is to overflow the buffers and supply it with the win address that prints out the flag.
Reference: https://book.hacktricks.xyz/binary-exploitation/stack-overflow/ret2win
Get win
address with objdump -d | grep win
.
Script with pwntools
: