heapinfo: interactive memory info for pwning / exploiting
HeapInfo
As pwn lovers, while playing CTF with heap exploitation, we always need a debugger (e.g. gdb) for tracking memory layout. But we don’t really need gdb if we want to see whether the heap layout same as our imagination or not. Hope this small tool helps us exploit easier ;).
Why
HeapInfo is very helpful when binary has somehow anti-debugger limitations, e.g. being ptraced. It still works because it doesn’t use ptrace.
If you prefer pwntools for exploiting, you can still use HeapInfo in irb/pry as a small debugger.
Features
- Can use in your ruby exploit script or in irb/pry.
- It works when the victim is being traced! i.e. you can use ltrace/strace/gdb and HeapInfo simultaneously!
- dump – Dump arbitrarily address the memory.
- layouts – Show the current bin layouts, very useful for heap exploitation.
- offset– Show the offset between the given address and segment. Very useful for calculating the relative offset.
- canary – Fetch the value of stack guard!
- x – Provide a gdb-like command.
- s – Provide a gdb-like command.
- find – Provide a gdb-like command.
- More features and details can be found in RDoc
Install
$ gem install heapinfo
Use
Copyright (c) 2016 david942j