about summary refs log tree commit diff
path: root/qemu_mode/libcompcov/README.compcov
diff options
context:
space:
mode:
authorAndrea Fioraldi <andreafioraldi@gmail.com>2019-07-20 14:23:07 +0200
committerGitHub <noreply@github.com>2019-07-20 14:23:07 +0200
commit914426d8877a111563dca3d4ec769c9ee95254e6 (patch)
tree646b71fafb67d6f1c8ccdad648c45e9a1dd1ad53 /qemu_mode/libcompcov/README.compcov
parent302e71779095357d1f04e97085a6db9dd10530ae (diff)
parent27928fbc946c4bed18534c565354cefef8eca04a (diff)
downloadafl++-914426d8877a111563dca3d4ec769c9ee95254e6.tar.gz
Merge pull request #26 from vanhauser-thc/qemu-compcov
Qemu CompCov
Diffstat (limited to 'qemu_mode/libcompcov/README.compcov')
-rw-r--r--qemu_mode/libcompcov/README.compcov33
1 files changed, 33 insertions, 0 deletions
diff --git a/qemu_mode/libcompcov/README.compcov b/qemu_mode/libcompcov/README.compcov
new file mode 100644
index 00000000..2a4a0ee5
--- /dev/null
+++ b/qemu_mode/libcompcov/README.compcov
@@ -0,0 +1,33 @@
+================================================================
+strcmp() / memcmp() CompareCoverage library for AFLplusplus-QEMU
+================================================================
+
+  Written by Andrea Fioraldi <andreafioraldi@gmail.com>
+
+This Linux-only companion library allows you to instrument strcmp(), memcmp(),
+and related functions to log the CompareCoverage of these libcalls.
+
+Use this with caution. While this can speedup a lot the bypass of hard
+branch conditions it can also waste a lot of time and take up unnecessary space
+in the shared memory when logging the coverage related to functions that
+doesn't process input-related data.
+
+To use the library, you *need* to make sure that your fuzzing target is linked
+dynamically and make use of strcmp(), memcmp(), and related functions.
+For optimized binaries this is an issue, those functions are often inlined
+and this module is not capable to log the coverage in this case.
+
+If you have the source code of the fuzzing target you should nto use this
+library and QEMU but build ot with afl-clang-fast and the laf-intel options.
+
+To use this library make sure to preload it with AFL_PRELOAD.
+
+  export AFL_PRELOAD=/path/to/libcompcov.so
+  export AFL_QEMU_COMPCOV=1
+  
+  afl-fuzz -Q -i input -o output <your options> -- <target args>
+
+The library make use of https://github.com/ouadev/proc_maps_parser and so it is
+Linux specific. However this is not a strict dependency, other UNIX operating
+systems can be supported simply replacing the code related to the
+/proc/self/maps parsing.