bytecodealliance / wasm-tools

CLI and Rust libraries for low-level manipulation of WebAssembly modules
Apache License 2.0
1.34k stars 244 forks source link

Request for Updated Usage Tutorial and AFL Integration Guide for wasm-mutate in wasm-tools #1349

Open 0xfocu5 opened 10 months ago

0xfocu5 commented 10 months ago

I have noticed that the code in the readme of https://github.com/bytecodealliance/wasm-tools/tree/main/crates/wasm-mutate is no longer usable. Could you provide an updated version of the code usage tutorial? Additionally, can this project be used with AFL? If so, could you provide a tutorial? Thank you!

alexcrichton commented 10 months ago

I'd recommend reading over the source code of the mutate subcommand. Wasmtime has an example of mutation in a fuzzer here and here.

This should be usable with AFL as I think from an API perspective it's similar enough to libFuzzer in LLVM