Skip to content

Instantly share code, notes, and snippets.

@mayli
Created October 28, 2016 20:57
Show Gist options
  • Save mayli/e48d0fbd621dd1cdc693005b5ab5239d to your computer and use it in GitHub Desktop.
Save mayli/e48d0fbd621dd1cdc693005b5ab5239d to your computer and use it in GitHub Desktop.
gdb bin200
gdb ./bin200
set follow-fork-mode child
break main
break *0x08048df6 # lea
run 10000
set *(unsigned char*)0x8048bdd = 0x74 # break on main, jne -> je
step
# start a new shell and `echo test | nc localhost 10000`
# type mulitple 's' in gdb until hit the following break point
Breakpoint 2, 0x08048df6 in main ()
# find password
(gdb) x/s $eax
0x804c008: "4bb0ab166697482644c7145e91717cb2"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment