信息网络安全 ›› 2020, Vol. 20 ›› Issue (5): 39-46.doi: 10.3969/j.issn.1671-1122.2020.06.000

• 技术研究 • 上一篇    下一篇

面向漏洞挖掘的基于符号分治区的测试用例生成技术

李明磊, 黄晖*(), 陆余良   

  1. 国防科技大学电子对抗学院,合肥 230009
  • 收稿日期:2020-04-22 出版日期:2020-05-10 发布日期:2020-06-05
  • 通讯作者: 黄晖 E-mail:hhui_123@163.com
  • 作者简介:李明磊(1996—),男,江苏,硕士研究生,主要研究方向为网络安全、漏洞挖掘与利用|黄晖(1987—),男,江苏,讲师,博士,主要研究方向为二进制软件分析;|陆余良(1964—),男,江苏,教授,硕士,主要研究方向为网络空间安全、漏洞挖掘与利用、网络态势感知
  • 基金资助:
    国家重点研发计划(2017YFB0802900)

Test Case Generation Technology Based on Symbol Divide and Conquer Area for Vulnerability Mining

LI Minglei, HUANG Hui*(), LU Yuliang   

  1. College of Electronic Engineering, National University of Defense Technology, Hefei 230009, China
  • Received:2020-04-22 Online:2020-05-10 Published:2020-06-05
  • Contact: Hui HUANG E-mail:hhui_123@163.com

摘要:

在漏洞挖掘中,符号执行技术是一种常用的测试用例生成技术。但当软件中包含加解密、校验和检验等复杂数学运算函数时,使用符号执行技术生成测试用例存在无法有效求解约束表达式的问题,导致漏洞挖掘效率低下。针对该问题,文章结合分治算法的思想提出基于符号分治区的测试用例生成技术。首先通过静态分析技术识别软件中的加解密、校验和检验等函数;然后以程序中的加解密、校验和检验函数为分界点对软件进行分区,符号执行引擎每执行到软件的一个分治区,就在本区引入一个新的符号变元进行约束构建,在约束求解时从软件最后一个分治区开始递归求解。基于该方法,文章在符号执行平台S2E上实现了漏洞挖掘原型系统Divide,并与现有的符号执行生成测试用例技术进行对比实验。实验结果表明,文章方法能够快速、有效地生成测试用例,提高漏洞挖掘的效率。

关键词: 符号执行, 约束求解, 测试用例生成, 静态分析, 漏洞挖掘

Abstract:

In vulnerability mining, symbol execution technology is a common test case generation technology. However, when the software contains complex mathematical operation functions such as encryption and decryption, checksum verification, using symbol execution technology to generate test cases cannot effectively solve constraint expressions, which results in low efficiency in vulnerability mining. In order to solve this problem, combining the idea of divide and conquer algorithm, this paper proposes a test case generation technique based on symbol divide and conquer area. Firstly, the functions of encryption and decryption, checksum verification in software are identified through static analysis technology. Then using the functions of encryption and decryption, checksum verification in the program as the partition point to partition the software. Every time the symbol execution engine executes to a divide and conquer area of software, a new symbol variable is introduced into this area for constraint construction. When solving constraints, the software will start to solve recursively from the last divide and conquer area of software. Based on this method, this paper implements a vulnerability mining prototype system Divide on the symbolic execution platform S2E, and compares with the existing symbol execution generation test case technologies. The experimental results show that this method can generate test cases quickly and effectively, and improve the efficiency of vulnerability mining.

Key words: symbol execution, constraint solving, test case generation, static analysis, vulnerability mining

中图分类号: