APP下载

模糊测试器AFL种子变异策略优化研究

2021-06-07张琦马莺姿

现代信息科技 2021年24期

张琦 马莺姿

摘  要:AFL作为模糊测试领域最具有代表性的工具,使用至今已发现大量软件的内存漏洞。实验表明,AFL超过60%的变异操作不会产生任何新路径,这些变异都是无效的变异。文章对AFL种子变异策略进行分析,研究并提出了一种变异策略的优化算法。该算法通过在确定性变异阶段记录种子文件的有效字节数组,在随机性变异阶段判断要变异的字节是否为有效字节来进行选择性的变异。根据所提出的算法对AFL进行了优化,实验验证了该种子变异优化算法的有效性。

关键词:模糊测试;AFL;种子变异策略;错误检测

中图分类号:TP391;TP311        文献标识码:A文章编号:2096-4706(2021)24-0142-04

Abstract: As the most representative tool in the field of Fuzzing, AFL has found a large number of software memory vulnerabilities so far. Experiment results show that more than 60% of AFLs mutations will not find any new paths, and these mutations are invalid. The paper analyzes the AFL seed mutation strategy, studies and proposes an optimization algorithm for the mutation strategy. The algorithm performs selective mutation by recording the effective byte array of the seed file in the deterministic mutation stage, and judging whether the bytes to be mutated are valid bytes in the random mutation stage. According to the proposed algorithm, AFL is optimized, and the experiment verifies the effectiveness of the seed mutation optimization algorithm.

Keywords: Fuzzing; AFL; seed mutation strategy; error detection

0  引  言

随着社会不断发展,信息化给人类的衣、食、住、行等各个方面带来了极大的便利。计算机软件给社会带来便利的同時,也潜藏着一些安全问题。OpenSSL[1]本身是一个进行安全通信、可以保障通信保密性和可靠性的应用程序,然而,在2014年,OpenSSL被爆出“心脏滴血”重大漏洞,攻击者可以通过这一漏洞,获取应用程序源码、用户的网络访问请求和用户的cookie信息,甚至可以获取到用户的电子邮件、银行卡账号密码等,带来了无法估量的损失。为了保证软件的可靠性和信息的安全性,越来越多的技术关注于检测软件系统的内存安全性。

AFL[2-4]模糊测试器基本思想是将种子测试用例作为被测程序的输入,检测程序的执行过程并按照种子变异策略生成新的测试用例喂给被测程序,最终报告异常行为。其中种子变异策略是模糊测试器的关键核心,测试用例的生成质量,决定了模糊测试器的执行效率。……

登录APP查看全文