<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Publishing DTD v1.1 20151215//EN" "http://jats.nlm.nih.gov/publishing/1.1/JATS-journalpublishing1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" article-type="research-article" dtd-version="1.1">
<front>
<journal-meta>
<journal-id journal-id-type="pmc">CMC</journal-id>
<journal-id journal-id-type="nlm-ta">CMC</journal-id>
<journal-id journal-id-type="publisher-id">CMC</journal-id>
<journal-title-group>
<journal-title>Computers, Materials &#x0026; Continua</journal-title>
</journal-title-group>
<issn pub-type="epub">1546-2226</issn>
<issn pub-type="ppub">1546-2218</issn>
<publisher>
<publisher-name>Tech Science Press</publisher-name>
<publisher-loc>USA</publisher-loc>
</publisher>
</journal-meta>
<article-meta>
<article-id pub-id-type="publisher-id">19432</article-id>
<article-id pub-id-type="doi">10.32604/cmc.2021.019432</article-id>
<article-categories>
<subj-group subj-group-type="heading">
<subject>Article</subject>
</subj-group>
</article-categories>
<title-group>
<article-title>Container Introspection: Using External Management Containers to Monitor Containers in Cloud Computing</article-title>
<alt-title alt-title-type="left-running-head">Container Introspection: Using External Management Containers to Monitor Containers in Cloud Computing</alt-title>
<alt-title alt-title-type="right-running-head">Container Introspection: Using External Management Containers to Monitor Containers in Cloud Computing</alt-title>
</title-group>
<contrib-group content-type="authors">
<contrib id="author-1" contrib-type="author" corresp="yes">
<name name-style="western"><surname>Zhan</surname><given-names>Dongyang</given-names></name>
<xref ref-type="aff" rid="aff-1">1</xref>
<email>zhandy@hit.edu.cn</email>
</contrib>
<contrib id="author-2" contrib-type="author">
<name name-style="western"><surname>Tan</surname><given-names>Kai</given-names></name>
<xref ref-type="aff" rid="aff-1">1</xref>
</contrib>
<contrib id="author-3" contrib-type="author">
<name name-style="western"><surname>Ye</surname><given-names>Lin</given-names></name>
<xref ref-type="aff" rid="aff-1">1</xref>
<xref ref-type="aff" rid="aff-2">2</xref>
</contrib>
<contrib id="author-4" contrib-type="author">
<name name-style="western"><surname>Yu</surname><given-names>Haining</given-names></name>
<xref ref-type="aff" rid="aff-1">1</xref>
<xref ref-type="aff" rid="aff-3">3</xref>
</contrib>
<contrib id="author-5" contrib-type="author">
<name name-style="western"><surname>Liu</surname><given-names>Hao</given-names></name>
<xref ref-type="aff" rid="aff-4">4</xref>
</contrib>
<aff id="aff-1"><label>1</label><institution>School of Cyberspace Science, Harbin Institute of Technology</institution>, <addr-line>Harbin, 150001</addr-line>, <country>China</country></aff>
<aff id="aff-2"><label>2</label><institution>Temple University</institution>, <addr-line>Philadelphia, 19122</addr-line>, <country>USA</country></aff>
<aff id="aff-3"><label>3</label><institution>City University of Hong Kong</institution>, <addr-line>Kowloon Tong, 518057</addr-line>, <country>Hong Kong</country></aff>
<aff id="aff-4"><label>4</label><institution>Qianxin Technology Group Co., Ltd.</institution>, <addr-line>Beijing, 100000</addr-line>, <country>China</country></aff>
</contrib-group>
<author-notes>
<corresp id="cor1"><label>&#x002A;</label>Corresponding Author: Dongyang Zhan. Email: <email>zhandy@hit.edu.cn</email></corresp>
</author-notes>
<pub-date pub-type="epub" date-type="pub" iso-8601-date="2021-08-23"><day>23</day>
<month>08</month>
<year>2021</year></pub-date>
<volume>69</volume>
<issue>3</issue>
<fpage>3783</fpage>
<lpage>3794</lpage>
<history>
<date date-type="received"><day>13</day><month>4</month><year>2021</year></date>
<date date-type="accepted"><day>06</day><month>6</month><year>2021</year></date>
</history>
<permissions>
<copyright-statement>&#x00A9; 2021 Zhan et al.</copyright-statement>
<copyright-year>2021</copyright-year>
<copyright-holder>Zhan et al.</copyright-holder>
<license xlink:href="https://creativecommons.org/licenses/by/4.0/">
<license-p>This work is licensed under a <ext-link ext-link-type="uri" xlink:type="simple" xlink:href="https://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution 4.0 International License</ext-link>, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.</license-p>
</license>
</permissions>
<self-uri content-type="pdf" xlink:href="TSP_CMC_19432.pdf"></self-uri>
<abstract>
<p>Cloud computing plays an important role in today&#x0027;s Internet environment, which meets the requirements of scalability, security and reliability by using virtualization technologies. Container technology is one of the two mainstream virtualization solutions. Its lightweight, high deployment efficiency make container technology widely used in large-scale cloud computing. While container technology has created huge benefits for cloud service providers and tenants, it cannot meet the requirements of security monitoring and management from a tenant perspective. Currently, tenants can only run their security monitors in the target container, but it is not secure because the attacker is able to detect and compromise the security monitor. In this paper, a secure external monitoring approach is proposed to monitor target containers in another management container. The management container is transparent for target containers, but it can obtain the executing information of target containers, providing a secure monitoring environment. Security monitors running inside management containers are secure for the cloud host, since the management containers are not privileged. We implement the transparent external management containers by performing the one-way isolation of processes and files. For process one-way isolation, we leverage Linux namespace technology to let management container become the parent of target containers. By mounting the file system of target container to that of the management container, file system one-way isolation is achieved. Compared with the existing host-based monitoring approach, our approach is more secure and suitable in the cloud environment.</p>
</abstract>
<kwd-group kwd-group-type="author">
<kwd>Container introspection</kwd>
<kwd>management container</kwd>
<kwd>external approach</kwd>
<kwd>one-way isolation</kwd>
</kwd-group>
</article-meta>
</front>
<body>
<sec id="s1"><label>1</label><title>Introduction</title>
<p>Cloud computing is one of the most important computing infrastructures, which is necessary for the development of the Internet of things and big data. There are many popular cloud service providers (e.g., Amazon, Microsoft, Google) hosting the applications of lots of developers or companies. Cloud computing is based on virtualization technology, which can divide huge physical resources into many small virtual resources. There are two mainstream virtualization technologies, including virtual machine and container. Each virtual machine has its own operating system kernel, making it heavyweight and less efficient in deployment. Compared with virtual machines, containers are lightweight and more efficient in deployment, because they share the operating system kernel with the host. Therefore, it is more popular.</p>
<p>The widespread development of cloud computing and containers has also brought security risks. In a cloud computing environment with multi-tenant tenants, tenants need to monitor and manage their container instances. However, the current host-based or container-based monitoring methods cannot meet the requirements of security and flexibility in cloud computing. Firstly, container-based monitors running inside target containers can be detected or subverted by in-container attackers, since they are running in the same namespace. Although monitors can be executed in the host to hide themselves, it is not secure in the cloud since host applications are privileged for all containers. Secondly, redirecting execution information of target containers to security monitors of cloud tenants is not flexible, because it needs the close cooperation of the cloud host. It is not practicable for cloud service providers to corporate with each cloud tenant.</p>
<p>In this paper, an external container monitoring architecture is proposed to solve these problems. In this architecture, monitoring tools of cloud tenants or CSPs are deployed in external management containers, which can intercept the execution information of target containers but are transparent to them. The external container provides a secure and flexible monitoring environment for security tools. Security tools running inside the management containers are transparent and isolated to target containers. Since the management container is unprivileged, in-container security tools cannot affect host security. So, cloud tenants can run security tools as they want. After providing a one-way transparent monitoring environment, CSP needs not to closely cooperate with different security tools of cloud tenants. Therefore, our architecture is more secure and flexible compared with existing host-based or container-based security monitoring approaches.</p>
<p>To achieve one-way transparent management containers, process and file one-way isolation approaches are proposed. For process isolation, we leverage Linux namespace technology to make management container become the parent of target containers. Since parent namespace has full privilege over child namespace, security tools running in management container can intercept the execution information of target containers, and are transparent to them. We do not leverage the container-in-container solution to achieve one-way isolation, because it needs the parent container to be privileged. For file isolation, we mount the file system of the target container to that of the management container. Therefore, security tools can access files of target containers transparently. After the implementation, we test the effectiveness and performance of our prototype. The experimental results show that our system can make security tools be transparent to target containers with high performance.</p>
<p>In summary, the contributions of this paper are as follows.
<list list-type="bullet">
<list-item><p>An external container monitoring approach is proposed to build management containers over target containers. Security tools running inside management containers are transparent to target containers, but can intercept the execution information of them.</p></list-item>
<list-item><p>A namespace-based process isolation approach is proposed by making the namespace of the management container to be the parent of target containers and ensuring the access security of the management container.</p></list-item>
<list-item><p>For file isolation, a file-system-based file introspection method is used for the management containers to access the files of target containers outside.</p></list-item>
</list></p>
<p>The rest of this paper is organized as follows. Section 2 gives the related work. The system design is described in Section 3. The design details about process introspection and file system introspection are given in Section 4 and Section 5 respectively. Section 6 evaluates the effectiveness and performance of the prototype. Section 7 concludes this paper and discusses the future work.</p>
</sec>
<sec id="s2"><label>2</label><title>Related Work</title>
<p>At present, container introspection technology is still a new research topic, and this concept is related with cloud security, virtual machine introspection and container security technologies [<xref ref-type="bibr" rid="ref-1">1</xref>,<xref ref-type="bibr" rid="ref-2">2</xref>].</p>
<sec id="s2_1"><label>2.1</label><title>Virtual Machine Introspection</title>
<p>The current research direction closest to the container introspection technology is virtual machine introspection (VMI) [<xref ref-type="bibr" rid="ref-3">3</xref>], which monitors VMs from the hypervisor. The hypervisor has the highest privilege and can intercept the execution information of target VMS. Under the framework of VMI, the monitoring of the VMs generally includes three steps: execution information collection, semantic reconstruction, and behavior analysis.</p>
<p>There are two approaches to collect VM information, including static analysis and dynamic interception. CFMT [<xref ref-type="bibr" rid="ref-4">4</xref>] obtains the contents of the VM disk from the outside and saves the checksums of all the original file contents in the VM files. Then it compares the checksum of the existing contents with the original one during each poll to detect whether there the file has been tampered with. VMWatcher [<xref ref-type="bibr" rid="ref-5">5</xref>] maps the file systems of a VM to the privileged virtual machine (DOM0), and uses anti-virus software to perform security analysis on these files to protect the security of the VM.</p>
<p>Compared with static approaches, dynamic approaches can obtain the execution information in real time. Ether [<xref ref-type="bibr" rid="ref-6">6</xref>] can capture the behavior of virtual machine system calls in real time. The system modifies the content of a specific register (MSR register) of the target VM. When the VM executes a system call, it throws an exception, which can trigger an event in the hypervisor. At this time, Ether can obtain specific information about the system call, such as call number and parameters. Nitro [<xref ref-type="bibr" rid="ref-7">7</xref>] is similar to Ether, but Ether is designed for the Xen platform and Nitro works in KVM platform.</p>
<p>The execution information collected in the VMM layer is binary low-level information, but security analysis needs high-level information. After collection, it needs to be reconstructed into high-level semantic information. Filesafe [<xref ref-type="bibr" rid="ref-8">8</xref>] reconstructs file system from disk image based on the layout of Windows FAT32 file system and then maps files and disk blocks. vMon [<xref ref-type="bibr" rid="ref-9">9</xref>] reconstructs the map between file and disk block for Linux VM. Volatility is an open-source memory analysis tool, which can reconstruct kernel objects from binary memory snapshot based on the profiles of layouts of different operating systems. Reference [<xref ref-type="bibr" rid="ref-10">10</xref>] can identify the kernel version by analyzing the VM kernel automatically.</p>
<p>VMI-based security tools are usually applied for cloud security [<xref ref-type="bibr" rid="ref-11">11</xref>&#x2013;<xref ref-type="bibr" rid="ref-13">13</xref>], such as CloudVMI [<xref ref-type="bibr" rid="ref-14">14</xref>], SECLOUD [<xref ref-type="bibr" rid="ref-15">15</xref>] and ESI-Cloud [<xref ref-type="bibr" rid="ref-16">16</xref>].</p>
</sec>
<sec id="s2_2"><label>2.2</label><title>Container Security</title>
<p>Container security [<xref ref-type="bibr" rid="ref-17">17</xref>] is a hot topic, so there are many works to analyze and protect container security. Reference [<xref ref-type="bibr" rid="ref-18">18</xref>] compares virtual machines and containers. Compared to virtual machine technology, containers are more light-weight and can reduce the resource consumption, because containers share the operating system of the host. But it also raises security risks due to the huge attack surface of the operating system. In addition, the ecosystem of the Docker containers also contains security challenges, this paper also focuses the security of it.</p>
<p>SCONE [<xref ref-type="bibr" rid="ref-19">19</xref>] leverages Intel SGX technology to protect the Docker containers from external malicious attacks and the untrusted cloud hosts. To defense against container escalation attacks, Reference [<xref ref-type="bibr" rid="ref-20">20</xref>] proposes an escape defense method by checking the status of Linux Namespace, which can detect abnormal processes and prevent users from malicious escaping behaviors. Reference [<xref ref-type="bibr" rid="ref-21">21</xref>] focuses on strengthening the Docker&#x0027;s access restriction, and hopes to extend the dockerfile format so that the Docker image maintainer can provide the SELinux security policies to enhance the security of the container. SELinux is widely used to enhance the security of certain service programs, the expansion and adjustment of dockerfile will allow SELinux security policies to be specified for different images, improving the security of Docker. Reference [<xref ref-type="bibr" rid="ref-22">22</xref>] exploits the Linux cgroups from containers and proves that cgroups technology is not enough to limit the resource access of containers in cloud computing.</p>
</sec>
<sec id="s2_3"><label>2.3</label><title>Container Introspection Technology</title>
<p>To analyze the security of containers, Reference [<xref ref-type="bibr" rid="ref-23">23</xref>] uses the introspection tool Prometheus to capture the information including the Docker engine itself and the memory usage of the container and the host OS. This method analyzes the data difference between the Apache server running in the container during normal operation and when it is infected by malware, and concludes that introspection tools can be used as data collection and forensic analysis tools for the early warning system in the containerized system. Reference [<xref ref-type="bibr" rid="ref-24">24</xref>] proposes a malicious node identification method.</p>
<p>In summary, there has not been much research on the concept of container introspection technology. This paper is a preliminary exploration of this concept.</p>
</sec>
</sec>
<sec id="s3"><label>3</label><title>Design of Container Introspection</title>
<p>This section describes the design overview of our system. We first give the motivation and then describe the threat model and assumption. After that, two one-way isolation approaches for process and file system are proposed.</p>
<sec id="s3_1"><label>3.1</label><title>Motivation</title>
<p>With the development and wide application of container technology, more and more containers are deployed in cloud computing. Containers are facing increasing security risks since they are providing services on the Internet. Therefore, many cloud tenants and cloud service providers need to manage and monitor their containers. There are several security and flexibility requirements of container monitoring, which are as follows.
<list list-type="simple">
<list-item><p>RQ1: Monitoring tools should be secure. Many containers execute processes with root privilege by default. It is not secure for monitors running inside them. Even though container processes are not privileged, they can also detect monitoring tools, which is not secure for monitoring tools.</p></list-item>
<list-item><p>RQ2: Security tools should be isolated from the host. Processes running inside containers can be accessed in the host, but it is not secure to run security tools of cloud tenants in the host in cloud computing.</p></list-item>
<list-item><p>RQ3: Cloud service providers should not closely cooperate with security tools. Another monitoring solution in the context of virtual machines is that the host intercepts execution information of the target VM and then sends it to the security tools running inside another secure VM. In the context of containers, it is possible for CSP to transmit the execution information of target containers to a secure container. However, this solution needs the close cooperation of CSPs. CSPs need to provide the customized monitoring APIs or required information for different monitors. It is very complicated for CSPs to perform API authorization and access control, since there are many containers of different cloud tenants running on the host.</p></list-item>
</list></p>
<p>To meet these requirements, this paper proposes an external approach for container introspection, which builds a one-way isolated management container over target containers. The management container is a secure and flexible environment for monitoring tools.</p>
</sec>
<sec id="s3_2"><label>3.2</label><title>Threat Model &#x0026; Assumptions</title>
<p>Before describing the design of our system, we first discuss the threat model and some assumptions.</p>
<p>We first assume that containers cannot escape to the cloud host. Container privilege escalation is a serious attack for cloud computing and security researchers are keeping fix vulnerabilities in the host kernel. But currently there no perfect host-based solution to defense container privilege escalation. Therefore, we do not consider container escape attack in this paper.</p>
<p>In addition, the CSPs are considered to be trusted, which is a common trust base in cloud computing. Most security monitors in cloud computing rely on the isolation provided by cloud hosts or hypervisors. The design of our system is also based on the security protection of cloud hosts.</p>
<p>Cloud tenants are responsible for the security of their security monitors. In this paper, we do not analyze the security of monitoring tools from cloud tenants and do not provide mechanisms for cloud tenants to intercept their security monitors.</p>
</sec>
<sec id="s3_3"><label>3.3</label><title>System Overview</title>
<p>The core method of our system is to build a one-way isolation management container, which can intercept the execution information of target containers but is transparent to them. The architecture of our system is shown in <?A3B2 "fig1",5,"anchor"?><xref ref-type="fig" rid="fig-1">Fig. 1</xref>.</p>
<fig id="fig-1"><label>Figure 1</label><caption><title>The system architecture of container introspection</title></caption><graphic mimetype="image" mime-subtype="png" xlink:href="CMC_19432-fig-1.png"/> </fig>
<p>The host provides OS virtualization service for containers, which has the highest privilege and isolates different containers. There are two modules in the system, building the one-way isolation environment for management containers. The PID NS management module makes the PID namespace of the management container be the parent of target containers by leveraging the host namespace mechanism. After that, the management container can intercept the process information of the target containers without the cooperation of the host. File system management module analyzes the structure of target containers and mounts them to the management container. Security tools of cloud tenants run in the management container, so that they can access the execution information of target containers. There can be many target containers managed by only one management container.</p>
</sec>
</sec>
<sec id="s4"><label>4</label><title>Namespace-based Process Introspection</title>
<p>We leverage the Linux namespace mechanism to achieve one-way process isolation. The main steps include: 1) constructing a parent PID namespace of target containers; 2) letting the management container join the parent namespace dynamically; 3) hiding other processes of the parent PID namespace. At first, we make a brief introduction of Linux namespaces.</p>
<sec id="s4_1"><label>4.1</label><title>Linux PID Namespace</title>
<p>There are 6 different namespaces introduced by the Linux kernel after v2.6. These namespaces are used to isolate different kinds of resources for containers, including PID namespace, UTS namespace, IPC namespace, MNT namespace, NET namespace and USER namespace. Among them, the PID namespace is used for process domain isolation. The relationship between different PID namespaces is shown in <?A3B2 "fig2",5,"anchor"?><xref ref-type="fig" rid="fig-2">Fig. 2</xref>. Only processes within the same PID namespace could see each other. The parent PID namespace has full privilege over child namespaces. Processes of child namespace are mapped into parent namespace. For instance, Process 1 of Namespace 1 is mapped as Process 5 in Namespace 0, so all of the processes in Namespace 0 are able to see it. For the Docker container, a new namespace is automatically created when the container is created. All processes running inside one container belong to the same PID namespace, so they can see each other. Since different containers have different PID namespaces, processes of different containers can see each other.</p>
<p>Inspired by the PID namespace, we found that if the PID namespace of the management container is that of the target container, the management container can visit the processes of the target container transparently.</p>
</sec>
<sec id="s4_2"><label>4.2</label><title>Docker-in-docker Architecture</title>
<p>There are several docker-in-docker solutions (e.g., dind), which make the docker create a new docker inside it. A child namespace can also be the parent of other namespaces. Based on this mechanism, running a docker in another docker is possible. But most dockers cannot create child dockers, because there are several challenges First, the parent docker should be privileged. However, privileged dockers are not safe and not accepted in cloud computing. Second, the file system of Docker (AUFS) should only consist of normal file systems, which means docker cannot run based on multiple AUFS file systems. These challenges are shortcomings of dind. So, dind should be created by Docker with &#x2018;privileged&#x2019; flag, and the file system of child docker should be a volume of the parent docker.</p>
<fig id="fig-2"><label>Figure 2</label><caption><title>The relationship between different namespaces</title></caption><graphic mimetype="image" mime-subtype="png" xlink:href="CMC_19432-fig-2.png"/></fig>
<p>Even though docker-in-docker solutions can build multiple levels of namespaces and make external monitoring possible, the security risks of privileged containers are unacceptable in cloud computing. Therefore, our approach leverages the architecture of the docker-in-docker solution and tries to overcome the problems of it.</p>
</sec>
<sec id="s4_3"><label>4.3</label><title>Joining into Parent Namespace</title>
<p>To address the problems of the docker-in-docker solution, our system is based on the docker-in-docker solution but does not execute security monitors directly in the parent docker. The main approach is to let the target containers run inside a parent container, and then let management container join the PID namespace of the parent docker. The steps are as follows.
<list list-type="simple">
<list-item><label>1)</label><p>Creating a parent container. When a cloud tenant creates her first container, the host first creates a parent container. This container can create child containers, so it is created with the &#x2018;privileged&#x2019; flag. But this step is transparent to the cloud tenants, and the tenants cannot operate the parent container.</p></list-item>
<list-item><label>2)</label><p>Creating target containers. Target containers are created within the parent container, so the PID namespace of the parent container is the parent of those of target containers. Parent container has the client which can create child containers for cloud tenant. Only containers of the same cloud tenant can be created in one parent container.</p></list-item>
<list-item><label>3)</label><p>Creating the management container. Management container is the execution environment of security monitors. To access the information of target containers, we let it join the PID namespace of the parent container, when it is created. Since this container only shares the same PID namespace of the parent container, it is not as privileged as the parent container. Therefore, it is more secure.</p></list-item>
</list></p>
</sec>
<sec id="s4_4"><label>4.4</label><title>Process Hiding</title>
<p>Since the management container shares the same PID namespace of the parent container, the management container can obtain the process information of client tools of the parent container, making the parent container be visible. To overcome this problem, we leverage a kernel module to hide the client in the parent container.</p>
<p>The process hiding approach is inspired by kernel rootkits. Kernel rootkits are used to hide processes or files in operating systems. They usually hook kernel functions and inject malicious code in kernel system calls. Among them, adore-ng is a popular rootkit, which is used for process and file hiding. It injects malicious code into several system calls (e.g., gedents64, etc.). The injected code deletes the process that needed to be hidden from the result list.</p>
<p>Our process hiding module is also based on the idea of kernel rootkit, hooking some key kernel functions and injecting code into several system calls (e.g., getdents). The difference is the module only hides the process information of the client from the management container. Since the management container and parent container share the same PID namespace, we hide the client process in the parent container from other processes within this namespace. Therefore, the most important step is to identify the processes of different namespaces.</p>
<p>To address this challenge, we first explore the relationship between processes and namespaces. In Linux, all task structures are linked by a doubly linked list, which first task is labeled with the &#x2018;init_task&#x2019; symbol. As shown in <?A3B2 "fig3",5,"anchor"?><xref ref-type="fig" rid="fig-3">Fig. 3</xref>, every task structure has a nsproxy object to record its different namespaces. The pid_ns fields of different tasks in a same container point to only one PID namespace object, so we can identify all the processes of a container in the kernel by identifying the pid_ns pointer of its task structure.</p>
<fig id="fig-3"><label>Figure 3</label><caption><title>Relationship between process structure and namespace</title></caption><graphic mimetype="image" mime-subtype="png" xlink:href="CMC_19432-fig-3.png"/></fig>
<p>When a parent container is created, the corresponding PID namespace is identified. Then, the pid of client in the parent container is obtained. After that, the namespace and pid are transferred to the kernel module via a customized system call. The kernel module reads the information and performs process hiding. If a process of parent container wants to obtain the process list by using ps command, the result of the system call is checked and the information of the client is cleared.</p>
</sec>
</sec>
<sec id="s5"><label>5</label><title>File System Introspection</title>
<p>The file system introspection is based on the AUFS file system, which is widely used by the Docker containers. So, we first make a brief introduction of AUFS, and then describe how we leverage AUFS to perform external file system introspection.</p>
<p>AUFS (short for advanced multi-layered unification file system) is an implementation of the Union File System, which can merge file directories stored in different locations and mount them to the same directory. As shown in <?A3B2 "fig4",5,"anchor"?><xref ref-type="fig" rid="fig-4">Fig. 4</xref>, the file system is copy-on-write. There are several layers in the file system of a docker. The lower layers are image layers, which are read-only. Therefore, these layers can be used for many dockers at the same time. The upper layer is writable, which records the modifications to the underlying images. When files are added, deleted, and modified in the container, a runtime copy will be generated in the upper layer. All the layers are mounted to the same directory with a number, which is not the ID of the container. So, we need to find the correspondence between this number and the container ID.</p>
<fig id="fig-4"><label>Figure 4</label><caption><title>File system introspection</title></caption><graphic mimetype="image" mime-subtype="png" xlink:href="CMC_19432-fig-4.png"/></fig>
<p>Based on the features of AUFS, we achieve the one-way file system isolation by mounting the mount point of the target container in the host to a subdirectory of the management container and analyzing the mapping between container ID and mount ID automatically, which is shown in <xref ref-type="fig" rid="fig-4">Fig. 4</xref>. In addition, when the target containers are going to be removed, the file system of it should be unmounted from the management container first, to prevent the failure of container removal.</p>
</sec>
<sec id="s6"><label>6</label><title>Evaluation</title>
<p>This section evaluates the effectiveness and performance of our system. The testbed is a PC equipped with 3.2&#x2005;GHz Intel i5 CPU and 8 GB RAM. The host operating system is Ubuntu 16.04. Dind is selected as the image of the parent container. The image of the target container is Ubuntu 14.04.</p>
<sec id="s6_1"><label>6.1</label><title>Effectiveness</title>
<p>Our system can obtain the process information and files of the target container from the management container, so the first step is to deploy the monitoring tools in the management container after deploying the target container. We test the effectiveness of process introspection and file system introspection respectively.</p>
<p>To test the effectiveness of process introspection, we first introduce a workload in the target container and then run the &#x2018;ps&#x2019; command in management to obtain the process list of the target container. The target container is running the ps command, and the management container is able to get the corresponding process information. Then, we run the ping command in the management container, and run the ps command in the target container. The results show that the processes of the management container are transparent to the target container.</p>
<p>We obtain the file list of the target container in the management container to test the effectiveness of file introspection. As shown in <?A3B2 "fig5",5,"anchor"?><xref ref-type="fig" rid="fig-5">Fig. 5</xref>, we first add a new file in the target container, then get the file list in the management container in <?A3B2 "fig6",5,"anchor"?><xref ref-type="fig" rid="fig-6">Fig. 6</xref>. From the result, we can know that the management container is able to access the file system of target containers.</p>
<fig id="fig-5"><label>Figure 5</label><caption><title>Adding a file in the target container</title></caption><graphic mimetype="image" mime-subtype="png" xlink:href="CMC_19432-fig-5.png"/></fig>
<fig id="fig-6"><label>Figure 6</label><caption><title>Accessing files from the parent container</title></caption><graphic mimetype="image" mime-subtype="png" xlink:href="CMC_19432-fig-6.png"/></fig>
</sec>
<sec id="s6_2"><label>6.2</label><title>Performance</title>
<p>Since our system introduces a parent container to user containers, the parent container will consume file space. Therefore, we measure the size of the dind image, which is 533 MB. According to the results, the space cost is acceptable for cloud computing.</p>
<p>There is a kernel module to hide the client processes in parent containers, which could introduce overhead to the &#x2018;ps&#x2019; command. So, we test the execution time before and after the injection of the kernel module for 1000 times, and then compare the performance. The average execution time of &#x2018;ps&#x2019; before module injection is about 23.05&#x2005;ms, and it is 23.2&#x2005;ms after injection. The experimental results show that the overhead is acceptable since the &#x2018;ps&#x2019; operation is not time-sensitive.</p>
</sec>
</sec>
<sec id="s7"><label>7</label><title>Conclusion &#x0026; Future Work</title>
<p>This paper proposes an external container introspection approach to monitor target containers from a management container, which is built by achieving a one-way transparent process and file isolation. Based on Linux namespaces, the namespace of the management container is the parent of target containers, so security tools running inside the management container can obtain the execution information of the target containers. For file system introspection, we analyze and mount the file system of target container to the management container. After the implementation, we test the prototype. The experimental results show that our system is effective with acceptable overhead. In this paper, we do not analyze cross-host containers of one cloud tenant. Containers belonging to one cloud tenant may be deployed in different physical cloud hosts, but our system can only analyze containers in one host. To analyze cross-host containers of one cloud tenant, we need to correlate and analyze different cloud hosts. This work is left to future work.</p>
</sec>
</body>
<back>
<fn-group>
<fn fn-type="other"><p><bold>Funding Statement:</bold> This paper is supported by National Natural Science Foundation of China (<uri xlink:href="http://www.nsfc.gov.cn/">http://www.nsfc.gov.cn/</uri>) under Grant No. 61872111, and Sichuan Science and Technology Program (<uri xlink:href="http://kjt.sc.gov.cn/">http://kjt.sc.gov.cn/</uri>) under Grant No. 2019YFSY0049 which are both received by L. Ye.</p></fn>
<fn fn-type="conflict"><p><bold>Conflicts of Interest:</bold> The authors declare that they have no conflicts of interest to report regarding the present study.</p></fn>
</fn-group>
<ref-list content-type="authoryear">
<title>References</title>
<ref id="ref-1"><label>[1]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>L.</given-names> <surname>Jiang</surname></string-name> and <string-name><given-names>Z.</given-names> <surname>Fu</surname></string-name></person-group>, &#x201C;<article-title>Privacy-preserving genetic algorithm outsourcing in cloud computing</article-title>,&#x201D; <source>Journal of Cyber Security</source>, vol. <volume>2</volume>, no. <issue>1</issue>, pp. <fpage>49</fpage>&#x2013;<lpage>61</lpage>, <year>2020</year>.</mixed-citation></ref>
<ref id="ref-2"><label>[2]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>W. M.</given-names> <surname>Eid</surname></string-name>, <string-name><given-names>S.</given-names> <surname>Atawneh</surname></string-name> and <string-name><given-names>M.</given-names> <surname>Al-Akhras</surname></string-name></person-group>, &#x201C;<article-title>Framework for cybersecurity centers to mass scan networks</article-title>,&#x201D; <source>Intelligent Automation &#x0026; Soft Computing</source>, vol. <volume>26</volume>, no. <issue>6</issue>, pp. <fpage>1319</fpage>&#x2013;<lpage>1334</lpage>, <year>2020</year>.</mixed-citation></ref>
<ref id="ref-3"><label>[3]</label><mixed-citation publication-type="conf-proc"><person-group person-group-type="author"><string-name><given-names>T.</given-names> <surname>Garfinkel</surname></string-name> and <string-name><given-names>R.</given-names> <surname>Mendel</surname></string-name></person-group>, &#x201C;<article-title>A virtual machine introspection based architecture for intrusion detection</article-title>,&#x201D; in <conf-name>Proc. NDSS</conf-name>, <conf-loc>San Diego, California, USA</conf-loc>, pp. <fpage>191</fpage>&#x2013;<lpage>206</lpage>, <year>2003</year>.</mixed-citation></ref>
<ref id="ref-4"><label>[4]</label><mixed-citation publication-type="conf-proc"><person-group person-group-type="author"><string-name><given-names>S.</given-names> <surname>Anjali</surname></string-name>, <string-name><given-names>S.</given-names> <surname>Gupta</surname></string-name> and <string-name><given-names>K.</given-names> <surname>Padam</surname></string-name></person-group>, &#x201C;<article-title>A light weight centralized file monitoring approach for securing files in cloud environment</article-title>,&#x201D; in <conf-name>Proc. ICITST</conf-name>, <conf-loc>London, UK</conf-loc>, pp. <fpage>382</fpage>&#x2013;<lpage>387</lpage>, <year>2012</year>.</mixed-citation></ref>
<ref id="ref-5"><label>[5]</label><mixed-citation publication-type="conf-proc"><person-group person-group-type="author"><string-name><given-names>X.</given-names> <surname>Jiang</surname></string-name>, <string-name><given-names>X.</given-names> <surname>Wang</surname></string-name> and <string-name><given-names>D.</given-names> <surname>Xu</surname></string-name></person-group>, &#x201C;<article-title>Stealthy malware detection through vmm-based&#x201D; out-of-the-box&#x201D; semantic view reconstruction</article-title>,&#x201D; in <conf-name>Proc. CCS</conf-name>, <conf-loc>Alexandria, Virginia, USA</conf-loc>, pp. <fpage>128</fpage>&#x2013;<lpage>138</lpage>, <year>2007</year>.</mixed-citation></ref>
<ref id="ref-6"><label>[6]</label><mixed-citation publication-type="conf-proc"><person-group person-group-type="author"><string-name><given-names>A.</given-names> <surname>Dinaburg</surname></string-name>, <string-name><given-names>P.</given-names> <surname>Royal</surname></string-name>, <string-name><given-names>M.</given-names> <surname>Sharif</surname></string-name> and <string-name><given-names>W.</given-names> <surname>Lee</surname></string-name></person-group>, &#x201C;<article-title>Ether: Malware analysis via hardware virtualization extensions</article-title>,&#x201D; in <conf-name>Proc. CCS</conf-name>, <conf-loc>Alexandria, Virginia, USA</conf-loc>, pp. <fpage>51</fpage>&#x2013;<lpage>62</lpage>, <year>2008</year>.</mixed-citation></ref>
<ref id="ref-7"><label>[7]</label><mixed-citation publication-type="conf-proc"><person-group person-group-type="author"><string-name><given-names>J.</given-names> <surname>Pfoh</surname></string-name>, <string-name><given-names>C.</given-names> <surname>Schneider</surname></string-name> and <string-name><given-names>C.</given-names> <surname>Eckert</surname></string-name></person-group>, &#x201C;<article-title>Nitro: Hardware-based system call tracing for virtual machines</article-title>,&#x201D; in <conf-name>Proc. IWSEC</conf-name>, <conf-loc>Tokyo, Japan</conf-loc>, pp. <fpage>96</fpage>&#x2013;<lpage>112</lpage>, <year>2011</year>.</mixed-citation></ref>
<ref id="ref-8"><label>[8]</label><mixed-citation publication-type="conf-proc"><person-group person-group-type="author"><string-name><given-names>J.</given-names> <surname>Wang</surname></string-name>, <string-name><given-names>M.</given-names> <surname>Yu</surname></string-name>, <string-name><given-names>B.</given-names> <surname>Li</surname></string-name>, <string-name><given-names>Z.</given-names> <surname>Qi</surname></string-name> and <string-name><given-names>H.</given-names> <surname>Guan</surname></string-name></person-group>, &#x201C;<article-title>Hypervisor-based protection of sensitive files in a compromised system</article-title>,&#x201D; in <conf-name>Proc. ACSAC</conf-name>, <conf-loc>Orlando, Florida, USA</conf-loc>, pp. <fpage>1765</fpage>&#x2013;<lpage>1770</lpage>, <year>2012</year>.</mixed-citation></ref>
<ref id="ref-9"><label>[9]</label><mixed-citation publication-type="conf-proc"><person-group person-group-type="author"><string-name><given-names>N.</given-names> <surname>Li</surname></string-name>, <string-name><given-names>B.</given-names> <surname>Li</surname></string-name>, <string-name><given-names>J.</given-names> <surname>Li</surname></string-name>, <string-name><given-names>T.</given-names> <surname>Wo</surname></string-name> and <string-name><given-names>J.</given-names> <surname>Huai</surname></string-name></person-group>, &#x201C;<article-title>vMON: An efficient out-of-VM process monitor for virtual machines</article-title>,&#x201D; in <conf-name>Proc. HPCC-EUC</conf-name>, <conf-loc>Zhangjiajie, Hunan, China</conf-loc>, pp. <fpage>1366</fpage>&#x2013;<lpage>1373</lpage>, <year>2013</year>.</mixed-citation></ref>
<ref id="ref-10"><label>[10]</label><mixed-citation publication-type="conf-proc"><person-group person-group-type="author"><string-name><given-names>Y.</given-names> <surname>Hebbal</surname></string-name>, <string-name><given-names>S.</given-names> <surname>Laniepce</surname></string-name> and <string-name><given-names>M. J.</given-names> <surname>Menaud</surname></string-name></person-group>, &#x201C;<article-title>K-binID: Kernel binary code identification for virtual machine introspection</article-title>,&#x201D; in <conf-name>Proc. DSC</conf-name>, <conf-loc>Taipei, Taiwan</conf-loc>, pp. <fpage>107</fpage>&#x2013;<lpage>114</lpage>, <year>2017</year>.</mixed-citation></ref>
<ref id="ref-11"><label>[11]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>C.</given-names> <surname>Lv</surname></string-name>, <string-name><given-names>J.</given-names> <surname>Zhang</surname></string-name>, <string-name><given-names>Z.</given-names> <surname>Sun</surname></string-name> and <string-name><given-names>G.</given-names> <surname>Qian</surname></string-name></person-group>, &#x201C;<article-title>Information flow security models for cloud computing</article-title>,&#x201D; <source>Computers, Materials &#x0026; Continua</source>, vol. <volume>65</volume>, no. <issue>3</issue>, pp. <fpage>2687</fpage>&#x2013;<lpage>2705</lpage>, <year>2020</year>.</mixed-citation></ref>
<ref id="ref-12"><label>[12]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>J.</given-names> <surname>Pan</surname></string-name>, <string-name><given-names>Y.</given-names> <surname>Zhuang</surname></string-name>, <string-name><given-names>X.</given-names> <surname>Hu</surname></string-name> and <string-name><given-names>W.</given-names> <surname>Zhao</surname></string-name></person-group>, &#x201C;<article-title>Fine-grained binary analysis method for privacy leakage detection on the cloud platform</article-title>,&#x201D; <source>Computers, Materials &#x0026; Continua</source>, vol. <volume>64</volume>, no. <issue>1</issue>, pp. <fpage>607</fpage>&#x2013;<lpage>622</lpage>, <year>2020</year>.</mixed-citation></ref>
<ref id="ref-13"><label>[13]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>J.</given-names> <surname>Qin</surname></string-name>, <string-name><given-names>Y.</given-names> <surname>Cao</surname></string-name>, <string-name><given-names>X.</given-names> <surname>Xiang</surname></string-name>, <string-name><given-names>Y.</given-names> <surname>Tan</surname></string-name>, <string-name><given-names>L.</given-names> <surname>Xiang</surname></string-name> <etal>et al.</etal></person-group>, &#x201C;<article-title>An encrypted image retrieval method based on simhash in cloud computing</article-title>,&#x201D; <source>Computers, Materials &#x0026; Continua</source>, vol. <volume>63</volume>, no. <issue>1</issue>, pp. <fpage>389</fpage>&#x2013;<lpage>399</lpage>, <year>2020</year>.</mixed-citation></ref>
<ref id="ref-14"><label>[14]</label><mixed-citation publication-type="conf-proc"><person-group person-group-type="author"><string-name><given-names>H.</given-names> <surname>wook Baek</surname></string-name>, <string-name><given-names>S.</given-names> <surname>Abhinav</surname></string-name> and <string-name><given-names>J.</given-names> <surname>Van der Merwe</surname></string-name></person-group>, &#x201C;<article-title>Cloudvmi: Virtual machine introspection as a cloud service</article-title>,&#x201D; in <conf-name>Proc. IC2E</conf-name>, <conf-loc>Boston, MA, USA</conf-loc>, pp. <fpage>153</fpage>&#x2013;<lpage>158</lpage>, <year>2014</year>.</mixed-citation></ref>
<ref id="ref-15"><label>[15]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>H.</given-names> <surname>Zhou</surname></string-name>, <string-name><given-names>H.</given-names> <surname>Ba</surname></string-name>, <string-name><given-names>Y.</given-names> <surname>Wang</surname></string-name>, <string-name><given-names>Z.</given-names> <surname>Wang</surname></string-name>, <string-name><given-names>J.</given-names> <surname>Ma</surname></string-name> <etal>et al.</etal></person-group>, &#x201C;<article-title>Tenant-oriented monitoring for customized security services in the cloud</article-title>,&#x201D; <source>Symmetry</source>, vol. <volume>11</volume>, no. <issue>2</issue>, pp. <fpage>252</fpage>, <year>2019</year>.</mixed-citation></ref>
<ref id="ref-16"><label>[16]</label><mixed-citation publication-type="conf-proc"><person-group person-group-type="author"><string-name><given-names>J.</given-names> <surname>Ren</surname></string-name>, <string-name><given-names>L.</given-names> <surname>Liu</surname></string-name>, <string-name><given-names>D.</given-names> <surname>Zhang</surname></string-name>, <string-name><given-names>H.</given-names> <surname>Zhou</surname></string-name> and <string-name><given-names>Q.</given-names> <surname>Zhang</surname></string-name></person-group>, &#x201C;<article-title>ESI-Cloud: extending virtual machine introspection for integrating multiple security services</article-title>,&#x201D; in <conf-name>Proc. SCC</conf-name>, <conf-loc>San Francisco, CA, USA</conf-loc>, pp. <fpage>804</fpage>&#x2013;<lpage>807</lpage>, <year>2016</year>.</mixed-citation></ref>
<ref id="ref-17"><label>[17]</label><mixed-citation publication-type="other"><person-group person-group-type="author"><string-name><given-names>T.</given-names> <surname>Bui</surname></string-name></person-group>, &#x201C;<article-title>Analysis of docker security</article-title>,&#x201D; arXiv preprint, arXiv:1501.02967, <year>2015</year>.</mixed-citation></ref>
<ref id="ref-18"><label>[18]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>T.</given-names> <surname>Combe</surname></string-name>, <string-name><given-names>A.</given-names> <surname>Martin</surname></string-name> and <string-name><given-names>R.</given-names> <surname>Di Pietro</surname></string-name></person-group>, &#x201C;<article-title>To docker or not to docker: A security perspective</article-title>,&#x201D; <source>IEEE Cloud Computing</source>, vol. <volume>3</volume>, no. <issue>5</issue>, pp. <fpage>54</fpage>&#x2013;<lpage>62</lpage>, <year>2016</year>.</mixed-citation></ref>
<ref id="ref-19"><label>[19]</label><mixed-citation publication-type="conf-proc"><person-group person-group-type="author"><string-name><given-names>S.</given-names> <surname>Arnautov</surname></string-name>, <string-name><given-names>B.</given-names> <surname>Trach</surname></string-name>, <string-name><given-names>F.</given-names> <surname>Gregor F</surname></string-name>, <string-name><given-names>T.</given-names> <surname>Knauth</surname></string-name>, <string-name><given-names>A.</given-names> <surname>Martin</surname></string-name> <etal>et al.</etal></person-group>, &#x201C;<article-title>SCONE: Secure linux containers with intel SGX</article-title>,&#x201D; in <conf-name>Porc. OSDI</conf-name>, <conf-loc>Savannah, GA, USA</conf-loc>, pp. <fpage>689</fpage>&#x2013;<lpage>703</lpage>, <year>2016</year>.</mixed-citation></ref>
<ref id="ref-20"><label>[20]</label><mixed-citation publication-type="conf-proc"><person-group person-group-type="author"><string-name><given-names>Z.</given-names> <surname>Jian</surname></string-name> and <string-name><given-names>L.</given-names> <surname>Chen</surname></string-name></person-group>, &#x201C;<article-title>A defense method against docker escape attack</article-title>,&#x201D; in <conf-name>Proc. ICCSP</conf-name>, <conf-loc>Wuhan, China, pp.</conf-loc> <fpage>142</fpage>&#x2013;<lpage>146</lpage>, <year>2017</year>.</mixed-citation></ref>
<ref id="ref-21"><label>[21]</label><mixed-citation publication-type="conf-proc"><person-group person-group-type="author"><string-name><given-names>E.</given-names> <surname>Bacis</surname></string-name>, <string-name><given-names>S.</given-names> <surname>Mutti</surname></string-name>, <string-name><given-names>S.</given-names> <surname>Capelli</surname></string-name> and <string-name><given-names>S.</given-names> <surname>Paraboschi</surname></string-name></person-group>, &#x201C;<article-title>Dockerpolicymodules: Mandatory access control for docker containers</article-title>,&#x201D; in <conf-name>Proc. CNS</conf-name>, <conf-loc>Florence, Italy</conf-loc>, pp. <fpage>749</fpage>&#x2013;<lpage>750</lpage>, <year>2015</year>.</mixed-citation></ref>
<ref id="ref-22"><label>[22]</label><mixed-citation publication-type="conf-proc"><person-group person-group-type="author"><string-name><given-names>X.</given-names> <surname>Gao</surname></string-name>, <string-name><given-names>Z.</given-names> <surname>Gu</surname></string-name>, <string-name><given-names>Z.</given-names> <surname>Li</surname></string-name>, <string-name><given-names>H.</given-names> <surname>Jamjoom</surname></string-name> and <string-name><given-names>C.</given-names> <surname>Wang</surname></string-name></person-group>, &#x201C;<article-title>Houdini&#x0027;s escape: Breaking the resource rein of linux control groups</article-title>,&#x201D; in <conf-name>Proc. CCS</conf-name>, <conf-loc>London, UK</conf-loc>, pp. <fpage>1073</fpage>&#x2013;<lpage>1086</lpage>, <year>2019</year>.</mixed-citation></ref>
<ref id="ref-23"><label>[23]</label><mixed-citation publication-type="conf-proc"><person-group person-group-type="author"><string-name><given-names>T.</given-names> <surname>Watts</surname></string-name>, <string-name><given-names>R.</given-names> <surname>Benton</surname></string-name>, <string-name><given-names>W.</given-names> <surname>Glisson</surname></string-name> and <string-name><given-names>J.</given-names> <surname>Shropshire</surname></string-name></person-group>, &#x201C;<article-title>Insight from a docker container introspection</article-title>,&#x201D; in <conf-name>Proc. HICSS</conf-name>, <conf-loc>Grand Wailea, Hawaii, USA</conf-loc>, <year>2019</year>.</mixed-citation></ref>
<ref id="ref-24"><label>[24]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>S.</given-names> <surname>Su</surname></string-name>, <string-name><given-names>Z.</given-names> <surname>Tian</surname></string-name>, <string-name><given-names>S.</given-names> <surname>Liang</surname></string-name>, <string-name><given-names>S.</given-names> <surname>Li</surname></string-name>, <string-name><given-names>S.</given-names> <surname>Du</surname></string-name> <etal>et al.</etal></person-group>, &#x201C;<article-title>A reputation management scheme for efficient malicious vehicle identification over 5G networks</article-title>,&#x201D; <source>IEEE Wireless Communications</source>, vol. <volume>27</volume>, no. <issue>3</issue>, pp. <fpage>46</fpage>&#x2013;<lpage>52</lpage>, <year>2020</year>.</mixed-citation></ref>
</ref-list>
</back>
</article>