Unit 42 Finds the First Cryptojacking Docker Container
Palo Alto Network's Unit 42 has found the first cryptocurrency miner malware that spreads like a worm through the use of Docker containers.
Palo Alto Network's Unit 42 has found the first cryptocurrency miner malware that spreads like a worm through the use of Docker (community edition) containers. They say that it has spread to more than 2,000 unsecured Docker hosts. They call it "Graboid" which refers to the 1990s movie Tremorswhich has giant sandworms that act in bursts.
One of the major advantages to this method of malware operation is that traditional endpoint protection software does not inspect data and activities inside containers. That gives the worm a stealth aspect it would not otherwise have going for it.
When a Docker image is first installed to run on what will become the compromised host, the daemons are unsecured. The actual malware (pocosow/centos:7.6.1810) is downloaded from an attacker's command and control (C2) server and aims to mine for Monero. The miner queries every 100 seconds for new vulnerable hosts from the C2 and picks its next three targets at random from a list the C2 provides that contains a list of 2000+ IP addresses. These IPs are hosts with unsecured docker API endpoints. 57.4% of the IPs originated from China, followed by 13% from the US.
The pocosow/centos:7.6.1810 container image contains a docker client tool that is used to communicate with other Docker hosts. The actions it will perform on the three new targets are not linear and straightforward. It installs the worm on the first target, stops a miner on the second target if it exists, and starts the miner on the third target. The strategy for this unusual behavior is not clear.\r\nUnit 42 found that each miner is active 63% of the time and that each mining period lasts for 250 seconds. They also found that pocosow/centos container image has been downloaded more than 10,000 times and another xmrig binary (gakeaws/nginx) has been downloaded more than 6,500 times. There is also another mining image with the name of gakeaws/mysql. Graboid performs both worm-spreading and cryptojacking from inside the Docker containers.
This particular malware doesn't involve sophisticated tactics, techniques or procedures. But another version of it could. Since the intruder looks to the C2 server for the actual malware, it would be fairly simple for an attacker to upgrade the specific malicious program.
Unit 42 recommends some actions to prevent against compromise. They say to "Never expose a docker daemon to the internet without a proper authentication mechanism. Note that by default the Docker Engine (CE) is NOT exposed to the internet."
Also, "Use Unix socket to communicate with Docker daemon locally or use SSH to connect to a remote docker daemon."
Of course, not pulling Docker images from unknown registries or unknown user namespaces will help.
Brandon Levene, Chronicle's head of applied intelligence, has this to say about this discovery. "It makes sense for attackers to target Docker because it's one of the most popular platform-as-a-service frameworks to date, and misconfigurations around PaaS are prime for abuse. By poisoning container images, the attackers effectively take advantage of the inherent trust that users place in Docker images -- surely no one would go through the trouble of building a container for malicious use, right? Granting a cryptominer worming capabilities also aligns with the general strategy of cryptojacking, which compromises as many hosts as possible and runs miners for a long time. When there are more compromised hosts, there are more contributions to mining pools, and therefore greater financial rewards."
— Larry Loeb has written for many of the last century's major "dead tree" computer magazines, having been, among other things, a consulting editor for BYTE magazine and senior editor for the launch of WebWeek.
Read more about:
Security NowAbout the Author
You May Also Like