作者投稿和查稿 主编审稿 专家审稿 编委审稿 远程编辑

计算机工程 ›› 2025, Vol. 51 ›› Issue (4): 178-187. doi: 10.19678/j.issn.1000-3428.0068783

• 网络空间安全 • 上一篇    下一篇

面向内核漏洞利用的堆喷对象控制代码自动化生成技术

刘壮*(), 顾康正, 谈心, 张源   

  1. 复旦大学计算机科学技术学院, 上海 200438
  • 收稿日期:2023-11-07 出版日期:2025-04-15 发布日期:2024-04-09
  • 通讯作者: 刘壮
  • 基金资助:
    国家自然科学基金(62172105); 上海市青年科技启明星计划(21QA1400700); 上海市基础研究特区计划(21TQ1400100:21TQ012)

Automatic Generation of Code for Heap Spraying Object Manipulation Targeting Kernel Vulnerability Exploitation

LIU Zhuang*(), GU Kangzheng, TAN Xin, ZHANG Yuan   

  1. School of Computer Science, Fudan University, Shanghai 200438, China
  • Received:2023-11-07 Online:2025-04-15 Published:2024-04-09
  • Contact: LIU Zhuang

摘要:

开发漏洞利用程序是评估内核漏洞可利用性的主要方式。堆喷对象在漏洞利用过程中被广泛使用, 以完成数据注入、内存布局等恶意行为。现有堆喷对象的研究忽略了基本类型的堆喷对象, 无法生成能够编辑堆喷对象内容的代码。为此, 提出面向内核漏洞利用的堆喷对象控制代码自动化生成技术。该技术包含了基于使用-定义链分析的堆喷对象识别和基于导向式模糊测试的堆喷对象控制代码生成。通过使用-定义链分析静态识别出目标内核中的堆喷对象及能够操控这些对象的关键代码位置; 将识别到的关键代码作为目标点, 利用导向式模糊测试技术动态生成目标堆喷对象的控制代码, 以辅助漏洞利用。实验结果表明, 该技术能够在Linux 5.15版本的内核中识别并生成28个堆喷对象的控制代码, 覆盖了现有研究识别到的所有堆喷对象。生成的控制代码中共有23个能控制堆喷对象完成预期目标, 成功率为82.1%。案例分析表明, 该技术生成的控制代码应用于真实内核漏洞的利用程序开发中。

关键词: 内核安全, 内核漏洞, 漏洞利用, 堆喷对象, 控制代码生成

Abstract:

Developing exploits for vulnerabilities is the primary method of evaluating the exploitability of kernel vulnerabilities. Heap spraying objects are widely used in the exploitation process to execute malicious behaviors, such as malicious content injection and memory layout manipulation. Currently, the basic types of heap spraying objects have received limited attention, and code that can edit the content of heap spraying objects has not been generated. Therefore, this paper proposes the automated technplogy for heap spraying objects manipulationg code for kernel vulnerabilities exploitation. This technology includes heap spraying object recognition based on usage-definition chain analysis and heap spraying object control code generation based on guided fuzzy testing. Usage-definition chain analysis is used to statically identify heap spraying objects within the target kernel and the key code positions that can manipulate these objects. Using the identified key codes as target points, guided fuzzy testing technology is applied to dynamically generate control codes for the target heap spraying object to assist in vulnerability exploitation. Experimental results show that the techniques can identify and generate the control code of 28 heap spraying objects in Linux 5.15, which covers all heap spraying objects identified in existing works. 23 generated codes can control the heap spraying object to achieve the expected target with a success rate of 82.1%. The case analysis shows that the manipulating code generated by these techniques can be used to exploit real-world kernel vulnerabilities.

Key words: kernel security, kernel vulnerability, vulnerability exploitation, heap spraying object, manipulating code generation