电子学报 ›› 2017, Vol. 45 ›› Issue (6): 1475-1482.DOI: 10.3969/j.issn.0372-2112.2017.06.028

• 学术论文 • 上一篇    下一篇

一种基于匹配字符串地址判定ARM固件装载基址的方法

朱瑞瑾1, 张宝峰1, 毛军捷1, 骆扬1, 谭毓安2,3, 张全新2,3   

  1. 1. 中国信息安全测评中心, 北京 100085;
    2. 北京理工大学计算机学院, 北京 100081;
    3. 北京市海量语言信息处理与云计算应用工程技术研究中心, 北京 100081
  • 收稿日期:2015-11-05 修回日期:2016-11-28 出版日期:2017-06-25
    • 通讯作者:
    • 张全新
    • 作者简介:
    • 朱瑞瑾 男,1985年生,山东菏泽人.中国信息安全测评中心助理研究员,研究方向为软件安全、嵌入式系统安全、固件安全、逆向工程.E-mail:ruijinzhu@gmail.com;张宝峰 男,1983年生,山东日照人.中国信息安全测评中心副研究员,研究方向为网络安全、嵌入式设备安全;毛军捷 男,1984年生,北京人,中国信息安全测评中心副研究员,研究方向为可信计算、固件安全;骆扬 男,1984年生,河北石家庄人,中国信息安全测评中心做博士后,研究方向为硬件木马、硬件蠕虫、智能芯片安全性;谭毓安 男,1972年生,重庆巫溪人,北京理工大学计算机学院教授,北京理工大学计算机实验教学中心主任,中国计算机学会高性能计算专委会委员,信息存储技术专委会委员.研究方向为信息安全、网络存储、嵌入式系统
    • 基金资助:
    • 国家自然科学基金 (No.61370063); 国家重点研发计划网络空间安全重点专项

Determining Image Base of ARM Firmware Based on Matching String Addresses

ZHU Rui-jin1, ZHANG Bao-feng1, MAO Jun-jie1, LUO Yang1, TAN Yu-an2,3, ZHANG Quan-xin2,3   

  1. 1. China Information Technology Security Evaluation Center, Beijing 100085, China;
    2. School of Computer Science and Technology, Beijing Institute of Technology, Beijing 100081, China;
    3. Beijing Engineering Research Center of Massive Language Information Processing and Cloud Computing Application, Beijing 100081, China
  • Received:2015-11-05 Revised:2016-11-28 Online:2017-06-25 Published:2017-06-25
    • Supported by:
    • National Natural Science Foundation of China (No.61370063); National Key Research and Development Program of China in Cyber Security

摘要:

固件是嵌入式系统的灵魂,当对固件进行安全检测或者深入理解固件中的运行机制时,对固件进行反汇编是一个必经的步骤.对固件反汇编时,首先要确定固件的装载基址及其运行环境的处理器类型.通常我们可以通过拆解硬件设备或者查阅产品手册获得处理器类型,但目前尚没有自动化工具可获知固件的装载基址.鉴于目前大部分嵌入式系统中的处理器为ARM类型,本文以ARM固件为研究目标,提出了一种自动化方法来判定固件的装载基址.首先通过研究固件中字符串的存储规律及其加载方式,提出了两个算法可分别求出固件中字符串偏移量和LDR指令加载的字符串地址.然后利用这些字符串信息,提出了DBMAS(Determining image Base by Matching Addresses of Strings)算法来判定固件的装载基址.实验证明本文提出的方法可以成功判定使用LDR指令加载字符串地址的固件装载基址.

关键词: 装载基址, 固件, ARM, 反汇编

Abstract:

Firmware is the soul of an embedded system,and disassembly is a necessary step to understand the operational mechanism or detect the vulnerabilities of the firmware.When disassembling a firmware,it should first determine the processor type of running environment and the image base of firmware.In general,the processor type can be got by tearing down the device or consulting the product manual.However,at present there is still no automated tool that can be used to obtain the image base of firmware.Since the processors of majority embedded systems are ARM architecture,in this paper we focus on the firmwares in ARM and propose an automated method to determine the base address.Firstly,by studying the storage rule and loading mode of the string we present two algorithms to calculate the string offset and the string address loaded by LDR instruction.Then with these information,we proposed a DBMAS (Determining image Base by Matching Addresses of Strings) algorithm to determine the image base.Experimental results indicate the proposed method can successfully determine the image base of firmware that uses the LDR instruction to load string address.

Key words: image base, firmware, ARM, disassemble

中图分类号: