about summary refs log tree commit diff
path: root/llvm_mode/README.cmplog.md
diff options
context:
space:
mode:
authorAndrea Fioraldi <andreafioraldi@gmail.com>2020-01-30 22:54:23 +0100
committerGitHub <noreply@github.com>2020-01-30 22:54:23 +0100
commit19ebdf31b999223e4965f701077f9af9d550e386 (patch)
tree9c6d27d58d0606d59725ef46766eb1961e908d31 /llvm_mode/README.cmplog.md
parentb050c1158398dd07e25a6cd65234da84e5656fa6 (diff)
parent6e9fce1c2d654c92dbf8e6b8cc21a88d8cba9496 (diff)
downloadafl++-19ebdf31b999223e4965f701077f9af9d550e386.tar.gz
Merge pull request #178 from vanhauser-thc/CmpLog
Cmp log
Diffstat (limited to 'llvm_mode/README.cmplog.md')
-rw-r--r--llvm_mode/README.cmplog.md42
1 files changed, 42 insertions, 0 deletions
diff --git a/llvm_mode/README.cmplog.md b/llvm_mode/README.cmplog.md
new file mode 100644
index 00000000..a0e838ad
--- /dev/null
+++ b/llvm_mode/README.cmplog.md
@@ -0,0 +1,42 @@
+# CmpLog instrumentation
+
+The CmpLog instrumentation enables the logging of the comparisons operands in a
+shared memory.
+
+These values can be used by variuous mutator built on top of it.
+At the moment we support the RedQueen mutator (input-2-state instructions only).
+
+## Build
+
+Tou use CmpLog, you have to build two versions of the instrumented target
+program.
+
+The first, using the regular AFL++ instrumentation.
+
+The second, the CmpLog binary, setting AFL_LLVM_CMPLOG during the compilation.
+
+For example:
+
+```
+./configure --cc=~/path/to/afl-clang-fast
+make
+cp ./program ./program.afl
+make clean
+export AFL_LLVM_CMPLOG=1
+./configure --cc=~/path/to/afl-clang-fast
+make
+cp ./program ./program.cmplog
+```
+
+## Use
+
+AFL++ have the -c option that can be used to specify a CmpLog binary (the second
+built).
+
+For example:
+
+```
+afl-fuzz -i input -o output -c ./program.cmplog -m none -- ./program.afl @@
+```
+
+Be careful to use -m none because CmpLog maps a lot of pages.