Global security desk · updated coverage of threats, exploits & breaches

Docker API Botnets Deploy Cryptominers Through Exposed Hosts

Botnets hijacking Docker APIs to deploy cryptominers are exploiting a simple but consequential mistake: an exposed container-management interface that accepts remote commands. Instead of compromising a website, an attacker scans for Docker Engine’s Remote API on TCP port 2375, tests whether authentication is missing, and then uses the host’s own container engine to run mining software. Because the API is legitimate administrative access, some security controls record the activity as authorised container management.

The danger extends beyond a hidden process and a larger cloud bill. Docker can create containers, attach storage, execute commands and mount host resources, so an attacker may turn a mining payload into broader host compromise. For Australian organisations, the attack surface is especially relevant because container adoption often spans cloud regions, managed services and internal build systems. The same controls must therefore apply to production orchestration, developer laptops and forgotten test hosts.

From an Open API to Host-Level Access

Docker normally listens on a local Unix socket rather than a public TCP port. The exposure becomes dangerous when a reverse proxy, remote development setup or cloud configuration publishes port 2375, or when port 2376 is deployed without properly configured client certificates. A remote client can query /_ping and /version, enumerate images and containers, then send requests to create, start or execute containers. Older Docker API versions may also lack controls introduced in later releases.

An attacker does not need a software exploit for this route. The documented API already offers the actions required to schedule workloads. If the interface is unauthenticated, botnet scanners can find it, test it and move onward without planting a traditional backdoor. Exposure through a legitimate proxy is equally risky because the proxy may faithfully pass API calls that are valid but unauthorised.

Once a malicious container starts, a common route is to mount the host filesystem under /host and run commands through a chroot. Another variant mounts /var/run/docker.sock, giving the container direct control of the daemon. Since the daemon commonly runs as root, restrictions inside the new container can be bypassed through the host. The result can include stolen credentials, altered services and a miner designed to survive simple cleanup.

Mining and Persistence Inside the Host

A common payload target is Monero because XMRig is widely available and designed to mine efficiently across common CPU architectures. The container may receive configuration through environment variables, download a current binary and join a mining pool over the Stratum protocol. Wallet addresses and pool credentials usually point to the attacker, turning victim compute into income for the botnet operator.

Mining is useful to attackers because the computational and electricity costs fall on the victim. A worker can also be tuned to avoid maximum CPU use, reducing the chance of triggering an obvious alert while remaining monetisable. GPU and accelerated variants may appear where the host exposes suitable hardware, but ordinary servers are often enough because the botnet values reach over individual profitability.

Persistence matters because stopping one container does not remove a miner installed on the host. Attackers may add scheduled tasks, modify service files, alter shell startup files or replace legitimate binaries. They can also suppress competing malware to preserve resources for the botnet. Container status therefore provides an incomplete view of compromise, especially where the attacker reached the underlying operating system.

Why the Botnet Can Scale

Botnets make this class of attack scalable by dividing the work across many compromised devices. A scanner locates potential Docker endpoints, a loader checks whether API operations succeed, and worker nodes manage mining pools and payload updates. Each stage can operate independently, making the campaign resilient when individual servers or defenders block one address.

The approach also reduces the need for expensive exploit development. Internet-wide scanning reveals hosts answering on the Docker API port, and many of those hosts accept anonymous requests. Some campaigns pair the same weaknesses with exposed Kubernetes APIs, kubelet endpoints or other orchestration services, although those are distinct attack paths that require their own validation. The common denominator is an administrative interface placed where untrusted clients can reach it.

For defenders, this creates a detection problem because malicious container creation can resemble routine deployment. Traditional perimeter tools may treat the source address as a trusted automation service, while the Docker daemon correctly reports that it received a valid request. Visibility must connect network logs, runtime events and host telemetry rather than relying on the container runtime alone.

Australian Workloads Add Practical Risk

Australia has major cloud regions in Sydney and Melbourne, and local enterprises routinely run a mix of public cloud, on-premises hardware and hosted colocation. A container intended for an internal build system may be reachable from an internet-facing load balancer or a home-office jump host. AWS, Azure and Google Cloud reduce hardware management but leave the customer responsible for API exposure, identity and firewalling.

Australia’s managed service provider and offshore support market adds another common pattern: a primary administrator in Melbourne or Brisbane delegates parts of the estate to a provider, while scripts and shared jump hosts retain old credentials. In plain Australian workplace language, the risk is leaving the “front door to the host” wide open; if that door has no lock, Docker itself performs the privileged work for the intruder.

Fixed-line NBN services and 5G routers also create exposed edge endpoints for smaller Australian firms and development kits. Meanwhile, resource operations around Perth and remote industrial sites may rely on hybrid links that connect to central cloud platforms. Across these environments, one forgotten tunnel or overly broad security group rule can place a Docker daemon within reach of an automated scanner.

Detecting the Hijack

Start with Docker Engine’s daemon logs and any reverse-proxy logs. Unexpected calls to /_ping, /containers/json, POST requests to /containers/create or /start, and sudden API activity from unrelated source networks deserve investigation. A burst of endpoint checks across many addresses can indicate a botnet scanning from the same infrastructure, even when individual requests look routine.

Process and workload telemetry may reveal the payload before a wallet appears. Look for sustained CPU use without matching application demand, miner binaries or renamed children, connections to mining pools and wallets in container settings. Common port numbers are not reliable identifiers because pools change endpoints and attackers alter behaviour. Image names are equally deceptive because a malicious image can be renamed to resemble a trusted base operating system.

Host-level checks should cover new cron entries, altered systemd units, modified SSH authorised_keys files, unexpected kernel or security modules, and outbound traffic unrelated to business services. Compare the container inventory with the list of expected Docker daemons, including test machines no longer connected to the main network. Centralised logs and file integrity monitoring can expose persistence that process cleanup misses.

Reducing the Attack Surface

Do not publish Docker’s plaintext API on 2375 to the internet. Bind remote administration to localhost and use an SSH tunnel, or protect 2376 with TLS and mutual client certificates behind strict network access controls. An authenticating proxy can add another layer, but it must deny every unapproved source and path. Check Docker Desktop, development daemons and temporary tunnels as carefully as production engines.

Limit what containers can do even when the API is secure. Run the daemon with rootless mode or user-namespace remapping where practical; avoid --privileged, host filesystem mounts, the Docker socket and host PID or IPC namespaces. Drop unnecessary Linux capabilities, apply seccomp and AppArmor profiles, use read-only root filesystems and mount only required directories. Patch the operating system and Docker Engine because API hardening and kernel protections evolve together.

Egress filtering can stop a miner reaching its pool even if an attacker creates a container. Permit only required DNS, registry and monitoring destinations from production workloads, then investigate unusual direct IP connections and unfamiliar domains. Use trusted registries, image signatures, vulnerability scanning and admission policy to reduce the chance that unapproved images or commands run in the first place.

Container security is easy to overlook in a hurried developer sprint. For engineers preparing a team briefing, the security books collection offers background material on container security and secure configuration. Pair that awareness with an asset register identifying every Docker daemon, including forgotten lab and test machines.

Containment, Recovery and Accountability

When a miner is found, isolate the affected host from the network and mining destinations, but do not assume deleting the container erases the intrusion. Preserve logs, disk artefacts and network records, then treat the operating system as compromised because the attacker may have escaped container boundaries. A reboot or factory reset of only the workload is not sufficient remediation.

Rebuild the host from a trusted baseline, apply current patches and restore services only after checking cron directories, service units, startup scripts and user accounts for persistence. Rotate any secrets, tokens or SSH keys that were accessible from the machine, then examine neighbouring systems for the same access pattern. Cloud customers should notify their provider, check compute history and anomalous egress, and monitor for renewed mining activity after recovery.

In Australia, cryptomining itself is not automatically a notifiable data breach. However, root-level access to a host can expose personal information, customer records or credentials, so organisations must assess the Privacy Act 1988, the OAIC Notifiable Data Breaches scheme and applicable state and territory privacy laws. The ACSC’s Essential Eight and ASD guidance provide useful control references for preventing exposed management services and strengthening incident detection.

The durable objective is to prevent an untrusted internet client from instructing the container runtime unless that access is explicitly authorised, authenticated and monitored. Cryptominers are a visible symptom of that failure, but host compromise and lateral movement are the more serious outcomes to contain.