Overview
Containers have transformed the way enterprise applications get deployed. All the applications run on these lightweight images that hold the application code and its dependencies. Since they do not depend on the underlying Operating System, they bring efficiency and portability that equips a smooth furnishing of resources and applications. Hence, securing containers from cyber threats and vulnerabilities becomes a crucial job.
Here, we will discuss some of the common Container Vulnerabilities and present a case study about Tech Vedika’s approach and the tools used for safeguarding one of the industry giant’s Containers from Vulnerability issues.
Common Container Vulnerabilities
- Access Control Exploits: Neglecting the fundamental authentication and authorization to Docker exposes the entire system and makes it vulnerable to unauthorized access. The consoles should be configured using password policies to keep the AWS system secure.
- Isolation Flaws: The Isolation of containers makes them robust from a security standpoint. However, isolation alone does not guarantee security, the containers should be secure by themselves. In case there is a compromised container, network segmentation prevents hackers from reaching the other containers.
- Untrusted Containers: Containers are portable and easy to use. It often happens that the hackers upload malware containers to public repositories. Hence, before running the container, its security should be assessed.
- Insecure Configuration of other components: The containers, the host Operating System, and the AWS accounts should be configured with the least privileges to secure the entire system. Docker commands should also be secured with passwords.
- Secret Management: Sensitive credentials, API keys, and tokens at every level should be equally protected. Hard coding and rotating credentials could be an expensive affair. Weak cryptography key generation, authentication, and incorrect use of cookies exploit the application.
- Container Image Vulnerabilities: The use of vulnerable container images leads to several security issues. It allows the malware to be installed and infect the community docker images.
Tech Vedika’s Case Study
For one of our reputed clients, there was a severe Incident reported for container vulnerability. Tech Vedika identified the root cause during security scanning and fixed those vulnerabilities in a quick time.
High priority security incident detected in our security scanning:
- Docker containers compromised
- Crypto mining activity observed
Action Taken:
Tech Vedika team performed security analysis using container vulnerability tools and found and fixed the incidents identified.
Approach:
- Scanned Gateway Server for vulnerabilities using a 3rd party tool (SonarQube – testing code level).
- As Zero vulnerabilities were found we moved to the next phase where we scanned the container level for docker container Vulnerability using third-party tools (Trivy).
- Initially tested in a dev environment and identified the vulnerabilities.
- Fixed the vulnerabilities that were found categorized as critical and high-priority.
- Types of Vulnerabilities-
- Container package level (only high-priority)
- Fixed by upgrading the packages.
- To make sure that the current images are not affected, a replica of gateway images was taken in the dev environment and then the packages were upgraded.
- Jar level (fixed both critical & high-priority)
- Container package level (only high-priority)
- Retest the docker image by running the container.
- Strengthening docker security using the best practices checklist below:
- Keep host machine and docker updated to the latest patch
- Do not expose the docker daemon socket
- Create the user with different roles and permission from the admin user or root user
- Capabilities in Linux play a vital role, use wisely
- To prevent privileges escalation, never allow any privileges to the docker container
- [MOST IMPORTANT] Disable Inter-container communication (–icc=false)
- Always use Linux Security Modules
- Build time is also one of the most important factors
- Filesystem and volume should be in Read-Only format
- Implementing a WAF solution to stop attacks at the firewall level.
- After fixing the issues in the dev environment, the updates were deployed on production.
- Types of Vulnerabilities-
Tools Used by Tech Vedika
- Trivy: This is a straightforward and all-inclusive third-party tool that scans containers and artifacts for any vulnerability/ misconfiguration/ secret. It scans Infrastructure as Code (IaC) files and also exposes the vulnerabilities of Operating systems and language packages. It can also detect the probable configuration issues that are risky for the AWS workload. Trivy also scans hardcoded secrets like passwords, API keys, and tokens.
- Docker Security Checklist: This is another important tool used to secure the Docker from potential cyber threats. It is a set of points to be checked to ensure a robust Docker environment.
Some Critical Issues Found
Library | Vulnerability ID | Severity | Installed Version | Fixed Version | Title |
busybox | CVE-2022-28391 | CRITICAL | 1.34.1-r3 | 1.34.1-r5 | CVE-2022-28391 affecting package busybox 1.35.0 –>avd.aquasec.com/nvd/cve-2022-28391 |
ssl_client | CVE-2022-28391 | CRITICAL | 1.34.1-r3 | 1.34.1-r5 | CVE-2022-28391 affecting package busybox 1.35.0 –>avd.aquasec.com/nvd/cve-2022-28391 |
Related Post
Related Post
Tags
Privacy Overview
Cookie | Duration | Description |
---|---|---|
cookielawinfo-checkbox-analytics | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics". |
cookielawinfo-checkbox-functional | 11 months | The cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional". |
cookielawinfo-checkbox-necessary | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary". |
cookielawinfo-checkbox-others | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other. |
cookielawinfo-checkbox-performance | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance". |
viewed_cookie_policy | 11 months | The cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data. |