This project implements a simple, deterministic, mutation-based fuzzer written in Rust.
The fuzzer reads an initial input seed from a _seed_
file in the working directory, applies random mutations based on a seeded pseudorandom number generator (PRNG), and outputs the final mutated input to stdout.
This project requires Rust
This binary was built on macOS (Apple Silicon)
To build the fuzzer for your own machine architecture:
cargo build --release
The compiled executable will be located at:
./target/release/fuzzer
Before running the fuzzer, make sure you are in the folder where _seed_
is located.
To run the fuzzer:
./fuzzer/target/release/fuzzer <prng_seed> <num_of_iterations> > output.txt
prng_seed
: A 32-bit unsigned integer to seed the PRNG.num_of_iterations
: Number of mutation iterations to perform.
Example:
./fuzzer 1337 9001 > fuzzed_input.txt
The output should be redirected into a file for testing against the challenge program.
- Start with a fixed seed file (
_seed_
), which is not modified. - For each iteration:
- Each byte in the input has a 13% chance to be replaced with a randomly generated byte (0–255).
- Every 500 iterations, 10 random bytes are appended to the current input.
- After all iterations, the mutated input is written directly to stdout.
This mutation process is deterministic for the same combination of:
- the initial seed file,
prng_seed
, andnum_of_iterations
.
This project depends on the following crate:
rand
(version 0.8): Used for deterministic pseudorandom number generation (StdRng
).