VOOZH about

URL: https://thenewstack.io/rootkits-come-to-containers-and-bring-trouble-with-them/

⇱ Rootkits Come to Containers and Bring Trouble with Them - The New Stack


TNS
SUBSCRIBE
Join our community of software engineering leaders and aspirational developers. Always stay in-the-know by getting the most important news and exclusive content delivered fresh to your inbox to learn more about at-scale software development.
REQUIRED
It seems that you've previously unsubscribed from our newsletter in the past. Click the button below to open the re-subscribe form in a new tab. When you're done, simply close that tab and continue with this form to complete your subscription.
The New Stack does not sell your information or share it with unaffiliated third parties. By continuing, you agree to our Terms of Use and Privacy Policy.
Welcome and thank you for joining The New Stack community!
Please answer a few simple questions to help us deliver the news and resources you are interested in.
REQUIRED
REQUIRED
REQUIRED
REQUIRED
REQUIRED
Great to meet you!
Tell us a bit about your job so we can cover the topics you find most relevant.
REQUIRED
REQUIRED
REQUIRED
REQUIRED
REQUIRED
Welcome!

We’re so glad you’re here. You can expect all the best TNS content to arrive Monday through Friday to keep you on top of the news and at the top of your game.

What’s next?

Check your inbox for a confirmation email where you can adjust your preferences and even join additional groups.

Follow TNS on your favorite social media networks.

Become a TNS follower on LinkedIn.

Check out the latest featured and trending stories while you wait for your first TNS newsletter.

PREV
1 of 2
NEXT
VOXPOP
As a JavaScript developer, what non-React tools do you use most often?
Angular
0%
Astro
0%
Svelte
0%
Vue.js
0%
Other
0%
I only use React
0%
I don't use JavaScript
0%
Thanks for your opinion! Subscribe below to get the final results, published exclusively in our TNS Update newsletter:
NEW! Try Stackie AI
From clobbered drafts to real-time sync
Apr 14th 2026 10:00am, by David Moore
TypeScript 6.0 RC arrives as a bridge to a faster future
Mar 14th 2026 9:00am, by Darryl K. Taft
Mastra empowers web devs to build AI agents in TypeScript
Jan 28th 2026 11:00am, by Loraine Lawson
2021-08-31 05:00:18
Rootkits Come to Containers and Bring Trouble with Them
in-depth-news,
Containers / Linux / Security

Rootkits Come to Containers and Bring Trouble with Them

Advanced Persistent Threats and rootkits go hand-in-hand.
Aug 31st, 2021 5:00am by Steven J. Vaughan-Nichols
👁 Featued image for: Rootkits Come to Containers and Bring Trouble with Them

Rootkits have long been a pain in the neck to servers. These collections of malicious programs would hide on servers while allowing their controllers’ administrator-level access to a computer or network. While they don’t get the security headlines they used to, they’re still alive, well, and causing damage. So, it comes as no surprise that Aqua’s Team Nautilus has found many attackers using advanced persistent threat (APT) techniques to plant rootkits in cloud native containers.

It’s never a dull moment in the security business.

APTs and rootkits go hand-in-hand. An APT is a determined effort by an enemy to use continuous, clandestine, and sophisticated hacking techniques to break into your system. Once in, they remain hidden, and your uninvited visitor grabs data or sets up malware for a bigger, better attack. A rootkit, the names say it all–root access is done by a hidden kit of programs — works well with APTs.

Usually, because of their sheer scale, APTs are done by nation-states. Rootkits, sadly, can be planted by just about any script kiddie.

Aqua has seen the following steps in this latest series of attacks:

  1. Running a vanilla container image: The adversaries run an Alpine Linux container image.
  2. Escaping to the host: The attackers then mount the host file system to escape the container and gain access to the host.
  3. Downloading a malicious script: After they have escaped to the host, they write a command in the cron scheduler system that downloads and executes a malicious shell script (cronb.sh) from a remote source.
  4. Loading and executing the malware: The script cronb.sh is the payload, which executes the attack.

Simple and ugly.

Team Nautilus has found that in “cloud native environments, attackers usually execute rootkits on the host to hide malicious processes and to reduce the chances of detection after they have escaped the containerized environment.” And, of course, “rootkits can be used to override functions or binaries in userspace (for example, using LD_PRELOAD).” This last is a really old C library trick but it’s still successfully used and abused today.

Specifically, whoever these attackers are they’re using the Linux kernel space rootkit Diamorphine. If they can’t get Diamorphine in they’ll try using a userspace rootkit as a fallback. In either case, the point is to hide the real malicious payload from your system.

No matter the rootkit, the name of the game in the current crop of rootkit attacks is to conceal malicious programs such as Bitcoin miners with their high CPU usage from process monitoring programs such as ps or top that track Linux processes. They do this by manipulating how you see the data in Linux’s /proc/ filesystem. You see nearly all userspace tools that report on processes rely on the /proc/ filesystem contents. So, when you call top you’re using the getdents or getdents64 function to pull the data from proc. This rootkit intercepts these functions and hides the hidden processes’ data.

So, what can you do about this? Well, as everyone’s been telling you all along. Keep your Linux system and open source software up to date. None of those rootkits can get in unless you’ve opened the door. Keep it closed and locked with up-to-date secure software without known and fixed holes and you’re good. Sure, once in a blue moon there’s a zero-day attack on Linux, but it’s rare. Known, fixed security holes are the real ways most attackers get in.

And, as the National Security Agency (NSA) reminds us, you should configure systems to load only modules with a valid digital signature. This makes it much harder for an attacker to push a malicious kernel module into your containers.

Aqua also recommends you use Tracee to protect yourself. This is an open source Linux runtime security and forensics tool. It’s built on top of extended BPF (eBPF). Tracee 0.5.0 and above enable you to write Open Policy Agent (OPA) Rego signatures. The point of this is it enables you to detect suspicious activity. For example, Aqua has added some basic signatures such as “Attempt to load a kernel module detection.” As the name says, this lets you detect suspicious kernel driver loading. For a more in-depth analysis on how you can detect privilege escalation with Tracee, check out the talk by Team Nautilus at BlackHat 2021.

You can also use Aqua Enforcers’ file integrity monitoring (FIM). This validates your operating system application files by comparing the current file state with a known, good baseline. If the rootkit changes the names of some binaries and inserts new files with their names it will spot these changes and alert you that there are programs up to no good in your systems.

TRENDING STORIES
Steven J. Vaughan-Nichols, aka sjvn, has been writing about technology and the business of technology since CP/M-80 was the cutting-edge PC operating system, 300bps was a fast internet connection, WordStar was the state-of-the-art word processor, and we liked it.
Read more from Steven J. Vaughan-Nichols
SHARE THIS STORY
TRENDING STORIES
SHARE THIS STORY
TRENDING STORIES
TNS DAILY NEWSLETTER Receive a free roundup of the most recent TNS articles in your inbox each day.
The New Stack does not sell your information or share it with unaffiliated third parties. By continuing, you agree to our Terms of Use and Privacy Policy.