Skip to content

Latest commit

 

History

History
34 lines (24 loc) · 776 Bytes

run_target.md

File metadata and controls

34 lines (24 loc) · 776 Bytes

Running a Target Program

Here we illustrate how to execute HavocMAB for readelf (binutils-2.37) with wllvm.

Environment

  • Tested on Ubuntu 18.04/20.04
  • LLVM 10.0-12.0

Instrumentation

# download the source code
wget https://ftp.gnu.org/gnu/binutils/binutils-2.37.tar.gz

tar -xvf binutils-2.37.tar.gz

# extract the byte code with wllvm
$ CC=wllvm LLVM_COMPILER=clang ./configure --disable-shared
$ LLVM_COMPILER=clang make -j$(nproc)
$ cd binutils
$ extract-bc readelf

# compile the target program
$ AFL_CC=clang AFL_CXX=cl
ang++ fuzzer/afl-clang-fast readelf.bc -o readelf_afl

Running HavocMAB

# start to fuzz
$ fuzzer/afl-fuzz -d -i $FUZZ_IN -o $FUZZ_OUT -- ./readelf_afl -a @@