afl qemu persistent hook

This commit is contained in:
Andrea Fioraldi
2020-02-07 20:43:17 +01:00
parent fd8fe4dd08
commit f2f6be5e99
13 changed files with 235 additions and 60 deletions

View File

@ -0,0 +1,20 @@
# QEMU persistent hook example
Compile the test binary and the library:
```
gcc -no-pie test.c -o test
gcc -fPIC -shared read_into_rdi.c -o read_into_rdi.so
```
Fuzz with:
```
export AFL_QEMU_PERSISTENT_ADDR=0x$(nm test | grep "T target_func" | awk '{print $1}')
export AFL_QEMU_PERSISTENT_HOOK=./read_into_rdi.so
mkdir in
echo 0000 > in/in
../../afl-fuzz -Q -i in -o out -- ./test
```