# All You Need Is a Fuzzing Brain

**Autonomous Cyber Reasoning System for Vulnerability Discovery and Patching**
[Paper](https://arxiv.org/abs/2509.07225) | [C Dataset](https://huggingface.co/datasets/Kitxuuu/AIXCC-C-Challenge) | [Java Dataset](https://huggingface.co/datasets/Kitxuuu/AIXCC-Java-Challenge)
---
FuzzingBrain is an LLM-powered autonomous system for vulnerability discovery and
patching, built on the OSS-Fuzz toolchain. It pairs coverage-guided fuzzing with
a **Suspicious-Point (SP)** reasoning brain: specialized agents partition the
target, reason about where bugs live, build proofs-of-vulnerability, and propose
patches — with every finding dynamically verified to eliminate hallucinations.
## Prerequisites
| Requirement | Notes |
|---|---|
| **Docker** | Running, and your user able to run containers (`docker ps` without `sudo`) |
| **Python** | Not required up front — `uv` fetches the version in `.python-version` (3.13), so the run does not depend on whatever `python3` happens to be first on `PATH` |
| **One LLM API key** | Anthropic, OpenAI, or Google Gemini |
| **Linux** | Recommended; OSS-Fuzz builds are happiest there |
| **Disk** | Tens of GB. An OSS-Fuzz build tree is several GB per target and large projects (wireshark, freerdp) transiently need far more |
## Setup
```bash
git clone https://github.com/fuzzingbrain/afc-crs-all-you-need-is-a-fuzzing-brain.git
cd afc-crs-all-you-need-is-a-fuzzing-brain
./setup.sh # uv, venv on Python 3.13, dependencies, .env
$EDITOR .env # add at least one API key
```
`setup.sh` is safe to re-run. PostgreSQL and Redis are started in containers
on the first run if they are not already reachable at the URLs in `.env`.
## Run
One entry point, one JSON task file:
```bash
./venv/bin/python -m fuzzingbrain.main --config examples/aixcc/cu-delta-05.json --budget-limit 20
```
Every field of the task file is also a flag, and a flag overrides the file
(`--help` lists them). `--check` validates the task and stops before doing any
work. [`examples/aixcc/`](examples/aixcc) holds two real task files, one delta
scan and one full scan.
Nothing is reported that has not crashed a real build: every candidate input is
executed against the built fuzzer and kept only if the sanitizer fires.
> **Pick a build-ready target.** The fuzzer has to build before any bug hunting
> starts, and a target that built last month may not build today: an OSS-Fuzz
> recipe that clones a dependency at `master` picks up whatever is there now.
> Check the build logs first when a run reports nothing — a failed build and a
> clean scan do not look alike there, but they can in a summary.
## How it works
```
target ─▶ analyze ─▶ build fuzzers ─▶ direction planning ─▶ sp-generate
│
report ◀─ verify ◀─ triage ◀─ pov ◀─ sp-verify ◀──────────────┘
```
A scan partitions the codebase into directions, reasons about suspicious points
(potential vulnerabilities), constructs candidate PoV inputs, and verifies every
crash before it is reported.
## Troubleshooting
| Symptom | Fix |
|---|---|
| `Model check failed … no API key for