A recent cybersecurity campaign exploits misconfigured Docker APIs to deploy cryptocurrency miners while using the Tor network for anonymity. Attackers target exposed Docker instances to gain unauthorized access, then leverage container environments to mine digital currencies covertly. This method particularly threatens cloud-reliant sectors like technology, finance, and healthcare.
Attack Methodology
To begin, attackers scan for Docker hosts with exposed APIs (port 2375/2376). They first check for existing containers and proceed to create new ones if none are found. Then using the lightweight alpine
image, attackers mount the host’s root directory (/hostroot
) as a volume. This grants unrestricted access to the host system, creating a container escape vulnerability. A Base64-encoded script installs Tor within the container, routing all traffic through the anonymity network. This masks the attacker’s origin during subsequent operations. The miner payload (typically XMRig) is fetched from a Tor-hidden service (.onion domain), executed directly in the container. Compression tools like zstd
accelerate payload deployment.
Key Characteristics
• Stealth: Tor obscures command-and-control traffic, making detection difficult.
• Persistence: Host directory mounting allows manipulation of critical system files.
• Targeting: Focuses on organizations with containerized infrastructure, especially those in tech, finance, and healthcare sectors.
Mitigation Recommendations
• Secure Docker APIs: Restrict API access to trusted IPs and enforce TLS encryption.
• Host Protection: Prevent directory mounting to containers unless explicitly required.
• Network Monitoring: Block Tor traffic at network boundaries and monitor for unusual container activity.