Skip to content

Latest commit

 

History

History
30 lines (23 loc) · 1.19 KB

libFuzzer.md

File metadata and controls

30 lines (23 loc) · 1.19 KB

Using libFuzzer with SharpFuzz

You can use libFuzzer as a SharpFuzz fuzzing engine on Linux and Windows.

1. Download the latest libfuzzer-dotnet release for your platform. Alternatively, you can compile libfuzzer-dotnet.cc (Linux) or libfuzzer-dotnet-windows.cc (Windows) from scratch using the following command:

clang -fsanitize=fuzzer libfuzzer-dotnet.cc -o libfuzzer-dotnet

2. In your Main function, call Fuzzer.LibFuzzer.Run (instead of Fuzzer.Run or Fuzzer.OutOfProcess.Run).

3. Start fuzzing by running the fuzz-libfuzzer.ps1 script like this:

scripts/fuzz-libfuzzer.ps1 `
    -libFuzzer "libfuzzer-dotnet-windows.exe" `
    -project YourFuzzingProject.csproj `
    -corpus Testcases