-
Notifications
You must be signed in to change notification settings - Fork 34
Open
Description
Hi,
Sorry for this question which may sound stupid. I have been reading the code of this project for quite a while, and I am starting to understand it.
However, I would like to implement this on my computer for fuzzing with AFL, and it is not clear how I should do it...
From what I understand, if I want to try and run an example against curl, I just need to run the generate_corpus.py script, and then run the file against ./curl_fuzzer, which will write the file into curl's socket, instead of letting it go look over the network. However, with AFL, I do not see any quick way to do all this process with the semi-randomly generated files from the AFL program.
Can you please help me with this?
Thank you!
Activity
cmeister2 commentedon Feb 19, 2019
Hi @4br3mm0rd!
In general this isn't natively set up for AFL. This uses libfuzzer to do all the bits it needs to do. We support compiling against a LIB_FUZZING_ENGINE as the interface to oss-fuzz.
In practice the oss-fuzz service provided by Google manages to do this with AFL, so I would suggest looking at https://github.com/google/oss-fuzz/blob/master/infra/base-images/base-builder/compile_afl to see if that helps.
geeknik commentedon Aug 21, 2019
Compiling the curl fuzzer suite with AFL is actually pretty easy. (@bagder @cmeister2)
Open up mainline.sh and add on line Unable to build using mainline.sh with Clang 11 / LLVM 11? #38:
export LIB_FUZZING_ENGINE=/path/to/FuzzingEngine.a
<-- we built this in step 1.Run mainline.sh (make sure clang and clang++ are in your path)
Execute curl fuzzer program like so:
afl-fuzz -m none -i input_dir -o output_dir -- ./curl-fuzzer
Profit. (Maybe)
WTXCKAi commentedon Oct 10, 2019
Hello~Thanks for your approach!I implemented this on my computer and compiled curl-fuzzer successfully. But when I run those fuzzers with afl-fuzz command, I see " last new path : none yet (odd, check syntax!) " on the AFL UI. It looks like some problems with curl-fuzzer. Can you please help me with this?