added snapshot feature to documentation

This commit is contained in:
van Hauser
2020-04-08 12:34:01 +02:00
parent 6688184bfd
commit ecdffa03f8
5 changed files with 26 additions and 3 deletions

View File

@ -35,6 +35,7 @@ sending a mail to <afl-users+subscribe@googlegroups.com>.
- rare: puts focus on queue entries that hits rare branches, also ignores
runtime
- llvm_mode:
- added SNAPSHOT feature (using https://github.com/AFLplusplus/AFL-Snapshot-LKM)
- added Control Flow Integrity sanitizer (AFL_USE_CFISAN)
- added AFL_LLVM_INSTRUMENT option to control the instrumentation type
easier: DEFAULT, CFG (INSTRIM), LTO, CTX, NGRAM-x (x=2-16)

View File

@ -257,6 +257,9 @@ checks or alter some of the more exotic semantics of the tool:
- AFL_NO_ARITH causes AFL to skip most of the deterministic arithmetics.
This can be useful to speed up the fuzzing of text-based file formats.
- AFL_NO_SNAPSHOT will advice afl-fuzz not to use the snapshot feature
if the snapshot lkm is loaded
- AFL_SHUFFLE_QUEUE randomly reorders the input queue on startup. Requested
by some users for unorthodox parallelized fuzzing setups, but not
advisable otherwise.

View File

@ -129,12 +129,18 @@ is not optimal and was only fixed in llvm 9.
You can set this with AFL_LLVM_NOT_ZERO=1
See [README.neverzero](README.neverzero.md)
## 4) Gotchas, feedback, bugs
## 4) Snapshot feature
To speed up fuzzing you can use a linux loadable kernel module which enables
a snapshot feature.
See [README.snapshot](README.snapshot.md)
## 5) Gotchas, feedback, bugs
This is an early-stage mechanism, so field reports are welcome. You can send bug
reports to <afl-users@googlegroups.com>.
## 5) Bonus feature #1: deferred initialization
## 6) Bonus feature #1: deferred initialization
AFL tries to optimize performance by executing the targeted binary just once,
stopping it just before main(), and then cloning this "master" process to get
@ -182,7 +188,7 @@ will keep working normally when compiled with a tool other than afl-clang-fast.
Finally, recompile the program with afl-clang-fast (afl-gcc or afl-clang will
*not* generate a deferred-initialization binary) - and you should be all set!
## 6) Bonus feature #2: persistent mode
## 7) Bonus feature #2: persistent mode
Some libraries provide APIs that are stateless, or whose state can be reset in
between processing different input files. When such a reset is performed, a

View File

@ -0,0 +1,12 @@
# AFL++ snapshot feature
Snapshot is a mechanic that makes a snapshot from a process and then restores
it's state, which is faster then forking it again.
All targets compiled with llvm_mode are automatically enabled for the
snapshot feature.
To use the snapshot feature for fuzzing compile and load this kernel
module: [https://github.com/AFLplusplus/AFL-Snapshot-LKM](https://github.com/AFLplusplus/AFL-Snapshot-LKM)
Note that is has little value for persistent (__AFL_LOOP) fuzzing.

View File

@ -165,6 +165,7 @@ static void usage(afl_state_t *afl, u8 *argv0, int more_help) {
"AFL_FORCE_UI: force showing the status screen (for virtual consoles)\n"
"AFL_NO_CPU_RED: avoid red color for showing very high cpu usage\n"
"AFL_SKIP_CPUFREQ: do not warn about variable cpu clocking\n"
"AFL_NO_SNAPSHOT: do not use the snapshot feature (if the snapshot lkm is loaded\n"
"AFL_NO_FORKSRV: run target via execve instead of using the forkserver\n"
"AFL_NO_ARITH: skip arithmetic mutations in deterministic stage\n"
"AFL_SHUFFLE_QUEUE: reorder the input queue randomly on startup\n"