How to perform Context Aware (structured input) Fuzzing on Complex Rust Code

Normally, we give simple standard input (string, integer, Picture, sql command (keywords), etc) to fuzzer (like AFL.rs) and then it start working. But my question is that if I want to give some complex input (like struct of Student (with lot of member variables) or even more complex data type like Block of blockchain, then is there any tool, technique in rust ecosystem to perform such kind of context aware (structured) fuzzing on rust developed code.

Not sure about fuzzing exactly, since AFAIK that pertains to things that are parsed from “flat” data.

But, closely related to fuzzing is property-based (random) testing, which definitely applies to types like the one you’ve described. Check out the proptest and quickcheck crates. These crates basically help you randomly generate values of even complex types (and you can customize this greatly) and assert properties of those values.

1 Like

thanks for your response… I will try them… but I think its just testing (not for fuzzing), may be I could modify them as per my requirements …