From 8f2f761719f91ed93cfef137adeb2d0a381db9b0 Mon Sep 17 00:00:00 2001 From: geeknik <466878+geeknik@users.noreply.github.com> Date: Fri, 1 Sep 2023 23:34:51 +0000 Subject: [PATCH] Create README.md --- fuzzer/README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 fuzzer/README.md diff --git a/fuzzer/README.md b/fuzzer/README.md new file mode 100644 index 000000000..00098df97 --- /dev/null +++ b/fuzzer/README.md @@ -0,0 +1,10 @@ +# how to fuzz nostrdb with afl++ + +1. Install Clang 14+ +2. Install LLVM 14+ +3. Install AFL++ +4. Then... + AFL_USE_ASAN=1 afl-clang-lto -flto=full -fsanitize=address -Wall -Wno-unused-function -Werror -O2 -g -Ideps/secp256k1/include -Ideps/lmdb -Ideps/flatcc/include fuzzer.c nostrdb.c sha256.c deps/flatcc/src/runtime/json_parser.c deps/flatcc/src/runtime/builder.c deps/flatcc/src/runtime/emitter.c deps/flatcc/src/runtime/refmap.c deps/lmdb/liblmdb.a deps/secp256k1/.libs/libsecp256k1.a -o fuzzer + create an input directory drop some sort of starting corpus. i chose blns.txt because it rocks. +5. create an input directory for your starting corpus. i chose blns.txt because it's awesome. +6. afl-fuzz -i $input -o $output -- ./fuzzer