Attack scenario · Kubernetes & infrastructure

Container-to-cloud identity exposure

How can a container escape lead to AWS account compromise? A privileged container escapes to its node and uses the node’s IAM role, which is far more powerful than any single workload’s.

Fictional, educational scenarioPrivilege takeoverData exposureLast updated · ATT&CK v20.1

Attack path · 4 stages

  1. 1

    Compromise a container

    T1190

  2. 2

    Escape to the node

    T1611

  3. 3

    Use the node IAM role

    T1552.005

  4. 4

    Abuse node permissions

    T1525T1530

For leadership

Executive summary

Containers share the underlying server. If one container is allowed to run with elevated privileges or mount host paths, compromising it can mean compromising the server — and the cloud credentials the server holds. Node credentials are often broader than any application needs, because nodes pull images, manage networking and sometimes much more. This scenario shows why workload isolation and minimal node permissions matter even when individual applications are well-scoped. The fixes are mostly configuration — enforcing pod security standards, blocking pod access to node metadata and trimming node roles — and can be rolled out gradually without application changes.

For engineers

Technical summary

A pod running privileged, with hostPath "/" or host PID, escapes to the node (T1611). From the node, IMDS returns the node instance role credentials; if pods can reach IMDS directly (hop limit 2+), escape is not even required.

Environment and assumptions

Fictional company: a logging DaemonSet runs privileged with hostPath mounts. The node role includes AmazonEC2ContainerRegistryPowerUser plus extra S3 permissions added for a past debugging task. IMDS hop limit is 2.

  • The adversary compromises a container on the node.
  • Fictional and simplified for education.

Interactive

Attack sequence

Select a stage, or use the arrow keys, to see preconditions, evidence and controls.

Text version of the attack sequence
  1. Compromise a container (T1190). The adversary gains code execution in a workload container. Preconditions: Vulnerable workload. Evidence: GuardDuty Runtime Monitoring. Controls: Patching; image scanning.
  2. Escape to the node (T1611). Using privileged settings or host mounts, the adversary executes on the host. Preconditions: Privileged container or hostPath / host namespaces. Evidence: GuardDuty Runtime Monitoring escape-related findings. Controls: Restricted Pod Security Standard.
  3. Use the node IAM role (T1552.005). The adversary requests the node’s role credentials from IMDS. Preconditions: IMDS reachable. Evidence: GuardDuty: instance credentials used outside the instance. Controls: IMDSv2 with hop limit 1; Minimal node role.
  4. Abuse node permissions (T1525, T1530). With ECR push rights, the adversary replaces images used by other services; with S3 rights, reads data. Preconditions: Node role has ECR push / S3 read. Evidence: CloudTrail: ecr PutImage by the node role. Controls: Node role limited to image pull; signed images.

Technique mapping

MITRE ATT&CK and ATLAS techniques referenced in this scenario
IDTechniqueTactics (official)Stages
T1190Exploit Public-Facing ApplicationInitial Access1
T1611Escape to HostPrivilege Escalation2
T1552.005Unsecured Credentials: Cloud Instance Metadata APICredential Access3
T1525Implant Internal ImagePersistence4
T1530Data from Cloud StorageCollection4

Technique names and tactic assignments come from the imported MITRE data. Mapping a stage to a technique is Securitain’s analysis.

Why the attack can succeed

  • Privileged workloads make escape straightforward.
  • Node roles accumulate permissions.
  • Pods can reach node metadata.

What prevents or limits the attack

What may detect the attack

Detection signals and telemetry sources
SignalTelemetry sourceNotes
Container escape and privilege-escalation behaviour on nodesGuardDuty Runtime Monitoring—
Node role performing write actions (ECR push, IAM)CloudTrail management events—

Telemetry only helps if it is enabled before the incident and someone acts on it. Listing a signal here does not mean it is collected or monitored in your environment.

What Securitain may assess

  • Securitain can assess todayEffective-permission view that considers managed, inline, group, boundary and SCP policies together. Learn more
  • Securitain can assess todayDetection of identities with sensitive permissions such as broad S3 access, KMS decrypt or Secrets Manager reads. Learn more
  • Outside Securitain’s current scopeKubernetes RBAC, pod security and in-cluster runtime behaviour are not assessed by Securitain today. Securitain can review the AWS IAM roles that workloads assume.

For leadership

Executive implications

integrity
Tampered images can spread to other services.
confidentiality
Data reachable by node roles is exposed.

No financial loss estimates are given; impact depends on the data, contracts and regulation involved.

Next steps

  1. Audit node roles for permissions beyond the EKS-managed policies.
  2. Set IMDS hop limit to 1 on node launch templates.
  3. Enforce Pod Security Standards.

References

MITRE ATT&CK® and ATT&CK® are registered trademarks of The MITRE Corporation. ATT&CK data © 2026 The MITRE Corporation. This work is reproduced and distributed with the permission of The MITRE Corporation (ATT&CK v20.1). Securitain is not affiliated with or endorsed by MITRE. Explanations, scenarios and control mappings on this page are Securitain’s own analysis. Sources and licensing

Stay in the loop

Cloud security insights, early access & compliance updates

Weekly InsightsEarly AccessExpert Content
No spam, everUnsubscribe anytimeWeekly updates
Chat with Securitain