Zero Trust Container Architecture ZTCA A Framework
Zero Trust Container Architecture ZTCA A Framework
Abstract: Containerisation is quickly becoming an accepted industry standard for development environments and Gartner,
in a recent market forecast, estimated that by 2022 more than 75% of organisations will be using containers
in production deployments. With this explosion in growth comes an added focus on security and best practices for using
containers. The use of containers, in particular Docker containers, has altered some of the more traditional deployment
paradigms by giving control of deployments to the development teams. This has massively benefited the DevOps release
cycle, but at the expense of many mature security and review processes that are integrated into traditional
deployments. Like all systems, containers need frameworks to guide best practices for deployments and to ensure mistakes
are not made that increase the risk level or attack surface of an application or service using containers, or the containers
themselves. Indeed, according to a recent presentation during DevSecCon24 by Justin Cormack, Security Lead at Docker Inc.,
Cormack believes most security issues related to Docker are due to misconfiguration rather than direct exploit. While work
has been previously conducted with regards to container security and separately applying Zero Trust Networking
Architecture to containers, in this work we will investigate the security state of a default deployment of the Docker container
engine on Linux and analyse how the principals of Zero Trust Architecture can be extended beyond the domain of networking,
distilled into a ”Zero Trust Containers Architecture” and applied to secure Docker deployments. In order to determine this,
research was conducted into the current state of Docker security and Zero Trust Architecture. Practical and theoretical
attacks were reviewed against a default Docker deployment to identify common themes and areas of issue. Results were
used to advise a generalised trust-based framework which was then used to analyse a Docker deployment and validate
mitigation of a selection of the identified attacks, proving out the concept of the proposed “Zero Trust Container
Architecture” framework.
1. Introduction
Regardless of the forecast advances made by Docker Inc. in securing the product, the current security state of
Docker is still a concern. Many security issues do exist currently, this is driven by a combination of technical
factors such as vulnerabilities in the Docker Engine and Linux OS, misconfigurations of the Docker system or
limitations of its design, however equally important are the concepts of ’system espoused’ versus the ’system in
use’ problem. That is, the difference between what the product developer aims to achieve and consequently
what they design for, as opposed to how the system is actually used in the real world. Work in (Martin 2018)
demonstrated that a fundamental difference exists in what Docker considers the recommended use case versus
what is actually being done in the real world. These differences, combined with the technical issues, as well as
the rapid adoption of Docker have combined to create a potential storm of security concern. Zero Trust
Networking Architecture (ZTA/ZTNA) is a design paradigm for networks which identified the need to move the
defensive perimeter down from the edge of the network. In a traditional edge firewall and Intrusion
Prevention/Intrusion Detection system, the edge of the network was considered the point of security, with
anything inside broadly trusted. ZTA advised to redefine this boundary away from the perimeter and down to
the user and resource in use. ZTA re-frames the question of network security into one of trust, that is, the
inherent insecurity of assumed trust that exists once inside the network perimeter. ZTA advises to assume no
explicit trust within a system, that internal users accessing internal services without explicit authentication and
authorisation cannot be trusted any more than external actors. ZTA’s ethos can be summed up with the line
’never trust, always verify’. ZTA offers opportunities to be re-purposed for use in securing Docker containers and
thereby mitigating some of the known configuration issues as well as minimise the surface area of exploits and
vulnerabilities.
This research will review and identify the issues with a default deployment of Docker through a combination of
practical experimentation to answer the core research question: Using a novel generalised trust-based
framework, based on the proven principals of ZTA, can a Docker deployment be secured? Some ancillary
questions have also been defined: (1) What issues currently affect a default deployment of Docker? (2) What
Proceedings of the 17th International Conference on Information Warfare and Security, 2022
111
Darragh Leahy and Christina Thorpe
additional common misconfigurations affect a Docker deployment? (3) Can ZTA, or an abstraction thereof be
applied to help secure a Docker deployment?
Using the strategic thinking and principles underpinning ZTNA, this paper aims to distil a trust-based framework
that considers multiple aspects of a Docker container deployment. With the aim of evolving ZTA beyond just the
scope of networking. To the best of our knowledge, the re-purposing of ZTA into a generalised trust framework
and applying the results to containers has not been done before. The success of this trust-based framework will
be validated through practical example and process as well as theoretical example. This is to be achieved by
applying the investigated attacks and issues against various Docker use cases reviewed and secured using the
new trust-based framework and reasoning out the improved security surface. This paper will focus on the most
straightforward deployment of Docker that can be configured, which is also likely to be one of the most common
real-world deployment scenarios. To this, we will propose and apply a trust-based framework adapted from ZTA.
2. Background
2.1 Containers
Figure 2: Instance and Operating System/Container Start-up for 10, 20 and 30 instances (Xavier et al., 2016)
Proceedings of the 17th International Conference on Information Warfare and Security, 2022
112
Darragh Leahy and Christina Thorpe
1 https://docs.microsoft.com/en-us/dotnet/architecture/microservices/docker-application-development-process/docker-app-
development-workflow)
Proceedings of the 17th International Conference on Information Warfare and Security, 2022
113
Darragh Leahy and Christina Thorpe
of all activities taking place within a network. Kindervag proposed three key concepts for ZTA (Kindervag, 2010):
(1) Ensure that all resources are accessed securely regardless of location (2) Adopt a least privilege strategy and
strictly enforce access control (3) Inspect and log all traffic. ZTA is often boiled down to the following mantra:
Never trust, always verify.
3. Related Work
Much work has been undertaken in the areas of container security, including Docker, and separately Zero Trust
Architecture. Both topics being well established and studied, however there have been relatively few papers
discussing Zero Trust Architecture for containers. Indeed, those papers that do exist in the crossover between
container security and ZTA are focused primarily on implementing the traditional Zero Trust Networking
approach to containers rather than abstracting the rules of ZTA into a more comprehensive framework to
consider and govern the entire surface area of a container deployment, or more specifically as it relates to this
paper, the surface area of a Docker container deployment.
(Surantha 2020) provides arguments for the use of ZTA from a technical standpoint in securing a container
deployment, without evolving the concept of ZTA beyond the network. (de Weeve 2020) provides a more in-
depth look at technical details, strategy and considerations when using ZTA with containers and identifies ZTA
as more than purely a technical concept, but a security approach. (Yasrab 2018) provides a review of some of
the most common issues affecting Docker containers and suggests several technical mitigations to address
specific issues without presenting a framework to be used in addressing and mitigating issues going forward.
(Martin 2018) conducted an extensive study of container security with practical demonstration from the
standpoint of what Docker recommends vs what in seen in the wild and being done by major Cloud Service
Providers. While this is an excellent paper that provides the basis of a mechanism for assessing Docker from a
security perspective, it is driven from a very technical focus and does not provide a complete framework for
analysing Docker deployments. (Bui 2015) contends that with proper security measures and lockdown, such as
a reduction of the Linux CAPs assigned to a container and implementation of SELinux or AppArmour, as well as
the removal of root use and privileged mode from containers, that containers could be considered relatively
secure. Bui however does not present any framework or methodology that can be used to analyse a Docker
deployment. (Rose 2019) provides a more comprehensive abstraction of ZTA, broadly arguing that ZTA can be
used as a tool for strategic thinking, focusing much more on the concepts of trust and how this can be established
rather than specific technical implementations.
4. Problem
In a 2020 Cyberthreat Defence Report published by CyberEdge, containers were listed as the number 1 weakest
link in the security landscape. Containers are subject to bugs and vulnerabilities and therefore open to abuse.
(Sultan 2019) states that containers are less secure than traditional VMs, and notes that this relative insecurity,
or perceived insecurity, of containers remains one of the largest barriers to the ongoing adoption of containers.
What makes Docker in particular an interesting target in the world of containers is threefold. First, we argue that
the default state of a Docker deployment does not apply security best practices. Second, common real-world
misconfigurations of Docker deployments increase the vulnerability and attack surface of a given deployment.
Finally, Dockers large uptake by the developer community to assist in rapid development and deployment has
resulted in the bypass of mature deployment processes. These factors have all combined to escalate the threat
posed by Docker when deployed without the use of a methodology, or framework, for considering its security.
In an article published on BlackHat, a leading security event series, Anthony Bettini, founder of Flawcheck,
dedicates an entire section to vulnerabilities not necessarily needing a Common Vulnerabilities and Exposures
(CVE) or code-based exploitation but rather those which attackers can take advantage of due to
”implementation weaknesses (ultimately, design imperfections)” (Bettini 2015). This is further borne out by
several other articles describing some of these real-world exploits or proving out the issue directly (Simonovich
2019), (Higashi 2018).
A similar investigation was conducted in 2019, that detected over 20,000 Docker instances, and a similar number
of Kubernetes instances, via Shodan (Quist, 2019). Quist notes that while these 40,000 combined instances are
not inherently vulnerable, they are at least demonstrating security misconfiguration in their deployments. The
research did however discover a number of vulnerable databases and deployments leaking personal
information. TrendMicro, ran a study to determine some real-world exploit scenarios against containers (Oliveira
2019). They discovered that malicious actors were using automated scanning to find exposed Docker APIs and
Proceedings of the 17th International Conference on Information Warfare and Security, 2022
114
Darragh Leahy and Christina Thorpe
deploy cryptomining container images against them, as well as containers to run scans for other exposed hosts.
An exposed Docker API is not the only issue, if we assume that a container has been access or exploited (via
Docker API or vulnerable container), there are a number of subsequent possible attack vectors. For instance,
(Hertz 2016) describes a number of attacks for escaping privileged containers or exploiting unprivileged
containers. (Avrahami 2019) details how to abuse a specific CVE, CVE-2019-5736 to break out of Docker, (Sharma
2020) provides a walk-through for abusing one of the Linux Capabilities granted by default to Docker images to
break out of a container. (Wist 2020) found that ”As many as 82% of certified images [on DockerHub] contain at
least either one high or critical vulnerability”.
5. Methodology
Proceedings of the 17th International Conference on Information Warfare and Security, 2022
115
Darragh Leahy and Christina Thorpe
This list of maxims allows for the design of a category/consideration matrix where elements of a Docker
deployment, or ’Categories’, are attributed a non-finite list of trust items, or ’Considerations’. ’Considerations’
are suggested items to be considered when the related ’Category’ is used with the framework, as such they are
not mandatory, as they are not necessarily relevant to every scenario. Users of the framework may also add
additional considerations to reflect their particular needs (e.g., alignment with another framework, standard or
internal business rules).
Proceedings of the 17th International Conference on Information Warfare and Security, 2022
116
Darragh Leahy and Christina Thorpe
Proceedings of the 17th International Conference on Information Warfare and Security, 2022
117
Darragh Leahy and Christina Thorpe
Proceedings of the 17th International Conference on Information Warfare and Security, 2022
118
Darragh Leahy and Christina Thorpe
help scope and understand the question of trust being asked, then passing to subsequent functions which refine
the exact use case in question, identify and define the appropriate trust required and contrast this with the
existing trust in a deployment, before moving to a remediation step and finally the implementation of
appropriate technical measurements to track the application of this trust. There are several decision gates
included in the flow of the framework which can be used to iterate on sections which do not initially produce a
refined output, or to review the process in light of remediation findings to ensure the framework has
appropriately addressed all aspects of trust in question. The framework is designed to be used in conjunction
with, not replace, other frameworks concerned with other elements of security (for instance frameworks for
designing and securing a corporate network).
8. Validation
Using the framework proposed, we analysed several scenarios derived from the issues identified in Section 6
and validated that the use of ZTCA leads to a successful mitigation, however it is not possible to address all attack
scenarios demonstrated in Section 6, due to complexity and time required to implement and demonstrate
mitigation of all in detail, however the following scenarios were investigated in detail:
• Test Scenario 1: Grant user access to Remote API (see Section 6.1)
• Test Scenario 2: Prevent Container Network Attack (see Section 6.3)
• Test Scenario 3: Review a Docker image (see Section 6.9)
Additionally, the following scenarios were walked through at a high level, that is the steps the framework
suggests but without actually applying the mitigation:
• Test Scenario 4: Review an existing Container; a novel use case
• Test Scenario 5: Deploy a Privileged Container; as seen in Section 6.7 In beginning validation, it is worth
noting that while there are various products on the market from a number of vendors to assist in
securing aspects of Docker containers, or securing the network or Host OS, this paper will avoid providing
implementation specifics for these products as this is outside the scope of this paper, but may reference
concepts or utilise certain products as an example of how they can be applied to achieve compliance
with suggestions of this framework.
This validation work is detailed in https://bit.ly/3EPJXN0, but due to space constraints, it cannot be presented
in this paper.
9. Conclusion
This paper focussed on three research questions: (1) What issues currently affect a default deployment of
Docker? (2) What additional common misconfigurations affect a Docker deployment? (3) Can ZTA, or an
abstraction thereof be applied to help secure a Docker deployment? We have shown that Docker contains a
Proceedings of the 17th International Conference on Information Warfare and Security, 2022
119
Darragh Leahy and Christina Thorpe
number of security concerns. From combination of both design issues and vulnerabilities, but also common
misconfigurations that sacrifice security for convenience. Further, several security issues arise from the
difference between a system espoused and a system in use. By distilling the principals of Zero Trust Architecture
and leveraging these to create a ZTCA framework, this paper has proposed a method for analysing and
determining the path to securing a Docker deployment. Validation has shown, when applying the framework to
areas of concern as identified in Section 6, the proposed framework can be used to successfully analyse and
recommend effective steps to ensure the security of a Docker deployment. The framework proposed, by virtue
of the scope of possibilities, is complicated and assumes a level of proficiency with Docker as well as the ability
to identify, analyse and implement additional appropriate security technologies. One of the main aims for future
research should either be around a simplification of the security by design process, though this may rely on
Docker Inc. developers themselves, or an abstraction layer for the Docker Engine which enforces the principals
of security and least privilege by default.
References
Avrahami, Y. (2019). Breaking out of docker via runc – CVE-2019-5736. https://unit42.paloaltonetworks.com /breaking-
docker-via-runc-explaining-cve-2019-5736/. Accessed: 2022-01-06.
Bettini, A. (2015). Vulnerability exploitation in docker container environments. https://www.blackhat.com/docs/eu-
15/materials/eu-15-Bettini-Vulnerability-Exploitation-In-DockerContainer-Environments-wp.pdf.
Bui, T. (2015). Analysis of docker security. https://arxiv.org/pdf/1501.02967.pdf. Accessed: 2022-01-06.
de Weeve, C. and Andreou, M. (2020). Zero Trust Network Security Model in containerized environments. PhD thesis,
University of Amsterdam.
Graber, S. (2016). LXD 2.0: Introduction to LXD [1/12]. https://stgraber.org/2016/03/11/lxd-2-0-introduction-to-lxd-112/.
Accessed: 2022-01-06.
Hertz, J. (2016). Abusing privileged and unprivileged linux containers. Whitepaper, NCC Group, 48.
Higashi, M., Kumar, G., and Chiodi, M. (2018). Lessons from the cryptojacking attack at tesla.
https://redlock.io/blog/cryptojacking-tesla. Accessed: 2022-01-06.
Kerman, A., Borchert, O., Rose, S., Division, Eileen, and Tan, A. (2020). Implementing a zero-trust architecture. Technical
report, NIST
Kindervag, J. (2010). No more chewy centers: Introducing the zero-trust model of information security. Forrester Research.
Martin, A., Raponi, S., Combe, T., and Di Pietro, R. (2018). Docker ecosystem – vulnerability analysis. Nokia Bell Labs, 122
Oliveira, A. (2019). Infected containers target docker via exposed APIs.
https://www.trendmicro.com/en_us/research/19/e/infected-cryptocurrency-mining-containers-target-docker-hosts-
with-exposed-apis-use-shodan-to-find-additional-victims.html. Accessed: 2022-01-06
Quist, N. (2019). Misconfigured and exposed: Container services. https://unit42.paloaltonetworks.com/misconfigured-and-
exposed-container-services/. Accessed: 2022-01-06.
Rose, S., Borchert, O., Mitchell, S., and Connelly, S. (2019). Zero trust architecture. Technical report, National Institute of
Standards and Technology.
Simonovich, V. and Nakar, O. (2019). Hundreds of vulnerable docker hosts exploited by cryptocurrency miners.
https://www.imperva.com/blog/hundreds-of-vulnerable-docker-hosts-exploited-by-cryptocurrency-miners/. Accessed:
2022-01-06.
Sultan, S., Ahmad, I., and Dimitriou, T. (2019). Container security: Issues, challenges, and the road ahead. IEEE Access,
7:52976–52996
Surantha, N. and Ivan, F. (2020). Secure kubernetes networking design based on zero trust model: A case study of financial
service. Master’s thesis, Bina Nusantara University, Jakarta, Indonesia.
Yasrab, R. (2018). Mitigating docker security issues. https://arxiv.org/ftp/arxiv/papers/1804/1804.05039.pdf. Accessed:
2022-01-06.
Wist, K., Helsem, M., and Gligoroski, D. (2020). Vulnerability analysis of 2500 docker hub images
Proceedings of the 17th International Conference on Information Warfare and Security, 2022
120