How aflplusplus/libafl works
Below are the main guidelines and components to include:
Main Components
• Core Fuzzing Libraries – Represent the primary “engine” components such as:
• libafl (the core building blocks for input handling, scheduling, feedbacks, mutators, and stages)
• libafl_targets (instrumentation backends such as SanitizerCoverage and other target-specific code)
• libafl_cc (facilitates compiler wrapping/instrumentation for source-based fuzzing)
• Additional core crates like libafl_bolts (utility functions for randomness, shmem, and system-level interactions)
• Integrations/Backends – Show separate modules/layers for each supported instrumentation framework:
• Frida support (libafl_frida)
• QEMU-based instrumentation (libafl_qemu)
• TinyInst integration (libafl_tinyinst)
• Concolic execution (libafl_concolic)
• Other targets (e.g. libafl_intelpt, libafl_unicorn).
• Fuzzer Implementations – There is a large “fuzzers” directory containing a huge variety of example fuzzers:
• In-process fuzzers (e.g. fuzzers/inprocess/*)
• Forkserver based fuzzers (e.g. fuzzers/forkserver/*)
• System and binary-only fuzzers (e.g. fuzzers/full_system/*, fuzzers/binary_only/*)
• WebAssembly fuzzers and others.
• Supporting Tools and Utilities – Other directories such as “docs”, “just”, “scripts”, and “utils” are important for building, testing, and demonstrating the overall framework.
Relationships and Interactions
• The core libraries form the “heart” of the system. They expose interfaces for feedback, scheduling, mutating inputs, and running target executables. These libraries are then used by the fuzzer implementations.
• Each fuzzer (found inside the fuzzers/ folder) uses one or more of the core libraries and then applies further customization, such as custom executors or instrumented harnesses.
• The integration modules (e.g., libafl_frida, libafl_qemu, libafl_tinyinst) bridge between the core fuzzing internals and external instrumentation frameworks—either through process injection, emulation, or compiler instrumentation.
• Message passing and multi-machine support (LLMP) are built into the libraries and provide data flow between fuzzers running across cores or machines.
Architectural Patterns and Design Principles
• Extensibility: The design intentionally allows replacing components (for example, using a different executor or mutator). Illustrate these components with “pluggable” interfaces.
• Lightweight message passing and multi-thread scalability: Emphasize the LLMP component which is used for inter-process and inter-machine communication.
• Multi-platform support: The project’s design supports multiple operating systems and architectures. Although this might be noted as a non-functional requirement, you could denote support across several platforms at a high level.
Additional Elements
• If space allows, include notes regarding how configuration is injected into the system (via Justfiles, Cargo build scripts, etc.).