Frameworkto Secure Docker Containers
Frameworkto Secure Docker Containers
net/publication/354029818
CITATIONS READS
15 1,370
2 authors, including:
Manish Abhishek
Indian Railways
13 PUBLICATIONS 63 CITATIONS
SEE PROFILE
All content following this page was uploaded by Manish Abhishek on 18 October 2021.
Abstract—Docker is one the key component for application Docker commands need to be executed to achieve all these
deployment using CI/CD pipelines. Wherever containers are tasks and Docker file is going to be used to bundle all the
going ot be used, Docker engine is always the first choice but required dependencies, libraries. For software deployment
on other hand security of the Docker images using which using Docker, the development community has been created
application is going to be deployed is always a concern. In the Docker hub that is used for persist the Docker images as
cloud computing, validation of the Docker images security is a a repository. Now a day for software deployment features are
paramount. Containers virtualization which is based on spitted in terms of micro services to achieve the code
operating system virtualization is not secure as hypervisor reusability and independent deployment via containers.
virtualization. In this paper we are proposing a framework
Every container is going to represent one individual process
which uses an architecture including plugins, CI/CD pipeline to
deploy the application to ensure the security of application
holding its own process id during its execution. It is
bundled as a Docker image. It is going to be referred from the recommended to have one container per micro service
starting of application development till the deployment holding individual or set of feature/module.
including plugin for Docker build, bundling the application in This requirement of using containers to bundle the
form of images along with required libraries, pushing the application in form of Docker image is raising a security
images to Docker registry. Jenkin jobs are going to be used for concern for its distribution. Software architects are also
getting the build and then for deployment. For validation, we
encouraging the inclusion of risk analysis which considers
came up with vulnerable Docker images and validated against
the distribution pipeline as malicious one. In this paper, the
our architecture having proposed model to compare the
results. In later sections, we have also considered the
proposed framework is based on the multi-layer security
containers security measures. architecture including the private registry to push the images
to address the vulnerabilities. For application deployment, it
Keywords— Containers, Continuous Integration (CI), is based on several stages wrapped as a Jenkin job in terms
Continuous Deployment (CD), Docker, Jenkin, Virtualization of CI/CD pipeline to evaluate the bundled Docker images
that is pushed later in Docker hub which is eliminating the
I. INTRODUCTION push and continuous reuse of vulnerable Docker images.
In today’s containerization world, the application Images selection along with malicious content has been also
development and deployment using CI/CD pipeline in one of analysed and evaluated via using the CI/CD pipeline to
the common requirements that everyone is looking at. figure out the abnormal execution environment followed by
Containers are very light weight in nature as they are totally security standards and practices with containers
based on Operating System (OS) virtualization and do not considerations. The remaining sections in this paper have
need the whole configuration for its dependent binaries. They been represented in following manner: Section 2 is
have been significantly adopted for the whole software describing the background details of security analysis and
lifecycle from deployment to development phases including concerns with respect to Docker images. Section 3 is all
upgrades, fix packs and much more. They are in trend an about the proposed framework model using which the whole
making a buzz in entire IT world. Containers have been architecture has been defined. Section 4 is describing the
considered a suitable choice even for High performance evaluation methodology, results and the related work.
computing applications via adopting their dynamic allocation Conclusion is provided in Section 5.
at the infrastructure level in cloud computing [1]. Instead of
II. SECURITY ANALYSIS
having virtual machines using hypervisor, containers have
been given more weightage to make the environment It is difficult to move the whole monolith application to
scalable and suitable for failover use cases. It executes on container in comparison to micro services. With monolith
isolated layer of operating system to avoid the overhead. application, scalability and code reusability is always a
They are very portable in nature in comparison to virtual concern as with software lifecycle, the whole application
machines which are basically using the whole individual grows and it’s difficult to maintain the legacy code over a
operating system including its own libraries, binaries as an time of period. The application running on physical server to
individual underlying layer of hardware layer via hypervisor. a Docker Container, it requires the identification of all the
This is one of the major reasons behind the adoption of elementary components. Figure 1 shows the abstracted
containers in virtualization world. architecture for Docker containers. With MVC architecture,
every layer is divided into containers. For example, database
Docker is an open source platform to facilitate layer will be in one container, web app in another and need a
applications in packages none other than containers. It separate for component holding the business logic along with
consist multiple light weighted containers. Docker consists its server. It has been analysed and found that file or
several modules which allows to bundle the application in executions examination is one of the forms of malware
form of image along with its dependencies, tagging of analysis to find out the probable cause of security
images, uploading and downloading of images to/from compromises. It is mainly categorized into two parts with
Docker hub or private registry, their execution and even
persisting the running state in terms of updates to use later.
Images Version
CentOS 7.0
PostgreSQL 12.0
Docker 18.09.07
AdoptOpenJDK 11
Nginx 1.10.3
Jenkin 2.164.1
Fig. 5: Dynamic analysis for Docker images at run time. [1] Abhishek, Manish. (2020). Containerization for shipping Scientific
Workloads in Cloud. International Journal of Advanced Trends in
Figure 5 shows the results of dynamic analysis API Computer Science and Engineering. 9. 5327.
including the process executions, file updates followed by 25 10.30534/ijatcse/2020/166942020.
seconds of runtime. File system is getting modified with [2] P. Mell, K. Scarfone, and S. Romanosky, “The Common
respect to the image functionality and performed actions. We Vulnerability Scoring System (CVSS) and Its Applicability to Federal
Agency Systems,” National Institute of Standards and Technology,
have examined the system and computing resources, for Tech. Rep. Interagency Report 7435, August 2007.
example CPU metadata. We found the major issue once [3] Abhishek, Manish. (2020). Dynamic Allocation of High-Performance
images started the SSH daemon. For network traffic we have Computing Resources. International Journal of Advanced Trends in
uploaded a pcap during image execution that found abnormal Computer Science and Engineering. 9. 3538-3543.
in nature. The observed finding was around DNS request and 10.30534/ijatcse/2020/159932020.
found the image as malicious one as it was trying to attempt [4] R. A. Martin, "Managing vulnerabilities in networked systems," in
cryptocurrency. Computer, vol. 34, no. 11, pp. 32-38, Nov. 2001, doi:
10.1109/2.963441.
A. Related Work [5] Abhishek, Manish. (2020). High Performance Computing using
Containers in Cloud. International Journal of Advanced Trends in
For CVEs, there are multiple tools that can be used. For Computer Science and Engineering. 9. 5686.
example: OpenSCAP6. It examines and based on data 10.30534/ijatcse/2020/220942020.
available as per the National Vulnerability Database7 [6] D. Goodin, “Backdoored images downloaded 5 million times finally
determines the security vulnerabilities and policies removed from Docker Hub,”
violations. To scan the Docker images, generally oscap- [https://arstechnica.com/informationtechnology/ 2018/06/backdoored-
Docker tool can be used. Many tools are open source and can images-downloaded-5-million-timesfinally- removed-from-Docker-
hub/, June 2018].
be easily integrated with CI/CD pipeline for static and
[7] V. Adethyaa and T. Jernigan, “Scanning Docker Images for
dynamic analysis. Even Docker itself officially offers trusted Vulnerabilities using Clair, Amazon ECS, ECR, and AWS
registries for security scan as per CVE database but we need CodePipeline,” AWS Compute Blog,
to pay for that. CI/CD pipeline is helpful in case of Docker November2018[https://aws.amazon.com/blogs/compute/scanning-
containers security checks. Adethyaa and Jernigan [7] Docker-images-forvulnerabilities- using-clair-amazon-ecs-ecr-aws-
demoed a CI/CD pipeline for Docker images which uses codepipeline/.].
[8] J. Valance, “Using Anchore Policies to Help Achieve the CIS Docker [13] D. Huang, H. Cui, S. Wen and C. Huang, "Security Analysis and
Benchmark,” Anchore Blog, May 2019, Threats Detection Techniques on Docker Container," 2019 IEEE 5th
[https://anchore.com/cisDocker- benchmark/] International Conference on Computer and Communications (ICCC),
[9] K. Brady, S. Moon, T. Nguyen and J. Coffman, "Docker Container Chengdu, China,2019, pp. 1214-1220, doi:
Security in Cloud Computing," 2020 10th Annual Computing and 10.1109/ICCC47050.2019.9064441.
Communication Workshop and Conference (CCWC), Las Vegas, NV, [14] A. R. Manu, J. K. Patel, S. Akhtar, V. K. Agrawal and K. N. B.
USA, 2020, pp. 0975-0980, doi: Subramanya Murthy, "A study, analysis and deep dive on cloud
10.1109/CCWC47524.2020.9031195. PAAS security in terms of Docker container security," 2016
[10] J. Blackthorne, A. Bulazel, A. Fasano, P. Biernat, and B. Yener, International Conference on Circuit, Power and Computing
“AVLeak: Fingerprinting Antivirus Emulators through Black-Box Technologies (ICCPCT), Nagercoil, 2016, pp. 1-13, doi:
Testing,” in 10th USENIX Workshop on Offensive Technologies. 10.1109/ICCPCT.2016.7530284.
Austin, TX: USENIX Association, Aug. 2016. [15] 15. P. P. W. Pathirathna, V. A. I. Ayesha, W. A. T. Imihira, W. M.
[11] V. Rastogi, C. Niddodi, S. Mohan, and S. Jha, “New directions for J. C. Wasala, N. Kodagoda and E. A. T. D. Edirisinghe, "Security
container debloating,” in Proceedings of the 2017 Workshop on testing as a service with Docker containerization," 2017 11th
Forming an Ecosystem Around Software Transformation, ser. FEAST International Conference on Software, Knowledge, Information
’17. New York, NY, USA: ACM, November 2017. Management and Applications (SKIMA), Malabe, 2017, pp. 1-7, doi:
10.1109/SKIMA.2017.8294109.
[12] Mullinix, Samuel & Konomi, Erikton & Townsend, Renee & Parizi,
Reza. (2020). On Security Measures for Containerized Applications
Imaged with Docker.