Skip to content

This repository contains a lightweight Rust program designed to demonstrate fuzz testing with AFL++.

Notifications You must be signed in to change notification settings

BowTiedRadone/rust-hello-fuzz

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AFL++ Fuzz Testing with Rust

This repository contains a lightweight Rust program designed to demonstrate fuzz testing with AFL++. The example program reads input from a file, processes the data, and intentionally includes a potential out-of-bounds error. By using AFL++, we can generate crashes and identify flaws in the code, providing a practical introduction to fuzzing techniques and AFL++ usage.

Getting Started

Prerequisites

  1. afl.rs installed

Steps

  1. Clone the repository:

    $ git clone https://github.com/BowTiedRadone/rust-aflPlusPlus
  2. Build the program using cargo afl:

    $ cd rust-aflPlusPlus
    $ cargo afl build
  3. Test the test cases from the corpus directory manually:

     $ cat ./corpus/test.txt
     test
    
     $ ./target/debug/afl-rust ./corpus/test.txt
     Buffer content: test
    
     $ cat ./corpus/crash.txt
     AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
    
     $ ./target/debug/afl-rust ./corpus/crash.txt
     thread 'main' panicked at src/main.rs:29:36:
     index out of bounds: the len is 101 but the index is 201
     note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
  4. Instructions on how to run AFL++ against the generated binary will be provided soon!

Conclusion

Stay tuned for updates!

About

This repository contains a lightweight Rust program designed to demonstrate fuzz testing with AFL++.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages