
A newly discovered cryptojacking campaign is targeting Docker environments using sophisticated evasion techniques to deploy cryptocurrency miners undetected. Researchers from Darktrace and Cado Security identified the malware, which leverages Docker API endpoints and Swarm orchestration to create a botnet for illicit mining operations1. The attackers use Alpine containers to deploy the XMRig miner while hiding processes using the libprocesshider rootkit2.
Technical Analysis of the Attack Chain
The campaign begins with mass scanning for exposed Docker APIs on ports 2375-2377 and 4243-4244 using tools like masscan and zgrab3. Once access is gained, the malware deploys scripts such as kube.lateral.sh and spread_docker_local.sh to move laterally across Docker, Kubernetes, and SSH hosts. The attackers establish persistence by adding SSH backdoors to authorized_keys files and stealing cloud credentials from AWS and Google Cloud environments4.
One notable aspect of this campaign is its use of Docker Hub tags hosted on attacker-controlled servers for command and control (C2) communications. This approach provides flexibility and resilience against takedowns. The malware also forces compromised hosts into a malicious Docker Swarm cluster, allowing centralized control over the mining operation5.
Evasion and Detection Challenges
The malware employs several techniques to avoid detection, including process hiding from common monitoring tools like top and ps. Researchers found the attackers using deobfuscation methods to conceal their activities, making traditional signature-based detection ineffective6.
Security teams should be aware of the following indicators of compromise:
- Unexpected Alpine container deployments
- Unusual network traffic to Teneo infrastructure
- Unauthorized Docker Swarm joins
- Modifications to authorized_keys files
Mitigation and Defense Strategies
Organizations running Docker environments should implement several defensive measures. First, secure Docker APIs by enforcing authentication and implementing firewall rules to restrict access. Monitoring Swarm activity for unauthorized joins or orchestration changes is critical for early detection7.
Regular patching of Docker, Kubernetes, and SSH services should be prioritized. Security teams should also monitor for unexpected container deployments and network connections to known cryptomining pools. Implementing runtime protection solutions that can detect process hiding techniques would provide additional defense against this threat8.
Attribution and Broader Implications
While not conclusively proven, researchers suspect ties to the known cryptojacking group TeamTNT based on similarities in tactics, techniques, and procedures (TTPs)9. This campaign represents an evolution in cloud-targeting malware, demonstrating attackers’ increasing sophistication in abusing container orchestration systems.
The discovery of this campaign highlights the ongoing risks of improperly secured cloud and container environments. As organizations continue to adopt containerization, attackers are developing more advanced methods to exploit these technologies for financial gain. This trend is likely to continue as cryptocurrency values fluctuate and attackers seek new revenue streams10.
References
- “Cryptojacking malware targets Docker with novel evasion technique,” Infosecurity Magazine, [Online]. Available: https://www.infosecurity-magazine.com/news/cryptojacking-malware-docker-novel/
- “Crypto-mining campaign targets Docker environments with new evasion technique,” Security Affairs, [Online]. Available: https://securityaffairs.com/176877/malware/crypto-mining-campaign-targets-docker-environments-with-new-evasion-technique.html
- “New cryptojacking attack targets Docker API to deploy miners,” The Hacker News, [Online]. Available: https://thehackernews.com/2024/10/new-cryptojacking-attack-targets-docker.html
- “Attackers target exposed Docker Remote API servers with perfctl,” Trend Micro, [Online]. Available: https://www.trendmicro.com/en_us/research/24/j/attackers-target-exposed-docker-remote-api-servers-with-perfctl-.html
- “Threat actors leveraging Docker Swarm & Kubernetes to mine cryptocurrency,” Datadog Report, [Online]. Available: https://securitylabs.datadoghq.com/articles/threat-actors-leveraging-docker-swarm-kubernetes-mine-cryptocurrency/
- “Stealthy new malware targets Docker images,” CyberPress, [Online]. Available: https://cyberpress.org/stealthy-new-malware-targets-docker-images/
- “Betting on bots,” Elastic Security Labs, [Online]. Available: https://www.elastic.co/security-labs/betting-on-bots
- “Cryptojacking malware exploits Docker for token mining,” ChannelE2E, [Online]. Available: https://www.channele2e.com/brief/cryptojacking-malware-exploits-docker-for-token-mining