1afl-fuzz(8)                 System Manager's Manual                afl-fuzz(8)
2
3
4

NAME

6       afl-fuzz
7
8

SYNOPSIS

10       afl-fuzz [ options ] -- /path/to/fuzzed_app [ ... ]
11
12

OPTIONS

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. "2ATR"):
45                         1=small files, 2=larger files (default), 3=all files,
46                         A=arithmetic solving, T=transformational solving,
47                         R=random colorization bytes.
48
49       Fuzzing behavior settings:
50         -Z            - sequential queue selection instead of weighted random
51         -N            - do not unlink the fuzzing input file (for devices etc.)
52         -n            - fuzz without instrumentation (non-instrumented mode)
53         -x dict_file  - fuzzer dictionary (see README.md, specify up to 4 times)
54
55       Test settings:
56         -s seed       - use a fixed seed for the RNG
57         -V seconds    - fuzz for a specified time then terminate
58         -E execs      - fuzz for an approx. no. of total executions then terminate
59                         Note: not precise and can have several more executions.
60
61       Other stuff:
62         -M/-S id      - distributed mode (-M sets -Z and disables trimming)
63                         see docs/fuzzing_in_depth.md#c-using-multiple-cores
64                         for effective recommendations for parallel fuzzing.
65         -F path       - sync to a foreign fuzzer queue directory (requires -M, can
66                         be specified up to 32 times)
67         -T text       - text banner to show on the screen
68         -I command    - execute this command/script when a new crash is found
69         -C            - crash exploration mode (the peruvian rabbit thing)
70         -b cpu_id     - bind the fuzzing process to the specified CPU core (0-...)
71         -e ext        - file extension for the fuzz test input file (if needed)
72
73       Environment variables used:
74       LD_BIND_LAZY: do not set LD_BIND_NOW env var for target
75       ASAN_OPTIONS: custom settings for ASAN
76                     (must contain abort_on_error=1 and symbolize=0)
77       MSAN_OPTIONS: custom settings for MSAN
78                     (must contain exitcode=86 and symbolize=0)
79       AFL_AUTORESUME: resume fuzzing if directory specified by -o already exists
80       AFL_BENCH_JUST_ONE: run the target just once
81       AFL_BENCH_UNTIL_CRASH: exit soon when the first crashing input has been found
82       AFL_CMPLOG_ONLY_NEW: do not run cmplog on initial testcases (good for resumes!)
83       AFL_CRASH_EXITCODE: optional child exit code to be interpreted as crash
84       AFL_CUSTOM_MUTATOR_LIBRARY: lib with afl_custom_fuzz() to mutate inputs
85       AFL_CUSTOM_MUTATOR_ONLY: avoid AFL++'s internal mutators
86       AFL_CYCLE_SCHEDULES: after completing a cycle, switch to a different -p schedule
87       AFL_DEBUG: extra debugging output for Python mode trimming
88       AFL_DEBUG_CHILD: do not suppress stdout/stderr from target
89       AFL_DISABLE_TRIM: disable the trimming of test cases
90       AFL_DUMB_FORKSRV: use fork server without feedback from target
91       AFL_EXIT_WHEN_DONE: exit when all inputs are run and no new finds are found
92       AFL_EXIT_ON_TIME: exit when no new coverage is found within the specified time
93       AFL_EXPAND_HAVOC_NOW: immediately enable expand havoc mode (default: after 60
94                             minutes and a cycle without finds)
95       AFL_FAST_CAL: limit the calibration stage to three cycles for speedup
96       AFL_FORCE_UI: force showing the status screen (for virtual consoles)
97       AFL_FORKSRV_INIT_TMOUT: time spent waiting for forkserver during startup (in ms)
98       AFL_HANG_TMOUT: override timeout value (in milliseconds)
99       AFL_I_DONT_CARE_ABOUT_MISSING_CRASHES: don't warn about core dump handlers
100       AFL_IGNORE_PROBLEMS: do not abort fuzzing if an incorrect setup is detected
101       AFL_IGNORE_TIMEOUTS: do not process or save any timeouts
102       AFL_IGNORE_UNKNOWN_ENVS: don't warn on unknown env vars
103       AFL_IMPORT_FIRST: sync and import test cases from other fuzzer instances first
104       AFL_INPUT_LEN_MIN/AFL_INPUT_LEN_MAX: like -g/-G set min/max fuzz length produced
105       AFL_PIZZA_MODE: 1 - enforce pizza mode, 0 - disable for April 1st
106       AFL_KILL_SIGNAL: Signal ID delivered to child processes on timeout, etc.
107                        (default: SIGKILL)
108       AFL_FORK_SERVER_KILL_SIGNAL: Kill signal for the fork server on termination
109                                    (default: SIGTERM). If unset and AFL_KILL_SIGNAL is
110                                    set, that value will be used.
111       AFL_MAP_SIZE: the shared memory size for that target. must be >= the size
112                     the target was compiled for
113       AFL_MAX_DET_EXTRAS: if more entries are in the dictionary list than this value
114                           then they are randomly selected instead all of them being
115                           used. Defaults to 200.
116       AFL_NO_AFFINITY: do not check for an unused cpu core to use for fuzzing
117       AFL_TRY_AFFINITY: try to bind to an unused core, but don't fail if unsuccessful
118       AFL_NO_ARITH: skip arithmetic mutations in deterministic stage
119       AFL_NO_AUTODICT: do not load an offered auto dictionary compiled into a target
120       AFL_NO_CPU_RED: avoid red color for showing very high cpu usage
121       AFL_NO_FORKSRV: run target via execve instead of using the forkserver
122       AFL_NO_SNAPSHOT: do not use the snapshot feature (if the snapshot lkm is loaded)
123       AFL_NO_STARTUP_CALIBRATION: no initial seed calibration, start fuzzing at once
124       AFL_NO_UI: switch status screen off
125       AFL_PATH: path to AFL support binaries
126       AFL_PYTHON_MODULE: mutate and trim inputs with the specified Python module
127       AFL_QUIET: suppress forkserver status messages
128       AFL_PRELOAD: LD_PRELOAD / DYLD_INSERT_LIBRARIES settings for target
129       AFL_TARGET_ENV: pass extra environment variables to target
130       AFL_SHUFFLE_QUEUE: reorder the input queue randomly on startup
131       AFL_SKIP_BIN_CHECK: skip afl compatibility checks, also disables auto map size
132       AFL_SKIP_CPUFREQ: do not warn about variable cpu clocking
133       AFL_STATSD: enables StatsD metrics collection
134       AFL_STATSD_HOST: change default statsd host (default 127.0.0.1)
135       AFL_STATSD_PORT: change default statsd port (default: 8125)
136       AFL_STATSD_TAGS_FLAVOR: set statsd tags format (default: disable tags)
137                               Supported formats are: 'dogstatsd', 'librato',
138                               'signalfx' and 'influxdb'
139       AFL_SYNC_TIME: sync time between fuzzing instances (in minutes)
140       AFL_NO_CRASH_README: do not create a README in the crashes directory
141       AFL_TESTCACHE_SIZE: use a cache for testcases, improves performance (in MB)
142       AFL_TMPDIR: directory to use for input file generation (ramdisk recommended)
143       AFL_EARLY_FORKSERVER: force an early forkserver in an afl-clang-fast/
144                             afl-clang-lto/afl-gcc-fast target
145       AFL_PERSISTENT: enforce persistent mode (if __AFL_LOOP is in a shared lib
146       AFL_DEFER_FORKSRV: enforced deferred forkserver (__AFL_INIT is in a .so)
147       AFL_FUZZER_STATS_UPDATE_INTERVAL: interval to update fuzzer_stats file in seconds, (default: 60, minimum: 1)
148
149       Compiled without Python module support.
150       Compiled without AFL_PERSISTENT_RECORD support.
151       Compiled with shmat support.
152       For additional help please consult docs/README.md :)
153
154
155

AUTHOR

157       afl++  was  written  by  Michal "lcamtuf" Zalewski and is maintained by
158       Marc "van Hauser" Heuse  <mh@mh-sec.de>,  Heiko  "hexcoder-"  Eissfeldt
159       <heiko.eissfeldt@hexco.de>,  Andrea Fioraldi <andreafioraldi@gmail.com>
160       and Dominik  Maier  <domenukk@gmail.com>  The  homepage  of  afl++  is:
161       https://github.com/AFLplusplus/AFLplusplus
162
163

LICENSE

165       Apache License Version 2.0, January 2004
166
167
168
169afl++                             2023-04-03                       afl-fuzz(8)
Impressum