Computer Engineering and Applications ›› 2022, Vol. 58 ›› Issue (18): 147-153.DOI: 10.3778/j.issn.1002-8331.2106-0507

• Network, Communication and Security • Previous Articles     Next Articles

Directed Grey-Box Fuzzing Technology Based on LSTM and Dynamic Strategy

LI Zhaoji, WANG Tianyuan, ZHOU Ziqiang, WANG Yao, CHEN Yongle   

  1. 1.College of Information and Computer, Taiyuan University of Technology, Jinzhong, Shanxi 030600, China
    2.Power Grid Technology Center, State Grid Shanxi Electric Power Company Electric Power Research Institute, Taiyuan 030001, China
  • Online:2022-09-15 Published:2022-09-15

基于LSTM和动态策略的定向灰盒模糊测试技术

李兆基,王田原,周自强,王尧,陈永乐   

  1. 1.太原理工大学 信息与计算机学院,山西 晋中 030600
    2.国网山西省电力公司电力科学研究院 电网技术中心,太原 030001

Abstract: Directed fuzzing is designed to quickly produce test cases, reach a series of given target locations, and discover program errors. However, the current directed fuzzing tools generally have the problem of low test efficiency. So a directed grey-box method based on neural network is proposed which builds a model to predict where the current seed can produce input gain by learning variation patterns in different locations in the input files from past fuzzing explorations, so as to guide the fuzzer to optimize mutation. At the same time, in order to solve the tradeoff of exploration-exploitation problem in directed fuzzers, a dynamic strategy is introduced to adaptively coordinate two stages in the process of fuzzy testing. A prototype system named DYNFuzz is implemented based on the existing fuzzing framework AFL, and is tested and evaluated on three benchmarks, which shows that DYNFuzz has higher directed performance and test efficiency than other fuzzers and would not be caught up in local dilemmas caused by the exploration-exploitation imbalance.

Key words: directed fuzzing, neural network, optimize mutations, dynamic strategy

摘要: 定向模糊测试旨在快速生产测试用例,达到给定的程序目标位置区域并发现程序错误。但目前的定向模糊测试工具普遍存在测试效率较低的问题,为此提出了一种基于神经网络的定向灰盒模糊测试方法,通过学习过去的模糊探索输入文件中不同位置的变异模式以生成模型来预测当前种子能够产生输入增益的位置,从而指导模糊器进行优化突变。同时为了解决定向灰盒模糊器中探索与开发的权衡问题,引入了一种动态策略在模糊测试过程中自适应协调两个阶段。基于现有的模糊测试框架AFL实现了一个原型系统,命名为DYNFuzz,并在3个基准上对其进行了测试和评估,实验结果表明,DYNFuzz具有比其他模糊器更高的定向性能和测试效率,并且不会陷入由探索开发不平衡导致的局部困境。

关键词: 定向模糊测试, 神经网络, 优化突变, 动态策略