一句话:扩展动态污点分析以自动推断输入语言的 token 与种子,显著提升 fuzzing 覆盖率。
现代模糊测试工具(如 AFL)在词法层面逐字节探索输入空间,对语法复杂的输入需逐字符拼装关键字,效率低下。字典虽能显著加速,却通常需人工提供;且现有动态污点分析在追踪输入 token 时会因隐式类型转换丢失污点。本文扩展动态污点分析,在不引发污点爆炸的前提下追踪隐式转换的数据,并实现 lFuzzer 测试生成器:它针对输入处理器的词法分析阶段系统探索分支,自动推断覆盖所有已见决策的 token 集合与种子输入,可直接作为模糊测试字典。实验表明,lFuzzer-AFL 在 json、lisp、tinyC 和 JavaScript 等复杂输入格式上,覆盖率相比 AFL 最多提升 17%。
Modern fuzzing tools like AFL operate at a lexical level: They explore the input space of tested programs one byte after another. For inputs with complex syntactical properties, this is very inefficient, as keywords and other tokens have to be composed one character at a time. Fuzzers thus allow to specify dictionaries listing possible tokens the input can be composed from; such dictionaries speed up fuzzers dramatically. Also, fuzzers make use of dynamic tainting to track input tokens and infer values that are expected in the input validation phase. Unfortunately, such tokens are usually implicitly converted to program specific values which causes a loss of the taints attached to the input data in the lexical phase. In this paper, we present a technique to extend dynamic tainting to not only track explicit data flows but also taint implicitly converted data without suffering from taint explosion. This extension makes it possible to augment existing techniques and automatically infer a set of tokens and seed inputs for the input language of a program given nothing but the source code. Specifically targeting the lexical analysis of an input processor, our lFuzzer test generator systematically explores branches of the lexical analysis, producing a set of tokens that fully cover all decisions seen. The resulting set of tokens can be directly used as a dictionary for fuzzing. Along with the token extraction seed inputs are generated which give further fuzzing processes a head start. In our experiments, the lFuzzer-AFL combination achieves up to 17% more coverage on complex input formats like json, lisp, tinyC, and JavaScript compared to AFL.