The security researchers Yuval Avrahami discovered some vulnerabilities in the rkt containter that could be exploited by an attacker to compromise the underlying host when a user executes the ‘rkt enter’ command into an attacker-controlled pod.
rkt (pronounced like a “rocket”) is a CLI for running application containers on Linux. rkt is designed to be secure, composable, and standards-based.
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 PoC that shows the exploitation of the above vulnerabilities.
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.
For example, an attacker can overwrite /bin/bash in the container, because it is the default binary executed if the user doesn’t specify another.
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.
Avrahami reported the flaws to RedHat and CoreOS, but RedHat revealed that at the time it has no plan for addressing them. RedHat asked the expert to share his findings with the community of the users.
“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 rkt, avoid using the ‘rkt enter’ command as the vulnerabilities in it are currently unpatched. I also suggest considering alternative container runtimes which are more steadily maintained, such as Docker, podman or LXD.”
Thank you
[adrotate banner=”9″] | [adrotate banner=”12″] |
(SecurityAffairs – rkt container, hacking)
[adrotate banner=”5″]
[adrotate banner=”13″]
The Treasury Department's Office of Foreign Assets Control (OFAC) sanctioned four Iranian nationals for their…
A cyber attack on Leicester City Council resulted in certain street lights remaining illuminated all…
The National Police Agency in South Korea warns that North Korea-linked threat actors are targeting…
The U.S. Department of State imposed visa restrictions on 13 individuals allegedly linked to the…
A cyber attack has been disrupting operations at Synlab Italia, a leading provider of medical…
Russia-linked APT28 group used a previously unknown tool, dubbed GooseEgg, to exploit Windows Print Spooler…
This website uses cookies.