• •    

基于自适应敏感区域变异的覆盖引导模糊测试

徐航1,杨智2,陈性元2,韩冰1,杜学绘3,4   

  1. 1. 战略支援部队信息工程大学
    2. 信息工程大学
    3. 信息工程大学,郑州 450001;
    4. 数学工程与先进计算国家重点实验室,郑州 450001;
  • 收稿日期:2023-08-31 修回日期:2023-10-30 发布日期:2023-12-18
  • 通讯作者: 杨智
  • 基金资助:
    国家自然科学基金

Coverage-guided Fuzzing Based on Adaptive Sensitive Region Mutation

  • Received:2023-08-31 Revised:2023-10-30 Online:2023-12-18

摘要: 针对覆盖引导的模糊测试(CGF)中存在大量无效变异且造成性能浪费的问题,提出了一种自适应敏感区域变异算法。首先根据变异出的测试用例是否执行新路径将对应的变异位置分为有效变异位置集合和无效变异位置集合,然后基于有效变异位置确定敏感区域,并将后续的变异集中在敏感区域内。在后续的模糊测试过程中,根据测试用例的执行结果自适应地调整对应种子的敏感区域,实现减少无效变异的目的。此外,设计了新的种子选择策略来配合敏感区域变异。将敏感区域算法集成到AFL上,并将其命名为Sensitive-region-based Mutation American Fuzzy Lop(SMAFL)。在12个流行的应用程序上对SMAFL进行评估,结果表明在相同的时间内,SMAFL平均比AFL多发现了39.3%的路径,SMAFL的模糊次数为AFL的3至4倍,并且SMAFL在12个程序中都实现了更高的代码覆盖率。在对LAVA-M的测试中,SMAFL发现了更多的bug,并且发现bug所用时间更短。

关键词: 模糊测试, 自适应算法, 软件漏洞, 代码覆盖率, 变异

Abstract: Abstract: To solve the problem that there are a lot of invalid mutations, and the performance is wasted in Coverage-guided Fuzzing (CGF), an adaptive sensitive region mutation algorithm is proposed. Firstly, the mutation locations are divided into effective mutation location set and invalid mutation location set according to whether the mutated test case executed a new path. Then, the sensitive region is determined based on the effective mutation location, and the subsequent mutation is concentrated in the sensitive region. In the subsequent fuzzing process, the sensitive region of the corresponding seed is adjusted adaptively according to the execution result of the test case, so as to reduce the invalid mutations. In addition, a new seed selection strategy was designed to assistant the sensitive region mutation algorithm. The adaptive sensitive region mutation algorithm was integrated into the AFL and named Sensitive-region-based Mutation American Fuzzy Lop (SMAFL). SMAFL was evaluated on 12 popular applications and the results show that, on average, SMAFL found 39.3% more paths than AFL in the same amount of time, SMAFL fuzzed three to four times more than AFL, and SMAFL achieved higher code coverage across all 12 programs. In testing LAVA-M, SMAFL found more bugs and found them in less time.

Key words: fuzzing, adaptive algorithm, software vulnerability, code coverage, mutation

中图分类号: