Skip to content

honggfuzz - Security-Oriented Coverage-Guided Fuzzer Cheatsheet

honggfuzz - Security-Oriented Coverage-Guided Fuzzer Cheatsheet

honggfuzz is a security-oriented, feedback-driven fuzzer from Google. It is known for being straightforward to point at a target, for solid multi-process and multi-threaded fuzzing out of the box, and for supporting both software instrumentation and hardware-based coverage feedback (Intel BTS/PT) — the latter letting you fuzz binaries you cannot recompile. It has a long track record of finding real vulnerabilities in widely-used software.

Fuzzing can consume large amounts of CPU and disk. Run it on dedicated capacity and in an isolated environment.

Installation

PlatformCommand
Debian/Ubuntusudo apt install honggfuzz
From sourcegit clone https://github.com/google/honggfuzz && make
macOSbrew install honggfuzz
Verifyhonggfuzz --help

Two Modes

ModeUse
File-basedTarget reads a file/stdin; honggfuzz mutates inputs
PersistentTarget exposes a fuzz entry point; far faster

File-Based Fuzzing

# Fuzz a program that takes a file argument
honggfuzz -i ./input_corpus -W ./workspace -- ./target ___FILE___
FlagPurpose
-i DIRInput corpus directory
-W DIRWorkspace (crashes, stats)
-o DIROutput corpus
___FILE___Placeholder replaced with the input file
-sFeed input via stdin instead
-t SECSPer-run timeout
-n NNumber of concurrent fuzzing threads

Persistent Mode (Fast)

#include <stdint.h>
#include <stddef.h>

int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
    parse_input(data, size);   // your target function
    return 0;
}
# Compile with honggfuzz's clang wrapper, then fuzz
hfuzz-clang -fsanitize=address fuzz_target.c -o fuzz_target
honggfuzz -i corpus -P -- ./fuzz_target
ElementNote
LLVMFuzzerTestOneInputSame entry point as libFuzzer — targets are portable
-PEnable persistent mode
hfuzz-clang / hfuzz-gccCompiler wrappers that add instrumentation

Persistent mode avoids process startup per input, often giving 10–100x more executions per second.

Coverage Feedback Options

MechanismFlag / requirement
Software instrumentationCompile with hfuzz-clang (default, best)
Intel BTS--linux_perf_bts_edge (no recompile)
Intel PT--linux_perf_ipt_block (no recompile)
Instruction/branch counts--linux_perf_instr, --linux_perf_branch

Hardware feedback is the escape hatch for closed-source binaries — you get coverage guidance without source access.

Sanitizers

# Build with ASan + UBSan for better crash detection
hfuzz-clang -fsanitize=address,undefined target.c -o target
SanitizerCatches
ASanBuffer overflows, use-after-free
UBSanUndefined behavior
MSanUninitialized reads
LeakSanitizerMemory leaks

Monitoring and Output

ItemWhere
Live statsTerminal UI (execs/sec, coverage, crashes)
CrashesWORKSPACE/*.fuzz files
ReportHONGGFUZZ.REPORT.TXT
Crash namingIncludes signal and faulting address
FlagEffect
-N NStop after N iterations
--exit_upon_crashStop at the first crash
-vVerbose
-QQuiet

Triage Workflow

# 1) Reproduce a crash
./target < WORKSPACE/SIGSEGV.PC.*.fuzz

# 2) Get a stack trace under a debugger
gdb --args ./target WORKSPACE/SIGSEGV.PC.*.fuzz

# 3) Minimize the input, then file the bug with the reproducer

honggfuzz vs Other Fuzzers

AspecthonggfuzzAFL++libFuzzerLibAFL
SetupVery easyEasyEasy (in-process)Build your own
Closed-source targetsYes (Intel PT/BTS)QEMU modeNoYes
Persistent modeYesYesNativeYes
Best forFast start, hardware feedbackBroad ecosystemLibrary APIsCustom fuzzers

Compare with AFL++ for the broadest ecosystem and LibAFL when you need to build a custom fuzzer.

Resources