信息网络安全 ›› 2025, Vol. 25 ›› Issue (7): 1053-1062.doi: 10.3969/j.issn.1671-1122.2025.07.005

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

基于库函数动态替换的物联网设备固件仿真方案

张光华1,2,3, 常继友2,3, 陈放2,3, 毛伯敏4, 王鹤1, 张建燕2,3()   

  1. 1.西安电子科技大学网络与信息安全学院,西安 710071
    2.河北科技大学信息科学与工程学院,石家庄 050018
    3.河北省智能物联网技术创新中心,石家庄 050018
    4.西北工业大学太仓长三角研究院,太仓 215400
  • 收稿日期:2024-06-03 出版日期:2025-07-10 发布日期:2025-08-07
  • 通讯作者: 张建燕 E-mail:1179602456@qq.com
  • 作者简介:张光华(1979—),男,河北,教授,博士,CCF会员,主要研究方向为网络与信息安全|常继友(1999—),男,河南,硕士研究生,主要研究方向为物联网安全、嵌入式设备仿真|陈放(2000—),男,河北,硕士研究生,主要研究方向为物联网安全、漏洞检测|毛伯敏(1989—),男,湖北,教授,博士,主要研究方向为空天地一体化网络、卫星物联网、车联网和边缘计算|王鹤(1987—),女,河南,讲师,博士,主要研究方向为应用密码和量子密码协议|张建燕(1982—),女,河北,助理研究员,硕士,主要研究方向为数字通信
  • 基金资助:
    国家自然科学基金(62072239);国家自然科学基金(62372236);苏州姑苏创新创业领军人才计划-青年创新领军人才项目(ZXL2022458)

Firmware Simulation Scheme of IoT Devices Based on Dynamic Substitution of Library Functions

ZHANG Guanghua1,2,3, CHANG Jiyou2,3, CHEN Fang2,3, MAO Bomin4, WANG He1, ZHANG Jianyan2,3()   

  1. 1. School of Cyber Engineering, Xidian University, Xi’an 710071, China
    2. School of Information Science and Engineering, Hebei University of Science and Technology, Shijiazhuang 050018, China
    3. Hebei Intelligent Internet of Things Technology Innovation Center, Shijiazhuang 050018, China
    4. Yangtze River Delta Research Institute of Northwestern Polytechnical University, Taicang 215400, China
  • Received:2024-06-03 Online:2025-07-10 Published:2025-08-07
  • Contact: ZHANG Jianyan E-mail:1179602456@qq.com

摘要:

物联网设备资源有限,导致传统的漏洞检测技术难以有效应用。固件仿真技术为解决这一问题提供了可能,但现有方案存在硬件依赖性强、运行成本高和可移植性差等问题。针对这些问题,文章提出一种基于库函数动态替换的物联网设备固件仿真方案。首先,设计了基于人机协同的固件仿真方法,通过固件分析和固件托管构建仿真环境,并在固件文件获取过程中引入专家经验。然后,提出一种基于符号执行的库函数替换技术,通过提取上一阶段的关键信息,利用符号执行技术进行分析并指导库函数生成,最终通过将库函数编译为动态链接库完成库函数替换。实验结果表明,相较于FIRMADYNE,文章所提方案的仿真速度平均提升了80.50%,优化后的符号执行运行速度约为优化前的两倍。同时,通过漏洞复现和漏洞挖掘技术进行验证,实验结果表明,该方案的仿真保真度能够满足漏洞检测和漏洞挖掘的需求。

关键词: 物联网, 固件仿真, 库函数替换, 交叉编译, 漏洞挖掘

Abstract:

The limited resources of IoT devices make it difficult for traditional vulnerability detection technologies to be effectively applied to these devices. Firmware simulation technology provides a way to solve this problem, but the existing firmware simulation solutions have problems such as strong hardware dependence, high operating costs, and poor portability. In view of the shortcomings of existing simulation solutions, this paper proposed a firmware simulation scheme of IoT devices based on dynamic substitution of library functions. Firstly, a firmware simulation method based on human-computer collaboration was designed. The simulation environment was built through firmware analysis and firmware hosting, and expert experience in the process of firmware file acquisition was introduced. Then, a library function replacement technology based on symbolic execution was designed to extract key information from the previous stage, symbolic execution was used to analyze and guide library function generation, and finally compiled the library function into a dynamic link library to complete the library function replacement. The experimental results show that the simulation speed of the proposed scheme in the article has increased by an average of 80.50% compared to FIRMADYNE, and the optimized symbol execution speed has increased by more than 100% compared to before optimization. At the same time, through vulnerability replication and vulnerability mining verification, the simulation fidelity of this scheme can meet the requirements of vulnerability detection and mining.

Key words: Internet of things, firmware simulation, library function replacement, cross-compilation, vulnerability mining

中图分类号: