diff options
| author | WorksButNotTested <62701594+WorksButNotTested@users.noreply.github.com> | 2021-04-30 09:28:20 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-04-30 10:28:20 +0200 |
| commit | 765f3e5169dc0b69c806b2b10a29250fa162ada7 (patch) | |
| tree | 588214eb3a979ab40b9c420b114096efd3aee3e9 /frida_mode/test/fuzzbench/src | |
| parent | c9d066038fe0bbf8e0ab0a481ca320ca1c31b1bf (diff) | |
| download | afl++-765f3e5169dc0b69c806b2b10a29250fa162ada7.tar.gz | |
Added representative fuzzbench test and test for libxml (#893)
* Added representative fuzzbench test and test for libxml * Added support for building FRIDA from source with FRIDA_SOURCE=1 Co-authored-by: Your Name <you@example.com>
Diffstat (limited to 'frida_mode/test/fuzzbench/src')
| -rw-r--r-- | frida_mode/test/fuzzbench/src/Dockerfile | 36 | ||||
| -rw-r--r-- | frida_mode/test/fuzzbench/src/run.sh | 10 |
2 files changed, 46 insertions, 0 deletions
diff --git a/frida_mode/test/fuzzbench/src/Dockerfile b/frida_mode/test/fuzzbench/src/Dockerfile new file mode 100644 index 00000000..b64ce688 --- /dev/null +++ b/frida_mode/test/fuzzbench/src/Dockerfile @@ -0,0 +1,36 @@ +FROM gcr.io/fuzzbench/base-image + +RUN apt-get update && \ + apt-get install -y wget libstdc++-5-dev libtool-bin automake flex bison \ + libglib2.0-dev libpixman-1-dev python3-setuptools unzip \ + git clang + +# Download afl++ +RUN git clone https://github.com/AFLplusplus/AFLplusplus.git /afl && \ + cd /afl && git checkout dev + +# Build afl++ without Python support as we don't need it. +# Set AFL_NO_X86 to skip flaky tests. +RUN cd /afl && \ + unset CFLAGS && unset CXXFLAGS && \ + AFL_NO_X86=1 CC=clang PYTHON_INCLUDE=/ make && \ + make -C utils/aflpp_driver + +# This makes interactive docker runs painless: +ENV AFL_SKIP_CPUFREQ=1 +ENV AFL_I_DONT_CARE_ABOUT_MISSING_CRASHES=1 +ENV AFL_TESTCACHE_SIZE=2 + +RUN mkdir /frida-mode +WORKDIR /frida-mode +RUN cp /afl/afl-fuzz . +COPY build/assets/afl-frida-trace.so . +COPY build/assets/fuzz-target.dict . +COPY build/assets/fuzzer . + +RUN mkdir /frida-mode/in +RUN split -l 1 -d -a 4 fuzz-target.dict /frida-mode/in/ + +WORKDIR / +COPY build/assets/run.sh . +RUN chmod +x /run.sh diff --git a/frida_mode/test/fuzzbench/src/run.sh b/frida_mode/test/fuzzbench/src/run.sh new file mode 100644 index 00000000..9a66b0f3 --- /dev/null +++ b/frida_mode/test/fuzzbench/src/run.sh @@ -0,0 +1,10 @@ +#!/bin/bash +AFL_QEMU_DRIVER_NO_HOOK=1 \ +AFL_FRIDA_PERSISTENT_CNT=1000000 \ +AFL_FRIDA_PERSISTENT_ADDR=0x55555599f6c0 \ +/frida-mode/afl-fuzz \ + -O \ + -i /frida-mode/in \ + -o /frida-mode/out \ + -- \ + /frida-mode/fuzzer \ No newline at end of file |
