Abstract
Traditional grey-box fuzzing often relies on random mutations, leading to inefficiencies in reaching complex code paths. This paper introduces CAMFuzz, a novel fuzzer that integrates Explainable Artificial Intelligence (XAI) to guide mutations surgically. By utilizing Class Activation Mapping (CAM), CAMFuzz identifies the specific bytes in a seed file that influence unvisited code blocks. Combined with dynamic code prioritization and magic value identification, CAMFuzz achieves a 17.32% improvement in basic block coverage over state-of-the-art tools and has discovered 19 previously unknown vulnerabilities in both open-source and commercial software.
The Fuzzing Bottleneck
Fuzzing is a critical technique for software security, yet popular tools like AFL face significant hurdles:
- The "Where" Problem: Random mutations often hit irrelevant bytes, failing to trigger new code paths.
- The "How" Problem: Fuzzers struggle to satisfy complex conditional checks (e.g., "magic numbers") through blind guessing.
- The "Priority" Problem: Significant time is often wasted on "ghost" code blocks—paths that are technically unvisited but practically unreachable, such as deep error handlers.
While some modern fuzzers use neural network gradients or heavy-weight taint analysis to address these issues, these methods are often noisy or introduce prohibitive performance overhead.
The CAMFuzz Approach
CAMFuzz bridges the gap between noisy AI-driven guidance and slow program analysis through three integrated modules.
1. Local Interpretation (XAI Core)
The heart of CAMFuzz is a Convolutional Neural Network (CNN) trained to map input seeds to program coverage. Unlike previous methods that use noisy gradients, CAMFuzz employs Class Activation Mapping (CAM). This technique generates a "heatmap" of the input, pinpointing exactly which bytes are responsible for triggering specific code blocks. This "local interpretation" allows the fuzzer to focus mutations on the most impactful regions of a file.
2. Dynamic Weight Adjustment (DWA)
To solve the priority problem, CAMFuzz analyzes the program's Control Flow Graph (CFG). It assigns weights to nodes based on reachability. If the fuzzer repeatedly fails to reach a specific child node, the DWA module lowers its priority, preventing the system from getting stuck on "hard-to-reach" stubs and maintaining high throughput on more promising code paths.
3. Magic Value Identification
To address the "How" problem, CAMFuzz uses lightweight static analysis to extract constants and switch-case values from the binary. When the XAI identifies a critical byte, the fuzzer prioritizes these "magic values" during mutation, significantly increasing the likelihood of passing complex checks.
Experimental Evaluation
The authors evaluated CAMFuzz against a suite of state-of-the-art fuzzers, including AFL, AFLFast, NEUZZ, and Angora. The testing ground included 11 open-source utilities (such as tcpdump and readelf) and commercial products like Microsoft JetEngine and Hancom Office, testing the tool's effectiveness on closed-source binaries.
Key Results
- Superior Coverage: CAMFuzz outperformed the second-best fuzzer by an average of 17.32% in basic block coverage.
- Vulnerability Discovery: The tool found 19 new vulnerabilities, with 6 already assigned CVEs. Notably, it successfully identified 6 bugs in commercial Windows binaries where source code was unavailable.
- Efficiency: Despite the inclusion of a neural network, the AI components account for only 2.15% of the total fuzzing time, demonstrating that explainability does not have to come at the cost of performance.
Discussion and Key Insights
A major takeaway from the research is that XAI acts as a noise filter. By focusing on the Global Average Pooling layer of the CNN, CAMFuzz produces a cleaner mapping of input-to-code than gradient-based methods. This prevents the fuzzer from wasting cycles on unrelated bytes.
Furthermore, the paper highlights the danger of the "Unreachable Trap." By dynamically deprioritizing stubborn blocks, CAMFuzz avoids the common pitfall of obsessing over unreachable error handlers, thereby discovering more bugs in the "reachable" parts of the application.
Conclusion
CAMFuzz demonstrates that "local interpretation" via XAI is a powerful tool for modern fuzzing. By moving from random mutations to explainable, targeted changes, it achieves higher coverage and finds more real-world bugs with minimal overhead. Future work will focus on extending these techniques to handle complex structured inputs like XML and PDF, where grammar-aware mutations are required.
Summary updated