[Paper Review] Superion: Grammar-Aware Greybox Fuzzing
Superion proposes a grammar-aware greybox fuzzer that leverages abstract syntax trees (ASTs) to intelligently trim test inputs while preserving structural validity. By iteratively removing subtrees from the AST and checking if coverage remains unchanged, it generates minimal, valid inputs that maintain bug-triggering capability, significantly improving fuzzing efficiency over traditional approaches.
In recent years, coverage-based greybox fuzzing has proven itself to be one of the most effective techniques for finding security bugs in practice. Particularly, American Fuzzy Lop (AFL for short) is deemed to be a great success in fuzzing relatively simple test inputs. Unfortunately, when it meets structured test inputs such as XML and JavaScript, those grammar-blind trimming and mutation strategies in AFL hinder the effectiveness and efficiency. To this end, we propose a grammar-aware coverage-based greybox fuzzing approach to fuzz programs that process structured inputs. Given the grammar (which is often publicly available) of test inputs, we introduce a grammar-aware trimming strategy to trim test inputs at the tree level using the abstract syntax trees (ASTs) of parsed test inputs. Further, we introduce two grammar-aware mutation strategies (i.e., enhanced dictionary-based mutation and tree-based mutation). Specifically, tree-based mutation works via replacing subtrees using the ASTs of parsed test inputs. Equipped with grammar-awareness, our approach can carry the fuzzing exploration into width and depth. We implemented our approach as an extension to AFL, named Superion; and evaluated the effectiveness of Superion on real-life large-scale programs (a XML engine libplist and three JavaScript engines WebKit, Jerryscript and ChakraCore). Our results have demonstrated that Superion can improve the code coverage (i.e., 16.7% and 8.8% in line and function coverage) and bug-finding capability (i.e., 31 new bugs, among which we discovered 21 new vulnerabilities with 16 CVEs assigned and 3.2K USD bug bounty rewards received) over AFL and jsfunfuzz. We also demonstrated the effectiveness of our grammar-aware trimming and mutation.
Motivation & Objective
- To address the inefficiency of greybox fuzzing in generating valid, minimal test inputs for complex inputs with syntactic structure.
- To reduce input bloat and redundancy in fuzzing campaigns by leveraging grammar-aware trimming of test inputs.
- To maintain or improve code coverage while minimizing input size through AST-based structural analysis.
- To integrate grammar-awareness into greybox fuzzing without requiring full program analysis or symbolic execution.
Proposed method
- Parse each input using a given grammar $G$ to generate an abstract syntax tree (AST) for structural analysis.
- Iteratively remove each subtree $n$ from the AST and test the resulting input $ret$ for coverage preservation.
- If coverage remains unchanged after removing $n$, retain the trimmed input $in = ret$ and continue; otherwise, restore $n$ to the tree.
- Use a built-in trimming function as fallback when parsing fails, ensuring input validity.
- Repeat the process until no further valid reductions can be made, returning the minimal valid input $ret$.
- Maintain structural correctness by operating on the AST rather than raw byte sequences.
Experimental results
Research questions
- RQ1Can grammar-aware AST-based input trimming improve the efficiency of greybox fuzzing?
- RQ2Does removing non-essential subtrees from test inputs preserve code coverage while reducing input size?
- RQ3How does grammar-aware trimming compare to traditional fuzzing in terms of coverage and execution speed?
- RQ4Can AST-level manipulation reduce the number of redundant test cases in fuzzing campaigns?
Key findings
- The proposed AST-based trimming strategy successfully reduces input size while maintaining or improving code coverage.
- By removing subtrees that do not affect coverage, Superion generates minimal, valid inputs that retain bug-detection capability.
- The method avoids invalid inputs by operating on the AST structure, ensuring grammar compliance throughout the trimming process.
- The approach outperforms standard greybox fuzzing by reducing redundant test executions through input minimization.
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.