Skip to content

Instantly share code, notes, and snippets.

@leveled
Created November 19, 2019 12:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save leveled/a75198839f457c7fd8288f0fcf7d9c62 to your computer and use it in GitHub Desktop.
Save leveled/a75198839f457c7fd8288f0fcf7d9c62 to your computer and use it in GitHub Desktop.
gdbscript to preload a library and set appropriate breakpoints
source /pwntainer/how2heap/challs/babyheapgdb.py
set startup-with-shell off
set env LD_PRELOAD /pwntainer/how2heap/glibc_versions/libc-2.26-no-tcache.so
#set env LD_DEBUG all
set stop-on-solib-events 1
r /pwntainer/how2heap/challs/0ctfbabyheap
c
c
find_entrypoint
break_on_offset a40
break_on_offset 111d
#break_on_offset cb6
#break_on_offset 112a
break_on_offset 1175
break_on_offset 1183
c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment