Skip to main content
Back
IntrusionAWS · Kubernetes
2 min read

Cryptomining on internet-exposed Kubernetes nodes in AWS

Victim
An unnamed Alert Logic customer
When
Mar 8, 2018Disclosed May 3, 2018
Entry
A permissive AWS security group admitted internet connections to the service that manages workloads on each node.

An AWS customer’s Kubernetes nodes were reachable from the internet after a firewall change. Alert Logic traced compromises on at least four nodes and detected cryptocurrency mining. The customer closed the firewall rule and removed the affected nodes.

What happened

Outside the cluster
Internet client
Internet
AWS cluster
Cluster nodes

AWS cluster

  1. 1

    Outside traffic reaches the node service

    From February 22

    AWS logs showed that a security group applied on February 22 admitted public traffic to the Kubernetes nodes. Alert Logic traced unsolicited traffic from an outside public address to the exposed node service.

  2. 2

    Responders confirm mining on the cluster

    By April 4

    Alert Logic correlated network and node records and found at least four nodes compromised after the group change. Its monitoring identified cryptocurrency mining at the customer.

Impact

At least four Kubernetes nodes were compromised. Alert Logic reported mining activity and found no evidence suggesting persistent access to the AWS account.

Could this have been prevented?

Keep node management on private networks

Where management clients have private connectivity, restrict the AWS security groups on every node to those sources. During recovery, compare network records with node and AWS change logs to identify the exposure window and the hosts that need replacement.

Incident control assessments

1
Prevented
0
Contained
1
Not covered

How it could have been prevented

The same replay with the controls in place. Green marks where a step is refused, blue where it is bounded, and red where no control reaches it. Open a row to read the control, why it acts, and its caveat.

Outside the cluster
Internet client
Internet
AWS cluster
Cluster nodes

AWS cluster

1 · Outside traffic reaches the node service

1 Prevented

2 · Responders confirm mining on the cluster

1 Not covered

Key facts

  • The public security group took effect on February 22, 2018.
  • Responders traced the earliest confirmed node compromises to March 8.
  • An analyst raised the mining incident on April 4.
  • The customer closed the security group and deleted the affected nodes.

Sources

Every fact in this breakdown comes from the public reporting below. The replay is a model of that reporting, not a reconstruction of the environment it describes.

  1. 1.
    Alert Logic Container IDS Solution Detects Cryptomining Attack on AWSAlert Logic, republished by Security Boulevard · May 3, 2018 · Vendor reportIncident responders correlated AWS and Kubernetes logs with their network sensor and documented four affected nodes.
  2. 2.
    Security group rulesAmazon Web Services · undated · Vendor reportSource ranges, rule aggregation and inbound reachability.

The estate in the replay is illustrative and drawn at the level of attack stages; the victim's real environment is not public. Verdicts describe what a control does when it is in place before the incident. They are not an assessment of the victim's security program.

More cloud attack breakdowns

All breakdowns