[go: up one dir, main page]

CN110263545A - An Android system-based startup process integrity measurement method - Google Patents

An Android system-based startup process integrity measurement method Download PDF

Info

Publication number
CN110263545A
CN110263545A CN201910428686.7A CN201910428686A CN110263545A CN 110263545 A CN110263545 A CN 110263545A CN 201910428686 A CN201910428686 A CN 201910428686A CN 110263545 A CN110263545 A CN 110263545A
Authority
CN
China
Prior art keywords
img
measurement
value
root
kernel
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201910428686.7A
Other languages
Chinese (zh)
Other versions
CN110263545B (en
Inventor
黑新宏
高文
王一川
王昌舒
朱赫
白彬彬
张丽
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xian University of Technology
Original Assignee
Xian University of Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Xian University of Technology filed Critical Xian University of Technology
Priority to CN201910428686.7A priority Critical patent/CN110263545B/en
Publication of CN110263545A publication Critical patent/CN110263545A/en
Application granted granted Critical
Publication of CN110263545B publication Critical patent/CN110263545B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/50Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
    • G06F21/57Certifying or maintaining trusted computer platforms, e.g. secure boots or power-downs, version controls, system software checks, secure updates or assessing vulnerabilities
    • G06F21/575Secure boot

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Storage Device Security (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The start-up course integrity measurement detection method based on android system that the invention discloses a kind of, since power-up, credible measurement root CRTM guides Bootloader and verifies its integrality, using secure hash algorithm SHA-1 to Bootloader operation, obtained actual metrics value is compared with the RIM value in RIM certificate, it, will be in result deposit platform configuration register storage trusted root if comparing result is consistent;Then CRTM transfers control to Bootloader;In Bootloader measurement Kernel-Process, the comprehensive measurement value TValue for kernel is obtained using trust metrics model, is finally reached the credible of entire android system.The present invention solves the problems, such as in trust computing existing in the prior art that integrity measurement framework is excessively complicated, is difficult to extend and credible without embodiment behavior.

Description

一种基于Android系统的启动过程完整性度量检测方法An Android system-based startup process integrity measurement method

技术领域technical field

本发明属于移动智能终端技术领域,具体涉及一种基于Android系统的启动过程完整性度量检测方法。The invention belongs to the technical field of mobile intelligent terminals, and in particular relates to an Android system-based startup process integrity measurement method.

背景技术Background technique

Android系统是目前应用最广泛的移动操作系统。Android系统最大的特点是具有较强的开放性,各个厂家都可以根据自己需求来定制系统;第三方应用的安装比较便捷,没有太多限制,这一点也是促使安卓系统持续发展的核心因素。而Android移动智能终端在为用户提供便利的同时,也造成了严重的安全隐患,比如:终端存储的个人信息、密码等已经成为攻击者的主要目标,短信内容、联系人列表、通话记录等信息容易被窃取。Android应用程序是以消息驱动起来的,驱动起来的应用程序离不开触摸机制的配合,由此可见触摸机制在Android系统中占有举足轻重的地位。从2010年发现首个Android木马程序以来,Android下的恶意软件数量急速增长,给用户的数据安全带来难以预测的风险。伴随着Android系统恶意代码的增多,触摸机制就成为攻击者选择的对象。触摸机制是操作所有客户端应用程序的前提,因此,检测触摸机制核心代码的完整性,可以有效的防止触摸机制植入恶意代码,保证用户数据的安全性。Android系统中的恶意代码往往不会让用户轻易发现,通常将恶意代码植入系统层,比运行在应用层的恶意软件更具有隐蔽性。更有严重的会对手机的硬件设备进行调用,进行偷拍、录音录像等等。因此,对于提高Android系统的安全性、防止隐私信息泄露给用户带来重要的意义。Android system is currently the most widely used mobile operating system. The biggest feature of the Android system is its strong openness, and each manufacturer can customize the system according to their own needs; the installation of third-party applications is relatively convenient and there are not too many restrictions, which is also the core factor that promotes the continuous development of the Android system. While Android mobile smart terminals provide users with convenience, they also cause serious security risks. For example, personal information and passwords stored in the terminal have become the main targets of attackers, and information such as text message content, contact list, call records, etc. easy to steal. Android applications are driven by messages, and the driven applications are inseparable from the cooperation of the touch mechanism. It can be seen that the touch mechanism plays an important role in the Android system. Since the first Android Trojan was discovered in 2010, the amount of malware under Android has grown rapidly, bringing unpredictable risks to users' data security. With the increase of malicious code in the Android system, the touch mechanism has become the object of choice for attackers. The touch mechanism is the premise of operating all client applications. Therefore, detecting the integrity of the core code of the touch mechanism can effectively prevent malicious code from being implanted in the touch mechanism and ensure the security of user data. The malicious code in the Android system is often not easily discovered by users. Usually, the malicious code is implanted into the system layer, which is more subtle than the malware running at the application layer. More serious calls will be made to the hardware devices of the mobile phone, secret photography, audio recording and so on. Therefore, it is of great significance to improve the security of the Android system and prevent the leakage of private information to users.

可信计算(Trusted Computing)是在计算和通信系统中广泛使用基于硬件安全模块支持下的可信计算平台,以提高系统整体的安全性。可信计算的概念最早出现在美国的彩虹系列信息系统安全的相关文件中,世界领先的IT巨头企业IBM、惠普、英特尔以及微软联合发起并建立了可信计算平台联盟(Trusted Computing Platform Alliance,简称为TCPA),可信计算平台联盟的成立也标志着可信计算技术的基础研究和产业化进入一个全新的发展阶段。在2003年,可信计算平台联盟改名并重组成为可信计算组织(TrustedComputing Group,简称为TCG),可信计算组织的出现同时也推动了可信计算技术研究和应用想着更高层次发展。可信计算平台联盟和可信计算组织自成立以来已经研究并确定了多种关于可信计算平台、可信存储以及可信网络连接等关于可信计算技术规范。Trusted Computing is a trusted computing platform that is widely used in computing and communication systems based on the support of hardware security modules to improve the overall security of the system. The concept of trusted computing first appeared in the Rainbow series of information system security related documents in the United States. The world's leading IT giants IBM, Hewlett-Packard, Intel and Microsoft jointly initiated and established the Trusted Computing Platform Alliance (Trusted Computing Platform Alliance for short). For TCPA), the establishment of the Trusted Computing Platform Alliance also marks that the basic research and industrialization of trusted computing technology has entered a new stage of development. In 2003, the Trusted Computing Platform Alliance was renamed and reorganized into the Trusted Computing Group (TCG for short). The Trusted Computing Platform Alliance and the Trusted Computing Organization have researched and determined a variety of trusted computing technical specifications on trusted computing platforms, trusted storage, and trusted network connections since their establishment.

可信计算技术属于一种全新的信息系统安全技术,在Android移动智能终端中应用的原理是把安全芯片架构引入到移动终端的硬件平台上,从而提高安卓终端的安全性和可靠性,这一点正好弥补了Android系统开放特性带来的缺陷。大量应用实例表明,可信移动平台的研发是可信计算技术发展的里程碑,Intel和IBM公司在2004年就提出了可信移动平台的研发,并设立相应协议,大大提高了移动智能终端的安全性。就其结构特性而言,可信移动平台是一种具有密码运算能力和存储功能的系统,通过加密、认证、密钥等体系进一步保证移动智能终端的安全性,可有效解决Android移动智能终端一直面临的安全问题。Trusted computing technology belongs to a brand-new information system security technology. The principle applied in Android mobile intelligent terminals is to introduce the security chip architecture into the hardware platform of mobile terminals, thereby improving the security and reliability of Android terminals. It just makes up for the defects brought by the open nature of the Android system. A large number of application examples show that the research and development of trusted mobile platforms is a milestone in the development of trusted computing technology. Intel and IBM proposed the research and development of trusted mobile platforms in 2004, and established corresponding protocols, which greatly improved the security of mobile smart terminals. sex. In terms of its structural characteristics, the trusted mobile platform is a system with cryptographic computing capabilities and storage functions. It further ensures the security of mobile smart terminals through systems such as encryption, authentication, and keys, which can effectively solve the problem of Android mobile smart terminals. facing security issues.

发明内容SUMMARY OF THE INVENTION

本发明的目的是提供一种基于Android系统的启动过程完整性度量检测方法,解决了现有技术中存在的可信计算中完整性度量架构过于复杂、难以扩展以及没有体现行为可信的问题。The purpose of the present invention is to provide an Android system-based startup process integrity measurement method, which solves the problems in the prior art that the integrity measurement architecture in trusted computing is too complex, difficult to expand, and does not reflect behavior credibility.

本发明所采用的技术方案是,一种基于Android系统的启动过程完整性度量检测方法,包括以下步骤:The technical solution adopted by the present invention is that a method for detecting the integrity of a startup process based on an Android system comprises the following steps:

从加电开始,可信度量根CRTM引导Bootloader并验证其完整性,Bootloader是系统启动前的引导程序;From power-on, the root of trust measurement CRTM boots the Bootloader and verifies its integrity, the Bootloader is the bootloader before the system starts;

采用安全散列算法SHA-1对Bootloader运算得到实际度量值,将得到的实际度量值与RIM证书中的RIM值进行比对,如果对比结果一致,将结果存入平台配置寄存器存储可信根中;Use the secure hash algorithm SHA-1 to calculate the actual metric value from the Bootloader, and compare the obtained actual metric value with the RIM value in the RIM certificate. If the comparison result is consistent, store the result in the platform configuration register to store the root of trust ;

然后CRTM将控制权移交给Bootloader;若比对结果不同,则开机失败,并将检验报告发送给用户。Then the CRTM transfers the control to the Bootloader; if the comparison results are different, the boot fails and the inspection report is sent to the user.

在Bootloader度量内核的过程中,利用信任度量模型得出对于内核的综合度量值TValue,根据可信度阙值Tm,做出相应的信任决策,可信度阙值Tm用来作为信任决策的评判标准,如果系统内核是可信的,则TValue>Tm,则将结果存入平台配置寄存器存储可信根中,随后将控制权交给系统内核,否则系统无法继续启动,并将检验报告发送给用户,按照上述同样的方法,再对Android操作系统以及第三方应用程序进行度量,最终达到整个Android系统的可信。In the process of measuring the kernel by the Bootloader, the trust measurement model is used to obtain the comprehensive measurement value TValue for the kernel, and the corresponding trust decision is made according to the credibility threshold Tm. The credibility threshold Tm is used as the judgment of the trust decision. Standard, if the system kernel is credible, then TValue>Tm, then store the result in the platform configuration register to store the root of trust, and then hand over control to the system kernel, otherwise the system cannot continue to start, and the test report is sent to Users, according to the same method as above, measure the Android operating system and third-party applications, and finally achieve the credibility of the entire Android system.

本发明的特点还在于,The present invention is also characterized in that,

移动可信模块MTM规范了若干可信根,包括度量可信根RTM、存储可信根RTS、报告可信根RTR,其中RTM作为一个软件模块存入只读ROM中,在系统加电后第一个被执行且不可以被修改,用于MTM作为可信度量和验证的起点,存储可信根RTS和报告可信根RTR作为硬件模块包含于MTM之中,用于完整性存储和报告,MTM中还定义了参考完整性度量值RIM和RIM证书,RIM的值是要对实体的度量摘要,是提前写入信任根的安全存储区,是该实体符合期望的基准值,为每次系统完整性验证提供了参考依据,RIM证书是一个经过数字签名的完整性保护结构,里面包含着RIM的值,数字签名以及相关的一些附加信息。The mobile trusted module MTM standardizes several trusted roots, including measuring the trusted root RTM, storing the trusted root RTS, and reporting the trusted root RTR. The RTM is stored in the read-only ROM as a software module, and the first time after the system is powered on. One that is executed and cannot be modified, used by the MTM as a starting point for trust measurement and verification, storing the Root of Trust RTS and reporting the Root of Trust RTR as a hardware module included in the MTM for integrity storage and reporting, The reference integrity metric value RIM and RIM certificate are also defined in the MTM. The value of RIM is the metric summary for the entity, the secure storage area written to the root of trust in advance, and the benchmark value that the entity meets the expectations. Integrity verification provides reference. RIM certificate is a digitally signed integrity protection structure, which contains RIM value, digital signature and some related additional information.

存储可信根RTS由可信平台度量配置寄存器PCR构成,PCR为160比特的存储位置,寄存器个数最少为16个,都存储在移动可信模块之中,它允许存储无限数量的度量值,还保持着度量的顺序,PCR保存着所有当前已经产生的度量值SHA-1的累积哈希值,160位的累积HASH值表示所有被度量过的组件完整性的状态。The storage trusted root RTS consists of the trusted platform metric configuration register PCR. The PCR is a 160-bit storage location, and the number of registers is at least 16, which are all stored in the mobile trusted module. It allows to store an unlimited number of metric values. The order of measurements is also maintained, and the PCR stores the cumulative hash value of all currently generated measurement values SHA-1, and the 160-bit cumulative HASH value represents the integrity status of all measured components.

信任度量模型表示为{V,E},其中V表示节点集合,E表示边集合,节点集合V为有限集合{rt,T},rt表示根目标,即rt表示为{TValue,TCount},TValue表示对各子目标度量完成后得到的综合度量值,TCount表示子目标的个数,TCount取值为{0…m},当TCount=0,即为需要度量的最小目标,不可再分,目标集合T={t1,t2,…tn},t={Name,Type,TValue,TCount},Name表示目标的名称,Type表示目标类型,边集合E为组合关系,边集合E代表权重值,权值的取值范围[0,1],且满足归一条件。The trust measurement model is expressed as {V, E}, where V represents the node set, E represents the edge set, the node set V is a finite set {rt, T}, rt represents the root target, that is, rt is represented as {TValue, TCount}, TValue Indicates the comprehensive measurement value obtained after the measurement of each sub-goal is completed, TCount indicates the number of sub-goals, and TCount is {0...m}. When TCount=0, it is the minimum target that needs to be measured. Set T={t1,t2,...tn},t={Name,Type,TValue,TCount}, Name represents the name of the target, Type represents the target type, the edge set E is the combination relationship, the edge set E represents the weight value, the weight The value ranges from [0, 1] and satisfies the normalization condition.

步骤1中度量具体如下:The measurements in step 1 are as follows:

在Bootloader运行的过程中,Bootloader将系统内核映像ZImage和根文件系统映像Ramdisk.img从flash读到ARM中,当前控制权在Bootloader,对内核进行度量:将需要度量的系统内核设置为根目标rt,Android源码编译完成后产生ZImage、System.img、Ramdisk.img、Userdata.img、Recovery.img镜像,上述镜像包含Android启动与运行所需的文件与相关库,因而,对系统内核进行度量,即是对产生的所有镜像进行度量,在度量系统内核的过程中,将System.img、Ramdisk.img、ZImage、Recovery.img、Userdata.img镜像作为根目标的子目标;During the running process of the Bootloader, the Bootloader reads the system kernel image ZImage and the root file system image Ramdisk.img from the flash to the ARM, the current control is in the Bootloader, and measures the kernel: set the system kernel to be measured as the root target rt , After the Android source code is compiled, ZImage, System.img, Ramdisk.img, Userdata.img, Recovery.img images are generated. The above images contain the files and related libraries required for Android to start and run. Therefore, the system kernel is measured, that is It is to measure all the generated images. In the process of measuring the system kernel, the images of System.img, Ramdisk.img, ZImage, Recovery.img and Userdata.img are used as sub-targets of the root target;

不同镜像的重要程度以及受到入侵的可能性各不相同,因而对不同镜像应赋予不同的权值,ZImage是内核映像,System.img为系统镜像,用于存储Android系统的重要文件,包括包和库文件,内存磁盘文件Ramdisk.img存储Linux内核启动时所要装载的文件,Recovery.img镜像只用于刷机,Bootloader根据用户选择进入相应模式,不同模式均包含ZImage和Ramdisk.img文件,Userdata.img是用户数据镜像,存储和用户相关的数据,确定Android设备内存的大小;The importance of different images and the possibility of being invaded are different, so different weights should be given to different images. ZImage is the kernel image, and System.img is the system image, which is used to store important files of the Android system, including packages and files. The library file, the memory disk file Ramdisk.img stores the files to be loaded when the Linux kernel is started. The Recovery.img image is only used for flashing the machine. Bootloader enters the corresponding mode according to the user's choice. Different modes include ZImage and Ramdisk.img files, Userdata.img It is a user data mirror, which stores user-related data and determines the size of the Android device memory;

根据上述各镜像重要程度以及面临风险的程度,设ZImage分配的权值为w1,设System.img分配的权值为w2,设Ramdisk.img分配的权值为w3,设Recovery.img分配的权值为w4,设Userdata.img分配的权值为w5,则对应权值的关系应为:According to the importance of the above-mentioned images and the degree of risk, let the weight allocated by ZImage be w1, the weight allocated by System.img to be w2, the weight allocated by Ramdisk.img to be w3, and the weight allocated by Recovery.img The value is w4, and if the weight assigned by Userdata.img is w5, the relationship between the corresponding weights should be:

w1+w2+w3+w4+w5=1;w1+w2+w3+w4+w5=1;

w1>w2>w3>w4>w5;w1>w2>w3>w4>w5;

所述内核镜像ZImage包含的子文件均为系统核心文件,因而在度量时将ZImage镜像整体度量;The sub-files contained in the described kernel image ZImage are all system core files, so the overall ZImage image is measured when measuring;

所述System.img镜像包含如下子目录文件:app、bin、etc、fonts、framework、lib、media、priv-app、tts、usr以及vendor,度量时对这些目录的权重分配进行分析:The System.img image contains the following subdirectory files: app, bin, etc, fonts, framework, lib, media, priv-app, tts, usr and vendor, and the weight distribution of these directories is analyzed during measurement:

各目录的权值分配顺序为:The weight distribution order of each directory is:

framework>priv-app>app>xbin=bin=lib>etc>fonts=tts=media=user=vendorframework>priv-app>app>xbin=bin=lib>etc>fonts=tts=media=user=vendor

Ramdisk.img中包含一些很重要的配置文件和内核启动完后加载的第一个进程init,init会分别解析init.rc和init.goldfish.rc配置文件初始化并装载系统库、程序直到开机完成,init进程还负责创建系统中包括Zygote进程在内的几个子进程,Zygote进程是所有JAVA进程的父进程,init动作执行分为四个时间段:early-init、init、early-boot、boot,根据配置文件在开机启动过程中被解析的顺序分配其权重值大小,分配的顺序为:Ramdisk.img contains some very important configuration files and the first process init loaded after the kernel is started. Init will parse the init.rc and init.goldfish.rc configuration files to initialize and load system libraries and programs until the boot is completed. The init process is also responsible for creating several child processes in the system, including the Zygote process. The Zygote process is the parent process of all JAVA processes. The init action execution is divided into four time periods: early-init, init, early-boot, boot, according to The order in which the configuration file is parsed during the startup process is assigned its weight value. The order of assignment is:

init.rc>init.goldfish.rc>ueventd.rc>init.environ.rc>init.usb.rc>init.trace.rcinit.rc>init.goldfish.rc>ueventd.rc>init.environ.rc>init.usb.rc>init.trace.rc

因为Recovery.img由ZImage和Ramdisk.img构成,ZImage部分和正常启动的内核镜像是相同的,因此只需度量其自身的Ramdisk.img镜像即可,度量权重分配和上述一致,对于Userdata.img,只需度量与用户应用程序无关的nativebenchmark文件作为Userdata.img的度量值;Because Recovery.img is composed of ZImage and Ramdisk.img, the ZImage part is the same as the normally booted kernel image, so it only needs to measure its own Ramdisk.img image, and the measurement weight distribution is consistent with the above. For Userdata.img, Just measure the nativebenchmark file unrelated to the user application as the measure of Userdata.img;

分配各个镜像对应的子目录的权重后,对一级子目录进行分别度量,度量结果用ei表示,其中i表示一级子目录的个数,若子目录度量结果与参考性完整度量值相同,则对应子目录的度量结果为1,否则结果为0,将子目录对应的权重表示为ai,其中i表示一级子目录的个数,则综合度量值TValue:After assigning the weights of the subdirectories corresponding to each image, measure the first-level subdirectories separately. The measurement result is represented by e i , where i represents the number of first-level subdirectories. If the subdirectory measurement result is the same as the reference integrity measurement value, Then the measurement result of the corresponding sub-directory is 1, otherwise the result is 0, and the weight corresponding to the sub-directory is expressed as a i , where i represents the number of first-level sub-directories, then the comprehensive measurement value TValue:

TValue=∑ei*ai TValue=∑e i *a i

对于二级目录的情况,采用类似上述描述的办法进行度量。For the case of secondary directories, a method similar to that described above is used for measurement.

本发明的有益效果是,一种基于Android系统的启动过程完整性度量检测方法,将可信度量机制与Android平台相结合,在分析完整性度量机制的基础上,对可信的概念进行扩展,引入信任度量机制,在系统中增加安全芯片作为可信根,采用逐级度量方式构建信任链,进而把这种信任拓展到整个Android终端,确保信息系统安全。在逐级度量的过程中,根据模型计算出度量目标的综合信任度,并将综合信任度与可信度阙值进行比对,若高于可信度阙值,则将控制权交给度量目标,否则系统启动失败,并将检测报告结果告知用户,与TCG的完整性度量模型的二进制度量结果相比,其有着更好的可扩展性与可适用性。The beneficial effect of the present invention is that a method for measuring the integrity of the startup process based on the Android system combines the credibility measurement mechanism with the Android platform, and on the basis of analyzing the integrity measurement mechanism, the concept of credibility is expanded, A trust measurement mechanism is introduced, a security chip is added as a root of trust in the system, and a chain of trust is constructed by a step-by-step measurement method, and then this trust is extended to the entire Android terminal to ensure the security of the information system. In the process of step-by-step measurement, the comprehensive trust degree of the measurement target is calculated according to the model, and the comprehensive trust degree is compared with the reliability threshold value. If it is higher than the reliability threshold value, the control power is given to the measurement target, otherwise the system fails to start, and informs the user of the detection report result. Compared with the binary measurement result of the TCG integrity measurement model, it has better scalability and applicability.

附图说明Description of drawings

图1是本发明一种基于Android系统的启动过程完整性度量检测方法中Android启动过程流程图;Fig. 1 is the Android startup process flow chart in a kind of Android system-based startup process integrity metric detection method of the present invention;

图2是本发明一种基于Android系统的启动过程完整性度量检测方法中基于可信移动模块的信任链传递过程;Fig. 2 is the trust chain transfer process based on trusted mobile module in a kind of Android system-based startup process integrity measurement method of the present invention;

图3是本发明一种基于Android系统的启动过程完整性度量检测方法中提出的改进度量模型。FIG. 3 is an improved metric model proposed in an Android system-based startup process integrity metric detection method of the present invention.

具体实施方式Detailed ways

下面结合具体实施方式对本发明进行详细说明。The present invention will be described in detail below with reference to specific embodiments.

本发明一种基于Android系统的启动过程完整性度量检测方法,将可信度量机制与Android平台相结合,能有效的判断Android代码的完整性和安全性,接下来将做出详细的说明:The present invention is a startup process integrity measurement method based on the Android system, which combines the trusted measurement mechanism with the Android platform, and can effectively judge the integrity and security of the Android code. Next, a detailed description will be made:

目前Android智能终端安全系数比较低,为了采用可信计算技术进行安全加固,还需要在Android智能终端增设MTM(Mobile Trusted Module)可信模块,由于Android系统普遍具有体积小,能耗低等特点,因此在增设MTM可信服务体系可以通过TF卡进行扩展存储处理,可以采用基于TF接口的MTM对Android智能移动终端体系进行可信计算改造,满足安全加固的需求。At present, the security factor of Android smart terminals is relatively low. In order to use trusted computing technology for security reinforcement, it is necessary to add MTM (Mobile Trusted Module) trusted modules to Android smart terminals. Because the Android system generally has the characteristics of small size and low energy consumption, Therefore, when the MTM trusted service system is added, the storage processing can be extended through the TF card, and the MTM based on the TF interface can be used to carry out trusted computing transformation of the Android intelligent mobile terminal system to meet the needs of security reinforcement.

大量实例表明,基于MTM信任链传递技术(如图2所示)是可信计算技术保证Android系统的完整和安全性的主要技术,合理地利用信任链技术,可以将可信计算平台的信任关系从可信度量根扩展到整个Android终端系统之中。移动端信任链是以MTM移动可信模块为核心,起点为核心信任根模块CRTM(core root of trust moudle),CRTM是系统加电之后运行的第一道程序,是一段简单可控的代码模块,认为其完全可信。A large number of examples show that the trust chain transfer technology based on MTM (as shown in Figure 2) is the main technology of trusted computing technology to ensure the integrity and security of the Android system. Reasonable use of the trust chain technology can make the trust relationship of the trusted computing platform. From the root of trust measurement to the entire Android terminal system. The mobile trust chain is based on the MTM mobile trusted module, and the starting point is the core root of trust module CRTM (core root of trust moudle). CRTM is the first program that runs after the system is powered on, and is a simple and controllable code module , that it is completely credible.

本发明一种基于Android系统的启动过程完整性度量检测方法,包括以下步骤:An Android system-based startup process integrity measurement detection method of the present invention includes the following steps:

如图1所示,从加电开始,可信度量根CRTM引导Bootloader并验证其完整性,Bootloader是系统启动前的引导程序;As shown in Figure 1, starting from power-on, the trusted measurement root CRTM boots the Bootloader and verifies its integrity. The Bootloader is the bootloader before the system starts;

采用安全散列算法SHA-1对Bootloader运算得到实际度量值,将得到的实际度量值与RIM证书中的RIM值进行比对,如果对比结果一致,将结果存入平台配置寄存器存储可信根中;Use the secure hash algorithm SHA-1 to calculate the actual metric value from the Bootloader, and compare the obtained actual metric value with the RIM value in the RIM certificate. If the comparison result is consistent, store the result in the platform configuration register to store the root of trust ;

然后CRTM将控制权移交给Bootloader;若比对结果不同,则开机失败,并将检验报告发送给用户。Then the CRTM transfers the control to the Bootloader; if the comparison results are different, the boot fails and the inspection report is sent to the user.

在Bootloader度量内核的过程中,利用信任度量模型得出对于内核的综合度量值TValue,根据可信度阙值Tm,做出相应的信任决策,可信度阙值Tm用来作为信任决策的评判标准,如果系统内核是可信的,则TValue>Tm,则将结果存入平台配置寄存器存储可信根中,随后将控制权交给系统内核,否则系统无法继续启动,并将检验报告发送给用户,按照上述同样的方法,再对Android操作系统以及第三方应用程序进行度量,最终达到整个Android系统的可信。In the process of measuring the kernel by the Bootloader, the trust measurement model is used to obtain the comprehensive measurement value TValue for the kernel, and the corresponding trust decision is made according to the credibility threshold Tm. The credibility threshold Tm is used as the judgment of the trust decision. Standard, if the system kernel is credible, then TValue>Tm, then store the result in the platform configuration register to store the root of trust, and then hand over control to the system kernel, otherwise the system cannot continue to start, and the test report is sent to Users, according to the same method as above, measure the Android operating system and third-party applications, and finally achieve the credibility of the entire Android system.

其中,移动可信模块MTM规范了若干可信根,包括度量可信根RTM、存储可信根RTS、报告可信根RTR,其中RTM作为一个软件模块存入只读ROM中,在系统加电后第一个被执行且不可以被修改,用于MTM作为可信度量和验证的起点,存储可信根RTS和报告可信根RTR作为硬件模块包含于MTM之中,用于完整性存储和报告,MTM中还定义了参考完整性度量值RIM和RIM证书,RIM的值是要对实体的度量摘要,是提前写入信任根的安全存储区,是该实体符合期望的基准值,为每次系统完整性验证提供了参考依据,RIM证书是一个经过数字签名的完整性保护结构,里面包含着RIM的值,数字签名以及相关的一些附加信息。Among them, the mobile trusted module MTM standardizes several trusted roots, including measuring the trusted root RTM, storing the trusted root RTS, and reporting the trusted root RTR. The RTM is stored in the read-only ROM as a software module, and the system is powered on. After the first one is executed and cannot be modified, it is used for the MTM as the starting point of trust measurement and verification, storing the root of trust RTS and reporting the root of trust RTR as a hardware module included in the MTM for integrity storage and In the report, the referential integrity metric value RIM and RIM certificate are also defined in the MTM. The value of RIM is the metric summary for the entity, the secure storage area written to the root of trust in advance, and the benchmark value that the entity meets expectations. The sub-system integrity verification provides a reference. The RIM certificate is a digitally signed integrity protection structure, which contains the RIM value, digital signature and some related additional information.

存储可信根RTS由可信平台度量配置寄存器PCR构成,PCR为160比特的存储位置,寄存器个数最少为16个,都存储在移动可信模块之中,它允许存储无限数量的度量值,还保持着度量的顺序,PCR保存着所有当前已经产生的度量值SHA-1的累积哈希值,160位的累积HASH值表示所有被度量过的组件完整性的状态。The storage trusted root RTS consists of the trusted platform metric configuration register PCR. The PCR is a 160-bit storage location, and the number of registers is at least 16, which are all stored in the mobile trusted module. It allows to store an unlimited number of metric values. The order of measurements is also maintained, and the PCR stores the cumulative hash value of all currently generated measurement values SHA-1, and the 160-bit cumulative HASH value represents the integrity status of all measured components.

然而由于Android系统文件众多,对于Android的硬件抽象层(HAL),其目的在于将硬件抽象化,为了保护硬件厂商知识产权,隐藏了特定平台的硬件接口细节。由此可见,不同的硬件厂商对于硬件抽象层的相关文件代码各不相同,对于不同硬件厂商的Android移动终端需要的参考性完整度量值各不相同,因而使得原有的可信度量机制的可扩展性弱。同样的,源码/system/core/init下的logo.c以及framworks/base/cmds下的bootanimation的作用是设置开机动画,不同的移动终端设备对应的开机动画也是各不相同,对于厂商的这些改动,我们依然认为该移动终端是可信的。However, due to the large number of Android system files, the purpose of Android's Hardware Abstraction Layer (HAL) is to abstract the hardware. In order to protect the intellectual property rights of hardware manufacturers, the hardware interface details of a specific platform are hidden. It can be seen that different hardware manufacturers have different relevant file codes for the hardware abstraction layer, and the reference integrity measurement values required for Android mobile terminals of different hardware manufacturers are different, which makes the original trusted measurement mechanism feasible. Weak scalability. Similarly, the logo.c under the source code /system/core/init and the bootanimation under framworks/base/cmds are used to set the boot animation. The boot animations corresponding to different mobile terminal devices are also different. For these changes of the manufacturer , we still believe that the mobile terminal is credible.

如图3所示,信任度量模型表示为{V,E},其中V表示节点集合,E表示边集合,节点集合V为有限集合{rt,T},rt表示根目标,即rt表示为{TValue,TCount},TValue表示对各子目标度量完成后得到的综合度量值,TCount表示子目标的个数,TCount取值为{0…m},当TCount=0,即为需要度量的最小目标,不可再分,目标集合T={t1,t2,…tn},t={Name,Type,TValue,TCount},Name表示目标的名称,Type表示目标类型,边集合E为组合关系,边集合E代表权重值,权值的取值范围[0,1],且满足归一条件。As shown in Figure 3, the trust metric model is represented as {V, E}, where V represents the node set, E represents the edge set, the node set V is a finite set {rt, T}, rt represents the root target, that is, rt is represented as { TValue, TCount}, TValue represents the comprehensive measurement value obtained after each sub-target measurement is completed, TCount represents the number of sub-targets, TCount is {0...m}, when TCount=0, it is the minimum target that needs to be measured , cannot be further divided, the target set T={t1,t2,...tn},t={Name,Type,TValue,TCount}, Name represents the name of the target, Type represents the target type, the edge set E is a combination relationship, and the edge set E represents the weight value, the value range of the weight value is [0, 1], and the normalization condition is satisfied.

步骤1中度量具体如下:The measurements in step 1 are as follows:

在Bootloader运行的过程中,Bootloader将系统内核映像ZImage和根文件系统映像Ramdisk.img从flash读到ARM中,当前控制权在Bootloader,对内核进行度量:将需要度量的系统内核设置为根目标rt,Android源码编译完成后产生ZImage、System.img、Ramdisk.img、Userdata.img、Recovery.img镜像,上述镜像包含Android启动与运行所需的文件与相关库,因而,对系统内核进行度量,即是对产生的所有镜像进行度量,在度量系统内核的过程中,将System.img、Ramdisk.img、ZImage、Recovery.img、Userdata.img镜像作为根目标的子目标;During the running process of the Bootloader, the Bootloader reads the system kernel image ZImage and the root file system image Ramdisk.img from the flash to the ARM, the current control is in the Bootloader, and measures the kernel: set the system kernel to be measured as the root target rt , After the Android source code is compiled, ZImage, System.img, Ramdisk.img, Userdata.img, Recovery.img images are generated. The above images contain the files and related libraries required for Android to start and run. Therefore, the system kernel is measured, that is It is to measure all the generated images. In the process of measuring the system kernel, the images of System.img, Ramdisk.img, ZImage, Recovery.img and Userdata.img are used as sub-targets of the root target;

不同镜像的重要程度以及受到入侵的可能性各不相同,因而对不同镜像应赋予不同的权值,ZImage是内核映像,System.img为系统镜像,用于存储Android系统的重要文件,包括包和库文件,内存磁盘文件Ramdisk.img存储Linux内核启动时所要装载的文件,Recovery.img镜像只用于刷机,Bootloader根据用户选择进入相应模式,不同模式均包含ZImage和Ramdisk.img文件,Userdata.img是用户数据镜像,存储和用户相关的数据,确定Android设备内存的大小;The importance of different images and the possibility of being invaded are different, so different weights should be given to different images. ZImage is the kernel image, and System.img is the system image, which is used to store important files of the Android system, including packages and files. The library file, the memory disk file Ramdisk.img stores the files to be loaded when the Linux kernel is started. The Recovery.img image is only used for flashing the machine. Bootloader enters the corresponding mode according to the user's choice. Different modes include ZImage and Ramdisk.img files, Userdata.img It is a user data mirror, which stores user-related data and determines the size of the Android device memory;

根据上述各镜像重要程度以及面临风险的程度,设ZImage分配的权值为w1,设System.img分配的权值为w2,设Ramdisk.img分配的权值为w3,设Recovery.img分配的权值为w4,设Userdata.img分配的权值为w5,则对应权值的关系应为:According to the importance of the above-mentioned images and the degree of risk, let the weight allocated by ZImage be w1, the weight allocated by System.img to be w2, the weight allocated by Ramdisk.img to be w3, and the weight allocated by Recovery.img The value is w4, and if the weight assigned by Userdata.img is w5, the relationship between the corresponding weights should be:

w1+w2+w3+w4+w5=1;w1+w2+w3+w4+w5=1;

w1>w2>w3>w4>w5;w1>w2>w3>w4>w5;

每个镜像中又包含了各个文件目录,不同的目录对应于Android中不同的功能,在确定权重值时,应考虑以下两个因素:Each image contains various file directories. Different directories correspond to different functions in Android. When determining the weight value, the following two factors should be considered:

一是对判断系统可信的重要程度,重要性越高,具有的权值也就越大.One is the importance of judging the credibility of the system, the higher the importance, the greater the weight.

二是判断其独立性,独立性越大,且其他文件对它有依赖关系,则具有较大权值。The second is to judge its independence. The greater the independence, and other files have dependencies on it, the greater the weight.

所述内核镜像ZImage包含的子文件均为系统核心文件,因而在度量时将ZImage镜像整体度量;The sub-files contained in the described kernel image ZImage are all system core files, so the overall ZImage image is measured when measuring;

System.img镜像包含如下子目录文件:app、bin、etc、fonts、framework、lib、media、priv-app、tts、usr以及vendor,度量时对这些目录的权重分配进行分析:The System.img image contains the following subdirectory files: app, bin, etc, fonts, framework, lib, media, priv-app, tts, usr, and vendor. The weight distribution of these directories is analyzed when measuring:

大量的底层攻击发生在Android的Framework层,例如触摸事件的隐私获取,通过修改Framework层源码,达到隐私窃取的目的。而这些改变将会引起System.img镜像Framework目录下framework.jar文件的改变,因而对于System.img文件下的Framework目录我们应分配高权值。priv-app和app分别存放着系统核心的apk文件和应用程序,恶意软件会安装在这两个文件目录下成为系统级应用程序。此外,Root病毒将会注入elf文件至手机xbin,bin,lib目录,造成手机私自扣费,恶意弹窗的现象发生,因而这些目录是我们需要重点度量的目录。相反的,Vendor目录存放的是第三方厂商的配置文件,因此我们可以赋予其相对较低的权值。由此,各目录的权值分配顺序为:A large number of low-level attacks occur in the Android Framework layer, such as the privacy acquisition of touch events. By modifying the source code of the Framework layer, the purpose of privacy theft is achieved. These changes will cause changes to the framework.jar file in the Framework directory of the System.img mirror, so we should assign a high weight to the Framework directory under the System.img file. priv-app and app store the core apk files and applications of the system respectively, and malware will be installed in these two file directories to become system-level applications. In addition, the Root virus will inject elf files into the xbin, bin, and lib directories of the mobile phone, causing the mobile phone to deduct fees without permission and malicious pop-up windows. Therefore, these directories are the directories we need to focus on. On the contrary, the Vendor directory stores the configuration files of third-party manufacturers, so we can give it a relatively low weight. Therefore, the weight distribution order of each directory is:

framework>priv-app>app>xbin=bin=lib>etc>fonts=tts=media=user=vendorframework>priv-app>app>xbin=bin=lib>etc>fonts=tts=media=user=vendor

Ramdisk.img中包含一些很重要的配置文件和内核启动完后加载的第一个进程init,init会分别解析init.rc和init.goldfish.rc配置文件初始化并装载系统库、程序直到开机完成,init进程还负责创建系统中包括Zygote进程在内的几个子进程,Zygote进程是所有JAVA进程的父进程,init动作执行分为四个时间段:early-init、init、early-boot、boot,根据配置文件在开机启动过程中被解析的顺序分配其权重值大小,分配的顺序为:Ramdisk.img contains some very important configuration files and the first process init loaded after the kernel is started. Init will parse the init.rc and init.goldfish.rc configuration files to initialize and load system libraries and programs until the boot is completed. The init process is also responsible for creating several child processes in the system, including the Zygote process. The Zygote process is the parent process of all JAVA processes. The init action execution is divided into four time periods: early-init, init, early-boot, boot, according to The order in which the configuration file is parsed during the startup process is assigned its weight value. The order of assignment is:

init.rc>init.goldfish.rc>ueventd.rc>init.environ.rc>init.usb.rc>init.trace.rcinit.rc>init.goldfish.rc>ueventd.rc>init.environ.rc>init.usb.rc>init.trace.rc

因为Recovery.img由ZImage和Ramdisk.img构成,ZImage部分和正常启动的内核镜像是相同的,因此只需度量其自身的Ramdisk.img镜像即可,度量权重分配和上述一致,对于Userdata.img,只需度量与用户应用程序无关的nativebenchmark文件作为Userdata.img的度量值;Because Recovery.img is composed of ZImage and Ramdisk.img, the ZImage part is the same as the normally booted kernel image, so it only needs to measure its own Ramdisk.img image, and the measurement weight distribution is consistent with the above. For Userdata.img, Just measure the nativebenchmark file unrelated to the user application as the measure of Userdata.img;

分配各个镜像对应的子目录的权重后,对一级子目录进行分别度量,度量结果用ei表示,其中i表示一级子目录的个数,若子目录度量结果与参考性完整度量值相同,则对应子目录的度量结果为1,否则结果为0,将子目录对应的权重表示为ai,其中i表示一级子目录的个数,则综合度量值TValue:After assigning the weights of the subdirectories corresponding to each image, measure the first-level subdirectories separately. The measurement result is represented by e i , where i represents the number of first-level subdirectories. If the subdirectory measurement result is the same as the reference integrity measurement value, Then the measurement result of the corresponding sub-directory is 1, otherwise the result is 0, and the weight corresponding to the sub-directory is expressed as a i , where i represents the number of first-level sub-directories, then the comprehensive measurement value TValue:

TValue=∑ei*ai TValue=∑e i *a i

对于二级目录的情况,采用类似上述描述的办法进行度量。For the case of secondary directories, a method similar to that described above is used for measurement.

改进的度量模型将叶子节点的度量结果按照不同的权值汇聚到各个子目标,然后汇聚到总目标得到最终的可信度。TCG完整性度量模型得到的是二进制的结果,经过改进的度量模型得到的是综合信任度,且改进的度量模型相比于原来的模型,其可扩展性与适用性变得更高。The improved measurement model aggregates the measurement results of leaf nodes to each sub-target according to different weights, and then aggregates to the total target to obtain the final credibility. The TCG integrity measurement model obtains binary results, and the improved measurement model obtains the comprehensive trust degree. Compared with the original model, the improved measurement model has higher scalability and applicability.

Claims (5)

1.一种基于Android系统的启动过程完整性度量检测方法,其特征在于,包括以下步骤:1. a startup process integrity measurement method based on Android system, is characterized in that, comprises the following steps: 从加电开始,可信度量根CRTM引导Bootloader并验证其完整性,Bootloader是系统启动前的引导程序;From power-on, the root of trust measurement CRTM boots the Bootloader and verifies its integrity, the Bootloader is the bootloader before the system starts; 采用安全散列算法SHA-1对Bootloader运算得到实际度量值,将得到的实际度量值与RIM证书中的RIM值进行比对,如果对比结果一致,将结果存入平台配置寄存器存储可信根中;Use the secure hash algorithm SHA-1 to calculate the actual metric value from the Bootloader, and compare the obtained actual metric value with the RIM value in the RIM certificate. If the comparison result is consistent, store the result in the platform configuration register to store the root of trust ; 然后CRTM将控制权移交给Bootloader;若比对结果不同,则开机失败,并将检验报告发送给用户;Then the CRTM transfers the control to the Bootloader; if the comparison results are different, the startup fails, and the inspection report is sent to the user; 在Bootloader度量内核的过程中,利用信任度量模型得出对于内核的综合度量值TValue,根据可信度阙值Tm,做出相应的信任决策,可信度阙值Tm用来作为信任决策的评判标准,如果系统内核是可信的,则TValue>Tm,则将结果存入平台配置寄存器存储可信根中,随后将控制权交给系统内核,否则系统无法继续启动,并将检验报告发送给用户,按照上述同样的方法,再对Android操作系统以及第三方应用程序进行度量,最终达到整个Android系统的可信。In the process of measuring the kernel by the Bootloader, the trust measurement model is used to obtain the comprehensive measurement value TValue for the kernel, and the corresponding trust decision is made according to the credibility threshold Tm. The credibility threshold Tm is used as the judgment of the trust decision. Standard, if the system kernel is credible, then TValue>Tm, then store the result in the platform configuration register to store the root of trust, and then hand over control to the system kernel, otherwise the system cannot continue to start, and the test report is sent to Users, according to the same method as above, measure the Android operating system and third-party applications, and finally achieve the credibility of the entire Android system. 2.根据权利要求1所述的一种基于Android系统的启动过程完整性度量检测方法,其特征在于,移动可信模块MTM规范了若干可信根,包括度量可信根RTM、存储可信根RTS、报告可信根RTR,其中RTM作为一个软件模块存入只读ROM中,在系统加电后第一个被执行且不可以被修改,用于MTM作为可信度量和验证的起点,存储可信根RTS和报告可信根RTR作为硬件模块包含于MTM之中,用于完整性存储和报告,MTM中还定义了参考完整性度量值RIM和RIM证书,RIM的值是要对实体的度量摘要,是提前写入信任根的安全存储区,是该实体符合期望的基准值,为每次系统完整性验证提供了参考依据,RIM证书是一个经过数字签名的完整性保护结构,里面包含着RIM的值,数字签名以及相关的一些附加信息。2. a kind of starting process integrity measurement method based on Android system according to claim 1 is characterized in that, mobile trusted module MTM has standardized some trusted roots, including measuring trusted root RTM, storage trusted root RTS, reporting root of trust RTR, in which RTM is stored as a software module in read-only ROM, the first to be executed after the system is powered on and cannot be modified, used for MTM as a starting point for trust measurement and verification, storage Trusted Root RTS and Reporting Trusted Root RTR are included in MTM as hardware modules for integrity storage and reporting. Reference integrity metrics RIM and RIM certificates are also defined in MTM. The value of RIM is to be used for entities. The metric summary is a secure storage area written into the trust root in advance. It is the benchmark value that the entity meets the expectations, and provides a reference for each system integrity verification. The RIM certificate is a digitally signed integrity protection structure, which contains With the value of RIM, digital signature and some related additional information. 3.根据权利要求2所述的一种基于Android系统的启动过程完整性度量检测方法,其特征在于,存储可信根RTS由可信平台度量配置寄存器PCR构成,PCR为160比特的存储位置,寄存器个数最少为16个,都存储在移动可信模块之中,它允许存储无限数量的度量值,还保持着度量的顺序,PCR保存着所有当前已经产生的度量值SHA-1的累积哈希值,160位的累积HASH值表示所有被度量过的组件完整性的状态。3. a kind of start-up process integrity measurement method based on Android system according to claim 2, is characterized in that, storage Trusted Root RTS is made up of Trusted Platform Measurement Configuration Register PCR, and PCR is the storage position of 160 bits, The number of registers is at least 16, and they are all stored in the mobile trusted module. It allows to store an unlimited number of metric values, and also maintains the order of metrics. PCR saves the cumulative hash of all currently generated metric values SHA-1. Hash value, a 160-bit cumulative HASH value that represents the status of the integrity of all measured components. 4.根据权利要求1~3任一项所述的一种基于Android系统的启动过程完整性度量检测方法,其特征在于,信任度量模型表示为{V,E},其中V表示节点集合,E表示边集合,节点集合V为有限集合{rt,T},rt表示根目标,即rt表示为{TValue,TCount},TValue表示对各子目标度量完成后得到的综合度量值,TCount表示子目标的个数,TCount取值为{0…m},当TCount=0,即为需要度量的最小目标,不可再分,目标集合T={t1,t2,…tn},t={Name,Type,TValue,TCount},Name表示目标的名称,Type表示目标类型,边集合E为组合关系,边集合E代表权重值,权值的取值范围[0,1],且满足归一条件。4. The Android system-based startup process integrity metric detection method according to any one of claims 1 to 3, wherein the trust metric model is represented as {V, E}, where V represents a node set, and E Represents the edge set, the node set V is a finite set {rt, T}, rt represents the root target, that is, rt is represented as {TValue, TCount}, TValue represents the comprehensive measurement value obtained after completing the measurement of each sub-target, and TCount represents the sub-target The number of , TCount is {0...m}, when TCount=0, it is the minimum target that needs to be measured, which cannot be further divided, the target set T={t1,t2,...tn}, t={Name,Type ,TValue,TCount}, Name represents the name of the target, Type represents the target type, the edge set E is the combination relationship, the edge set E represents the weight value, the value range of the weight value is [0, 1], and the normalization condition is satisfied. 5.根据权利要求4所述的一种基于Android系统的启动过程完整性度量检测方法,其特征在于,所述步骤1中度量具体如下:5. a kind of starting process integrity measurement method based on Android system according to claim 4, is characterized in that, in described step 1, measurement is specifically as follows: 在Bootloader运行的过程中,Bootloader将系统内核映像ZImage和根文件系统映像Ramdisk.img从flash读到ARM中,当前控制权在Bootloader,对内核进行度量:将需要度量的系统内核设置为根目标rt,Android源码编译完成后产生ZImage、System.img、Ramdisk.img、Userdata.img、Recovery.img镜像,上述镜像包含Android启动与运行所需的文件与相关库,因而,对系统内核进行度量,即是对产生的所有镜像进行度量,在度量系统内核的过程中,将System.img、Ramdisk.img、ZImage、Recovery.img、Userdata.img镜像作为根目标的子目标;During the running process of the Bootloader, the Bootloader reads the system kernel image ZImage and the root file system image Ramdisk.img from the flash to the ARM, the current control is in the Bootloader, and measures the kernel: set the system kernel to be measured as the root target rt , After the Android source code is compiled, ZImage, System.img, Ramdisk.img, Userdata.img, Recovery.img images are generated. The above images contain the files and related libraries required for Android to start and run. Therefore, the system kernel is measured, that is It is to measure all the generated images. In the process of measuring the system kernel, the images of System.img, Ramdisk.img, ZImage, Recovery.img and Userdata.img are used as sub-targets of the root target; 不同镜像的重要程度以及受到入侵的可能性各不相同,因而对不同镜像应赋予不同的权值,ZImage是内核映像,System.img为系统镜像,用于存储Android系统的重要文件,包括包和库文件,内存磁盘文件Ramdisk.img存储Linux内核启动时所要装载的文件,Recovery.img镜像只用于刷机,Bootloader根据用户选择进入相应模式,不同模式均包含ZImage和Ramdisk.img文件,Userdata.img是用户数据镜像,存储和用户相关的数据,确定Android设备内存的大小;The importance of different images and the possibility of being invaded are different, so different weights should be given to different images. ZImage is the kernel image, and System.img is the system image, which is used to store important files of the Android system, including packages and files. The library file, the memory disk file Ramdisk.img stores the files to be loaded when the Linux kernel is started. The Recovery.img image is only used for flashing the machine. Bootloader enters the corresponding mode according to the user's choice. Different modes include ZImage and Ramdisk.img files, Userdata.img It is a user data mirror, which stores user-related data and determines the size of the Android device memory; 根据上述各镜像重要程度以及面临风险的程度,设ZImage分配的权值为w1,设System.img分配的权值为w2,设Ramdisk.img分配的权值为w3,设Recovery.img分配的权值为w4,设Userdata.img分配的权值为w5,则对应权值的关系应为:According to the importance of the above-mentioned images and the degree of risk, let the weight allocated by ZImage be w1, the weight allocated by System.img to be w2, the weight allocated by Ramdisk.img to be w3, and the weight allocated by Recovery.img The value is w4, and if the weight assigned by Userdata.img is w5, the relationship between the corresponding weights should be: w1+w2+w3+w4+w5=1;w1+w2+w3+w4+w5=1; w1>w2>w3>w4>w5;w1>w2>w3>w4>w5; 所述内核镜像ZImage包含的子文件均为系统核心文件,因而在度量时将ZImage镜像整体度量;The sub-files contained in the described kernel image ZImage are all system core files, so the overall ZImage image is measured when measuring; 所述System.img镜像包含如下子目录文件:app、bin、etc、fonts、framework、lib、media、priv-app、tts、usr以及vendor,度量时对这些目录的权重分配进行分析:The System.img image contains the following subdirectory files: app, bin, etc, fonts, framework, lib, media, priv-app, tts, usr and vendor, and the weight distribution of these directories is analyzed during measurement: 各目录的权值分配顺序为:The weight distribution order of each directory is: framework>priv-app>app>xbin=bin=lib>etc>fonts=tts=media=user=vendorframework>priv-app>app>xbin=bin=lib>etc>fonts=tts=media=user=vendor Ramdisk.img中包含一些很重要的配置文件和内核启动完后加载的第一个进程init,init会分别解析init.rc和init.goldfish.rc配置文件初始化并装载系统库、程序直到开机完成,init进程还负责创建系统中包括Zygote进程在内的几个子进程,Zygote进程是所有JAVA进程的父进程,init动作执行分为四个时间段:early-init、init、early-boot、boot,根据配置文件在开机启动过程中被解析的顺序分配其权重值大小,分配的顺序为:Ramdisk.img contains some very important configuration files and the first process init loaded after the kernel is started. Init will parse the init.rc and init.goldfish.rc configuration files to initialize and load the system library and program until the boot is completed. The init process is also responsible for creating several child processes in the system, including the Zygote process. The Zygote process is the parent process of all JAVA processes. The init action execution is divided into four time periods: early-init, init, early-boot, boot, according to The order in which the configuration file is parsed during the startup process is assigned its weight value. The order of assignment is: init.rc>init.goldfish.rc>ueventd.rc>init.environ.rc>init.usb.rc>init.trace.rcinit.rc>init.goldfish.rc>ueventd.rc>init.environ.rc>init.usb.rc>init.trace.rc 因为Recovery.img由ZImage和Ramdisk.img构成,ZImage部分和正常启动的内核镜像是相同的,因此只需度量其自身的Ramdisk.img镜像即可,度量权重分配和上述一致,对于Userdata.img,只需度量与用户应用程序无关的nativebenchmark文件作为Userdata.img的度量值;Because Recovery.img is composed of ZImage and Ramdisk.img, the ZImage part is the same as the normally booted kernel image, so it only needs to measure its own Ramdisk.img image, and the measurement weight distribution is consistent with the above. For Userdata.img, Just measure the nativebenchmark file unrelated to the user application as the measure of Userdata.img; 分配各个镜像对应的子目录的权重后,对一级子目录进行分别度量,度量结果用ei表示,其中i表示一级子目录的个数,若子目录度量结果与参考性完整度量值相同,则对应子目录的度量结果为1,否则结果为0,将子目录对应的权重表示为ai,其中i表示一级子目录的个数,则综合度量值TValue:After assigning the weights of the subdirectories corresponding to each image, measure the first-level subdirectories separately. The measurement result is represented by e i , where i represents the number of first-level subdirectories. If the subdirectory measurement result is the same as the reference integrity measurement value, Then the measurement result of the corresponding sub-directory is 1, otherwise the result is 0, and the weight corresponding to the sub-directory is expressed as a i , where i represents the number of first-level sub-directories, then the comprehensive measurement value TValue: TValue=∑ei*ai TValue=∑e i *a i 对于二级目录的情况,采用类似上述描述的办法进行度量。For the case of secondary directories, a method similar to that described above is used for measurement.
CN201910428686.7A 2019-05-22 2019-05-22 An Android system-based startup process integrity measurement method Active CN110263545B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910428686.7A CN110263545B (en) 2019-05-22 2019-05-22 An Android system-based startup process integrity measurement method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910428686.7A CN110263545B (en) 2019-05-22 2019-05-22 An Android system-based startup process integrity measurement method

Publications (2)

Publication Number Publication Date
CN110263545A true CN110263545A (en) 2019-09-20
CN110263545B CN110263545B (en) 2022-11-04

Family

ID=67915085

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910428686.7A Active CN110263545B (en) 2019-05-22 2019-05-22 An Android system-based startup process integrity measurement method

Country Status (1)

Country Link
CN (1) CN110263545B (en)

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110688649A (en) * 2019-10-16 2020-01-14 中国电子信息产业集团有限公司第六研究所 Application loading method and device based on trusted technology
CN111045744A (en) * 2019-12-17 2020-04-21 全球能源互联网研究院有限公司 Trusted verification starting method and device of system
CN111324497A (en) * 2020-02-20 2020-06-23 杭州涂鸦信息技术有限公司 Linux system partition self-checking method and system
CN112464271A (en) * 2021-01-27 2021-03-09 信联科技(南京)有限公司 Method and system for constructing high-reliability execution environment of power Internet of things edge Internet of things agent
CN112769800A (en) * 2020-12-31 2021-05-07 武汉船舶通信研究所(中国船舶重工集团公司第七二二研究所) Switch integrity verification method and device and computer storage medium
CN113127876A (en) * 2019-12-30 2021-07-16 国民技术股份有限公司 Trusted computing control method and equipment
CN113536387A (en) * 2020-04-15 2021-10-22 青岛海信移动通信技术股份有限公司 Terminal and method for detecting integrity of kernel data
CN113868344A (en) * 2021-09-29 2021-12-31 全球能源互联网研究院有限公司 Construction system, method, apparatus, server and storage medium for power application
WO2022028081A1 (en) * 2020-08-04 2022-02-10 华为技术有限公司 Integrity measurement method and integrity measurement device
CN117240611A (en) * 2023-11-13 2023-12-15 傲拓科技股份有限公司 A PLC information security protection system and method based on artificial intelligence
CN117834627A (en) * 2023-12-29 2024-04-05 北京字跳网络技术有限公司 Remote certification method, device, electronic device and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101122936A (en) * 2007-09-21 2008-02-13 武汉大学 Embedded Platform Booting on a Trusted Mechanism
US8756417B1 (en) * 2014-02-04 2014-06-17 Sypris Electronics, Llc Multi-level assurance trusted computing platform
CN107679393A (en) * 2017-09-12 2018-02-09 中国科学院软件研究所 Android integrity verification methods and device based on credible performing environment

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101122936A (en) * 2007-09-21 2008-02-13 武汉大学 Embedded Platform Booting on a Trusted Mechanism
US8756417B1 (en) * 2014-02-04 2014-06-17 Sypris Electronics, Llc Multi-level assurance trusted computing platform
CN107679393A (en) * 2017-09-12 2018-02-09 中国科学院软件研究所 Android integrity verification methods and device based on credible performing environment

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
CHEN LI等: "Formal Analysis of Trust Chain", 《 2010 SECOND INTERNATIONAL CONFERENCE ON NETWORKS SECURITY, WIRELESS COMMUNICATIONS AND TRUSTED COMPUTING》 *
凌君等: "移动可信模块MTM在嵌入式系统中的应用", 《军事通信技术》 *
张立强等: "可信计算中的可信度量机制", 《北京工业大学学报》 *
纪祥敏等: "基于TMA的Android平台信任链构建方法研究", 《计算机仿真》 *

Cited By (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110688649A (en) * 2019-10-16 2020-01-14 中国电子信息产业集团有限公司第六研究所 Application loading method and device based on trusted technology
CN111045744A (en) * 2019-12-17 2020-04-21 全球能源互联网研究院有限公司 Trusted verification starting method and device of system
CN111045744B (en) * 2019-12-17 2024-03-08 全球能源互联网研究院有限公司 A system trusted verification startup method and device
CN113127876A (en) * 2019-12-30 2021-07-16 国民技术股份有限公司 Trusted computing control method and equipment
CN111324497B (en) * 2020-02-20 2023-10-27 杭州涂鸦信息技术有限公司 Partition self-checking method and system for linux system
CN111324497A (en) * 2020-02-20 2020-06-23 杭州涂鸦信息技术有限公司 Linux system partition self-checking method and system
CN113536387B (en) * 2020-04-15 2024-06-04 青岛海信移动通信技术有限公司 Terminal and method for detecting integrity of kernel data
CN113536387A (en) * 2020-04-15 2021-10-22 青岛海信移动通信技术股份有限公司 Terminal and method for detecting integrity of kernel data
WO2022028081A1 (en) * 2020-08-04 2022-02-10 华为技术有限公司 Integrity measurement method and integrity measurement device
CN112769800A (en) * 2020-12-31 2021-05-07 武汉船舶通信研究所(中国船舶重工集团公司第七二二研究所) Switch integrity verification method and device and computer storage medium
CN112769800B (en) * 2020-12-31 2022-10-04 武汉船舶通信研究所(中国船舶重工集团公司第七二二研究所) Integrity verification method, device and computer storage medium for switch
CN112464271A (en) * 2021-01-27 2021-03-09 信联科技(南京)有限公司 Method and system for constructing high-reliability execution environment of power Internet of things edge Internet of things agent
CN113868344A (en) * 2021-09-29 2021-12-31 全球能源互联网研究院有限公司 Construction system, method, apparatus, server and storage medium for power application
CN113868344B (en) * 2021-09-29 2024-04-16 国网智能电网研究院有限公司 Construction system, method, device, server and storage medium for power application
CN117240611A (en) * 2023-11-13 2023-12-15 傲拓科技股份有限公司 A PLC information security protection system and method based on artificial intelligence
CN117240611B (en) * 2023-11-13 2024-01-30 傲拓科技股份有限公司 A PLC information security protection system and method based on artificial intelligence
CN117834627A (en) * 2023-12-29 2024-04-05 北京字跳网络技术有限公司 Remote certification method, device, electronic device and storage medium
CN117834627B (en) * 2023-12-29 2024-12-31 北京字跳网络技术有限公司 Remote certification method, device, electronic device and storage medium

Also Published As

Publication number Publication date
CN110263545B (en) 2022-11-04

Similar Documents

Publication Publication Date Title
CN110263545B (en) An Android system-based startup process integrity measurement method
Shabtai et al. Securing Android-powered mobile devices using SELinux
US9690498B2 (en) Protected mode for securing computing devices
US8254568B2 (en) Secure booting a computing device
KR101120825B1 (en) Method and system for ensuring that a software update may be installed or run only on a specific device or class of devices
US8417962B2 (en) Device booting with an initial protection component
CN105468978B (en) A kind of creditable calculation password platform suitable for electric system universal computing platform
US8291480B2 (en) Trusting an unverified code image in a computing device
US8850212B2 (en) Extending an integrity measurement
KR101458780B1 (en) Providing a multi-phase lockstep integrity reporting mechanism
KR102873469B1 (en) Validating Virtual Environment Types for Policy Enforcement
EP2126770B1 (en) Trusted computing entities
US20050262571A1 (en) System and method to support platform firmware as a trusted process
Martin The ten-page introduction to Trusted Computing
EP3338214B1 (en) Secure computation environment
US10019577B2 (en) Hardware hardened advanced threat protection
US7805601B2 (en) Computerized apparatus and method for version control and management
CN110543769B (en) A trusted boot method based on encrypted TF card
Breitenbacher et al. Hades-iot: A practical host-based anomaly detection system for iot devices (extended version)
Akram et al. An introduction to the trusted platform module and mobile trusted module
Song et al. Dimac: Dynamic integrity measurement architecture for containers with arm trustzone
CN115906046A (en) Trusted Computing System and Measurement Method Based on Trusted Computing System
Alam et al. Analysis of existing remote attestation techniques
Zhang et al. SEIP: simple and efficient integrity protection for open mobile platforms
Redini Analyzing and securing firmware for IoT devices

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
OL01 Intention to license declared
OL01 Intention to license declared