Trusted computing is a security technology that establishes a reliable execution environment and verifies and protects the data in the system based on the hardware security mechanism.Integrity measurement is the core component of trusted computing platform.Integrity measurement can detect whether the program or execution components being loaded in the operating system are complete,and whether the program or boot process running the platform itself has been maliciously modified.The released IMA version of Linux only provides static integrity verification for user-mode executable files,and does not have the ability to detect memory status in real time.Some follow-up researches continue to improve on this basis by introducing access control policies,combining information flow or classifying software behaviors.However,the existing integrity measurement models still have the following deficiencies:(1)the principle of privilege isolation is not strictly adhered to,and there are potential security risks;(2)the performance overhead is large and cannot be applied to the actual working scenarios of embedded devices;(3)depends on some specific software and hardware technologies,etc.This paper studies the above problems and proposes a kernel-level dynamic integrity measurement architecture suitable for embedded Linux systems to achieve effective and complete integrity protection for Linux-based embedded devices.The main work contents are as follows:(1)A protection method based on monitoring the behavior of memory page privilege modification is proposed.The physical page where the measurement content resides is regarded as the measurement object for runtime integrity check,which effectively solves the TOC-TOU problem existing in the static measurement method.At the same time,attacks such as control flow hijacking and malicious code injection can be detected.(2)A kernel-level measurement method is introduced for relocation and dynamic linking information that position-independent code depends on.Strictly abide by the principle of privilege isolation,by monitoring the loading process of file objects in the kernel,and then predicting the results of relocation and dynamic linking,the integrity measurement of the key data of the user-mode process control flow is realized in the kernel mode.(3)Implement integrity protection on the code area of the kernel space.Includes kernel images and list of kernel modules.Since there is a mechanism of kernel address space layout randomization in the kernel mode,it is necessary to determine the baseline after the system is started,so as to realize the integrity protection of memory areas such as kernel images and kernel modules.(4)The full scan function is realized,covering the user mode process and the kernel mode code memory area,and the system security situation in the current state can be checked in real time and regularly.The final form of this design is that the kernel module is loaded into the kernel during the secure boot process,which can check the integrity of the memory area during code loading,runtime and full scan.And respond to attack threats such as control flow hijacking and implanting malicious code.Finally,the prototype of the system is implemented,the functional effectiveness test is carried out by simulating the attack scenario,and the performance test is carried out on the embedded device.Through comparative analysis,the results show that the dynamic integrity measurement model proposed in this paper outperforms the existing measurement technology in terms of security characteristics,and the performance overhead generated can fully meet the application requirements in embedded device scenarios. |