Attack scenario · Kubernetes & infrastructure

Compromised EKS service account

What can an attacker do with a compromised Kubernetes service account on EKS? A pod’s service account token is stolen; through Kubernetes RBAC and the IAM role mapped to it, the adversary reaches both the cluster and AWS.

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

Attack path · 4 stages

  1. 1

    Compromise a pod

    T1190

  2. 2

    Steal workload tokens

    T1528

  3. 3

    Read cluster secrets

    T1552T1613

  4. 4

    Access AWS data

    T1078.004T1530

For leadership

Executive summary

In Kubernetes on AWS, each workload carries two identities: one inside the cluster and one in AWS. If a workload is compromised, both travel with it. A service account with broad cluster permissions can be used to read secrets or start new workloads; an associated AWS role can reach cloud data. Because these identities are configured by different teams in different places, nobody may have a complete view of what a single compromised pod could do. Leaders should ask whether each production workload’s cluster and cloud permissions have been reviewed together.

For engineers

Technical summary

A projected service account token (or the AWS credentials issued via IRSA / EKS Pod Identity) is stolen from a compromised pod. Kubernetes RBAC determines in-cluster actions (secrets get/list, pods/exec, create pods); the mapped IAM role determines AWS actions.

Environment and assumptions

Fictional company: an EKS cluster runs a reporting service whose service account is bound to a ClusterRole allowing get/list on secrets in all namespaces, and mapped via EKS Pod Identity to an IAM role with s3:GetObject on a data-lake bucket.

  • The adversary achieves code execution in the reporting pod.
  • Kubernetes audit logs are not enabled.
  • Fictional and simplified for education.

Interactive

Attack sequence

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

Stage 1

Compromise a pod

A vulnerable dependency in the reporting service gives code execution.

Preconditions
  • Exploitable vulnerability
Required access
  • Network access to the service.
Potential evidence
  • Application logs; GuardDuty Runtime Monitoring
Defensive controls
  • Image scanning; patching
Text version of the attack sequence
  1. Compromise a pod (T1190). A vulnerable dependency in the reporting service gives code execution. Preconditions: Exploitable vulnerability. Evidence: Application logs; GuardDuty Runtime Monitoring. Controls: Image scanning; patching.
  2. Steal workload tokens (T1528). The adversary reads the projected service account token and obtains AWS credentials through the pod’s identity. Preconditions: Token automounted; Pod Identity association exists. Evidence: GuardDuty EKS findings for anomalous API use. Controls: Disable token automount where unused; Per-workload IAM roles.
  3. Read cluster secrets (T1552, T1613). With cluster-wide secret read access, the adversary lists secrets across namespaces, including other applications’ credentials. Preconditions: RBAC allows get/list secrets cluster-wide. Evidence: Kubernetes audit log: list secrets by the reporting service account (only if audit logs are enabled). Controls: Namespace-scoped RBAC; no cluster-wide secret access; Control plane audit logging.
  4. Access AWS data (T1078.004, T1530). The AWS credentials are used to read the data-lake bucket — potentially from outside the cluster. Preconditions: IAM role with S3 access. Evidence: CloudTrail: role session used from outside cluster network; S3 data events. Controls: Scoped IAM role; aws:SourceVpce conditions on the bucket.

Technique mapping

MITRE ATT&CK and ATLAS techniques referenced in this scenario
IDTechniqueTactics (official)Stages
T1190Exploit Public-Facing ApplicationInitial Access1
T1528Steal Application Access TokenCredential Access2
T1552Unsecured CredentialsCredential Access3
T1613Container and Resource DiscoveryDiscovery3
T1078.004Valid Accounts: Cloud AccountsInitial Access, Persistence, Privilege Escalation, Stealth4
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

  • Cluster RBAC and AWS IAM were each granted generously by different teams.
  • Audit logging for the control plane was off.
  • Secrets for many apps lived in one cluster readable by one service account.

What prevents or limits the attack

What may detect the attack

Detection signals and telemetry sources
SignalTelemetry sourceNotes
Service accounts listing secrets or creating pods unexpectedlyEKS control plane audit logs—
Pod role used outside the clusterGuardDuty; CloudTrail—

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

confidentiality
Credentials for many applications plus cloud data can be exposed from one pod.
integrity
With pod-creation rights, the adversary could run their own workloads.

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

Next steps

  1. Enable EKS audit logs.
  2. Find ClusterRoleBindings granting secrets access to app service accounts.
  3. Review IAM roles mapped to service accounts.

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