This repository contains a lightweight C++ program designed to demonstrate fuzz testing with AFL++. The example program reads input from a file, processes the data, and intentionally includes a potential buffer overflow vulnerability. By using AFL++, we can generate crashes and identify flaws in the code, providing a practical introduction to fuzzing techniques and AFL++ usage.
- A Linux distribution
afl++
installedafl-clang-fast
installed (it is usually installed by default after a proper afl++ installation)
- Clone the repository:
git clone https://github.com/BowTiedRadone/cpp-aflPlusPlus.git
- Build the program using
afl-clang-fast++
:Optionally, you can build with sanitizers enabled (e.g., AddressSanitizer):cd cpp-aflPlusPlus afl-clang-fast++ -o test test.cpp
afl-clang-fast++ -fsanitize=address -o test test.cpp
- Run AFL++:
afl-fuzz -i ./input -o ./output ./test @@
- Explore the findings inside the
output
folder!
Happy fuzzing!