# afl.rs **Repository Path**: pwn2security/afl.rs ## Basic Information - **Project Name**: afl.rs - **Description**: ALF Fuzzing漏洞模糊测试工具 - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-04-11 - **Last Updated**: 2021-04-11 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README

afl.rs logo
afl.rs

Fuzzing Rust code with AFLplusplus

## What is it? [Fuzz testing][] is a software testing technique used to find security and stability issues by providing pseudo-random data as input to the software. [AFLplusplus][] is a popular, effective, and modern fuzz testing tool based on [AFL][american-fuzzy-lop]. This library, afl.rs, allows one to run AFLplusplus on code written in [the Rust programming language][rust]. ## Documentation Documentation can be found in the [Rust Fuzz Book](https://rust-fuzz.github.io/book/afl.html). ## What does it look like? Screen recording of afl Screen recording of AFL running on Rust code. [conditional compilation]: https://doc.rust-lang.org/reference.html#conditional-compilation [Cargo feature]: http://doc.crates.io/manifest.html#the-[features]-section [example-defer]: https://github.com/frewsxcv/afl.rs/blob/master/examples/deferred-init.rs [LLVM pass]: https://github.com/frewsxcv/afl.rs/blob/master/plugin/src/afl-llvm-pass.o.cc [example]: https://github.com/frewsxcv/afl.rs/blob/master/afl/examples/hello.rs [Cargo]: http://doc.crates.io/ [unresolved issue]: https://github.com/frewsxcv/afl.rs/issues/11 [fuzz testing]: https://en.wikipedia.org/wiki/Fuzz_testing [rustup]: https://rustup.rs/ [american-fuzzy-lop]: http://lcamtuf.coredump.cx/afl/ [AFLplusplus]: https://aflplus.plus/ [rust]: https://www.rust-lang.org ## `lazy_static` variables `lazy_static` variables present problems for AFL's persistent mode, which afl.rs uses. Such variables can cause AFL to give incorrectly low stability reports, or fail to report timeouts, for example. To address such problems, rust-fuzz provides a ["resettable" version](https://github.com/rust-fuzz/resettable-lazy-static.rs) of `lazy_static`. To use it, make the following two changes to your target's `Cargo.toml` file. 1. Add a `[patch.crates-io]` section and overide the `lazy_static` dependency with the rust-fuzz version: ```toml [patch.crates-io] lazy_static = { git = "https://github.com/rust-fuzz/resettable-lazy-static.rs" } ``` 2. Enable the `reset_lazy_static` feature on afl.rs: ```toml [dependencies] afl = { version = "*", features = ["reset_lazy_static"] } ```