Author Login Editor-in-Chief Peer Review Editor Work Office Work

Computer Engineering ›› 2023, Vol. 49 ›› Issue (6): 24-33. doi: 10.19678/j.issn.1000-3428.0064958

• Research Hotspots and Reviews • Previous Articles     Next Articles

Research on Automatic Verification Method of Tcache Poisoning Heap Vulnerability Based on Symbolic Execution

ZHANG Liqun1,2, PAN Zulie1,2, HUANG Hui1,2, WANG Ruipeng1,2, LI Yang1,2   

  1. 1. College of Electronic Countermeasure, National University of Defense Technology, Hefei 230037, China;
    2. Anhui Province Key Laboratory of Cyberspace Security Situation Awareness and Evaluation, Hefei 230037, China
  • Received:2022-06-10 Revised:2022-08-31 Published:2023-06-10

基于符号执行的Tcache Poisoning堆漏洞自动验证方法研究

张利群1,2, 潘祖烈1,2, 黄晖1,2, 王瑞鹏1,2, 李阳1,2   

  1. 1. 国防科技大学 电子对抗学院, 合肥 230037;
    2. 网络空间安全态势感知与评估安徽省重点实验室, 合肥 230037
  • 作者简介:张利群(1998-),男,硕士研究生,主研方向为二进制漏洞挖掘与分析;潘祖烈,教授、博士;黄晖,讲师、博士;王瑞鹏,博士研究生;李阳,讲师。
  • 基金资助:
    国家重点研发计划(2021YFB3100500)。

Abstract: Tcache Poisoning is a kind of heap poisoning exploitation method for heap management.The existing automatic exploitation methods do not consider the impact of this new mechanism and can not be applied for exploiting heap vulnerabilities under higher versions of Glibc.To overcome these drawbacks,an in-depth analysis on Tcache mechanism and its verification method are presented and an automatic Tcache Poisoning exploitation method is proposed based on symbolic execution.This method defines multiple groups to formally describe the state of the heap chunk. By hooking up the key API,the state information of the heap chunk is collected during program operation,and symbolic variables are introduced to symbolize the external input data in order to acquire key information.This method detects the triggering of heap vulnerabilities through state monitoring and gradually generates Tcache Poisoning attack constraints and attack payload constraints according to the Tcache Poisoning heap vulnerability automatic exploit model. Finally,the vulnerability exploit code is generated through constraint solution.Based on the S2E symbolic execution platform,the automatic exploitation system TPAEG is implemented and 10 test programs are tested. TPAEG generates verification code for five of the seven test programs using the Tcache Poisoning method. The experimental results show that TPAEG can effectively detect heap overflow vulnerabilities and use-after-free vulnerabilities,and it can automatically perform exploitation according to different scenarios of Tcache Poisoning attacks,complete control flow hijacking,and generate exploit code.

Key words: heap vulnerability, Tcache Poisoning method, symbolic execution, vulnerability automatic verification, constraint construction

摘要: Tcache Poisoning是面向堆管理机制的一种堆漏洞利用方法,现有的堆漏洞自动验证工作未考虑Tcache带来的影响,无法适用于高版本Glibc堆漏洞自动验证。分析Tcache机制以及Tcache Poisoning验证方法的原理,提出一种基于符号执行的Tcache Poisoning堆漏洞自动验证方法。定义多元组对堆块的状态进行形式化描述,通过对关键API函数的挂钩,在程序运行过程中收集堆块的状态信息,并引入符号变元将外部输入数据符号化,实现关键信息的获取。通过状态监控检测堆漏洞触发,依据Tcache Poisoning堆漏洞自动验证模型,逐步生成Tcache Poisoning攻击约束和攻击载荷约束,最后通过约束求解生成漏洞验证代码。基于S2E符号执行平台实现自动验证系统TPAEG,并对10个测试程序进行测试,其中在Tcache Poisoning方法的7个测试程序中有5个生成了验证代码。实验结果表明,TPAEG可有效地检测堆溢出漏洞和释放后重用漏洞,并能够针对符合Tcache Poisoning攻击特征的场景实现自动验证,完成控制流的劫持并生成验证代码。

关键词: 堆漏洞, Tcache Poisoning方法, 符号执行, 漏洞自动验证, 约束构建

CLC Number: