1afl-fuzz(8) System Manager's Manual afl-fuzz(8)
2
3
4
6 afl-fuzz
7
8
10 afl-fuzz [ options ] -- /path/to/fuzzed_app [ ... ]
11
12
14 Required parameters:
15 -i dir - input directory with test cases
16 -o dir - output directory for fuzzer findings
17
18 Execution control settings:
19 -p schedule - power schedules compute a seed's performance score:
20 fast(default), explore, exploit, seek, rare, mmopt, coe, lin
21 quad -- see docs/FAQ.md for more information
22 -f file - location read by the fuzzed program (default: stdin or @@)
23 -t msec - timeout for each run (auto-scaled, default 1000 ms). Add a '+'
24 to auto-calculate the timeout, the value being the maximum.
25 -m megs - memory limit for child process (0 MB, 0 = no limit [default])
26 -O - use binary-only instrumentation (FRIDA mode)
27 -Q - use binary-only instrumentation (QEMU mode)
28 -U - use unicorn-based instrumentation (Unicorn mode)
29 -W - use qemu-based instrumentation with Wine (Wine mode)
30 -X - use VM fuzzing (NYX mode - standalone mode)
31 -Y - use VM fuzzing (NYX mode - multiple instances mode)
32
33 Mutator settings:
34 -g minlength - set min length of generated fuzz input (default: 1)
35 -G maxlength - set max length of generated fuzz input (default: 1048576)
36 -D - enable deterministic fuzzing (once per queue entry)
37 -L minutes - use MOpt(imize) mode and set the time limit for entering the
38 pacemaker mode (minutes of no new finds). 0 = immediately,
39 -1 = immediately and together with normal mutation.
40 See docs/README.MOpt.md
41 -c program - enable CmpLog by specifying a binary compiled for it.
42 if using QEMU/FRIDA or the fuzzing target is compiled
43 for CmpLog then just use -c 0.
44 -l cmplog_opts - CmpLog configuration values (e.g. "2AT"):
45 1=small files, 2=larger files (default), 3=all files,
46 A=arithmetic solving, T=transformational solving.
47
48 Fuzzing behavior settings:
49 -Z - sequential queue selection instead of weighted random
50 -N - do not unlink the fuzzing input file (for devices etc.)
51 -n - fuzz without instrumentation (non-instrumented mode)
52 -x dict_file - fuzzer dictionary (see README.md, specify up to 4 times)
53
54 Test settings:
55 -s seed - use a fixed seed for the RNG
56 -V seconds - fuzz for a specified time then terminate
57 -E execs - fuzz for an approx. no. of total executions then terminate
58 Note: not precise and can have several more executions.
59
60 Other stuff:
61 -M/-S id - distributed mode (see docs/parallel_fuzzing.md)
62 -M auto-sets -D, -Z (use -d to disable -D) and no trimming
63 -F path - sync to a foreign fuzzer queue directory (requires -M, can
64 be specified up to 32 times)
65 -T text - text banner to show on the screen
66 -I command - execute this command/script when a new crash is found
67 -C - crash exploration mode (the peruvian rabbit thing)
68 -b cpu_id - bind the fuzzing process to the specified CPU core (0-...)
69 -e ext - file extension for the fuzz test input file (if needed)
70
71 Environment variables used:
72 LD_BIND_LAZY: do not set LD_BIND_NOW env var for target
73 ASAN_OPTIONS: custom settings for ASAN
74 (must contain abort_on_error=1 and symbolize=0)
75 MSAN_OPTIONS: custom settings for MSAN
76 (must contain exitcode=86 and symbolize=0)
77 AFL_AUTORESUME: resume fuzzing if directory specified by -o already exists
78 AFL_BENCH_JUST_ONE: run the target just once
79 AFL_BENCH_UNTIL_CRASH: exit soon when the first crashing input has been found
80 AFL_CMPLOG_ONLY_NEW: do not run cmplog on initial testcases (good for resumes!)
81 AFL_CRASH_EXITCODE: optional child exit code to be interpreted as crash
82 AFL_CUSTOM_MUTATOR_LIBRARY: lib with afl_custom_fuzz() to mutate inputs
83 AFL_CUSTOM_MUTATOR_ONLY: avoid AFL++'s internal mutators
84 AFL_CYCLE_SCHEDULES: after completing a cycle, switch to a different -p schedule
85 AFL_DEBUG: extra debugging output for Python mode trimming
86 AFL_DEBUG_CHILD: do not suppress stdout/stderr from target
87 AFL_DISABLE_TRIM: disable the trimming of test cases
88 AFL_DUMB_FORKSRV: use fork server without feedback from target
89 AFL_EXIT_WHEN_DONE: exit when all inputs are run and no new finds are found
90 AFL_EXIT_ON_TIME: exit when no new coverage finds are made within the specified time period
91 AFL_EXPAND_HAVOC_NOW: immediately enable expand havoc mode (default: after 60 minutes and a cycle without finds)
92 AFL_FAST_CAL: limit the calibration stage to three cycles for speedup
93 AFL_FORCE_UI: force showing the status screen (for virtual consoles)
94 AFL_FORKSRV_INIT_TMOUT: time spent waiting for forkserver during startup (in milliseconds)
95 AFL_HANG_TMOUT: override timeout value (in milliseconds)
96 AFL_I_DONT_CARE_ABOUT_MISSING_CRASHES: don't warn about core dump handlers
97 AFL_IGNORE_UNKNOWN_ENVS: don't warn on unknown env vars
98 AFL_IGNORE_PROBLEMS: do not abort fuzzing if an incorrect setup is detected during a run
99 AFL_IMPORT_FIRST: sync and import test cases from other fuzzer instances first
100 AFL_INPUT_LEN_MIN/AFL_INPUT_LEN_MAX: like -g/-G set min/max fuzz length produced
101 AFL_PIZZA_MODE: 1 - enforce pizza mode, 0 - disable for April 1st
102 AFL_KILL_SIGNAL: Signal ID delivered to child processes on timeout, etc. (default: SIGKILL)
103 AFL_MAP_SIZE: the shared memory size for that target. must be >= the size
104 the target was compiled for
105 AFL_MAX_DET_EXTRAS: if more entries are in the dictionary list than this value
106 then they are randomly selected instead all of them being
107 used. Defaults to 200.
108 AFL_NO_AFFINITY: do not check for an unused cpu core to use for fuzzing
109 AFL_TRY_AFFINITY: try to bind to an unused core, but don't fail if unsuccessful
110 AFL_NO_ARITH: skip arithmetic mutations in deterministic stage
111 AFL_NO_AUTODICT: do not load an offered auto dictionary compiled into a target
112 AFL_NO_CPU_RED: avoid red color for showing very high cpu usage
113 AFL_NO_FORKSRV: run target via execve instead of using the forkserver
114 AFL_NO_SNAPSHOT: do not use the snapshot feature (if the snapshot lkm is loaded)
115 AFL_NO_UI: switch status screen off
116 AFL_PATH: path to AFL support binaries
117 AFL_PYTHON_MODULE: mutate and trim inputs with the specified Python module
118 AFL_QUIET: suppress forkserver status messages
119 AFL_PRELOAD: LD_PRELOAD / DYLD_INSERT_LIBRARIES settings for target
120 AFL_TARGET_ENV: pass extra environment variables to target
121 AFL_SHUFFLE_QUEUE: reorder the input queue randomly on startup
122 AFL_SKIP_BIN_CHECK: skip afl compatibility checks, also disables auto map size
123 AFL_SKIP_CPUFREQ: do not warn about variable cpu clocking
124 AFL_STATSD: enables StatsD metrics collection
125 AFL_STATSD_HOST: change default statsd host (default 127.0.0.1)
126 AFL_STATSD_PORT: change default statsd port (default: 8125)
127 AFL_STATSD_TAGS_FLAVOR: set statsd tags format (default: disable tags)
128 Supported formats are: 'dogstatsd', 'librato',
129 'signalfx' and 'influxdb'
130 AFL_SYNC_TIME: sync time between fuzzing instances (in minutes)
131 AFL_NO_CRASH_README: do not create a README in the crashes directory
132 AFL_TESTCACHE_SIZE: use a cache for testcases, improves performance (in MB)
133 AFL_TMPDIR: directory to use for input file generation (ramdisk recommended)
134 AFL_EARLY_FORKSERVER: force an early forkserver in an afl-clang-fast/
135 afl-clang-lto/afl-gcc-fast target
136 AFL_PERSISTENT: enforce persistent mode (if __AFL_LOOP is in a shared lib
137 AFL_DEFER_FORKSRV: enforced deferred forkserver (__AFL_INIT is in a .so
138
139 Compiled without Python module support.
140 Compiled without AFL_PERSISTENT_RECORD support.
141 Compiled with shmat support.
142 For additional help please consult docs/README.md :)
143
144
145
147 afl++ was written by Michal "lcamtuf" Zalewski and is maintained by
148 Marc "van Hauser" Heuse <mh@mh-sec.de>, Heiko "hexcoder-" Eissfeldt
149 <heiko.eissfeldt@hexco.de>, Andrea Fioraldi <andreafioraldi@gmail.com>
150 and Dominik Maier <domenukk@gmail.com> The homepage of afl++ is:
151 https://github.com/AFLplusplus/AFLplusplus
152
153
155 Apache License Version 2.0, January 2004
156
157
158
159afl++ 2022-09-15 afl-fuzz(8)