Skip to main content
QUICK REVIEW

[论文解读] Superion: Grammar-Aware Greybox Fuzzing

Junjie Wang, Bihuan Chen|arXiv (Cornell University)|Dec 4, 2018
Software Testing and Debugging Techniques参考文献 59被引用 8
一句话总结

Superion 提出了一种语法感知的灰盒模糊测试工具,利用抽象语法树(AST)智能地裁剪测试输入,同时保持结构有效性。通过迭代地从 AST 中移除子树并检查覆盖率是否保持不变,它生成最小且有效的输入,同时保留触发错误的能力,显著提升了传统方法的模糊测试效率。

ABSTRACT

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.

研究动机与目标

  • 解决灰盒模糊测试在生成具有语法结构的复杂输入时,有效且最小化测试输入的低效问题。
  • 通过语法感知的输入裁剪,减少模糊测试活动中的输入膨胀与冗余。
  • 通过基于 AST 的结构分析,在最小化输入大小的同时维持或提升代码覆盖率。
  • 在不依赖完整程序分析或符号执行的前提下,将语法感知能力集成到灰盒模糊测试中。

提出的方法

  • 使用给定语法 $G$ 解析每个输入,生成用于结构分析的抽象语法树(AST)。
  • 迭代地从 AST 中移除每个子树 $n$,并测试生成的输入 $ret$ 是否保持覆盖率。
  • 如果移除 $n$ 后覆盖率保持不变,则保留裁剪后的输入 $in = ret$ 并继续;否则,将 $n$ 恢复到树中。
  • 当解析失败时,使用内置裁剪函数作为回退,确保输入的有效性。
  • 重复此过程,直到无法再进行有效缩减,最终返回最小的有效输入 $ret$。
  • 通过操作 AST 而非原始字节序列,保持结构正确性。

实验结果

研究问题

  • RQ1语法感知的基于 AST 的输入裁剪是否能提升灰盒模糊测试的效率?
  • RQ2从测试输入中移除非关键子树是否能在减小输入大小的同时保持代码覆盖率?
  • RQ3与传统模糊测试相比,语法感知裁剪在覆盖率和执行速度方面表现如何?
  • RQ4基于 AST 的操作能否减少模糊测试活动中冗余测试用例的数量?

主要发现

  • 所提出的基于 AST 的裁剪策略成功减小了输入大小,同时维持或提升了代码覆盖率。
  • 通过移除不影响覆盖率的子树,Superion 生成了最小且有效的输入,同时保留了缺陷检测能力。
  • 通过在 AST 结构上操作,该方法避免了无效输入,确保了整个裁剪过程中语法合规性。
  • 通过输入最小化,该方法通过减少冗余测试执行,优于标准的灰盒模糊测试。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。