Zig-afl-kit: Convenience functions for easy integration with AFL++

Got intrigued in the past by fuzzing but never could be bothered to figure out how to set it up?

This library helps streamline as much as possible setting up fuzzing for your program.

Unfortunately you will still have to build AFL++ yourself but hopefully not for long.

Would love to hear some feedback from those who tried it.

7 Likes

This looks relevant for building: Fast LLVM-based instrumentation for afl-fuzz
The last part is about generating a code coverage report.

Thank you @kristoff for the new fuzzing method.

1 Like

Integration with GitHub - allyourcodebase/AFLplusplus: Zig build of AFLplusplus project. was successful, now zig-afl-kit also builds the entire AFL++ toolchain for you on demand (you will need to have llvm on your system though).

This is the new fuzzing experience:

5 Likes

Thanks so much for making this repo @kristoff! I’ve been using afl-kit the past few days and with this i went from 180/sec to 29-30k/sec - around 163x faster now. Previously I was following https://www.ryanliptak.com/blog/fuzzing-zig-code/ and that was enough to help me eliminate all of the crashes from my parser. But its great to see it running faster now after previously trying to figure out how to speed it up. I just pushed those changes in this commit if anyone is curious.

1 Like