信息网络安全 ›› 2025, Vol. 25 ›› Issue (3): 403-414.doi: 10.3969/j.issn.1671-1122.2025.03.004

• 理论研究 • 上一篇    下一篇

基于LLM的多媒体原生库模糊测试研究

解梦飞1,2, 傅建明1,2(), 姚人懿1,2   

  1. 1.武汉大学国家网络安全学院,武汉 430072
    2.空天信息安全与可信计算教育部重点实验室,武汉 430072
  • 收稿日期:2024-10-16 出版日期:2025-03-10 发布日期:2025-03-26
  • 通讯作者: 傅建明 E-mail:jmfu@whu.edu.cn
  • 作者简介:解梦飞(1996—),男,山东,博士研究生,CCF会员,主要研究方向为软件安全|傅建明(1969—),男,湖南,教授,博士,CCF会员,主要研究方向为系统与软件安全、AI安全|姚人懿(2002—),男,湖南,硕士研究生,主要研究方向为软件安全
  • 基金资助:
    国家自然科学基金(62272351)

Research on LLM-Based Fuzzing of Native Multimedia Libraries

XIE Mengfei1,2, FU Jianming1,2(), YAO Renyi1,2   

  1. 1. School of Cyber Science and Engineering, Wuhan University, Wuhan 430072, China
    2. Key Laboratory of Aerospace Information Security and Trusted Computing of Ministry of Education, Wuhan 430072, China
  • Received:2024-10-16 Online:2025-03-10 Published:2025-03-26
  • Contact: FU Jianming E-mail:jmfu@whu.edu.cn

摘要:

多媒体原生库通过C/C++语言直接操作底层系统资源,在显著提升音视频数据处理效率的同时,也引入了持久的内存安全威胁。然而,现有的原生库模糊测试研究不仅缺乏对多媒体库的针对性,还难以实现对闭源二进制程序的运行时监控机制。文章提出一种基于LLM的多媒体原生库模糊测试方案MediaFuzzer,通过自启发式的LLM问询方案,MediaFuzzer能够准确提取蕴含在函数签名中的功能语义信息,并进一步筛选出潜在的多媒体原生库函数作为执行入口。随后,MediaFuzzer设计并实现了基于模拟执行的模糊测试框架,能够在系统依赖、内存管控和代码执行3个层次构建完整的运行时监控机制,从而实现覆盖率导向的输入变异以及主动捕获内存异常行为。实验结果表明,MediaFuzzer从500个移动应用中识别出7类共1557个多媒体函数,成功挖掘到WhatsApp中的1个已公开漏洞以及包括微信在内的3个零日漏洞。

关键词: 多媒体原生库, 模糊测试, 内存安全, 大语言模型

Abstract:

Multimedia native libraries written in C/C++ can efficiently process audio and video streams by directly accessing underlying system resources, while posing persistent memory threats. However, existing native library fuzzing research lacks specificity for multimedia libraries and faces difficulties in implementing runtime monitoring of closed-source binary programs. The article proposed MediaFuzzer, a fuzzing scheme of native multimedia libraries based on LLM. Through a self-heuristic LLM querying approach, MediaFuzzer could accurately extracted functional semantic information contained in function signatures and subsequently identified potential multimedia native library functions as execution entry points. Furthermore, MediaFuzzer designed and implemented an emulation-based fuzzing framework that built comprehensive runtime monitoring mechanisms at three different levels, including system dependencies, memory management, and code execution, enabling coverage-guided mutation and active memory anomaly detection during the fuzzing process. Experimental evaluation shows that MediaFuzzer identify 1557 multimedia functions across 7 categories from 500 mobile applications, successfully discovering one disclosed vulnerability in WhatsApp and three zero-day vulnerabilities, including one in WeChat.

Key words: native multimedia libraries, fuzzing, memory safety, large language model

中图分类号: