This repository shows how one could build custom hooks in a dedicated library and use them during a fuzzing run. The example is very contrived but shows how fuzzing blocks could be overcome by using custom hooks.
- lib Library containing a custom hook.
- app Example application using methods intercepted by the custom hooks. Also includes a fuzz target to that
just executes the
mainmethod of the application.
- Install Jazzer as described in its readme
- Build the whole project with Gradle
./gradlew build- Test the example application
java -jar app/build/libs/app.jar- Fuzz the application with Jazzer
jazzer --cp=app/build/libs/app.jar:lib/build/libs/lib.jar --custom_hooks=com.code_intelligence.hooks.ClockHooks --target_class=com.code_intelligence.example.ExampleFuzzTarget- Alternatively autofuzz the application
jazzer --cp=app/build/libs/app.jar:lib/build/libs/lib.jar --custom_hooks=com.code_intelligence.hooks.ClockHooks --autofuzz=com.code_intelligence.example.ExampleApplication::main