Seed scheduling, the order in which seeds are selected, can greatly affect the performance of a fuzzer. Existing approaches schedule seeds based on their historical mutation data, but ignore the structure of the underlying Control Flow Graph (CFG). Examining the CFG can help seed scheduling by revealing the potential edge coverage gain from mutating a seed. An ideal strategy will schedule seeds based on a count of all reachable and feasible edges from a seed through mutations, but computing feasibility along all edges is prohibitively expensive. Therefore, a seed scheduling strategy must approximate this count. We observe that an approximate count should have 3 properties -- (i) it should increase if there are more edges reachable from a seed; (ii) it should decrease if mutation history information suggests an edge is hard to reach or is located far away from currently visited edges; and (iii) it should be efficient to compute over large CFGs. We observe that centrality measures from graph analysis naturally provide these three properties and therefore can efficiently approximate the likelihood of reaching unvisited edges by mutating a seed. We therefore build a graph called the edge horizon graph that connects seeds to their closest unvisited nodes and compute the seed node's centrality to measure the potential edge coverage gain from mutating a seed. We implement our approach in K-scheduler and compare with many popular seed scheduling strategies. We find that K-scheduler increases feature coverage by 25.89% compared to Entropic and edge coverage by 4.21% compared to the next-best AFL-based seed scheduler, in arithmetic mean on 12 Google FuzzBench programs. It also finds 3 more previously-unknown bugs than the next-best AFL-based seed scheduler.
Psyzkaller: Learning from Historical and On-the-Fly Execution Data for Smarter Seed Generation in OS kernel Fuzzing
University of Chinese Academy of Sciences(中国科学院大学);TCA Lab, Institute of Software, Chinese Academy of Sciences(中国科学院软件研究所);Zhongguancun Lab(中关村实验室);Cryptography and Cyberspace Security (Whampoa) Institute(密码与网络安全(黄埔)研究院);School of Cyber Science and Technology, Shandong University(山东大学网络空间安全学院)
Corpus Distillation for Effective Fuzzing: A Comparative Evaluation
基于变异的模糊化通常使用一组初始的非崩溃种子输入(语料库),通过变异来生成新的输入。潜在种子的语料库通常包含数千个类似的输入。这种多样性的缺乏可能导致从所有可用种子中进行穷举突变而浪费模糊努力。为了解决这个问题,模糊器带有蒸馏工具(例如,AFL-Cmin),其选择触发与完整语料库相同的检测数据点范围的种子的最小子集。通常的做法表明,最小化种子的数量和累积大小会导致更有效的模糊,我们系统地探索。我们提出了34+ CPU-年的模糊结果与五种蒸馏方法,以了解它们在现实世界的软件中发现错误的影响。我们评估了一些技术,包括现有的afl-cmin和Minset,以及MoonLight-一个免费提供的,可配置的,最先进的,开源的工具。我们的实验比较了蒸馏方法的有效性,目标是Google Fuzzer Test Suite和一组不同的六个真实世界的库和程序,涵盖了16个程序中的13种不同的输入文件格式。我们的研究结果表明,蒸馏是一个必要的前兆,任何模糊运动时,开始与一个大的初始语料库。我们比较了替代蒸馏方法的有效性。值得注意的是,我们的实验表明,最先进的蒸馏工具(如MoonLight和Minset)并不能完全找到我们的综合活动暴露的所有33个bug(在现实世界的目标中):每种技术似乎都有自己的优势。我们发现(并报告)Minset没有发现的MoonLight的新错误,反之亦然。此外,afl-cmin…