信息网络安全 ›› 2021, Vol. 21 ›› Issue (4): 89-95.doi: 10.3969/j.issn.1671-1122.2021.04.010

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

轻量级嵌入式软件动态二进制插桩算法

梁晓兵1, 孔令达1(), 刘岩1, 叶莘2   

  1. 1.中国电力科学研究院有限公司计量研究所,北京 100085
    2.国网浙江省电力有限公司营销服务中心,杭州 310007
  • 收稿日期:2020-12-03 出版日期:2021-04-10 发布日期:2021-05-14
  • 通讯作者: 孔令达 E-mail:cy1818cy@163.com
  • 作者简介:梁晓兵(1978—),男,河南,高级工程师,博士,主要研究方向为信息安全|孔令达(1990—),男,黑龙江,工程师,硕士,主要研究方向为电表质量分析、软件安全|刘岩(1982—),女,山东,高级工程师,硕士,主要研究方向为智能量测|叶莘(1991—),男,浙江,工程师,硕士,主要研究方向为嵌入式安全
  • 基金资助:
    国家电网有限公司总部科技项目(5600-201955458A-0-0-00)

Lightweight Dynamic Binary Instrumentation Algorithm for Embedded Software

LIANG Xiaobing1, KONG Lingda1(), LIU Yan1, YE Xin2   

  1. 1. Institute of Metrology, China Electric Power Research Institute Co., Ltd., Beijing 100085, China
    2. Marketing Service Center, State Grid Zhejiang Electric Power Co., Ltd., Hangzhou, 310007, China
  • Received:2020-12-03 Online:2021-04-10 Published:2021-05-14
  • Contact: KONG Lingda E-mail:cy1818cy@163.com

摘要:

软件二进制插桩是软件性能分析、漏洞挖掘、质量评价领域的关键技术。在嵌入式环境下,传统动态插桩算法受到无操作系统、CPU架构复杂、内存资源紧张等局限,难以展开工作。文章以软件动态二进制插桩算法为研究目的,通过静态特征分析和动态跟踪算法,引入图论算法对固件中的二进制进行分析,提出了嵌入式设备远程调试协议,实现了对软件运行时信息的获取。与传统方案相比,文章所想方案解决了现有工具对源码、操作系统或CPU架构的依赖,同时显著降低了内存和运算资源的占用率,可以有效解决嵌入式设备的动态插桩问题。

关键词: 软件插桩, 二进制插桩, 软件调试, 控制流分析

Abstract:

Binary instrumentation is a key technology in the fields of software performance analysis, vulnerability mining, and quality evaluation. When working on the embedded environment, traditional dynamic instrumentation algorithms are facing limitations like lacking operating system, complex CPU architecture, and tight memory resources. Those limitations make binary instrumentation on embedding software extremely difficult. Therefore, this paper studies the lightweight binary dynamic instrumentation technology, and realizes the acquisition of software runtime information through static feature analysis and dynamic tracking algorithms. Graph-based algorithms and embedded-oriented remote debugging protocol are introduced as well. Compared with the traditional solution, the solution in this article solves the dependence on source code, operating system or CPU architecture, while significantly reducing the occupancy rate of memory and computing resources. Therefore dynamic binary instrumentation work can be effectively solved.

Key words: software instrumentation, binary instrumentation, software debugging, binary analysis

中图分类号: