Join us

Privilege escalation in AWS Elastic Kubernetes Service (EKS)

Privilege escalation in AWS Elastic Kubernetes Service (EKS)

An Trinh shares a scenario where his team was trying to escalate privileges from a compromised pod in AWS Elastic Kubernetes Service (EKS) and struggled with NodeRestriction, a security mechanism enabled by default on all EKS versions.

  • They discovered that a container running inside an EC2 instance could request the AWS metadata service to obtain the instance's IAM token.
  • By requesting service account tokens for those pods from the API server, they were able to impersonate them and use their privileges.
  • They also discovered that in a Kubernetes deployment, pods are usually distributed evenly in the cluster, and there is no boundary separating pods running sensitive services from other untrusted pods.
  • By inspecting and pivoting through every pod, it is possible to obtain a token with a higher trust boundary, such as one with permission to list the cluster's secrets.


Let's keep in touch!

Stay updated with my latest posts and news. I share insights, updates, and exclusive content.

Unsubscribe anytime. By subscribing, you share your email with @faun and accept our Terms & Privacy.

Give a Pawfive to this post!


Only registered users can post comments. Please, login or signup.

Start writing about what excites you in tech — connect with developers, grow your voice, and get rewarded.

Join other developers and claim your FAUN.dev() account now!

Avatar

The FAUN

FAUN.dev()

@faun
The FAUN watches over the forest of developers. It roams between Kubernetes clusters, code caves, AI trails, and cloud canopies, gathering the signals that matter and clearing out the noise.
Developer Influence
3k

Influence

302k

Total Hits

3711

Posts