Parallel fuzzing automation tool for AFL on Linux
This tool automates fuzzing with the American Fuzzy Lop fuzzer. If you want to set up a larger multi-threaded fuzzing session using AFL and run it with little to no supervision, then auto-afl is for you.
auto-afl was created for my seminar thesis at the Chair of Systems Security @ RUB.
auto-afl was built for AFL version 2.52b. You need the binaries afl-fuzz
, afl-tmin
and afl-cmin
from AFL on your $PATH, as well as screen
and tmux
.
Please also put the script afl-ptmin
on your $PATH. (This version of afl-ptmin
is modified from brandonprry's gist.)
To use auto-afl:
-
Create any directory
-
Copy your instrumented binary here
Use
afl-gcc
orafl-clang
to compile with instrumentation. auto-afl does NOT do this for you! -
Create a subdirectory and put your test cases there
-
Make sure you have enough memory to mount a
tmpfs
. If you are low on memory, consider changing the default of 4GB file system size inauto-afl.sh
. -
Run auto-afl
auto-afl will spawn a tmux session for you or use an existing one. You will then be presented with a configuration screen. Enter:
- A title for your session
- The amount of cores to use (auto-afl will never use more than one less core than in your system to keep things running smoothly)
- The amount of fuzzing cycles to perform (the queue will be deduplicated and minimized after each cycle)
- The name of the directory with your test cases
- The name of the target
- Any parameters to invoke your target with (Use
@@
as a placeholder for the input file name. If you do not, then the file content will be sent to the target's standard input) - Any parameters for AFL (memory limits, etc.). There are separate entries for afl-fuzz, afl-tmin and afl-cmin as they each take slightly different arguments. Please see the AFL documentation for what to use where.
Hit enter one more time, then auto-afl will start the fuzzing run.
auto-afl performs the follwing actions:
- Create a
tmpfs
ramdisk to protect your HDD/SSD from excessive writes and speed up the fuzzers - Run the fuzzers for one cycle (you will see some stats for each fuzzer)
- Collect all queues and create a backup
- Minimize each test case in the queues
- De-duplicate the queues
- Minimize again
- Go back to step 2 as many times as you specified
- Collect all crashes and save them outside the ramdisk
- Destroy the ramdisk