[go: up one dir, main page]

CN108733455B - Container isolation enhancement system based on ARM TrustZone - Google Patents

Container isolation enhancement system based on ARM TrustZone Download PDF

Info

Publication number
CN108733455B
CN108733455B CN201810549087.6A CN201810549087A CN108733455B CN 108733455 B CN108733455 B CN 108733455B CN 201810549087 A CN201810549087 A CN 201810549087A CN 108733455 B CN108733455 B CN 108733455B
Authority
CN
China
Prior art keywords
container
module
file
operating system
trusted
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.)
Active
Application number
CN201810549087.6A
Other languages
Chinese (zh)
Other versions
CN108733455A (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.)
Shanghai Jiao Tong University
Original Assignee
Shanghai Jiao Tong University
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 Shanghai Jiao Tong University filed Critical Shanghai Jiao Tong University
Priority to CN201810549087.6A priority Critical patent/CN108733455B/en
Publication of CN108733455A publication Critical patent/CN108733455A/en
Application granted granted Critical
Publication of CN108733455B publication Critical patent/CN108733455B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45562Creating, deleting, cloning virtual machine instances
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45587Isolation or security of virtual machine instances

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Storage Device Security (AREA)

Abstract

本发明提供了一种基于ARM TrustZone的容器隔离性增强系统,包括:运行于用户端的容器管理客户端;运行于服务器端普通世界中的不可信操作系统、不可信容器管理模块以及可信执行环境;运行于服务器端安全世界中的页表管理模块、寄存器保护模块、系统调用挟持模块、文件系统安全增强模块、执行流同步服务安全增强模块、进程间通讯服务安全增强模块、可信容器镜像下载模块以及安全容器启动模块。本发明将现有应用程序安全运行在被攻击者完全控制的恶意操作系统之上;使得容器内不同用户的不同应用能够进行安全的通信与控制流同步;用户无需对现有镜像做任何修改。

Figure 201810549087

The invention provides a container isolation enhancement system based on ARM TrustZone, including: a container management client running on the user side; an untrusted operating system, an untrusted container management module and a trusted execution environment running in the common world of the server side ;Page table management module, register protection module, system call hijacking module, file system security enhancement module, execution stream synchronization service security enhancement module, inter-process communication service security enhancement module, trusted container image download running in the server-side security world module and secure container launch module. The invention safely runs the existing application program on the malicious operating system completely controlled by the attacker; different applications of different users in the container can perform secure communication and control flow synchronization; the user does not need to make any modification to the existing image.

Figure 201810549087

Description

基于ARM TrustZone的容器隔离性增强系统Container isolation enhancement system based on ARM TrustZone

技术领域technical field

本发明涉及虚拟化技术领域,具体地,涉及一种基于ARM TrustZone的容器隔离性增强系统。The invention relates to the field of virtualization technology, in particular, to a container isolation enhancement system based on ARM TrustZone.

背景技术Background technique

虚拟化技术能够在一台物理计算机上模拟出多个虚拟计算机,从而提升硬件的利用率,方便多个用户共享同一台物理设备。容器则是一种轻量级的虚拟化技术。不同的容器将会共享同一个操作系统内核,但是每个容器都拥有自己独立的文件系统、用户空间、进程空间等。相较于传统的虚拟化技术,容器拥有更短的启动时间、更快的性能以及更加便捷的部署方法。由于这些显著的优点,容器目前已经被广泛应用于服务器领域。基于容器,云端服务器能够快速、便捷地为每个用户创建其独立的运行环境。而越来越多的用户也选择将自己的数据存入位于云端的容器之中,从而得到更为快速、方便的用户体验。Virtualization technology can simulate multiple virtual computers on one physical computer, thereby improving hardware utilization and facilitating multiple users to share the same physical device. Containers are a lightweight virtualization technology. Different containers will share the same operating system kernel, but each container has its own independent file system, user space, process space, etc. Compared to traditional virtualization technologies, containers have shorter startup times, faster performance, and easier deployment methods. Due to these significant advantages, containers have been widely used in the server field. Based on containers, cloud servers can quickly and easily create their own independent running environment for each user. More and more users also choose to store their data in containers located in the cloud, so as to obtain a faster and more convenient user experience.

在拥有更快性能与更便捷部署方法的同时,容器的安全性一直饱受诟病。不同容器之间需要共享同一个操作系统内核,一旦该内核被攻破,那么容器之间的隔离性将被破坏。与此同时,操作系统内核因其庞大的代码量,一直存在着数以千计的漏洞数量。在云计算环境下,一旦攻击者通过一个容器攻陷了操作系统内核,其将能操控云端中的所有容器。While having faster performance and easier deployment methods, the security of containers has always been criticized. Different containers need to share the same operating system kernel. Once the kernel is compromised, the isolation between containers will be destroyed. At the same time, the operating system kernel has always had thousands of vulnerabilities due to its huge amount of code. In the cloud computing environment, once an attacker compromises the operating system kernel through a container, he will be able to control all the containers in the cloud.

目前,ARM架构由于其较好的能源利用率,较高的性价比,正逐渐受到服务器领域的青睐。市场上已经存在了一系列基于ARM体系结构的处理器芯片。随之也引入了一个新的安全问题,一旦基于ARM的云端服务器中的操作系统被攻破,如何保证用户容器的安全性,防止攻击者控制用户容器中应用的执行流、窃取用户储存于容器中的敏感数据等等,成为本领域面临的重大问题。At present, the ARM architecture is gradually being favored by the server field due to its better energy utilization and higher cost performance. A series of processor chips based on the ARM architecture already exist on the market. A new security problem is also introduced. Once the operating system in the ARM-based cloud server is compromised, how to ensure the security of the user container, and prevent attackers from controlling the execution flow of the application in the user container and stealing the user storage in the container. sensitive data, etc., has become a major problem facing this field.

经过检索发现:After searching, it was found:

1、Owen等人利用硬件虚拟化技术设计并实现了一个安全系统InkTag,能够保护应用程序,防止其受到不可信操作系统内核的攻击。InkTag为每个应用提供了一个独立的安全运行环境,阻止操作系统直接访问安全运行环境中的内存数据,从而保护应用程序的数据不被窃取、控制流不被篡改。同时,对于部分依赖于操作系统完成的服务,InkTag也将对其进行检查。1. Owen et al. used hardware virtualization technology to design and implement a security system InkTag, which can protect applications from attacks by untrusted operating system kernels. InkTag provides an independent safe operating environment for each application, preventing the operating system from directly accessing the memory data in the safe operating environment, thereby protecting the application data from being stolen and the control flow from being tampered with. At the same time, InkTag will also check for services that partially depend on the completion of the operating system.

但是,InkTag虽然防止了操作系统对于单一应用程序的攻击,但是其并不适用于容器环境。首先,该系统无法直接启动现有容器镜像,使得其具备保护容器的能力。其次,该系统也未考虑到容器本身多用户、多应用的复杂使用环境,无法保证容器内部不同用户应用之间通信、共享信息、权限控制的安全。However, although InkTag prevents OS attacks on a single application, it is not suitable for container environments. First, the system cannot directly start existing container images, making it capable of protecting containers. Secondly, the system does not take into account the complex use environment of the container itself with multiple users and applications, and cannot guarantee the security of communication, information sharing, and permission control between different user applications inside the container.

2、为了保护容器的安全性,Arnautov等人利用Intel的SGX技术,设计实现了一个安全的容器保护系统SCONE。该系统利用SGX技术提供的可信执行环境enclave,保护每个单独的容器进程。由于硬件保证了任何enclave外部的软件(包括操作系统)都无法访问encalve的内存,干涉encalve内部的执行流,因此SCONE能够有效的保护一个容器应用的安全性,防止其受到不可信操作系统的攻击。2. In order to protect the security of containers, Arnautov and others used Intel's SGX technology to design and implement a secure container protection system SCONE. The system utilizes the trusted execution environment enclave provided by SGX technology to protect each individual container process. Since the hardware ensures that any software outside the enclave (including the operating system) cannot access the memory of the encalve and interfere with the execution flow inside the encalve, SCONE can effectively protect the security of a container application and prevent it from being attacked by an untrusted operating system. .

但是,SCONE存在两个缺点:首先,其只能支持单应用单进程的容器。也就是说,一个容器中仅能够运行一个单进程的应用程序,极大的限制了容器的应用场景。同时SCONE也没有考虑多用户、多应用环境下,不同应用之间如何安全协同工作的问题;其次,SCONE要求对原有的容器镜像进行修改,因此不能直接运行原有的镜像。这一缺点使得用户无法运行Docker仓库中数百万的容器镜像,限制了容器的使用场景。However, SCONE has two disadvantages: First, it can only support containers with single application and single process. That is to say, only one single-process application can run in a container, which greatly limits the application scenarios of containers. At the same time, SCONE does not consider the issue of how different applications work together safely in a multi-user and multi-application environment; secondly, SCONE requires modification of the original container image, so the original image cannot be directly run. This shortcoming makes it impossible for users to run millions of container images in Docker repositories, limiting the usage scenarios of containers.

综上所述,如何利用ARM平台自身体系结构的特点,为容器维护任意多个可信执行环境、如何在依赖不可信操作系统提供服务的同时防止其对容器应用进行攻击、如何兼容现有的容器镜像,成为本领域亟待解决的问题。In summary, how to use the characteristics of the ARM platform's own architecture to maintain any number of trusted execution environments for containers, how to rely on untrusted operating systems to provide services while preventing them from attacking container applications, and how to be compatible with existing Container images have become an urgent problem to be solved in this field.

目前没有发现同本发明类似技术的说明或报道,也尚未收集到国内外类似的资料At present, no description or report of similar technology to the present invention has been found, and similar materials at home and abroad have not been collected.

发明内容SUMMARY OF THE INVENTION

针对现有技术中存在的上述不足,本发明的目的是提供一种基于ARM TrustZone的容器隔离性增强系统。该系统利用ARM平台自身体系结构的特点,为容器维护任意多个可信执行环境;在依赖不可信操作系统提供服务的同时,能够防止其对容器应用进行攻击;能够兼容现有的容器镜像。In view of the above deficiencies in the prior art, the purpose of the present invention is to provide a container isolation enhancement system based on ARM TrustZone. The system utilizes the characteristics of the ARM platform's own architecture to maintain any number of trusted execution environments for containers; while relying on untrusted operating systems to provide services, it can prevent them from attacking container applications; it is compatible with existing container images.

本发明是通过以下技术方案实现的。The present invention is achieved through the following technical solutions.

根据本发明的一个方面,提供了一种基于ARM TrustZone的容器隔离性增强系统,包括:According to an aspect of the present invention, an ARM TrustZone-based container isolation enhancement system is provided, including:

运行于用户端的容器管理客户端;A container management client running on the client side;

运行于服务器端普通世界中的不可信操作系统、不可信容器管理模块以及可信执行环境;Untrusted operating system, untrusted container management module and trusted execution environment running in the normal world of the server side;

运行于服务器端安全世界中的页表管理模块、寄存器保护模块、系统调用挟持模块、文件系统安全增强模块、执行流同步服务安全增强模块、进程间通讯服务安全增强模块、可信容器镜像下载模块以及安全容器启动模块;Page table management module, register protection module, system call hijacking module, file system security enhancement module, execution stream synchronization service security enhancement module, inter-process communication service security enhancement module, trusted container image download module running in the server-side security world And the secure container startup module;

其中:in:

所述容器管理客户端与服务器端普通环境中的任意数量的容器进行连接,并向容器发送用户指令;每一个容器均运行在一个可信执行环境中;The container management client connects with any number of containers in the common environment of the server, and sends user instructions to the containers; each container runs in a trusted execution environment;

所述不可信操作系统为容器的应用程序提供运行环境以及所需的服务;The untrusted operating system provides a running environment and required services for container applications;

所述不可信容器管理模块提供了基本的容器管理操作;The untrusted container management module provides basic container management operations;

所述页表管理模块,寄存器保护模块以及系统调用挟持模块共同完成对任意数量的可信执行环境的维护;The page table management module, the register protection module and the system call holding module jointly complete the maintenance of any number of trusted execution environments;

所述文件系统安全增强模块、执行流同步服务安全增强模块以及进程间通讯服务安全增强模块共同完成对不可信操作系统服务的安全性的增强,防止不可信操作系统通过提供恶意系统服务,窃取容器进程隐私数据和/或篡改容器进程控制流;The file system security enhancement module, the execution stream synchronization service security enhancement module, and the inter-process communication service security enhancement module jointly complete the security enhancement of the untrusted operating system service, preventing the untrusted operating system from stealing the container by providing malicious system services. Process privacy data and/or tamper with container process control flow;

所述可信容器镜像下载模块和安全容器启动模块共同完成对安全的容器管理功能的提供。The trusted container image downloading module and the secure container startup module jointly complete the provision of secure container management functions.

优选地,所述可信执行环境中的硬件资源均不可被不可信操作系统直接访问。Preferably, none of the hardware resources in the trusted execution environment can be directly accessed by an untrusted operating system.

优选地,所述页表管理模块独占式管理整个不可信操作系统的所有页表,通过控制页表,保护容器进程的内存,限制不可信操作系统访问容器进程的内存。Preferably, the page table management module exclusively manages all page tables of the entire untrusted operating system, and by controlling the page tables, protects the memory of the container process and restricts the untrusted operating system from accessing the memory of the container process.

优选地,所述页表管理模块搜索不可信操作系统内核中所有管理页表的指令,并将这些替换为向页表管理模块发送对应请求;页表管理模块确保储存页表的物理内存页对于普通世界为只读,同时确保不可信操作系统内核的代码为不可写,实现页表管理模块对页表的独占式管理。Preferably, the page table management module searches all instructions for managing page tables in the untrusted operating system kernel, and replaces these with corresponding requests sent to the page table management module; the page table management module ensures that the physical memory pages storing the page tables are The common world is read-only, while ensuring that the code of the untrusted operating system kernel is not writable, and the page table management module implements the exclusive management of the page table.

优选地,所述寄存器保护模块保证不可信操作系统无法直接访问或修改可信执行环境的寄存器信息;其中,寄存器保护模块截获所有用户态进程与内核态的不可信操作系统内核之间的切换;在切换过程中,寄存器保护模块负责完成可信运行环境的寄存器保存以及恢复工作,从而保证不可信操作系统无法任意篡改和/或窃取可信运行环境的寄存器信息。Preferably, the register protection module ensures that the untrusted operating system cannot directly access or modify the register information of the trusted execution environment; wherein, the register protection module intercepts the switching between all user-mode processes and the kernel-mode untrusted operating system kernel; During the switching process, the register protection module is responsible for saving and restoring the registers of the trusted operating environment, thereby ensuring that the untrusted operating system cannot arbitrarily tamper and/or steal the register information of the trusted operating environment.

优选地,所述用户态进程与内核态的不可信操作系统内核之间的切换,包括如下过程:Preferably, the switching between the user mode process and the untrusted operating system kernel in kernel mode includes the following process:

所有用户态进入不可信操作系统内核的操作,均通过对异常的处理实现;对所有异常的处理均由被储存在异常向量表中的异常处理函数完成,所述异常向量表的地址被存储在物理寄存器中;寄存器保护模块将不可信操作系统中所有修改物理寄存器的指令替换为向寄存器保护模块发送对应请求,并在异常向量表维护的异常处理函数中插入一条切换指令(该指令为smc指令,是ARM处理器中的一条标准指令,其能够切换至安全世界,从而进入寄存器保护模块),确保所有进入不可信操作系统内核的行为都将被寄存器保护模块截获;All operations of entering the untrusted operating system kernel from user mode are realized by handling exceptions; handling of all exceptions is completed by the exception handling function stored in the exception vector table, and the address of the exception vector table is stored in the In the physical register; the register protection module replaces all instructions that modify the physical registers in the untrusted operating system by sending corresponding requests to the register protection module, and inserts a switching instruction (this instruction is the smc instruction) in the exception handling function maintained by the exception vector table. , is a standard instruction in the ARM processor, which can switch to the secure world and enter the register protection module), ensuring that all actions entering the untrusted operating system kernel will be intercepted by the register protection module;

由内核态退出至用户态,采用eret指令完成;寄存器保护模块确保不可信操作系统内核代码中不存在任何退出内核态的指令,所有退出操作均转发至寄存器保护模块完成,从而能够截获所有退出不可信操作系统内核的操作。Exit from the kernel state to the user state is completed by the eret instruction; the register protection module ensures that there is no instruction to exit the kernel state in the kernel code of the untrusted operating system, and all exit operations are forwarded to the register protection module to complete, so as to intercept all the exit cannot be completed. operation of the operating system kernel.

优选地,所述系统调用挟持模块在对系统调用时触发的异常进行处理的处理函数处植入一个特定指令(该特定指令也称为特定钩子,是指一条smc指令,该指令将进入安全世界,从而进入系统调用挟持模块),确保所有的系统调用均由系统调用挟持模块处理。Preferably, the system call hijacking module implants a specific instruction (also called a specific hook, which refers to an smc instruction, which will enter the secure world) at the processing function for processing the exception triggered by the system call. , thus entering the system call hijacking module) to ensure that all system calls are handled by the system call hijacking module.

优选地,所述文件系统安全增强模块保证容器应用文件系统的私密性和完整性,同时确保文件系统的访问权限;其中:Preferably, the file system security enhancement module ensures the privacy and integrity of the container application file system, and at the same time ensures the access authority of the file system; wherein:

所述文件系统安全增强模块利用系统调用挟持模块,截获所有容器进行的文件系统访问操作,并加密所有的文件写操作;同时,对于所有的文件读取操作,均进行相应的解密,保证文件的私密性;The file system security enhancement module utilizes the system call to hold the module, intercepts the file system access operations performed by all containers, and encrypts all file write operations; at the same time, for all file read operations, it performs corresponding decryption to ensure that the file is safe. privacy;

所述文件系统安全增强模块为每一个容器文件维护一份元数据,所述元数据包括文件内容的哈希值以及版本号;对文件的每次写操作都会更新哈希值以及版本号,并且文件系统安全增强模块自身记录最新的版本号;当容器进程进行文件读取操作时,文件系统安全增强模块通过验证读取内容的哈希值以及版本号,将读取内容返回至容器进程,保证文件的完整性;The file system security enhancement module maintains a piece of metadata for each container file, and the metadata includes the hash value and version number of the file content; each write operation to the file will update the hash value and version number, and The file system security enhancement module itself records the latest version number; when the container process performs a file read operation, the file system security enhancement module verifies the hash value and version number of the read content, and returns the read content to the container process to ensure that the integrity of the document;

所述文件系统安全增强模块截获所有修改容器对应用户的系统调用,追踪当前进程的对应用户;同时,在每个容器文件的元数据中额外储存一个权限信息,并且对于截获的所有文件访问操作,都根据该权限信息进行权限验证;The file system security enhancement module intercepts all system calls of the corresponding user of the modified container, and tracks the corresponding user of the current process; at the same time, additionally stores a permission information in the metadata of each container file, and for all intercepted file access operations, Permission verification is performed based on the permission information;

可信容器镜像下载模块在下载镜像时自动创建原始数据,文件系统安全增强模块根据用户所调用的系统调用,对自动创建的原始数据进行修改,形成每一个容器文件的元数据;这些元数据使用每一个容器唯一的加密密钥进行加密;所述加密密钥通过文件系统安全增强模块保护,并在关机前储存在可信储存介质之中。The trusted container image download module automatically creates the original data when downloading the image, and the file system security enhancement module modifies the automatically created original data according to the system call invoked by the user to form the metadata of each container file; these metadata use Each container is encrypted with a unique encryption key; the encryption key is protected by a file system security enhancement module and stored in a trusted storage medium before shutdown.

优选地,所述执行流同步服务安全增强模块通过截获执行流同步服务同步不同进程时对应的系统调用,分析对应的语意,控制容器进程的执行流,避免执行流被不可信操作系统所篡改。Preferably, the execution flow synchronization service security enhancement module controls the execution flow of the container process by intercepting the corresponding system calls when the execution flow synchronization service synchronizes different processes, analyzes the corresponding semantics, and prevents the execution flow from being tampered by an untrusted operating system.

优选地,进程间通讯服务安全增强模块,根据进程之间的数据传递方式,对进程间的通讯过程进行如下保护:Preferably, the inter-process communication service security enhancement module performs the following protection on the inter-process communication process according to the data transfer mode between the processes:

-对于直接的数据传递方式,进程间通讯服务安全增强模块通过截取系统调用,识别出所有的通信信道,为每个通信信道生成一个通信密钥,并在通信过程中对这些通信信道进行加密;- For the direct data transfer method, the inter-process communication service security enhancement module identifies all communication channels by intercepting system calls, generates a communication key for each communication channel, and encrypts these communication channels during the communication process;

-对于共享内存的数据传递方式,进程间通讯服务安全增强模块借助页表管理模块,进行共享内存的保护;具体地,在共享内存建立时,进程间通讯服务安全增强模块告知页表管理模块,帮助不同容器应用进程完成共享内存的建立;页表管理模块确保任何其他进程,都不能影射共享内存对应的物理内存页,进而直接保证基于共享内存的进程间通讯服务的安全性。- For the data transfer method of shared memory, the inter-process communication service security enhancement module uses the page table management module to protect the shared memory; specifically, when the shared memory is established, the inter-process communication service security enhancement module informs the page table management module, Helps different container application processes to complete the establishment of shared memory; the page table management module ensures that no other process can map the physical memory page corresponding to the shared memory, thereby directly guaranteeing the security of the inter-process communication service based on shared memory.

优选地,所述可信容器镜像下载模块用以验证所下载容器镜像的完整性,同时对容器镜像进行初始化工作,确保上述文件系统安全增强模块正常工作;具体为:Preferably, the trusted container image downloading module is used to verify the integrity of the downloaded container image, and at the same time initialize the container image to ensure the normal operation of the above-mentioned file system security enhancement module; specifically:

可信容器镜像下载模块与镜像仓库建立采用SSL协议加密的可信网络连接,直接从镜像仓库中获取容器镜像,并且通过计算哈希值,验证镜像的完整性;镜像下载完成之后,可信容器镜像下载模块对镜像进行如下初始化操作:The trusted container image download module establishes a trusted network connection encrypted by the SSL protocol with the image repository, obtains the container image directly from the image repository, and verifies the integrity of the image by calculating the hash value; after the image download is complete, the trusted container The image download module performs the following initialization operations on the image:

生成一个镜像唯一的镜像密钥,镜像密钥用以加密所有镜像内的其他密钥;Generate a unique image key for an image, and the image key is used to encrypt other keys in all images;

遍历镜像内的所有文件,对每个文件进行加密,并且计算文件内容的哈希值,生成元数据文件;经过处理后的容器镜像交由不可信容器管理模块进行储存。Traverse all files in the image, encrypt each file, calculate the hash value of the file content, and generate a metadata file; the processed container image is sent to the untrusted container management module for storage.

优选地,所述安全容器启动模块用以保证容器启动时的安全性,确保容器正确运行在可信执行环境之中,同时为容器以及容器管理客户端搭建可信通信通道;具体为:Preferably, the secure container startup module is used to ensure the security when the container is started, to ensure that the container runs correctly in a trusted execution environment, and to build a trusted communication channel for the container and the container management client; specifically:

容器启动时,安全容器启动模块验证启动镜像的完整性,确保启动的容器应用运行在可信执行环境之中;安全容器启动模块将与容器管理客户端协商一个通信密钥,并且使用该通信密钥加密容器应用的所有输入输出。When the container is started, the secure container startup module verifies the integrity of the boot image to ensure that the launched container application runs in a trusted execution environment; the secure container startup module will negotiate a communication key with the container management client, and use the communication key. The key encrypts all input and output of the container application.

与现有技术相比,本发明具有如下的有益效果:Compared with the prior art, the present invention has the following beneficial effects:

1、本发明可以防御所有来自容器外部应用的攻击。1. The present invention can defend against all attacks from applications outside the container.

利用本发明提供的可信执行环境,任意容器外部的应用程序均无法访问容器内部应用程序所使用的内存,干扰容器内部应用程序的执行状态。因此,能够本发明能够保护容器内应用以及用户隐私,不受到容器外部应用的侵害。With the trusted execution environment provided by the present invention, any application outside the container cannot access the memory used by the application inside the container, and interferes with the execution state of the application inside the container. Therefore, the present invention can protect the application in the container and the privacy of the user, and is not infringed by the application outside the container.

2、本发明可以防御所有来自其他容器的攻击。2. The present invention can defend against all attacks from other containers.

本发明的可信执行环境同样将不同容器的应用进行了隔离,保证了不同容器中的应用无法访问其他应用的内存、控制状态等等,从而能够防御来自其他容器的攻击。The trusted execution environment of the present invention also isolates applications in different containers, ensuring that applications in different containers cannot access the memory, control state, etc. of other applications, thereby being able to defend against attacks from other containers.

3、本发明可以防御所有来自不可信操作系统的软件攻击。3. The present invention can defend against all software attacks from untrusted operating systems.

本发明限制不可信操作系统对容器应用内存、寄存器等的直接访问,从而防止了不可信操作系统对容器应用的直接攻击(直接窃取内存数据、篡改应用控制流等)。The invention restricts the direct access of the untrusted operating system to the container application memory, registers, etc., thereby preventing the untrusted operating system from directly attacking the container application (directly stealing memory data, tampering with the application control flow, etc.).

同时,本发明对所有依赖于不可信操作系统的服务进行了检查,防止了不可信操作系统通过提供恶意系统服务,对容器应用进行攻击。At the same time, the present invention checks all the services that depend on the untrusted operating system, preventing the untrusted operating system from attacking the container application by providing malicious system services.

4、本发明可以防御来自容器内部其他用户应用的攻击。4. The present invention can defend against attacks from other user applications inside the container.

本发明对容器内部不同应用间的通信,文件共享等都进行了检查。除了能够防止来自容器内其他用户应用的攻击之外,还能够防止容器内应用与不可信操作系统勾结,从而对其他用户应用/数据发起的攻击。The present invention checks the communication and file sharing among different applications inside the container. In addition to preventing attacks from other user applications in the container, it can also prevent attacks on other user applications/data from collusion between applications in the container and untrusted operating systems.

5、本发明利用ARM体系结构特点,提出了一种可信执行环境的构建方法,能够将现有应用程序安全运行在被攻击者完全控制的恶意操作系统之上。5. The present invention proposes a method for constructing a trusted execution environment by utilizing the features of the ARM architecture, which can safely run existing application programs on a malicious operating system that is completely controlled by an attacker.

6、本发明利用之前所述的可信之行环境,结合本发明提出的可信服务机制,使得容器内的不同用户的不同应用能够进行安全的通信与控制流同步。6. The present invention utilizes the aforementioned trusted travel environment, combined with the trusted service mechanism proposed by the present invention, so that different applications of different users in the container can perform secure communication and control flow synchronization.

7、本发明自动化保护来自Docker官方仓库的容器镜像,用户无需对现有镜像做任何修改。7. The present invention automatically protects the container image from the Docker official warehouse, and the user does not need to make any modification to the existing image.

8、本发明为现有多用户、多进程的容器环境提供了一个基于TrustZone技术的安全增强方案,有效防止不可信的普通世界操作系统对用户容器进行攻击。本发明中提到的可信执行环境、安全文件系统等模块,还可被用以进行其他环境下的用户程序安全增强。8. The present invention provides a security enhancement scheme based on TrustZone technology for the existing multi-user and multi-process container environment, which effectively prevents untrusted common world operating systems from attacking user containers. The modules such as the trusted execution environment and the secure file system mentioned in the present invention can also be used to enhance user program security in other environments.

附图说明Description of drawings

通过阅读参照以下附图对非限制性实施例所作的详细描述,本发明的其它特征、目的和优点将会变得更明显:Other features, objects and advantages of the present invention will become more apparent by reading the detailed description of non-limiting embodiments with reference to the following drawings:

图1为本发明一实施例的系统架构图;FIG. 1 is a system architecture diagram of an embodiment of the present invention;

图2为本发明一实施例的可信镜像下载流程图;FIG. 2 is a flow chart of downloading a trusted image according to an embodiment of the present invention;

图3为本发明一实施例的安全容器启动流程图;FIG. 3 is a flowchart of a secure container startup according to an embodiment of the present invention;

图4为本发明一实施例的容器进程系统调用检查流程图;FIG. 4 is a flowchart of a container process system call check according to an embodiment of the present invention;

图5为本发明一实施例的安全文件系统访问流程图;FIG. 5 is a flowchart of a secure file system access according to an embodiment of the present invention;

图6为本发明一实施例的安全控制流同步服务使用流程图;FIG. 6 is a flow chart of using a security control flow synchronization service according to an embodiment of the present invention;

图7为本发明一实施例的安全进程间通讯服务使用流程图。FIG. 7 is a flow chart of using a secure inter-process communication service according to an embodiment of the present invention.

具体实施方式Detailed ways

下面对本发明的实施例作详细说明:本实施例在以本发明技术方案为前提下进行实施,给出了详细的实施方式和具体的操作过程。应当指出的是,对本领域的普通技术人员来说,在不脱离本发明构思的前提下,还可以做出若干变形和改进,这些都属于本发明的保护范围。The embodiments of the present invention are described in detail below: This embodiment is implemented on the premise of the technical solution of the present invention, and provides detailed implementation modes and specific operation processes. It should be pointed out that for those skilled in the art, without departing from the concept of the present invention, several modifications and improvements can be made, which all belong to the protection scope of the present invention.

实施例Example

本实施例提供了一种基于ARM TrustZone的容器隔离性增强系统,该系统能够有效解决现有技术中所遇到的问题,包括:This embodiment provides an ARM TrustZone-based container isolation enhancement system, which can effectively solve the problems encountered in the prior art, including:

如何利用ARM平台自身体系结构的特点,为容器维护任意多个可信执行环境?ARM的TrustZone硬件技术仅仅提供了一个单一的可信执行环境称为“安全世界”。而单纯的将不同的容器应用运行在“安全世界”中,并不能提高容器之间的安全性。因此,如何利用“安全世界”,为每个容器进程提供了以独占的可信执行环境就至关重要。How to use the characteristics of the ARM platform's own architecture to maintain any number of trusted execution environments for containers? ARM's TrustZone hardware technology provides only a single trusted execution environment called "Secure World". Simply running different container applications in the "secure world" cannot improve the security between containers. Therefore, how to use the "secure world" to provide an exclusive trusted execution environment for each container process is crucial.

如何在依赖不可信操作系统提供服务的同时,防止其对容器应用进行攻击?应用程序(包括容器中的应用)依赖于操作系统提供的系统调用,从而完成诸多功能(如文件访问,网络通讯等)。而对于多用户、多应用的容器环境,其中不同应用还将依赖于操作系统进行文件的共享、执行流的同步、进程间的通讯等等。一个不可信的操作系统可能利用这些系统服务,从而窃取容器应用中的隐私数据,或者操控容器应用的执行流。How to prevent attacks on container applications while relying on untrusted operating systems to provide services? Applications (including applications in containers) rely on system calls provided by the operating system to complete many functions (such as file access, network communication, etc.). For a multi-user and multi-application container environment, different applications will also rely on the operating system for file sharing, execution flow synchronization, inter-process communication, and so on. An untrusted operating system may exploit these system services to steal private data in container applications, or manipulate the execution flow of container applications.

如何兼容现有的容器镜像?容器作为一个已经受到广泛应用的技术,互联网上已经存在着数以百万计的容器镜像,用户可以方便的下载这些镜像并启动一个自己的容器。以使用最为广泛的Docker容器管理工具来说,在官方的Docker仓库中,已经存在将近一百万个Docker容器镜像。因此设计的容器安全系统必须能够兼容现有的容器镜像。How to be compatible with existing container images? As a technology that has been widely used, there are millions of container images on the Internet. Users can easily download these images and start a container of their own. As the most widely used Docker container management tool, there are nearly one million Docker container images in the official Docker repository. Therefore, the designed container security system must be compatible with existing container images.

为了防止不可信操作系统直接访问、篡改容器内应用程序的内存数据,控制容器内应用程序的指令流,本实施例将首先为每个容器应用进程创建一个可信执行环境。ARM平台的TrustZone硬件技术提供了一个可信执行环境称为“安全世界”,原有的普通运行环境称为“普通世界”,“安全世界”能够访问“普通世界”所有的硬件资源(内存,寄存器,外部设备等),而“普通世界”无法访问“安全世界”的硬件资源。基于硬件提供的“安全世界”,本实施例首先控制“普通世界”中的页表映射,阻止不可信操作系统访问容器应用的内存;之后,本实施例挟持容器应用与不可信操作系统之间的切换,从而保证容器应用的寄存器,控制流不会被篡改。通过以上两种方法,本实施例能够为每个容器应用提供一个独享的可信执行环境。In order to prevent the untrusted operating system from directly accessing and tampering with the memory data of the application in the container and controlling the instruction flow of the application in the container, this embodiment will first create a trusted execution environment for each container application process. The TrustZone hardware technology of the ARM platform provides a trusted execution environment called "Secure World", the original ordinary operating environment is called "Ordinary World", and "Secure World" can access all hardware resources (memory, registers, external devices, etc.), while the "normal world" cannot access the hardware resources of the "secure world". Based on the "secure world" provided by the hardware, this embodiment first controls the page table mapping in the "normal world" to prevent the untrusted operating system from accessing the memory of the container application; then, this embodiment hijacks the relationship between the container application and the untrusted operating system switch, so as to ensure that the registers and control flow of the container application will not be tampered with. Through the above two methods, this embodiment can provide an exclusive trusted execution environment for each container application.

之后,本实施例还需要防止不可信操作系统通过恶意操控提供给容器应用的系统服务,从而窃取容器应用内的用户隐私、篡改容器应用的控制流。本实施例主要保护三类系统服务:After that, this embodiment also needs to prevent the untrusted operating system from maliciously manipulating the system services provided to the container application, thereby stealing user privacy in the container application and tampering with the control flow of the container application. This embodiment mainly protects three types of system services:

文件系统:容器应用依赖操作系统提供的文件系统服务。本实施例将挟持容器应用调用的所有文件系统相关服务,对文件进行加密、哈希计算,从而保证容器内部文件的隐私性以及完整性。与此同时,操作系统也可能通过恶意控制文件访问权限,泄露用户隐私,本实施例也将对所有容器应用的文件访问进行权限审查。File system: Container applications rely on file system services provided by the operating system. In this embodiment, all file system-related services called by the container application will be hijacked, and the files will be encrypted and hashed, so as to ensure the privacy and integrity of the files inside the container. At the same time, the operating system may also maliciously control file access rights, thereby leaking user privacy. In this embodiment, the file access rights of all container applications will also be reviewed.

执行流同步服务:本实施例考虑的是多用户、多应用的复杂容器环境。该环境下,同意容器内部的不同应用需要依赖操作系统的服务进行一些跨进程的执行流同步操作。例如利用IPC信号量,使得不同应用进程不会同时访问一个资源,造成数据竞争(data race),从而产生不可预料的执行结果。不可信的操作系统能够通过控制这些执行流同步服务,从而干扰容器内应用的正常执行,甚至能够进一步窃取容器内的应用的隐私数据。本实施例将挟持并检查容器内应用所调用的执行流同步服务,包括信号(s ignal)发送与接收,信号量,文件锁等,保证它们语意的正确性。Executing stream synchronization service: This embodiment considers a complex container environment with multiple users and multiple applications. In this environment, it is agreed that different applications inside the container need to rely on the services of the operating system to perform some cross-process execution flow synchronization operations. For example, by using IPC semaphore, different application processes will not access a resource at the same time, resulting in data race (data race), resulting in unpredictable execution results. An untrusted operating system can control these execution flow synchronization services, thereby interfering with the normal execution of applications in the container, and even further stealing the private data of applications in the container. This embodiment will hold and check the execution flow synchronization service called by the application in the container, including signal (signal) sending and receiving, semaphore, file lock, etc., to ensure the correctness of their semantics.

进程间通讯服务:同一容器内的不同进程还能够通过管道(pipe)、IPC消息队列、IPC共享内存等方式进行应用进程间的通讯。由于现有应用程序大多认为操作系统是可信的,因此其几乎不会对进程间的通讯进行加密。这意味着一个被攻破的操作系统能够轻易的窃取,甚至篡改任何进程间通讯的内容,从而窃取容器进程的数据、挟持容器进程的控制流。本实施例首先将挟持所有的进程间通讯。对于管道、IPC消息队列等“消息传递”类的通讯方法,才用密码学的方法进行通讯内容的保护。而对于共享内存这一特殊的通讯方式,本实施例通过控制页表,保证只有合法的内存共享进程才能够访问对应的共享内存,不可信的操作系统将无法访问任何共享内存。Inter-process communication service: Different processes in the same container can also communicate between application processes through pipes, IPC message queues, and IPC shared memory. Since most existing applications consider the operating system to be trusted, they rarely encrypt inter-process communication. This means that a compromised operating system can easily steal or even tamper with the content of any inter-process communication, thereby stealing data from the container process and hijacking the control flow of the container process. This embodiment will first hijack all inter-process communication. For the communication methods of "message passing" such as pipelines and IPC message queues, cryptographic methods are used to protect the communication content. As for the special communication mode of shared memory, this embodiment controls the page table to ensure that only legitimate memory sharing processes can access the corresponding shared memory, and an untrusted operating system cannot access any shared memory.

除了保证容器运行时的安全性之外,本实施例还需要提供安全的容器管理功能。包括可信容器镜像下载以及安全容器启动两个过程。可信容器镜像下载首先保证从官方镜像仓库所下载的容器镜像的完整性,同时也会为下载的容器镜像进行一些初始化工作。安全容器启动过程首先将验证启动容器的身份以及完整性,并且与用户端的容器管理客户端协商一个通信密钥,保证容器启动后,用户能够安全的操控其自身的容器。In addition to ensuring the security of the container runtime, this embodiment also needs to provide a secure container management function. Including two processes of trusted container image download and secure container startup. Trusted container image download first ensures the integrity of the container image downloaded from the official image repository, and also performs some initialization work for the downloaded container image. The secure container startup process will first verify the identity and integrity of the startup container, and negotiate a communication key with the container management client on the client side to ensure that after the container is started, the user can safely control his own container.

下面结合附图对本实施例的技术方案进一步详细描述。The technical solution of this embodiment will be further described in detail below with reference to the accompanying drawings.

本发明的具体系统实施例如图1所示。用户端运行着一个容器管理客户端,用以向运行在服务器端的容器发送指令。而在服务器端,ARM的TrustZone安全扩展将硬件划分为普通世界与安全世界。普通世界中运行着不可信操作系统、不可信容器管理模块以及任意数量的用户容器。每个容器中都可能存在多个容器进程,每个容器进程都运行在一个本实施例维护的可信执行环境之中。A specific system embodiment of the present invention is shown in FIG. 1 . The client side runs a container management client to send commands to the container running on the server side. On the server side, ARM's TrustZone security extension divides the hardware into the normal world and the secure world. The normal world runs untrusted operating systems, untrusted container management modules, and any number of user containers. There may be multiple container processes in each container, and each container process runs in a trusted execution environment maintained by this embodiment.

在安全世界中,则存在诸多增强安全性的模块。页表管理模块,寄存器保护模块、系统调用挟持模块负责维护多个可信执行环境。文件系统安全增强模块、执行流同步服务安全增强模块、进程间通讯服务安全增强模块用以增强不可信操作系统服务的安全性,防止不可信操作系统通过提供恶意系统服务,窃取容器进程隐私数据、篡改容器进程控制流。可信容器镜像下载模块和安全容器启动模块则提供了安全的容器管理功能。In the security world, there are many modules that enhance security. The page table management module, the register protection module, and the system call hijacking module are responsible for maintaining multiple trusted execution environments. File system security enhancement module, execution stream synchronization service security enhancement module, and inter-process communication service security enhancement module are used to enhance the security of untrusted operating system services and prevent untrusted operating systems from providing malicious system services to steal container process private data, Tampering with container process control flow. The trusted container image download module and the secure container startup module provide secure container management functions.

下面将详细阐述本实施例中各个模块的具体实施:The specific implementation of each module in this embodiment will be described in detail below:

【容器管理客户端】【Container management client】

运行在用户端的容器管理应用程序,用以与服务器端的容器进行连接,向服务器端的容器发送用户指令。The container management application running on the user side is used to connect with the container on the server side and send user instructions to the container on the server side.

【不可信操作系统】【Untrusted operating system】

管理普通世界的硬件资源,为应用程序提供运行环境以及所需的服务。该模块由于自身庞大的代码量,拥有较多的安全漏洞,因此较易受到攻击。Manage the hardware resources of the general world, and provide the running environment and required services for the application. Due to its huge amount of code, this module has many security holes, so it is more vulnerable to attack.

【不可信容器管理模块】【Untrusted container management module】

用以对容器进行基本的管理操作,例如查看CPU使用情况,启动容器等。由于操作系统的不可信,本模块也较易受到攻击者攻击。因此对于容器镜像下载以及容器启动两个关键操作,由安全世界中的可信容器镜像下载模块与安全容器启动模块进行安全性增强。It is used to perform basic management operations on containers, such as viewing CPU usage, starting containers, etc. Due to the untrustworthy operating system, this module is also vulnerable to attackers. Therefore, for the two key operations of container image download and container startup, the security enhancement is performed by the trusted container image download module and the secure container startup module in the secure world.

【可信执行环境】【Trusted Execution Environment】

由本实施例所维护的一个可信执行环境,该环境的内存、寄存器等硬件资源均不可被不可信操作系统直接访问。In a trusted execution environment maintained by this embodiment, hardware resources such as memory and registers in the environment cannot be directly accessed by an untrusted operating system.

【页表管理模块】【Page table management module】

当处理器(CPU)访问内存时,需要将虚拟内存地址翻译为物理内存地址,从而从物理内存中读取/写入数据。而页表则负责储存虚拟内存至物理内存的映射,处理器将自动根据页表内的映射关系,完成虚拟地址至物理地址的转换。因此一旦控制页表之后,也将能够控制任何进程(包括操作系统)对于物理内存的访问。而本实施例的页表管理模块首先独占的管理整个系统的所有页表,之后通过控制页表,保护容器进程的内存,限制不可信的操作系统访问容器进程的内存。When the processor (CPU) accesses the memory, it needs to translate the virtual memory address to the physical memory address to read/write data from the physical memory. The page table is responsible for storing the mapping from virtual memory to physical memory, and the processor will automatically complete the conversion from virtual address to physical address according to the mapping relationship in the page table. Therefore, once you control the page table, you will also be able to control access to physical memory by any process (including the operating system). However, the page table management module of this embodiment first exclusively manages all page tables of the entire system, and then controls the page tables to protect the memory of the container process and restrict untrusted operating systems from accessing the memory of the container process.

为了实现页表管理模块独占式的页表控制,本实施例需要限制不可信操作系统对页表的访问。在ARM平台上,对于页表的管理(启用某页表,关闭/开启页表功能)需要通过一些特殊的指令实现。本实施例首先搜索不可信操作系统内核中所有这些特殊的指令,将其替换为向页表管理模块发送对应请求。之后,页表管理模块确保页表页(储存页表的物理内存页)对于普通世界为“只读”,同时确保操作系统内核的代码为“不可写”。至此,页表管理模块实现了对页表的“独占式”管理。对于所有的页表修改操作,不可信操作系统都必须将其转发至页表管理模块完成。In order to implement exclusive page table control by the page table management module, this embodiment needs to restrict the access of the untrusted operating system to the page table. On the ARM platform, the management of the page table (enabling a certain page table, turning off/on the page table function) needs to be implemented through some special instructions. This embodiment first searches for all these special instructions in the kernel of the untrusted operating system, and replaces them with sending corresponding requests to the page table management module. After that, the page table management module ensures that the page table page (the physical memory page where the page table is stored) is "read-only" to the normal world, while ensuring that the code of the operating system kernel is "not writable". So far, the page table management module has realized the "exclusive" management of the page table. For all page table modification operations, the untrusted operating system must forward it to the page table management module for completion.

之后,页表管理模块会根据一些安全策略对所有页表修改操作进程审查,如:1)所有内核态的可执行代码都必须标记为“不可写”;2)任何被影射至可信执行环境中的物理内存,都不可被影射至操作系统;3)不同可信执行环境之间,只有通过“进程间通讯服务安全增强模块”完成的共享内存操作后,才能够共享对应的物理页。After that, the page table management module will review all page table modification operation processes according to some security policies, such as: 1) All executable code in kernel mode must be marked as "unwritable"; 2) Anything that is mapped to a trusted execution environment The physical memory in the server cannot be mapped to the operating system; 3) Between different trusted execution environments, the corresponding physical page can be shared only after the shared memory operation completed by the "Interprocess Communication Service Security Enhancement Module".

【寄存器保护模块】【Register Protection Module】

寄存器保护模块需要保证不可信操作系统无法直接访问或修改可信执行环境的寄存器信息。首先,寄存器保护模块需要截获所有用户态进程与内核态的不可信操作系统内核之间的切换。之后在切换过程中,寄存器保护模块将会负责完成可信运行环境的寄存器保存以及恢复工作,从而保证不可信操作系统无法任意篡改/窃取可信运行环境的寄存器信息。The register protection module needs to ensure that the untrusted operating system cannot directly access or modify the register information of the trusted execution environment. First, the register protection module needs to intercept all switching between user mode processes and the untrusted operating system kernel in kernel mode. After that, during the switching process, the register protection module will be responsible for saving and restoring the registers of the trusted operating environment, so as to ensure that the untrusted operating system cannot arbitrarily tamper/steal the register information of the trusted operating environment.

对于进入、退出不可信操作系统内核两个不同的切换操作,本模块采用不同的截获方法。首先,在ARM平台下,所有用户态进入不可信操作系统内核的操作均通过对异常(execption)的处理实现。对所有异常的处理均由被储存在异常向量表中的异常处理函数完成,该向量表的地址被储存在一个特殊的物理寄存器(VBAR)中。寄存器保护模块首先确保将操作系统中所有修改物理寄存器的指令均替换为向寄存器保护模块发送对应请求。之后,在异常向量表维护的异常处理函数中插入一条切换指令(该切换指令指smc指令,为ARM处理器的一条特殊指令),从而确保了所有进入不可信操作系统内核的行为都将被寄存器保护模块截获。For the two different switching operations of entering and exiting the untrusted operating system kernel, this module adopts different interception methods. First of all, under the ARM platform, all the operations of entering the untrusted operating system kernel from the user mode are realized by processing exceptions (execption). All exceptions are handled by exception handling functions stored in an exception vector table whose address is stored in a special physical register (VBAR). The register protection module first ensures that all instructions for modifying physical registers in the operating system are replaced by sending corresponding requests to the register protection module. After that, insert a switching instruction (the switching instruction refers to the smc instruction, which is a special instruction of the ARM processor) into the exception handling function maintained by the exception vector table, thereby ensuring that all actions entering the untrusted operating system kernel will be registered by the register. Protection module interception.

由内核态退出至用户态只能由几类非常有限的指令完成,目前最新的ARMv8结构下,采用一条eret指令完成。寄存器保护模块确保不可信操作系统内核代码中不存在任何退出内核态的指令,所有退出操作必须转发至寄存器保护模块完成。从而能够截获所有退出不可信操作系统内核的操作。Exiting from kernel mode to user mode can only be completed by a few very limited instructions. Under the latest ARMv8 structure, an eret instruction is used to complete. The register protection module ensures that there is no instruction to exit the kernel state in the kernel code of the untrusted operating system, and all exit operations must be forwarded to the register protection module for completion. Thus, all operations that exit the untrusted operating system kernel can be intercepted.

【系统调用挟持模块】【System call hijacking module】

应用程序通过系统调用使用不可信操作系统提供的系统服务,为了能够对这些服务进程审核,系统调用挟持模块会确保所有可信执行环境发起的系统调用都将先被该模块捕获。The application uses the system services provided by the untrusted operating system through system calls. In order to audit these service processes, the system call hijacking module will ensure that all system calls initiated by the trusted execution environment will be captured by this module first.

在ARM平台下,系统调用通过一个特定的“svc”指令实现,该执行将触发一个特定的异常。本模块将在该异常的处理函数处植入一个特定钩子(该特定钩子是指一条smc指令),确保所有的系统调用都将被系统调用挟持模块处理。Under the ARM platform, the system call is implemented through a specific "svc" instruction, and the execution will trigger a specific exception. This module will implant a specific hook (the specific hook refers to an smc instruction) at the exception handling function to ensure that all system calls will be processed by the system call hijacking module.

注意,页表管理模块保证了不可信操作系统的代码无法被修改,因此寄存器保护模块以及系统调用挟持模块植入在异常处理函数中的“钩子”将无法被不可信操作系统所篡改。Note that the page table management module ensures that the code of the untrusted operating system cannot be modified, so the "hook" implanted in the exception handling function by the register protection module and the system call hijacking module cannot be tampered with by the untrusted operating system.

【文件系统安全增强模块】【File System Security Enhancement Module】

本实施例保护三类系统服务,分别是文件系统,执行流同步服务一集进程间通讯服务。文件系统安全增强模块负责保证容器应用文件系统的私密性以及完整性,同时确保文件系统的访问权限。This embodiment protects three types of system services, namely, the file system, and implements a stream synchronization service and a set of inter-process communication services. The file system security enhancement module is responsible for ensuring the privacy and integrity of the file system of the container application, and at the same time ensuring the access rights of the file system.

为了保证文件的私密性,本模块利用系统调用挟持模块,截获所有容器进行的文件系统访问操作,加密所有的文件写操作。同时对于所有的文件读取操作,都会进行相应的解密。In order to ensure the privacy of the file, this module uses the system call to hold the module, intercepts the file system access operations performed by all containers, and encrypts all file write operations. At the same time, for all file read operations, corresponding decryption will be performed.

为了保证文件的完整性,本模块为每个容器文件维护了一份元数据,其中就包括了文件内容的哈希值以及版本号。每次写操作都会更新哈希值以及版本号,并且模块自身记录最新的版本号。当容器进程进行文件读取操作时,本模块首先验证读取内容的哈希值以及版本号,验证通过后再将读取内容返回至容器进程。In order to ensure the integrity of the file, this module maintains a metadata for each container file, which includes the hash value and version number of the file content. Each write operation updates the hash value and version number, and the module itself records the latest version number. When the container process performs a file read operation, this module first verifies the hash value and version number of the read content, and then returns the read content to the container process after the verification is passed.

为了进行权限验证,本模块首先截获所有修改容器对应用户的系统调用,追踪当前进程的对应用户。之后,本模块将在每个文件的元数据中额外储存一个权限信息,并且对于截获的所有文件访问操作,都根据该权限信息进行权限检查。In order to perform permission verification, this module first intercepts all system calls of the corresponding user of the modified container, and tracks the corresponding user of the current process. After that, this module will additionally store an additional permission information in the metadata of each file, and perform permission checking according to the permission information for all intercepted file access operations.

本模块中使用的元数据,由可信容器镜像下载模块在下载镜像时自动创建。同时本模块也将根据用户所调用的系统调用,对这些元数据进行修改。这些元数据将使用一个容器唯一的加密密钥进行加密,并储存在硬盘之中。所用的加密密钥将有本模块保护,并且在关机前储存在可信储存介质之中(例如ARM平台提供的RPMB)。The metadata used in this module is automatically created by the trusted container image download module when downloading the image. At the same time, this module will also modify these metadata according to the system calls called by the user. This metadata will be encrypted with a container-unique encryption key and stored on the hard drive. The encryption key used will be protected by this module and stored in a trusted storage medium (eg RPMB provided by the ARM platform) before shutdown.

【执行流同步服务安全增强模块】[Execution stream synchronization service security enhancement module]

执行流同步服务用以同步不同进程之间的执行流,主要包含信号量,锁,信号等等。执行流同步服务安全增强模块通过截获对应系统调用,分析对应语意,从而控制容器进程的执行流,确保其不被不可信的操作系统所篡改。The execution flow synchronization service is used to synchronize the execution flow between different processes, mainly including semaphores, locks, signals, etc. The execution flow synchronization service security enhancement module controls the execution flow of the container process by intercepting the corresponding system call and analyzing the corresponding semantics to ensure that it is not tampered with by an untrusted operating system.

对于信号量,以及锁,本模块将截获所有对应的系统调用,包括初始化、获取、释放资源。对于所有的获取操作,一旦资源不满足要求(信号量不足或者锁正被占用),本模块将组织当前容器进程继续执行,从而保证执行流同步服务的语意正确性。For semaphores and locks, this module will intercept all corresponding system calls, including initialization, acquisition, and release of resources. For all acquisition operations, once the resources do not meet the requirements (the semaphore is insufficient or the lock is being occupied), this module will organize the current container process to continue to execute, thereby ensuring the semantic correctness of the stream synchronization service.

而对于信号这一特殊的同步操作,本模块将截获所有插入至容器进程的信号,并对其进行检查。每个信号都需要有对应的触发事件后,才可被插入至容器进程中。As for the special synchronization operation of signals, this module will intercept all signals inserted into the container process and check them. Each signal needs to have a corresponding trigger event before it can be inserted into the container process.

【进程间通讯服务安全增强模块】[Interprocess Communication Service Security Enhancement Module]

进程之间数据传递方式主要由两类,第一种是直接的数据传递,如管道(pipe)以及消息队列。对于这类通讯方式,本模块采用加密的方式进行保护。首先,本模块通过截取系统调用,识别出所有的通信信道,之后为每个信道生成一个通信密钥,并在之后的通信过程中对这些信道进行加密。There are two main types of data transfer methods between processes. The first is direct data transfer, such as pipes and message queues. For this type of communication, this module uses encryption to protect. First, this module identifies all communication channels by intercepting system calls, then generates a communication key for each channel, and encrypts these channels in the subsequent communication process.

第二种通讯方式是共享内存,不同的进程能够通过系统调用,让各自的一段虚拟内存空间映射至一段相同的物理内存空间,从而基于该共享内存进行通讯。与基于通信信道的进程间通讯方法不同,共享内存只有在建立时才需要操作系统的帮助,而在通讯无需操作系统的干涉。这也就意味着,本模块难以截获到基于共享内存的进程间通讯方式。The second communication method is shared memory. Different processes can map their respective virtual memory spaces to the same physical memory space through system calls, so as to communicate based on the shared memory. Different from the inter-process communication method based on the communication channel, the shared memory only needs the help of the operating system when it is established, and does not need the intervention of the operating system in the communication. This means that it is difficult for this module to intercept the inter-process communication method based on shared memory.

因此,本模块借助页表管理模块,进行共享内存的保护。具体来说,在共享内存建立时,本模块会告知页表管理模块,从而帮助不同容器应用进程完成共享内存的建立。之后,页表管理模块将确保任何其他进程,包括操作系统,都不能影射该共享内存对应的物理内存页。从而直接保证了基于共享内存的进程间通讯服务的安全性。Therefore, this module uses the page table management module to protect the shared memory. Specifically, when the shared memory is established, this module will inform the page table management module to help different container application processes complete the establishment of the shared memory. After that, the page table management module will ensure that no other process, including the operating system, can map the physical memory page corresponding to the shared memory. Thus, the security of the inter-process communication service based on shared memory is directly guaranteed.

【可信容器镜像下载模块】[Trusted container image download module]

在保证了容器运行时的安全性之后,本实施例仍需保证容器镜像下载,以及容器启动时的安全性。可信容器镜像下载模块用以验证所下载容器镜像的完整性,同时对容器镜像进行初始化工作,确保上述文件系统安全增强模块能够正常工作。After ensuring the security of the container runtime, this embodiment still needs to ensure the security of the container image download and the container startup. The trusted container image download module is used to verify the integrity of the downloaded container image, and at the same time, initialize the container image to ensure that the above-mentioned file system security enhancement module can work normally.

本模块首先与镜像仓库建立起采用SSL协议加密的可信网络连接,之后直接从镜像仓库中获取容器镜像,并且通过计算哈希值,验证镜像的完整性。镜像下载完成之后,本模块对镜像进行初始化操作。首先,生成一个镜像唯一的镜像密钥,镜像密钥用以加密所有镜像内的其他密钥。之后,遍历镜像内的所有文件,对每个文件进行加密,并且计算文件内容的哈希值,生成元数据文件。经过处理后的容器镜像将交由普通世界的不可信容器管理模块进行储存。This module first establishes a trusted network connection encrypted by the SSL protocol with the mirror warehouse, then directly obtains the container image from the mirror warehouse, and verifies the integrity of the mirror by calculating the hash value. After the image download is complete, this module initializes the image. First, an image-unique image key is generated, and the image key is used to encrypt other keys in all images. After that, traverse all the files in the image, encrypt each file, and calculate the hash value of the file content to generate a metadata file. The processed container image will be stored by the untrusted container management module of the ordinary world.

【安全容器启动模块】【Secure container startup module】

安全容器启动模块用以保证容器启动时的安全性,确保容器正确运行在本实施例维护的可信执行环境之中,同时为容器以及用户端的容器管理客户端搭建一个可信通信通道。The secure container startup module is used to ensure the security of the container during startup, to ensure that the container runs correctly in the trusted execution environment maintained in this embodiment, and to build a trusted communication channel for the container and the container management client of the user.

容器启动时,本模块将首先验证启动镜像的完整性,确保启动的容器应用运行在本实施例维护的可信执行环境之中。之后,本模块将与容器管理客户端协商一个通信密钥,并且使用该密钥加密容器应用的所有输入输出(容器应用的默认输入输出将被发送至容器管理客户端)When the container is started, this module will first verify the integrity of the startup image to ensure that the started container application runs in the trusted execution environment maintained by this embodiment. After that, this module will negotiate a communication key with the container management client, and use this key to encrypt all the input and output of the container application (the default input and output of the container application will be sent to the container management client)

本发明的方法实施例,基于上述基于ARM TrustZone的容器隔离性增强系统,具体包括:可信镜像下载流程,安全容器启动流程,容器进程系统调用检查流程,安全文件系统访问流程、安全控制流同步服务使用流程以及安全进程间通讯服务使用流程。The method embodiment of the present invention, based on the above-mentioned ARM TrustZone-based container isolation enhancement system, specifically includes: a trusted image download process, a secure container startup process, a container process system call checking process, a secure file system access process, and a security control flow synchronization process Service usage flow and secure inter-process communication service usage flow.

【可信镜像下载流程】【Trusted image download process】

步骤1:建立可信下载通道。可信容器镜像下载模块首先与远端的镜像仓库进行SSL加密信道的建立,保证镜像仓库的身份验证,信道加密密钥的交换等等。一旦镜像仓库的身份验证失败,则可信镜像下载流程立即结束。Step 1: Establish a trusted download channel. The trusted container image download module first establishes an SSL encrypted channel with the remote image repository to ensure the authentication of the image repository, exchange of channel encryption keys, and so on. Once the authentication of the image repository fails, the trusted image download process ends immediately.

步骤2:下载容器镜像。可信容器镜像下载模块通过之前建立的可信下载通道,完成容器镜像的下载。Step 2: Download the container image. The trusted container image download module completes the download of the container image through the previously established trusted download channel.

步骤3:验证镜像完整性。通过计算镜像的哈希值,与从镜像仓库获得的镜像哈希值做比较,从而能够验证镜像的完整性。如镜像完成性遭受破坏,将立即结束本次下载流程。Step 3: Verify image integrity. The integrity of the image can be verified by calculating the hash value of the image and comparing it with the image hash value obtained from the image repository. If the image completion is damaged, the download process will end immediately.

步骤4:加密镜像内用户文件。可信镜像下载模块首先生成一个镜像唯一的加密密钥——镜像密钥。之后使用该密钥对镜像内部的所有文件进行加密。Step 4: Encrypt user files in the image. The trusted image download module first generates a unique encryption key for the image—the image key. This key is then used to encrypt all files inside the image.

步骤5:生成文件元数据。遍历镜像中的每个文件,对其内容进行哈希,并且将哈希值、初始版本号、文件权限等元数据存入对应的元数据文件。同时,采用镜像密钥对元数据文件进行加密。完成元数据生成之后,下载的景象文件将交流容器管理模块进行正常的初始化工作。该部分工作为现有容器管理工具的通用技术,不属于本实施例的创新设计,因此在此不做详述。Step 5: Generate file metadata. Traverse each file in the image, hash its content, and store metadata such as the hash value, initial version number, and file permissions in the corresponding metadata file. At the same time, the metadata file is encrypted with the mirror key. After the metadata is generated, the downloaded scene file will communicate with the container management module for normal initialization. This part of the work is a general technology of the existing container management tool, and does not belong to the innovative design of this embodiment, so it will not be described in detail here.

【安全容器启动流程】[Secure container startup process]

步骤1:发送容器启动请求。容器管理客户端通过一个SSL信道向安全容器启动模块发送一个容器启动请求。该请求包括启动指令,启动镜像ID,启动应用名,容器应用参数等。Step 1: Send a container start request. The container management client sends a container start request to the secure container start module through an SSL channel. The request includes startup instructions, startup image ID, startup application name, container application parameters, etc.

步骤2:启动准备工作。启动请求首先被转发至普通世界中的不可信容器管理模块,完成启动的准备工作,包括:检索启动容器镜像,完成容器命名空间初始化等等。Step 2: Start preparations. The startup request is first forwarded to the untrusted container management module in the ordinary world, and the preparations for startup are completed, including: retrieving the startup container image, completing the initialization of the container namespace, and so on.

步骤3:验证启动镜像。在完成准备工作之后,不可信容器管理模块将会调用一个特定的系统调用,启动容器的第一个应用。此时安全容器启动模块会截获该系统调用,验证当前容器所挂在文件系统的完整性。一旦当前容器镜像与用户制定的启动镜像不符,或者镜像内的文件遭受篡改,容器启动过程将立即终止。Step 3: Verify the boot image. After completing the preparations, the untrusted container management module will call a specific system call to start the first application of the container. At this time, the secure container startup module will intercept the system call to verify the integrity of the file system on which the current container is mounted. Once the current container image does not match the startup image specified by the user, or the files in the image are tampered with, the container startup process will be terminated immediately.

步骤4:协商通信密钥。验证镜像之后,安全容器启动模块会与容器管理客户端协商一个通信密钥,之后用户与容器之间的所有交互都会使用该密钥进行加密。Step 4: Negotiate the communication key. After the image is verified, the secure container launch module negotiates a communication key with the container management client, and all interactions between the user and the container are encrypted using this key.

步骤5:启动容器应用。安全容器启动模块之后会将容器应用运行在本实施例维护的可信执行环境之中。该过程包括容器应用进程的页表初始化、文件系统挂在、应用代码加载等等。Step 5: Start the container application. After the secure container startup module, the container application will be run in the trusted execution environment maintained by this embodiment. This process includes page table initialization of the container application process, file system hanging, application code loading, and so on.

步骤6:容器启动完成。最终,操作系统将切换至容器应用的执行入口,开始执行容器应用。而容器应用的标准输出都将通过可信通道,发送至容器管理客户端。而默认的应用标准输入也均是通过可信通道,从容器管理客户端处获得。Step 6: The container startup is complete. Eventually, the operating system will switch to the execution entry of the container application and start executing the container application. The standard output of the container application will be sent to the container management client through the trusted channel. The default application standard input is also obtained from the container management client through a trusted channel.

【容器进程系统调用检查流程】[Container process system call check flow]

步骤1:进程发起系统调用。容器进程通过标准库函数,通过执行“svc”指令调用系统调用。Step 1: The process initiates a system call. The container process invokes the system call by executing the "svc" instruction through the standard library function.

步骤2:操作系统捕获异常。该指令会触发一个特性的异常,该异常将陷入操作系统内核。内核通过一个特定的异常处理函数处理该异常。Step 2: The operating system catches the exception. This instruction triggers a characteristic exception that will trap into the operating system kernel. The kernel handles this exception through a specific exception handler.

步骤3:切换至截获模块。本实施例在不可信操作系统的异常处理函数入口处植入了一个“钩子”,确保了该异常首先会切换至系统调用截获模块进行处理。Step 3: Switch to the interception module. In this embodiment, a "hook" is implanted at the entrance of the exception handling function of the untrusted operating system, which ensures that the exception will first be switched to the system call interception module for processing.

步骤4:获取系统调用号。系统调用采用一个系统调用号来表示进程想要调用的系统功能。在ARM平台下,系统调用号被出存在“X8”寄存器中。系统调用截获模块将获取该系统调用号,从而确定进程所调用的系统调用。Step 4: Get the system call number. A system call uses a system call number to indicate the system function that the process wants to call. Under the ARM platform, the system call number is stored in the "X8" register. The system call interception module will obtain the system call number to determine the system call called by the process.

步骤5:获取系统调用参数。根据不同系统调用,解析系统调用传入的参数,分析参数的语意。Step 5: Get system call parameters. According to different system calls, parse the parameters passed in by the system calls, and analyze the semantics of the parameters.

步骤6:检查系统调用。获取具体的系统调用语意后,能够对系统调用进行一阶段检查。该阶段包括检查应用是否具有系统调用权限以及对本次系统调用的记录。Step 6: Check for system calls. After obtaining the specific system call semantics, one-stage inspection of the system call can be performed. This stage includes checking whether the application has system call permission and recording the current system call.

步骤7:内核完成系统调用。一阶段检查完成之后,切换至不可信操作系统内核,进行系统调用的正常处理。Step 7: The kernel completes the system call. After the first-stage check is completed, switch to the untrusted operating system kernel to perform normal processing of system calls.

步骤8:切换至截获模块。当不可信操作系统内核完成系统调用,返回容器进程时,该返回操作首先被系统调用截获模块截取。Step 8: Switch to the interception module. When the untrusted operating system kernel completes the system call and returns to the container process, the return operation is first intercepted by the system call interception module.

步骤9:获取系统调用返回值。截获模块之后获取系统调用的具体返回值,根据之前步骤4和步骤5获得的信息,判断本次返回值对应的系统调用类型。Step 9: Get the system call return value. After the interception module, the specific return value of the system call is obtained, and the type of the system call corresponding to the return value is determined according to the information obtained in the previous steps 4 and 5.

步骤10:检查系统调用返回值。根据不同的系统调用类型,检查系统调用的返回值是否合法。Step 10: Check the system call return value. Check whether the return value of the system call is legal according to different system call types.

步骤11:返回应用进程。检查完成之后,返回应用进程,本次系统调用完成。Step 11: Return to the application process. After the check is completed, return to the application process, and this system call is completed.

【安全文件系统访问流程】【Secure file system access process】

文件写操作流程:File write operation process:

步骤1:发起文件写操作。容器应用进程调用系统调用,进行文件写操作。Step 1: Initiate a file write operation. The container application process invokes system calls to perform file write operations.

步骤2:截获系统调用。系统调用截获模块截获该次写操作,并且将本次系统调用首先转发至文件系统安全增强模块进行处理。Step 2: Intercept the system call. The system call interception module intercepts the write operation, and first forwards the system call to the file system security enhancement module for processing.

步骤3:访问权限检查。文件系统安全增强模块首先检查当前应用进程是否具有对应的文件访问权限。Step 3: Access permission check. The file system security enhancement module first checks whether the current application process has the corresponding file access authority.

步骤4:加密写内容。文件系统安全增强模块首先获取目标文件对应的文件加密密钥。之后以块为粒度,将需要写入的文件内容进行加密。Step 4: Encrypt the write content. The file system security enhancement module first obtains the file encryption key corresponding to the target file. After that, the content of the file to be written is encrypted with the block as the granularity.

步骤5:更新哈希值。文件系统安全增强模块以块为力度计算写入的文件内容的哈希值,并且在相应的元数据文件中,更新对应的哈希值。Step 5: Update the hash value. The file system security enhancement module calculates the hash value of the written file content with the block as the strength, and updates the corresponding hash value in the corresponding metadata file.

步骤6:更新版本号。文件系统安全增强模块更新当前最新的文件版本号,并且将版本号写入对应的元数据文件中。同时,文件系统安全增强模块自身也将保存该版本号。Step 6: Update the version number. The file system security enhancement module updates the current latest file version number, and writes the version number into the corresponding metadata file. At the same time, the file system security enhancement module itself will also save the version number.

步骤7:完成写操作。更新完对应的元数据之后,加密后的文件内容被写入目标文件,同时本次系统调用操作返回至用户进程。Step 7: Complete the write operation. After updating the corresponding metadata, the encrypted file content is written to the target file, and the system call operation returns to the user process.

文件读操作流程:File read operation process:

步骤1:发起文件读请求。容器应用进程发起文件去读系统调用,进行文件读操作。Step 1: Initiate a file read request. The container application process initiates a file read system call to perform a file read operation.

步骤2:访问权限检查。系统调用截取模块截取该系统调用,记录本次系统调用,并且将本次调用转发至文件系统安全增强模块进行访问权限的检查。Step 2: Access permission check. The system call interception module intercepts the system call, records the current system call, and forwards the current call to the file system security enhancement module to check the access authority.

步骤3:读取加密文件内容。检查通过后,将请求转发至操作系统完成。不可信操作系统对加密后的文件进行读取,并将读取后的密文返回至容器应用进程。Step 3: Read the encrypted file content. After the check is passed, the request is forwarded to the operating system for completion. The untrusted operating system reads the encrypted file and returns the read ciphertext to the container application process.

步骤4:截获系统调用返回。系统调用截获模块截获该系统调用返回,并且将该返回转发至文件系统安全增强模块进行检查。Step 4: Intercept the return of the system call. The system call interception module intercepts the return of the system call, and forwards the return to the file system security enhancement module for inspection.

步骤5:解密读取内容。文件系统安全增强模块首先根据文件对应的密钥,解密读取的文件密文。Step 5: Decrypt the read content. The file system security enhancement module first decrypts the ciphertext of the read file according to the key corresponding to the file.

步骤6:验证哈希值与版本号。文件系统安全增强模块读物文件对应的元数据,比较解密后文件内容的哈希值与文件元数据中的哈希值是否相同。同时比较文件元数据中记录的文件版本与文件系统安全增强模块记录的最新文件版本是否相同。Step 6: Verify the hash and version number. The metadata corresponding to the file system security enhancement module reads the file, and compares whether the hash value of the decrypted file content is the same as the hash value in the file metadata. At the same time, compare whether the file version recorded in the file metadata is the same as the latest file version recorded by the file system security enhancement module.

步骤7:读取操作完成。哈希值与版本号均验证通过后,解密后的文件原文将被返回至应用进程中,本次文件读取操作完成。Step 7: The read operation is complete. After both the hash value and the version number are verified, the decrypted original text of the file will be returned to the application process, and the file reading operation is completed.

【安全控制流同步服务使用流程】【Use process of security control flow synchronization service】

步骤0:创建控制流同步对象。容器应用首先通过系统调用,创建控制流同步对象。之后通过对该对象进行获取/释放操作,从而协调不同应用进程的控制流。Step 0: Create a control flow synchronization object. The container application first creates a control flow synchronization object through a system call. Afterwards, the control flow of different application processes is coordinated by acquiring/releasing the object.

资源获取操作:Resource acquisition operation:

步骤1:获取对象资源。应用进程发起控制流资源获取操作,该操作通过一个特殊的系统调用完成。Step 1: Get the object resource. The application process initiates the control flow resource acquisition operation, which is completed through a special system call.

步骤2:截获请求。系统调用挟持模块截获该系统调用,并将其转发至执行流同步服务安全增强模块进行处理。Step 2: Intercept the request. The system call hijacking module intercepts the system call and forwards it to the execution stream synchronization service security enhancement module for processing.

步骤3:等待对象资源。执行流流同步服务安全增强模块会为不同的控制流同步对象维护对应的资源值(例如互斥锁,对应的资源最大值就是1,而信号量,该值就是信号量的初始值)。对于每次资源获取操作,该模块判断当前的资源值是否足够。Step 3: Wait for the object resource. The security enhancement module that executes the stream synchronization service will maintain the corresponding resource values for different control stream synchronization objects (for example, mutex locks, the corresponding resource maximum value is 1, and semaphore, this value is the initial value of the semaphore). For each resource acquisition operation, the module judges whether the current resource value is sufficient.

步骤4:成功获取/等待。如果资源值足够,那么执行流同步服务安全增强模块减去相应的资源值,完成该获取请求。如果当前资源不足,那么该获取操作将进入等待队列,直至拥有足够的资源。Step 4: Successful get/wait. If the resource value is sufficient, execute the stream synchronization service security enhancement module minus the corresponding resource value to complete the acquisition request. If the current resources are insufficient, the fetch operation will enter the waiting queue until sufficient resources are available.

步骤5:完成获取操作。获取资源成功后,将返回应用进程,该获取操作完成。Step 5: Complete the acquisition operation. After the resource acquisition is successful, the application process will be returned, and the acquisition operation is completed.

资源释放操作:Resource release operation:

步骤1:释放对象资源。容器应用进程通过系统调用,发起资源释放操作。Step 1: Release object resources. The container application process initiates a resource release operation through a system call.

步骤2:截获请求。该操作首先被系统调用截获模块截取,并且转发至执行流同步服务安全增强模块。Step 2: Intercept the request. The operation is first intercepted by the system call interception module, and forwarded to the security enhancement module of the execution stream synchronization service.

步骤3:记录释放操作。执行流同步服务安全增强模块将记录本次释放操作,病释放该对象对应的资源值。同时,也将选择一个正在等待的资源获取进程,允许其继续进行资源获取操作。Step 3: Record the release operation. Executing the stream synchronization service security enhancement module will record this release operation, and release the resource value corresponding to the object. At the same time, a waiting resource acquisition process will also be selected, allowing it to continue the resource acquisition operation.

步骤4:完成释放操作。释放资源之后,将返回应用进程,本次释放操作完成。Step 4: Complete the release operation. After the resources are released, the application process will be returned, and the release operation is completed.

【安全进程间通讯服务使用流程】【Use flow of secure inter-process communication service】

步骤0:创建通信通道。容器应用进行通过系统调用,首先建立起一个通信通道。对于共享内存这一特殊的通讯方式,通道一旦建立,应用间即可进行通讯,无需之后的步骤。而对于管道(pipe)以及消息队列(message queue)这些通讯方式,仍需进行之后的消息发送、接受流程。Step 0: Create a communication channel. The container application makes a system call and first establishes a communication channel. For the special communication method of shared memory, once the channel is established, applications can communicate with each other without further steps. For communication methods such as pipes and message queues, the subsequent message sending and receiving processes are still required.

步骤1:创建信道密钥。完成通信通道的建立后,进程间通讯服务安全增强模块为该通道维护一个唯一的通讯密钥。Step 1: Create a channel key. After the establishment of the communication channel is completed, the security enhancement module of the inter-process communication service maintains a unique communication key for the channel.

消息发送过程:Message sending process:

步骤2:发送消息。容器应用进程通过系统调用,发送消息。Step 2: Send a message. The container application process sends messages through system calls.

步骤3:截获请求。系统调用截获模块,截取该系统调用,并且将该调用转发至进程间通讯服务安全增强模块进行处理。Step 3: Intercept the request. The system call interception module intercepts the system call, and forwards the call to the interprocess communication service security enhancement module for processing.

步骤3:加密消息内容。进程间通讯服务安全增强模块根据对应通信信道的密钥,加密需要发送的通信内容。Step 3: Encrypt message content. The security enhancement module of the inter-process communication service encrypts the communication content to be sent according to the key of the corresponding communication channel.

步骤4:完成发送操作。加密后的消息内容交由不可信操作系统进行发送。发送完成后返回应用进程,本次消息发送操作完成。Step 4: Complete the send operation. The encrypted message content is sent by the untrusted operating system. After the sending is completed, return to the application process, and this message sending operation is completed.

消息接受过程:Message acceptance process:

步骤2:接受消息。容器应用进程通过系统调用,接受其他进程发送的消息内容。Step 2: Accept the message. The container application process accepts the content of messages sent by other processes through system calls.

步骤3:接受消息密文。利用不可信操作系统,进行消息的接受。Step 3: Accept the message ciphertext. Use the untrusted operating system to receive messages.

步骤4:截获消息返回。消息接受完成后,截获系统调用返回操作,并由进程间通信服务安全增强模块对该返回内容进行检查处理。Step 4: The intercepted message is returned. After the message reception is completed, the system call return operation is intercepted, and the returned content is checked and processed by the inter-process communication service security enhancement module.

步骤5:解密消息内容。进程间通信服务安全增强模块对接收到的消息进行解密。Step 5: Decrypt the message content. The interprocess communication service security enhancement module decrypts the received message.

步骤6:完成接受请求。揭秘后的消息内容被发送至应用进程,本次消息接受过程完成。Step 6: Finish accepting the request. The content of the disclosed message is sent to the application process, and the message acceptance process is completed.

本实施例提供的基于ARM TrustZone的容器隔离性增强系统:The ARM TrustZone-based container isolation enhancement system provided in this embodiment:

1、可以防御所有来自容器外部应用的攻击。1. It can defend against all attacks from applications outside the container.

利用本实施例提供的可信执行环境,任意容器外部的应用程序均无法访问容器内部应用程序所使用的内存,干扰容器内部应用程序的执行状态。因此,能够本发明能够保护容器内应用以及用户隐私,不受到容器外部应用的侵害。With the trusted execution environment provided by this embodiment, any application outside the container cannot access the memory used by the application inside the container, and interferes with the execution state of the application inside the container. Therefore, the present invention can protect the application in the container and the privacy of the user, and is not infringed by the application outside the container.

2、可以防御所有来自其他容器的攻击。2. It can defend against all attacks from other containers.

可信执行环境同样将不同容器的应用进行了隔离,保证了不同容器中的应用无法访问其他应用的内存、控制状态等等,从而能够防御来自其他容器的攻击。The trusted execution environment also isolates applications in different containers, ensuring that applications in different containers cannot access the memory, control state, etc. of other applications, so as to defend against attacks from other containers.

3、可以防御所有来自不可信操作系统的软件攻击。3. It can defend against all software attacks from untrusted operating systems.

限制不可信操作系统对容器应用内存、寄存器等的直接访问,从而防止了不可信操作系统对容器应用的直接攻击(直接窃取内存数据、篡改应用控制流等)。Restrict direct access of untrusted operating systems to container application memory, registers, etc., thereby preventing untrusted operating systems from directly attacking container applications (directly stealing memory data, tampering with application control flow, etc.).

同时,对所有依赖于不可信操作系统的服务进行了检查,防止了不可信操作系统通过提供恶意系统服务,对容器应用进行攻击。At the same time, all services that depend on untrusted operating systems are checked to prevent untrusted operating systems from attacking container applications by providing malicious system services.

4、可以防御来自容器内部其他用户应用的攻击。4. It can defend against attacks from other user applications inside the container.

对容器内部不同应用间的通信,文件共享等都进行了检查。除了能够防止来自容器内其他用户应用的攻击之外,还能够防止容器内应用与不可信操作系统勾结,从而对其他用户应用/数据发起的攻击。The communication between different applications inside the container, file sharing, etc. are checked. In addition to preventing attacks from other user applications in the container, it can also prevent attacks on other user applications/data from collusion between applications in the container and untrusted operating systems.

本实施例的技术方案带来了如下有益效果:The technical scheme of this embodiment has brought the following beneficial effects:

1.利用ARM体系结构特点,提出了一种可信执行环境的构建方法,能够将现有应用程序安全运行在被攻击者完全控制的恶意操作系统之上。1. Using the characteristics of ARM architecture, a method of constructing a trusted execution environment is proposed, which can safely run existing applications on a malicious operating system that is completely controlled by attackers.

2.利用之前所述的可信之行环境,结合本发明提出的可信服务机制,使得容器内的不同用户的不同应用能够进行安全的通信与控制流同步。2. Using the trusted travel environment described above, combined with the trusted service mechanism proposed by the present invention, different applications of different users in the container can perform secure communication and control flow synchronization.

3.自动化保护来自Docker官方仓库的容器镜像,用户无需对现有镜像做任何修改。3. Automatically protect container images from Docker's official repository, and users do not need to make any modifications to existing images.

在本实施例中:In this example:

利用ARM TrustZone技术,在普通世界创建无法被操作系统访问的可信执行环境。Use ARM TrustZone technology to create a trusted execution environment in the ordinary world that cannot be accessed by the operating system.

通过去除关键指令,限制普通世界操作系统执行特殊特权指令,从而实现排它式(独占式)的页表管理。By removing key instructions, the ordinary world operating system is restricted from executing special privileged instructions, thereby realizing exclusive (exclusive) page table management.

利用ARM体系结构自带的两个不同的页表基地址寄存器,隔离普通世界不可信操作系统与容易应用进程的虚拟内存地址空间,阻止普通世界操作系统访问被分配至容器应用进程的物理内存页。Using the two different page table base address registers that come with the ARM architecture, isolate the virtual memory address space of the common world untrusted operating system and the easy application process, and prevent the common world operating system from accessing the physical memory pages allocated to the container application process .

利用TrustZone技术,挟持所有容器应用进程与普通世界操作系统之间的切换,并进一步对容器应用进程的上下文(寄存器等)进行保护,防止普通世界操作系统挟持容器应用的执行流。Using TrustZone technology, it hijacks the switching between all container application processes and the ordinary world operating system, and further protects the context (registers, etc.) of the container application process, preventing the ordinary world operating system from hijacking the execution flow of the container application.

利用硬件特性,保证容器应用所使用的文件系统的安全性。Utilize hardware features to ensure the security of the file system used by container applications.

通过挟持容器应用进程与普通世界操作系统之间的切换,检查所有文件系统的访问,对文件的读写进行加解密。同时哈希树保证文件内容的完整性。By hijacking the switching between the container application process and the ordinary world operating system, it checks the access of all file systems, and encrypts and decrypts the reading and writing of files. At the same time, the hash tree ensures the integrity of the file content.

利用TrustZone,实现容器内不同进程、不同用户之间的文件访问权限控制。Use TrustZone to control file access permissions between different processes and different users in the container.

利用TrustZone技术,保证不同容器应用进程之间控制流同步服务、进程间通讯服务的安全。Use TrustZone technology to ensure the security of control flow synchronization services and inter-process communication services between different container application processes.

挟持容器内应用进程发起的控制流同步服务系统调用,利用TrustZone技术为容器提供安全可信的控制流同步服务。The control flow synchronization service system call initiated by the application process in the container is hijacked, and the TrustZone technology is used to provide a safe and reliable control flow synchronization service for the container.

挟持容器内应用进程发起的进程间通讯服务,为不同的通信通道绑定加密密钥,保证通信数据的安全,同时对通信信道进行访问权限控制。It hijacks the inter-process communication service initiated by the application process in the container, binds encryption keys for different communication channels, ensures the security of communication data, and controls the access rights of communication channels.

利用TrustZone技术实现的可信的容器管理服务。A trusted container management service implemented with TrustZone technology.

自动化的容器镜像预处理方法,兼容现有镜像。Automated container image preprocessing method, compatible with existing images.

利用TrustZone技术识别用户发起的容器启动请求,对容器的启动参数进行完整性验证,确保被启动容器与用户请求一致。Use TrustZone technology to identify the container startup request initiated by the user, and verify the integrity of the container startup parameters to ensure that the started container is consistent with the user request.

为每一单独容器启动请求创建通讯密钥,通过挟持容器内应用与用户之间的通信信道,保护两者间通信数据的安全。Create a communication key for each individual container start request, and protect the security of the communication data between the two applications by hijacking the communication channel between the application and the user in the container.

利用TrustZone技术为每个容器应用进程维护个单独的可信执行环境,保护容器应用的内存、寄存器等数据无法被普通世界操作系统所篡改。The TrustZone technology is used to maintain a separate trusted execution environment for each container application process to protect the memory, registers and other data of the container application from being tampered with by ordinary world operating systems.

可信文件系统的实现,包括挟持应用发起的文件系统访问操作、加密/解密文件读写内容、控制容器内文件访问权限。The implementation of the trusted file system includes hijacking the file system access operation initiated by the application, encrypting/decrypting the read and write content of the file, and controlling the access permission of the file in the container.

可信进程间通讯服务与控制流同步服务。Trusted inter-process communication service and control flow synchronization service.

安全的容器管理服务,包括自动化验证下载容器镜像的完整性、自动化构建可信容器镜像、验证容器启动参数完整性以及用户与容器间通讯安全保护等。Secure container management services, including automated verification of the integrity of downloaded container images, automated construction of trusted container images, verification of the integrity of container startup parameters, and security protection of communications between users and containers.

本实施例中缩略语和关键术语定义:Definitions of abbreviations and key terms in this example:

容器:一种轻量级的虚拟化技术。利用操作系统提供的接口,能够快速启动一个用户定义的运行环境。Containers: A lightweight virtualization technology. Using the interface provided by the operating system, a user-defined operating environment can be quickly started.

Docker:一个开源的容器管理工具,能够帮助用户管理容器镜像并且启动、暂停、管理容器。Docker: An open source container management tool that helps users manage container images and start, pause, and manage containers.

Docker镜像:主要包含一个容器的文件系统,Docker能够根据Docker镜像启动一个容器。Docker image: It mainly contains a file system of a container, and Docker can start a container according to the Docker image.

Docker仓库:一个容器镜像管理平台,用户能够将自己的容器镜像上传到该仓库,也能够从仓库中下载其他用户分享的容器镜像。Docker repository: A container image management platform, users can upload their own container images to the repository, and can also download container images shared by other users from the repository.

以上对本发明的具体实施例进行了描述。需要理解的是,本发明并不局限于上述特定实施方式,本领域技术人员可以在权利要求的范围内做出各种变形或修改,这并不影响本发明的实质内容。Specific embodiments of the present invention have been described above. It should be understood that the present invention is not limited to the above-mentioned specific embodiments, and those skilled in the art can make various variations or modifications within the scope of the claims, which do not affect the essential content of the present invention.

Claims (10)

1. A container isolation enhancement system based on ARM TrustZone is characterized by comprising:
the container management client runs on the client;
the system comprises an untrusted operating system, an untrusted container management module and a trusted execution environment, wherein the untrusted operating system, the untrusted container management module and the trusted execution environment run in the common world of a server side;
the system comprises a page table management module, a register protection module, a system call clamping module, a file system security enhancement module, an execution flow synchronization service security enhancement module, an interprocess communication service security enhancement module, a trusted container mirror image downloading module and a secure container starting module which run in a server-side secure world;
wherein:
the container management client is connected with any number of containers in the common environment of the server and sends user instructions to the containers; each container runs in a trusted execution environment;
the untrusted operating system provides a running environment and required services for the application program of the container;
the untrusted container management module provides basic container management operations;
the page table management module, the register protection module and the system calling clamping module jointly complete maintenance of any number of trusted execution environments;
the file system security enhancement module, the execution flow synchronization service security enhancement module and the interprocess communication service security enhancement module jointly complete the enhancement of the security of the services of the untrusted operating system, and prevent the untrusted operating system from stealing container process privacy data and/or tampering container process control flow by providing malicious system services;
the trusted container mirror image downloading module and the secure container starting module jointly complete the provision of the secure container management function.
2. The ARM TrustZone-based container isolation enhancement system of claim 1, wherein none of the hardware resources in the trusted execution environment are directly accessible to the untrusted operating system.
3. The ARM TrustZone-based container isolation enhancement system of claim 1, wherein the page table management module manages all page tables of the entire untrusted operating system exclusively, protects the memory of the container process by controlling the page tables, and restricts the untrusted operating system from accessing the memory of the container process;
the page table management module searches all instructions for managing the page table in the kernel of the untrusted operating system and replaces the instructions with the instructions for sending corresponding requests to the page table management module; the page table management module ensures that a physical memory page storing the page table is read only in the common world, and simultaneously ensures that a code of an untrusted operating system kernel is unwritable, so that exclusive management of the page table by the page table management module is realized.
4. The ARM TrustZone-based container isolation enhancement system of claim 1, wherein the register protection module ensures that untrusted operating systems cannot directly access or modify register information of trusted execution environments; the register protection module intercepts and captures switching between all user mode processes and a kernel of a kernel-mode untrusted operating system; in the switching process, the register protection module is responsible for finishing register storage and recovery work of the trusted operating environment, so that the untrusted operating system can not randomly tamper and/or steal register information of the trusted operating environment;
the switching between the user mode process and the kernel of the kernel mode untrusted operating system comprises the following processes:
all user states enter the operation of an untrusted operating system kernel, and are realized by processing the exception; processing all exceptions is done by an exception handling function stored in an exception vector table, the address of which is stored in a physical register; the register protection module replaces all instructions for modifying the physical registers in the untrusted operating system with instructions for sending corresponding requests to the register protection module, and inserts a switching instruction in an exception handling function maintained by an exception vector table to ensure that all behaviors entering the untrusted operating system kernel are intercepted by the register protection module;
exiting from the kernel state to the user state, and completing by adopting an eret instruction; the register protection module ensures that no instruction exiting the kernel state exists in the kernel code of the untrusted operating system, and all exiting operations are forwarded to the register protection module to be completed, so that all operations exiting the kernel of the untrusted operating system can be intercepted.
5. The ARM TrustZone-based container isolation enhancement system of claim 1, wherein the system call holding module implants a specific instruction at a processing function that handles exceptions triggered at the time of the system call, ensuring that all system calls are handled by the system call holding module.
6. The ARM TrustZone-based container isolation enhancement system of claim 1, wherein the file system security enhancement module ensures privacy and integrity of a container application file system, while ensuring access rights of the file system; wherein:
the file system security enhancement module intercepts file system access operations of all containers by using a system call clamping module, and encrypts all file write operations; meanwhile, all file reading operations are correspondingly decrypted, so that the privacy of the files is ensured;
the file system security enhancement module maintains a piece of metadata for each container file, wherein the metadata comprises a hash value and a version number of file contents; the hash value and the version number are updated every time the file is written, and the latest version number is recorded by the file system security enhancement module; when the container process reads the file, the file system security enhancement module returns the read content to the container process by verifying the hash value and the version number of the read content, so as to ensure the integrity of the file;
the file system security enhancement module intercepts system calls of users corresponding to all modification containers and tracks the corresponding users of the current process; meanwhile, additionally storing a piece of authority information in the metadata of each container file, and performing authority verification on all intercepted file access operations according to the authority information;
the trusted container mirror image downloading module automatically creates original data when downloading mirror images, and the file system security enhancement module modifies the automatically created original data according to a system called by a user to form metadata of each container file; these metadata are encrypted using an encryption key unique to each container; the encryption key is protected by the file system security enhancement module and is stored in the trusted storage medium before shutdown.
7. The ARM TrustZone-based container isolation enhancement system of claim 1, wherein the execution flow synchronization service security enhancement module analyzes corresponding semantics by intercepting corresponding system calls when the execution flow synchronization service synchronizes different processes, controls an execution flow of a container process, and prevents the execution flow from being tampered with by an untrusted operating system.
8. The ARM TrustZone-based container isolation enhancement system of claim 1, wherein the interprocess communication service security enhancement module performs the following protection on the interprocess communication process according to the data transmission mode between the processes:
for direct data transfer, the interprocess communication service security enhancement module identifies all communication channels by intercepting system calls, generates a communication key for each communication channel, and encrypts these communication channels during communication;
for the data transmission mode of the shared memory, the interprocess communication service security enhancement module protects the shared memory by means of the page table management module; specifically, when the shared memory is established, the inter-process communication service security enhancement module informs the page table management module to help different container application processes to complete establishment of the shared memory; the page table management module ensures that any other process cannot map the physical memory page corresponding to the shared memory, thereby directly ensuring the safety of the inter-process communication service based on the shared memory.
9. The ARM TrustZone-based container isolation enhancement system of claim 1, wherein the trusted container mirror image downloading module is configured to verify the integrity of a downloaded container mirror image and initialize the container mirror image to ensure that the file system security enhancement module operates normally; the method specifically comprises the following steps:
establishing a trusted network connection encrypted by an SSL (secure socket layer) protocol between a trusted container mirror image downloading module and a mirror image warehouse, directly acquiring a container mirror image from the mirror image warehouse, and verifying the integrity of the mirror image by calculating a hash value; after the mirror image downloading is completed, the trusted container mirror image downloading module performs the following initialization operations on the mirror image:
generating a mirror image key unique to the mirror image, wherein the mirror image key is used for encrypting other keys in all the mirror images;
traversing all files in the mirror image, encrypting each file, calculating a hash value of the file content, and generating a metadata file; and the processed container mirror image is delivered to the untrusted container management module for storage.
10. The ARM TrustZone-based container isolation enhancement system of claim 1, wherein the secure container start module is configured to ensure security of the container when starting, ensure that the container operates correctly in a trusted execution environment, and establish a trusted communication channel for the container and a container management client; the method specifically comprises the following steps:
when the container is started, the safety container starting module verifies the integrity of the starting mirror image and ensures that the started container application runs in a trusted execution environment; the secure container launch module will negotiate a communication key with the container management client and encrypt all inputs and outputs of the container application using the communication key.
CN201810549087.6A 2018-05-31 2018-05-31 Container isolation enhancement system based on ARM TrustZone Active CN108733455B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810549087.6A CN108733455B (en) 2018-05-31 2018-05-31 Container isolation enhancement system based on ARM TrustZone

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810549087.6A CN108733455B (en) 2018-05-31 2018-05-31 Container isolation enhancement system based on ARM TrustZone

Publications (2)

Publication Number Publication Date
CN108733455A CN108733455A (en) 2018-11-02
CN108733455B true CN108733455B (en) 2020-08-18

Family

ID=63931522

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810549087.6A Active CN108733455B (en) 2018-05-31 2018-05-31 Container isolation enhancement system based on ARM TrustZone

Country Status (1)

Country Link
CN (1) CN108733455B (en)

Families Citing this family (37)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109491776B (en) * 2018-11-06 2022-05-31 北京百度网讯科技有限公司 Task scheduling method and system
CN109508225A (en) * 2018-11-15 2019-03-22 珠海市知安全科技有限公司 A kind of application container system under windows operating system
CN109522754B (en) * 2018-11-28 2021-11-19 中国科学院信息工程研究所 Core control method for trusted isolation environment of mobile terminal
CN111382131B (en) * 2018-12-27 2023-05-09 浙江大学 Data processing method, device and storage medium
CN109800596B (en) * 2018-12-27 2023-01-31 余炀 Personal data safety management system
CN111400726B (en) * 2019-01-03 2024-04-09 斑马智行网络(香港)有限公司 Data processing method, device, equipment and machine-readable medium
CN110069921B (en) 2019-04-12 2021-01-01 中国科学院信息工程研究所 A container platform-oriented trusted software authorization verification system and method
US11256785B2 (en) * 2019-07-09 2022-02-22 Microsoft Technologly Licensing, LLC Using secure memory enclaves from the context of process containers
US11003785B2 (en) 2019-07-16 2021-05-11 Advanced New Technologies Co., Ltd. Data transmission method and apparatus in tee systems
CN110427274B (en) * 2019-07-16 2020-07-17 阿里巴巴集团控股有限公司 Data transmission method and device in TEE system
CN110413382A (en) * 2019-08-06 2019-11-05 山东超越数控电子股份有限公司 A kind of method, equipment and the readable medium of the resource dynamic adjustment of Docker container
CN110825489A (en) * 2019-10-21 2020-02-21 网易(杭州)网络有限公司 Application method and device of android simulator and terminal equipment
CN111124956B (en) * 2019-11-22 2023-03-07 海光信息技术股份有限公司 A container protection method, processor, operating system and computer equipment
CN111177701B (en) * 2019-12-11 2022-09-13 北京握奇智能科技有限公司 Method and equipment for realizing cryptographic function service based on trusted execution environment and security chip
EP4097614B1 (en) * 2020-01-28 2025-06-04 C2A-SEC, Ltd. Control flow integrity system and method
CN111382445B (en) * 2020-03-03 2023-04-07 首都师范大学 Method for providing trusted service by using trusted execution environment system
EP3907637A1 (en) 2020-05-05 2021-11-10 Siemens Aktiengesellschaft Method and device for securely starting a container instance
CN111581654B (en) * 2020-05-08 2023-10-24 苏州深信达网络科技有限公司 Method for amplifying performance of encryption chip
CN111651778B (en) * 2020-05-26 2023-05-05 上海交通大学 Physical memory isolation method based on RISC-V instruction architecture
CN111859428B (en) * 2020-07-22 2022-07-19 成都安恒信息技术有限公司 Containerization-based secret key storage method and system
CN112256396B (en) * 2020-10-23 2022-10-21 海光信息技术股份有限公司 Memory management method, system, security processing device, and data processing device
CN113296887B (en) * 2021-03-31 2023-12-08 阿里巴巴(中国)有限公司 Method and device for starting safety container
CN113391880B (en) * 2021-06-21 2023-04-07 超越科技股份有限公司 Trusted mirror image transmission method for layered double hash verification
CN115729771A (en) * 2021-09-01 2023-03-03 中兴通讯股份有限公司 Kernel thread protection method, terminal and computer readable storage medium
CN113703924B (en) * 2021-09-22 2024-07-26 上海交通大学 Safe virtual machine system design method and system based on trusted execution environment
CN114035886B (en) * 2021-09-28 2023-10-03 中国科学院信息工程研究所 A container security hardening system and method for kernel data
CN114048502B (en) * 2021-10-15 2023-08-15 中国科学院信息工程研究所 Lightweight trusted channel and communication control method thereof
CN114153557A (en) * 2021-11-01 2022-03-08 平头哥(上海)半导体技术有限公司 Method and system for deploying specified application based on host machine operating system
CN114139036B (en) * 2021-11-08 2025-04-29 北京银盾泰安网络科技有限公司 A container image sharing platform and construction method thereof
CN113792276A (en) * 2021-11-11 2021-12-14 麒麟软件有限公司 Operating system user identity authentication method and system based on dual-architecture
CN116257368A (en) * 2021-12-10 2023-06-13 华为技术有限公司 A communication method in a computer system and related products
CN114491507A (en) * 2022-01-13 2022-05-13 南京翼辉信息技术有限公司 Design method for realizing lightweight safety container based on embedded real-time operating system
US12135826B2 (en) * 2022-09-06 2024-11-05 Hewlett Packard Enterprise Development Lp Securing a container ecosystem
CN119149163A (en) * 2023-06-14 2024-12-17 华为技术有限公司 Data processing method, device and computer readable storage medium
CN117076002B (en) * 2023-09-28 2024-01-02 飞腾信息技术有限公司 Safe starting method and related device
CN117573275A (en) * 2023-11-14 2024-02-20 中电云计算技术有限公司 A safe reading and writing method and system for trusted container applications based on TrustZone
CN118245170B (en) * 2024-05-28 2024-08-16 联泰集群(北京)科技有限责任公司 Container communication management method and device, electronic equipment and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102436566A (en) * 2012-01-12 2012-05-02 冶金自动化研究设计院 Dynamic trusted measurement method and safe embedded system
CN107819875A (en) * 2017-11-27 2018-03-20 深信服科技股份有限公司 User specially enjoys method of servicing and device under a kind of cloud platform

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9069637B2 (en) * 2011-07-25 2015-06-30 Intel Corporation Dynamic feature enhancement in client server applications and high volume server deployment with dynamic app store integration

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102436566A (en) * 2012-01-12 2012-05-02 冶金自动化研究设计院 Dynamic trusted measurement method and safe embedded system
CN107819875A (en) * 2017-11-27 2018-03-20 深信服科技股份有限公司 User specially enjoys method of servicing and device under a kind of cloud platform

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
vTZ: Virtualizing ARM TrustZone;ZhichaoHua etl;《This paper is included in the Proceedings of the 》;20170816;第541-556页 *
基于 TrustZone 技术的安全移动远程控制系统;夏虞斌等;《计算机工程》;20160430;第42卷(第4期);第147-154页 *

Also Published As

Publication number Publication date
CN108733455A (en) 2018-11-02

Similar Documents

Publication Publication Date Title
CN108733455B (en) Container isolation enhancement system based on ARM TrustZone
US11693951B2 (en) Method and apparatus for applying application context security controls for software containers
JP7046111B2 (en) Automatic detection during malware runtime
US10708051B2 (en) Controlled access to data in a sandboxed environment
CN104392188B (en) A kind of secure data store method and system
CN107077428B (en) Method, electronic system and computer storage medium for protecting application secret
US10454902B2 (en) Techniques for secure data extraction in a virtual or cloud environment
Zhao et al. vsgx: Virtualizing sgx enclaves on amd sev
Suciu et al. Horizontal privilege escalation in trusted applications
JP2016523421A (en) Method, data processing program, computer program product, and data processing system for handling guest events in a system controlled by a hypervisor
US12135657B2 (en) Architecture, system and methods thereof for secure computing using hardware security classifications
Ports et al. Towards Application Security on Untrusted Operating Systems.
Onarlioglu et al. Privexec: Private execution as an operating system service
CN108595982A (en) A kind of secure computing architecture method and device based on more container separating treatments
Richter et al. Isolating operating system components with Intel SGX
US20220129593A1 (en) Limited introspection for trusted execution environments
Lapid et al. Navigating the samsung trustzone and cache-attacks on the keymaster trustlet
US20220245255A1 (en) Systems and methods for processor virtualization
EP4339823B1 (en) Zero-trust cloud deployment
Bhudia et al. RansomClave: ransomware key management using SGX
Zhang et al. QKPT: securing your private keys in cloud with performance, scalability and transparency
Park et al. CAFE: A virtualization-based approach to protecting sensitive cloud application logic confidentiality
Zhao Wideshears: Investigating and breaking widevine on QTEE
Bove Secure Services for Standard RISC-V Architectures
Quaresma TrustZone based attestation in secure runtime verification for embedded systems

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