Skip to content


Repository files navigation

DHOP: Discover Heap OPerations


  • Discover inputs that trigger heap operations in a binary program.
  • Find inputs to achieve the desired heap layout.


  • Python 3
  • GCC (sudo apt install gcc g++ make)
  • Capstone Engine (sudo apt install libcapstone-dev)
  • cmake (sudo apt install cmake)
  • LLVM (sudo apt install llvm-dev)
  • zlib (sudo apt install zlib1g-dev)

It finds the main loop by analyzing the LLVM IR code, which is lifted from the binary. Users can use either RetDec or McSema as the lifter, and the prerequisites are as follows, respectively.

Prerequisites for Using RetDec

Prerequisites for Using McSema

..., and a disassembler required by McSema, like:


./ -o results/naive/tracer test/naive
./ -o results/naive -s random results/naive/tracer/ test/naive
./ -o results/naive/simple -a allocator/simplemalloc/ -s random results/naive/tracer/ test/naive