Cloud Security, Threat Management, Threat Management, Malware

Docker attackers devise clever technique to avoid detection

Share

In what researchers say is a first, attackers are performing a new container attack technique in the wild, whereby they build their own malicious images on a targeted host instead of pulling preexisting ones from a public registry. This maneuver allows the adversaries to avoid static detection by scanners that are programmed to look for suspicious images.

The attack exploits misconfigured Docker API ports in order to infect victims with a resource-hijacking cryptominer, according to a new blog post from Aqua Security, whose researchers uncovered the scheme.

"This is yet another step in the super-fast evolution of attacks against cloud-native environments in just the past couple of years," said says the post, from Assaf Morag, lead data analyst.

"Normally, attacks against misconfigured Docker API are initiated by pulling an image from a public registry (i.e. Docker Hub) and spinning up the container on the targeted host environment," explains Morag. But by building an original image on the host, scanners likely won't detect a problem "since the image is built upon a standard Alpine base image and would most probably be marked as benign."

Indeed, because images' names and perhaps even IDs are randomly created, security personnel can't easily add these images to deny/block lists in order to facilitate future detection of such threats. The technique also improves the persistency of the attack because the malicious image can't be taken down if it's not stored anywhere in the first place.

Fortunately, Morag advises that dynamic threat analysis that seeks out anomalous behavior should help block this attack technique.

In the observed attack, the adversary used a Docker SDK for Python package to send various malicious commands to vulnerable Docker implementations. The first of these commands is designed to determine if a Docker server has an exposed API. If so, the attackers then use a GET request to receive a list of containers on the host. Next, they use a A POST request with a Docker build command to create an image on the host. At that point, the attackers create a new malicious container based on the image and then run said container and ultimately execute an ELF file, which turns out to be the XMRig cryptominer.

An In-Depth Guide to Cloud Security

Get essential knowledge and practical strategies to fortify your cloud security.
Bradley Barth

As director of multimedia content strategy at CyberRisk Alliance, Bradley Barth develops content for online conferences, webcasts, podcasts video/multimedia projects — often serving as moderator or host. For nearly six years, he wrote and reported for SC Media as deputy editor and, before that, senior reporter. He was previously a program executive with the tech-focused PR firm Voxus. Past journalistic experience includes stints as business editor at Executive Technology, a staff writer at New York Sportscene and a freelance journalist covering travel and entertainment. In his spare time, Bradley also writes screenplays.

Get daily email updates

SC Media's daily must-read of the most current and pressing daily news

By clicking the Subscribe button below, you agree to SC Media Terms of Use and Privacy Policy.