APP下载

面向二进制程序的导向性模糊测试方法

2019-08-01张瀚方周安民贾鹏刘露平刘亮

计算机应用 2019年5期

张瀚方 周安民 贾鹏 刘露平 刘亮

摘 要:为了解决当前模糊测试技术中变异存在一定的盲目性以及变异生成的样本大多经过相同的高频路径的问题,提出并实现了一种基于轻量级程序分析技术的二进制程序模糊测试方法。首先对目标二进制程序进行静态分析来筛选在模糊测试过程中阻碍样本文件深入程序内部的比较指令;随后对目标文件进行插桩来获取比较指令中操作数的具体值,并根据该具体值为比较指令建立实时的比较进度信息,通过比较进度衡量样本的重要程度;然后基于模糊测试过程中实时的路径覆盖信息为经过稀有路径的样本增加其被挑选进行变异的概率;最后根据比较进度信息并结合启发式策略有针对性地对样本文件进行变异,通过变异引导提高模糊测试中生成能够绕过程序规约检查的有效样本的效率。实验结果表明, 所提方法发现crash及发现新路径的能力均优于模糊测试工具AFLDyninst。

关键词:导向性模糊测试;反馈式模糊测试;二进制模糊测试;程序插桩;漏洞挖掘

中图分类号:TP311

文献标志码:A

Abstract: In order to address the problem that the mutation in the current fuzzing has certain blindness and the samples generated by the mutation mostly pass through the same highfrequency paths, a binary fuzzing method based on lightweight program analysis technology was proposed and implemented. Firstly, the target binary program was statically analyzed to filter out the comparison instructions which hinder the sample files from penetrating deeply into the program during the fuzzing process. Secondly, the target binary program was instrumented to obtain the specific values of the operands in the comparison instructions, according to which the realtime comparison progress information for each comparison instruction was established, and the importance of each sample was measured according to the comparison progress information. Thirdly, the realtime path coverage information in the fuzzing process was used to increase the probability that the samples passing through rare paths were selected to be mutated. Finally, the input files were directed and mutated by the comparison progress information combining with a heuristic strategy to improve the efficiency of generating valid inputs that could bypass the comparison checks in the program. The experimental results show that the proposed method is better than the current binary fuzzing tool AFLDyninst both in finding crashes and discovering new paths.

英文关键词Key words: directed fuzzing; feedback fuzzing; binary fuzzing; program instrumentation; vulnerability mining

0 引言

随着计算机的广泛使用和网络技术的飞快发展,计算机软件早已融入到人们的日常生活中,在金融、交通、医疗卫生和国防科技等领域中发挥着重要作用。软件数量日益增加,与之俱来的软件安全问题也越发突出。软件中存在的漏洞为攻击者提供了可乘之机,近年來攻击者利……

登录APP查看全文