一句话:提出 Truzz,通过识别校验相关字节并利用路径转移优化种子调度,提升灰盒模糊测试的覆盖率与漏洞发现能力。
覆盖率引导灰盒模糊测试(CGF)的优化通常包括推断字节与路径约束的关系,以及对路径转移建模以优化 power schedule。前者可能误关联额外字节,后者仅调度种子而忽略种子内字节。本文提出轻量方法 Truzz:识别与 validation checks 相关的字节并保护其少被变异,使更多输入进入功能代码;同时利用路径转移优先调度可能通向新路径的种子,收获更多新边。作者在六个主流 CGF 上实现 Truzz。评估显示,流入功能代码的输入平均增加 16.14%,新边增加 24.75%,并在 8 个程序中发现 13 个 bug,其中 6 个未被原始 fuzzer 发现。
Coverage-guided Greybox Fuzzing (CGF) is one of the most successful and widely-used techniques for bug hunting. Two major approaches are adopted to optimize CGF: (i) to reduce search space of inputs by inferring relationships between input bytes and path constraints; (ii) to formulate fuzzing processes (e.g., path transitions) and build up probability distributions to optimize power schedules, i.e., the number of inputs generated per seed. However, the former is subjective to the inference results which may include extra bytes for a path constraint, thereby limiting the efficiency of path constraints resolution, code coverage discovery, and bugs exposure; the latter formalization, concentrating on power schedules for seeds alone, is inattentive to the schedule for bytes in a seed. In this paper, we propose a lightweight fuzzing approach, Truzz, to optimize existing Coverage-guided Greybox Fuzzers (CGFs). To address two aforementioned challenges, Truzz identifies the bytes related to the validation checks (i.e., the checks guarding error-handling code), and protects those bytes from being frequently mutated, making most generated inputs examine the functionalities of programs, in lieu of being rejected by validation checks. The byte-wise relationship determination mitigates the problem of loading extra bytes when fuzzers infer the byte-constraint relation. Furthermore, the proposed path transition within Truzz can efficiently prioritize the seed as the new path, harvesting many new edges, and the new path likely belongs to a code region with many undiscovered code lines. To evaluate our approach, we implemented 6 state-of-the-art fuzzers, AFL, AFLFast, NEUZZ, MOPT, FuzzFactory and GreyOne, in Truzz. The experimental results show that on average, Truzz can generate 16.14% more inputs flowing into functional code, in addition to 24.75% more new edges than the vanilla fuzzers. Finally, our approach exposes 13 bugs in 8 target programs, and 6 of them have not been identified by the vanilla fuzzers.