Don't like this style? Click here to change it! blue.css
Alright what are our goals?
malloc
and free
main_arena
?https://github.com/pwndbg/pwndbg should be available in your pwndockers but in the other environments you'll need to install it.
OK let's just make a program to call malloc
and free
and see what happens.
Inspecting the heap with vis
bins
and heap
. 1) Let's write a program, 2) Let's use gdb
with pwndbg and 3) Let's start
and step through.
Now let's look at a typical CTF style Heap setup:
This sort of state-machine menu is classic CTF exploit stuff, and is actually surprisingly easy to inspect/debug/work with.