Sunday, November 17, 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

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

Critical TP-Link DHCP Vulnerability Let Attackers Execute Arbitrary Code Remotely

A critical security flaw has been uncovered in certain TP-Link routers, potentially allowing malicious...

Chinese SilkSpecter Hackers Attacking Black Friday Shoppers

SilkSpecter, a Chinese financially motivated threat actor, launched a sophisticated phishing campaign targeting e-commerce...

Cybercriminals Launch SEO Poisoning Attack to Lure Shoppers to Fake Online Stores

The research revealed how threat actors exploit SEO poisoning to redirect unsuspecting users to...

Black Basta Ransomware Leveraging Social Engineering For Malware Deployment

Black Basta, a prominent ransomware group, has rapidly gained notoriety since its emergence in...

Free Webinar

Protect Websites & APIs from Malware Attack

Malware targeting customer-facing websites and API applications poses significant risks, including compliance violations, defacements, and even blacklisting.

Join us for an insightful webinar featuring Vivek Gopalan, VP of Products at Indusface, as he shares effective strategies for safeguarding websites and APIs against malware.

Discussion points

Scan DOM, internal links, and JavaScript libraries for hidden malware.
Detect website defacements in real time.
Protect your brand by monitoring for potential blacklisting.
Prevent malware from infiltrating your server and cloud infrastructure.

More like this

Critical TP-Link DHCP Vulnerability Let Attackers Execute Arbitrary Code Remotely

A critical security flaw has been uncovered in certain TP-Link routers, potentially allowing malicious...

Chinese SilkSpecter Hackers Attacking Black Friday Shoppers

SilkSpecter, a Chinese financially motivated threat actor, launched a sophisticated phishing campaign targeting e-commerce...

Cybercriminals Launch SEO Poisoning Attack to Lure Shoppers to Fake Online Stores

The research revealed how threat actors exploit SEO poisoning to redirect unsuspecting users to...