Sunday, December 22, 2024
HomeComputer SecurityMost Critical Docker Vulnerability Let Hackers To Take Complete Control Over Host...

Most Critical Docker Vulnerability Let Hackers To Take Complete Control Over Host & All Containers Within It

Published on

SIEM as a Service

Researchers discovered a critical vulnerability in Docker that allows an attacker to take complete control of the host and the containers associated with it.

The Docker vulnerability resides in the copy command (cp) used in containers platforms such as Docker, Podman, and Kubernetes. This command can be used to copy files & folders between the container and the local file system.

The commands can be used like below:

- Advertisement - SIEM as a Service
docker cp [OPTIONS] CONTAINER:SRC_PATH DEST_PATH|-
docker cp [OPTIONS] SRC_PATH|- CONTAINER:DEST_PATH

Docker Copy Command Vulnerability

According to researchers, this is the first Docker cp command that leads to a full container escape after the runC vulnerability identified in February.

The vulnerability can be exploited by the attacker if the docker already compromised with any previous vulnerabilities or if the user runs a malicious container image from an untrusted source.

“If the user then executes the vulnerable cp command to copy files out of the compromised container, the attacker can escape and take full root control of the host and all other containers in it,” reads Palo Alto report.

To copy out the file between containers, Docker uses a process called docker-tar, which works by Chrooting which archiving and passing the file to the target destination.

In following exploiting video, “a Docker user runs a malicious image that contains our evil libnss_files.so library and then tries to copy some logs from the container. The /breakout binary in the image is a simple bash script that mounts the host filesystem to the container at /host_fs and also writes a message to /evil on the host.’

The docker-tar isn’t containerized and it runs in host namespaces with all root capabilities, so by injecting code into docker-tar, a malicious container can get full access.

There are 2 possible attack scenario is a Docker user that copies some files from either:

  • A container running a malicious image with bad libnss_*.so libraries.
  • A compromised container where an attacker replaced the libnss_*.so libraries.

Both scenarios allow an attacker to exploit the docker-vulnerability to gains root code execution access on the host.

The Docker vulnerability can be tracked as CVE-2019-14271 and the security issue fixed with Docker version 19.03.1.

Researchers recommended running the containers as a non-root user if the root permission is not required, it may increase security and prevent attacks.

You can read the complete Technical analysis for this vulnerability here.

Also Read: Docker Hub Hacked – Hackers Gained Access to 190,000 Users Accounts

Gurubaran
Gurubaran
Gurubaran is a co-founder of Cyber Security News and GBHackers On Security. He has 10+ years of experience as a Security Consultant, Editor, and Analyst in cybersecurity, technology, and communications.

Latest articles

Threat Actors Selling Nunu Stealer On Hacker Forums

A new malware variant called Nunu Stealer is making headlines after being advertised on underground hacker...

Siemens UMC Vulnerability Allows Arbitrary Remote Code Execution

A critical vulnerability has been identified in Siemens' User Management Component (UMC), which could...

Foxit PDF Editor Vulnerabilities Allows Remote Code Execution

Foxit Software has issued critical security updates for its widely used PDF solutions, Foxit...

Windows 11 Privilege Escalation Vulnerability Lets Attackers Execute Code to Gain Access

Microsoft has swiftly addressed a critical security vulnerability affecting Windows 11 (version 23H2), which...

API Security Webinar

72 Hours to Audit-Ready API Security

APIs present a unique challenge in this landscape, as risk assessment and mitigation are often hindered by incomplete API inventories and insufficient documentation.

Join Vivek Gopalan, VP of Products at Indusface, in this insightful webinar as he unveils a practical framework for discovering, assessing, and addressing open API vulnerabilities within just 72 hours.

Discussion points

API Discovery: Techniques to identify and map your public APIs comprehensively.
Vulnerability Scanning: Best practices for API vulnerability analysis and penetration testing.
Clean Reporting: Steps to generate a clean, audit-ready vulnerability report within 72 hours.

More like this

Threat Actors Selling Nunu Stealer On Hacker Forums

A new malware variant called Nunu Stealer is making headlines after being advertised on underground hacker...

Siemens UMC Vulnerability Allows Arbitrary Remote Code Execution

A critical vulnerability has been identified in Siemens' User Management Component (UMC), which could...

Foxit PDF Editor Vulnerabilities Allows Remote Code Execution

Foxit Software has issued critical security updates for its widely used PDF solutions, Foxit...