tree: 0d8c7f1610bc40eccc1618b1ae2a232aa7ccd620 [path history] [tgz]
  1. FuzzerBuiltins.h
  2. FuzzerBuiltinsMsvc.h
  3. FuzzerCommand.h
  4. FuzzerCorpus.h
  5. FuzzerCrossOver.cpp
  6. FuzzerDataFlowTrace.cpp
  7. FuzzerDataFlowTrace.h
  8. FuzzerDefs.h
  9. FuzzerDictionary.h
  10. FuzzerDriver.cpp
  11. FuzzerExtFunctions.def
  12. FuzzerExtFunctions.h
  13. FuzzerExtFunctionsDlsym.cpp
  14. FuzzerExtFunctionsWeak.cpp
  15. FuzzerExtFunctionsWindows.cpp
  16. FuzzerExtraCounters.cpp
  17. FuzzerFlags.def
  18. FuzzerFork.cpp
  19. FuzzerFork.h
  20. FuzzerInterceptors.cpp
  21. FuzzerInterface.h
  22. FuzzerInternal.h
  23. FuzzerIO.cpp
  24. FuzzerIO.h
  25. FuzzerIOPosix.cpp
  26. FuzzerIOWindows.cpp
  27. FuzzerLoop.cpp
  28. FuzzerMain.cpp
  29. FuzzerMerge.cpp
  30. FuzzerMerge.h
  31. FuzzerMutate.cpp
  32. FuzzerMutate.h
  33. FuzzerOptions.h
  34. FuzzerPlatform.h
  35. FuzzerRandom.h
  36. FuzzerSHA1.cpp
  37. FuzzerSHA1.h
  38. FuzzerTracePC.cpp
  39. FuzzerTracePC.h
  40. FuzzerUtil.cpp
  41. FuzzerUtil.h
  42. FuzzerUtilDarwin.cpp
  43. FuzzerUtilFuchsia.cpp
  44. FuzzerUtilLinux.cpp
  45. FuzzerUtilPosix.cpp
  46. FuzzerUtilWindows.cpp
  47. FuzzerValueBitMap.h
  48. libfuzzer.cpp
  49. libfuzzer.inc
  50. Makefile
  51. README.md
custom_mutators/libfuzzer/README.md

custum mutator: libfuzzer LLVMFuzzerMutate()

This uses the libfuzzer LLVMFuzzerMutate() function in llvm 12.

just type make to build

AFL_CUSTOM_MUTATOR_LIBRARY=custom_mutators/libfuzzer/libfuzzer-mutator.so afl-fuzz ...

Note that this is currently a simple implementation and it is missing two features:

  • Splicing (“Crossover”)
  • Dictionary support

To update the source, all that is needed is that FuzzerDriver.cpp has to receive

#include "libfuzzer.inc"

before the closing namespace bracket.

It is also libfuzzer.inc where the configuration of the libfuzzer mutations are done.

Original repository: https://github.com/llvm/llvm-project Path: compiler-rt/lib/fuzzer/*.{h|cpp} Source commit: df3e903655e2499968fc7af64fb5fa52b2ee79bb