moved custom_mutator examples

This commit is contained in:
Dominik Maier 2021-04-26 16:03:08 +02:00
parent 3d830daa46
commit a3f8fc5d1c
17 changed files with 15 additions and 7 deletions

View File

@ -3,6 +3,14 @@
Custom mutators enhance and alter the mutation strategies of afl++. Custom mutators enhance and alter the mutation strategies of afl++.
For further information and documentation on how to write your own, read [the docs](../docs/custom_mutators.md). For further information and documentation on how to write your own, read [the docs](../docs/custom_mutators.md).
## Examples
The `./examples` folder contains examples for custom mutators in python and C.
## Rust
In `./rust`, you will find rust bindings, including a simple example in `./rust/example` and an example for structured fuzzing, based on lain, in`./rust/example_lain`.
## The afl++ Grammar Mutator ## The afl++ Grammar Mutator
If you use git to clone afl++, then the following will incorporate our If you use git to clone afl++, then the following will incorporate our

View File

@ -285,8 +285,8 @@ afl-fuzz /path/to/program
## 4) Example ## 4) Example
Please see [example.c](../utils/custom_mutators/example.c) and Please see [example.c](../custom_mutators/examples/example.c) and
[example.py](../utils/custom_mutators/example.py) [example.py](../custom_mutators/examples/example.py)
## 5) Other Resources ## 5) Other Resources

View File

@ -83,5 +83,5 @@ You can find a simple solution in utils/argv_fuzzing.
## Attacking a format that uses checksums? ## Attacking a format that uses checksums?
Remove the checksum-checking code or use a postprocessor! Remove the checksum-checking code or use a postprocessor!
See utils/custom_mutators/ for more. See `afl_custom_post_process` in custom_mutators/examples/examples.c for more.

View File

@ -190,8 +190,8 @@ handlers of the target.
## 13) Gotchas, feedback, bugs ## 13) Gotchas, feedback, bugs
If you need to fix up checksums or do other cleanup on mutated test cases, see If you need to fix up checksums or do other cleanups on mutated test cases, see
utils/custom_mutators/ for a viable solution. `afl_custom_post_process` in custom_mutators/examples/example.c for a viable solution.
Do not mix QEMU mode with ASAN, MSAN, or the likes; QEMU doesn't appreciate Do not mix QEMU mode with ASAN, MSAN, or the likes; QEMU doesn't appreciate
the "shadow VM" trick employed by the sanitizers and will probably just the "shadow VM" trick employed by the sanitizers and will probably just

View File

@ -29,8 +29,8 @@ test "1" = "`../afl-fuzz | grep -i 'without python' >/dev/null; echo $?`" && {
} }
} }
# Compile the custom mutator # Compile the custom mutator
cc -D_FIXED_CHAR=0x41 -g -fPIC -shared -I../include ../utils/custom_mutators/simple_example.c -o libexamplemutator.so > /dev/null 2>&1 cc -D_FIXED_CHAR=0x41 -g -fPIC -shared -I../include ../custom_mutators/examples/simple_example.c -o libexamplemutator.so > /dev/null 2>&1
cc -D_FIXED_CHAR=0x42 -g -fPIC -shared -I../include ../utils/custom_mutators/simple_example.c -o libexamplemutator2.so > /dev/null 2>&1 cc -D_FIXED_CHAR=0x42 -g -fPIC -shared -I../include ../custom_mutators/examples/simple_example.c -o libexamplemutator2.so > /dev/null 2>&1
test -e test-custom-mutator -a -e ./libexamplemutator.so && { test -e test-custom-mutator -a -e ./libexamplemutator.so && {
# Create input directory # Create input directory
mkdir -p in mkdir -p in