HeapViewer: IDA Pro plugin to examine the glibc heap, focused on exploit development
HeapViewer
An IDA Pro plugin (for now) to examine the heap, focused on exploit development.
Currently only supports glibc malloc (ptmalloc2).
Features
- Heap tracer (malloc/free)
- Malloc chunk info
- Multi-arena info (chunks, top, last-remainder)
- Bins info (fastbins, unsortedbin, smallbins y largebins)
- Tcache info (glibc >= 2.26)
- GraphView for linked lists (bins/tcache)
- Magic utils:
- Unlink merge info
- Fake fastbin finder
- House of force helper
- Useful libc offsets
Install
Requirements
- IDA Pro >= 6.9
Tested on
- glibc <= 2.27 (x86, x64)
git clone https://github.com/danigargu/heap-viewer.git
Just drop the heap_viewer.py
file and the heap_viewer
folder into IDA’s plugin directory.
Because IDA does not load libc-dbg symbols in the debug session, is necessary generate a config file before using the plugin. To make this, simply install the libc6-dbg package in the remote Linux machine and execute the script utils\get_config.py. Then, paste the content in the heap_viewer\config.json file.
get_config.py
If you do not have the dbg symbols for given libc (ex: CTFs ;D), you can use the get_main_arena tool, and get the main_arena offset for that libc. This is enough so the plugin works correctly. Simply put the main_arena offset in the config.json file.
Examples:
Tracer
Arena & chunk info
Tcache entries
Bins
Bin graph
Find fake fastbin
Unlink merge info
Useful libc offsets
Copyright (C) 2018 Daniel García Gutiérrez – @danigargu
Source: https://github.com/danigargu/