Skip to content

Latest commit

 

History

History
executable file
·
37 lines (26 loc) · 981 Bytes

README.md

File metadata and controls

executable file
·
37 lines (26 loc) · 981 Bytes

STFGFuzz

Constraint Flow Graph Fuzzer

Building STFGFuzz

Build Requirements

  • Linux-amd64 (Tested on Ubuntu 18.04/20.04)
  • LLVM (llvm_mode/llvm_install.md)
  • target programs (Programs/compile_programs.md)

Build Target Program

pip install wllvm

# wllvm-sanity-checker
export FORCE_UNSAFE_CONFIGURE=1
export LLVM_COMPILER=clang
CC=wllvm CFLAGS="-g -O0" LIBS="-lacl" ./configure --prefix=`pwd`
make -j6  # -j Depends on the number of computer processes.
make install
cd coreutils-8.24-lava-safe/lava-install/bin/
extract-bc xxx  # Get the file in .bc format.

clang -fsanitize=address -fsanitize-coverage=trace-pc-guard,trace-cmp -emit-llvm -c xxx.bc -o xxx_trace.bc
opt -load ../Build/LLVMObfuscator.so -line -S xxx_trace.bc -o xxx_pass.bc
llc -filetype=obj xxx_pass.bc -o xxx.o
clang++ -fsanitize=address -Wl,--whole-archive -L./ClangSanitizer -lcmpcov -Wl,--no-whole-archive xxx.o -o xxx

Program Structure

Directory structure

  • STFGFuzzer.py