
Développez des fuzzers HTTP black-box conscients de la structure en Rust, avec des mutateurs, planificateurs, observateurs, décideurs et processeurs composables pour des tests web et API personnalisés.
Tranquille, ce n'est pas un autre outil en ligne de commande, c'est une bibliothèque ! 😁
Plus précisément, FeroxFuzz est une bibliothèque de fuzzing HTTP sensible à la structure.
L'objectif principal de FeroxFuzz était d'extraire certains composants essentiels de feroxbuster et de les placer dans un endroit où ils pourraient être généralement utiles à d'autres personnes. Ce faisant, j'espère que toute personne souhaitant écrire des outils web et/ou des fuzzers web ponctuels en Rust pourra le faire avec un minimum d'effort.
La conception globale de FeroxFuzz est dérivée de LibAFL. FeroxFuzz implémente la plupart des composants listés dans LibAFL: A Framework to Build Modular and Reusable Fuzzers (pre-print). Lorsque FeroxFuzz s'en écarte, c'est généralement pour prendre en charge le code asynchrone.
Comme LibAFL, FeroxFuzz est une bibliothèque de fuzzing composable. Cependant, contrairement à LibAFL, FeroxFuzz est uniquement axé sur le fuzzing HTTP en boîte noire.
Vous trouverez ci-dessous une représentation visuelle des différents composants, hooks et flux de contrôle utilisés par FeroxFuzz.

FeroxFuzz est très performant et a été conçu pour répondre à tous mes besoins prévus pour un nouveau feroxbuster. Cependant, je m'attends toujours à ce que l'API de FeroxFuzz change, au moins légèrement, lorsque le travail sur la nouvelle version de feroxbuster commencera.
Tant que l'API n'est pas stabilisée, des changements cassants pourraient vont survenir.
La façon la plus simple de commencer est d'inclure FeroxFuzz dans le Cargo.toml de votre projet.
[dependencies]
feroxfuzz = { version = "1.0.0-rc.13" }
En plus du dossier examples/, la documentation de l'API contient une documentation détaillée des composants ainsi que des exemples d'utilisation.
L'exemple ci-dessous (examples/async-simple.rs) montre le strict minimum pour écrire un fuzzer avec FeroxFuzz.
Si vous utilisez les sources, l'exemple peut être exécuté depuis le répertoire feroxfuzz/ avec la commande suivante :
note : sauf si un serveur web tourne sur votre machine @ port 8000, vous devrez modifier la cible passée dans
Request::from_url
cargo run --example async-simple
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
// create a new corpus from the given list of words
let words = Wordlist::from_file("./examples/words")?
.name("words")
.build();
// pass the corpus to the state object, which will be shared between all of the fuzzers and processors
let mut state = SharedState::with_corpus(words);
// bring-your-own client, this example uses the reqwest library
let req_client = reqwest::Client::builder().build()?;
// with some client that can handle the actual http request/response stuff
// we can build a feroxfuzz client, specifically an asynchronous client in this
// instance.
//
// feroxfuzz provides both a blocking and an asynchronous client implementation
// using reqwest.
let client = AsyncClient::with_client(req_client);
// ReplaceKeyword mutators operate similar to how ffuf/wfuzz work, in that they'll
// put the current corpus item wherever the keyword is found, as long as its found
// in data marked fuzzable (see ShouldFuzz directives below)
let mutator = ReplaceKeyword::new(&"FUZZ", "words");
// fuzz directives control which parts of the request should be fuzzed
// anything not marked fuzzable is considered to be static and won't be mutated
//
// ShouldFuzz directives map to the various components of an HTTP request
let request = Request::from_url(
"http://localhost:8000/?admin=FUZZ",
Some(&[ShouldFuzz::URLParameterValues]),
)?;
// a `StatusCodeDecider` provides a way to inspect each response's status code and decide upon some Action
// based on the result of whatever comparison function (closure) is passed to the StatusCodeDecider's
// constructor
//
// in plain english, the `StatusCodeDecider` below will check to see if the request's http response code
// received is equal to 200/OK. If the response code is 200, then the decider will recommend the `Keep`
// action be performed. If the response code is anything other than 200, then the recommendation will
// be to `Discard` the response.
//
// `Keep`ing the response means that the response will be allowed to continue on for further processing
// later in the fuzz loop.
let decider = StatusCodeDecider::new(200, |status, observed, _state| {
if status == observed {
Action::Keep
} else {
Action::Discard
}
});
// a `ResponseObserver` is responsible for gathering information from each response and providing
// that information to later fuzzing components, like Processors. It knows things like the response's
// status code, content length, the time it took to receive the response, and a bunch of other stuff.
let response_observer: ResponseObserver<AsyncResponse> = ResponseObserver::new();