[Paper Review] Augmenting Greybox Fuzzing with Generative AI
ChatFuzz augments AFL++ with a generative AI-based mutator that creates format-conforming inputs, achieving about 12.77% higher edge coverage than AFL++ across 12 programs and benchmarks.
Real-world programs expecting structured inputs often has a format-parsing stage gating the deeper program space. Neither a mutation-based approach nor a generative approach can provide a solution that is effective and scalable. Large language models (LLM) pre-trained with an enormous amount of natural language corpus have proved to be effective for understanding the implicit format syntax and generating format-conforming inputs. In this paper, propose ChatFuzz, a greybox fuzzer augmented by generative AI. More specifically, we pick a seed in the fuzzer's seed pool and prompt ChatGPT generative models to variations, which are more likely to be format-conforming and thus of high quality. We conduct extensive experiments to explore the best practice for harvesting the power of generative LLM models. The experiment results show that our approach improves the edge coverage by 12.77\% over the SOTA greybox fuzzer (AFL++) on 12 target programs from three well-tested benchmarks. As for vulnerability detection, \sys is able to perform similar to or better than AFL++ for programs with explicit syntax rules but not for programs with non-trivial syntax.
Motivation & Objective
- Motivate the need for format-conforming inputs in greybox fuzzing for structured data programs.
- Propose a generative-AI based mutator that complements traditional mutation-based fuzzing.
- Systematically study hyper-parameters of the AI mutator to identify best practices.
- Evaluate the approach on diverse targets to measure coverage gains and seed contribution.
- Open-source ChatFuzz and datasets for reproducibility.
Proposed method
- Integrate an AI-based Chat Mutator with AFL++, forming ChatFuzz as an augmentation layer.
- Use seed inputs from the fuzzer to prompt a ChatGPT endpoint to generate variations.
- Parse AI responses into new seeds and feed them back into the fuzzer for coverage testing.
- Experiment with model endpoints (chat vs completion) and tuning hyper-parameters (prompt design, max_tokens, n, temperature).
- Evaluate edge coverage gains, seed diversity, and syntactic validity across twelve programs from multiple benchmarks.
Experimental results
Research questions
- RQ1How much edge coverage improvement does ChatFuzz achieve over AFL++ on target programs?
- RQ2Can the AI-based mutator produce high-quality, syntax-conforming seeds across different input formats?
- RQ3How do AI model choices and hyper-parameters affect fuzzing performance and Seed import rates?
- RQ4Is ChatFuzz effective for vulnerability discovery across programs with varying input syntax complexity?
Key findings
- ChatFuzz improves edge coverage by 12.77% on average over AFL++ across 12 programs.
- The AI mutator contributes about 12.77% of seeds in the fuzzer queue on average, with higher shares for some programs (e.g., >30% for mujs, ossfuzz, lua).
- The ChatGPT-based mutator yields higher seed quality (unique and syntactically valid seeds) with the chat model (CT) than the completion model (CP), though CP can generate more seeds overall.
- Format-aware prompts and including sample input in prompts significantly boost coverage compared to prompts without input.
- ChatFuzz variants with the CT endpoint achieve notable coverage gains compared to AFL++, and format-agnostic variants still outperform AFL++ by around 6% on average.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.