The task is a remote x86_64 binary (both binary and libc were provided), and is marked with "pwn" and "network". So the goal is to exploit some vulnerability to obtain a shell.
They're actually two parts of the
task, named 2manypkts-v1
and 2manypkts-v2
respectively.
The binary has somewhat trivial stack buffer overflow vulnerability. In the first part, you can
just overflow the buffer up to (and beyond) main
return address, and employ well-known ROP technique.
The second part is harder: main
never returns, but buffer can also overwrite some other variables, including
several pointers to heap variables, which would allow to call realloc
with arbitrary arguments.