The security researchers Yuval Avrahami discovered some vulnerabilities in the
rkt (pronounced like a “rocket”) is a CLI for running application containers on Linux.
The basic unit of execution at runtime is a pod, that includes multiple containers running in a shared context.
The ‘rkt enter’ command allows users to execute binaries in a running container. The binaries are executed as root, with no seccomp filtering or cgroup isolation, the only restriction is represented by namespaces.
Avrahami discovered that it is possible to escape the container by triggering the vulnerabilities.
“The ‘rkt enter’ command allows users to run a binary in a running container, and is the rkt equivalent of ‘docker exec’.” states the expert.
“Binaries from the container executed via ‘rkt enter’ run as root, with all capabilities, and with no seccomp filtering or cgroup isolation applied. They are only restricted by namespaces, which are not enough to prevent them from breaking out and compromising the host.”
Below the list of the issues reported to RedHat (who acquired CoreOS in mid-2018):
The researchers published a video
The attacker needs to have root access to the container, then when the user runs the ‘rkt enter’ command, he can overwrite binaries and libraries in the container to run his malicious code.
The attacker could also overwrite libc.so.6 in the container, which is likely to be loaded by processes spawned with ‘rkt enter’. Using the gcc constructor attribute the code is run whenever the modified libc library is loaded by a process.
“Once an attacker is running in the context of a container process spawned by ‘rkt enter’, he can escape the container and gain root access on the host with relative ease, as he runs with all capabilities, no seccomp filtering and without cgroup isolation,” continues the security researcher.
The expert provides as an example of exploitation the escape via mounting the host’s root directory.
Mounting the host root directory using the ‘mknod’ and ‘mount’ syscalls, would give the attacker root access on the host. The expert also published a video PoC for this attack.
“While investigating rkt I also discovered a way to create malicious ACI/OCI images that will compromise the host when run. Although this is certainly not ideal, malicious images are not a part of rkt’s threat module. Running images from an untrusted source is not aligned with rkt’s recommendations nor proper use,” concludes the researcher.
“As I stated at the start of this blog, if you are using
If you appreciate my effort in spreading cybersecurity awareness, please vote for Security Affairs in the section “Your Vote for the Best EU Security Tweeter”
|[adrotate banner=”9″]||[adrotate banner=”12″]|