From d564656f1c63fdf481c1c7199ca362335ec6d7b3 Mon Sep 17 00:00:00 2001 From: Nereuxofficial <37740907+Nereuxofficial@users.noreply.github.com> Date: Sun, 30 Jun 2024 14:31:34 +0200 Subject: [PATCH] Improved documentation for fuzzers/cargo_fuzz and dynamic_analysis (#2350) * Improved documentation for fuzzers/cargo_fuzz and dynamic_analysis * revert line breaks in markdown files --- fuzzers/cargo_fuzz/README.md | 2 +- fuzzers/dynamic_analysis/README.md | 17 +++++++++-------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/fuzzers/cargo_fuzz/README.md b/fuzzers/cargo_fuzz/README.md index 4d30ba27ef..38a2b22414 100644 --- a/fuzzers/cargo_fuzz/README.md +++ b/fuzzers/cargo_fuzz/README.md @@ -1,3 +1,3 @@ # cargo-fuzz -This is a minimalistic example how to use LibAFL with cargo-fuzz. It uses the `libafl_libfuzzer` comatability layer to be libFuzzer compatiable. +This is a minimalistic example how to use LibAFL with cargo-fuzz. It uses the `libafl_libfuzzer` compatibility layer in order to be libFuzzer compatible. diff --git a/fuzzers/dynamic_analysis/README.md b/fuzzers/dynamic_analysis/README.md index 9da06f3f4d..a3ffde7597 100644 --- a/fuzzers/dynamic_analysis/README.md +++ b/fuzzers/dynamic_analysis/README.md @@ -1,11 +1,12 @@ # Dynamic Analysis Fuzzer -This fuzzer is to show how you can collect runtime analysis information during fuzzing using LibAFL. We use the Little-CMS project for the example. + +This fuzzer is to show how you can collect runtime analysis information during fuzzing using LibAFL. We use the [Little-CMS](https://github.com/mm2/Little-CMS) project for the example. First, this fuzzer requires `nlohmann-json3-dev` to work. -To run the fuzzer, -0. Compile the fuzzer with `cargo build --release` -1. `mkdir analysis` and run `build.sh`. This will compile Little-CMS to extract the analysis information and generate a json file for each module. -2. run `python3 concatenator.py analysis`. This will concatenate all the json into one single file. This json file maps a function id to its analysis information. -3. Compile the fuzzer with `cargo make fuzzer`. This will instrument the fuzzer at every function entry point. Therefore, whenever we reach the entry of any function, we -can log its id and logs what functions we executed. -4. Run the fuzzer `RUST_LOG=info ./fuzzer --input ./corpus --output ./out`. You'll see a stream of analysis data \ No newline at end of file +To run the fuzzer: + +1. Compile the fuzzer with `cargo build --release` +2. `mkdir analysis` and run `build.sh`. This will compile Little-CMS to extract the analysis information and generate a json file for each module. +3. run `python3 concatenator.py analysis`. This will concatenate all the json into one single file. This json file maps a function id to its analysis information. +4. Compile the fuzzer with `cargo make fuzzer`. This will instrument the fuzzer at every function entry point. Therefore, whenever we reach the entry of any function, we can log its id and logs what functions we executed. +5. Run the fuzzer `RUST_LOG=info ./fuzzer --input ./corpus --output ./out`. You'll see a stream of analysis data \ No newline at end of file