Abuse of Amazon EKS Access Entries for Persistent Backdoor Establishment
Adversaries with EKS administrative permissions may exploit EKS access entries to temporarily grant themselves cluster-admin access, establish persistent Kubernetes RBAC backdoors, and delete the access entry to conceal their activity.
Adversaries possessing sufficient AWS IAM permissions (eks:CreateAccessEntry and eks:DeleteAccessEntry) are leveraging Amazon EKS access entries to establish long-term persistence in Kubernetes clusters. By creating an access entry linked to their own IAM principal with high-privilege cluster-admin permissions, attackers can interact directly with the Kubernetes API to deploy backdoors, such as privileged ServiceAccounts, ClusterRoleBindings, or unauthorized DaemonSets. Once these persistent RBAC objects are established, the attacker deletes the EKS access entry to remove the CloudTrail audit trail associated with the initial grant. This technique effectively hides the method of entry while maintaining unauthorized control over the cluster through legitimate-looking Kubernetes-level resources. Defenders must monitor for short-duration grant-and-revoke cycles of EKS access entries, as this behavioral pattern is highly characteristic of this persistence strategy.
Attack Chain
- Attacker gains AWS credentials with
eks:CreateAccessEntryandeks:DeleteAccessEntrypermissions. - Attacker calls
CreateAccessEntryvia the EKS API to map their IAM principal to a cluster-admin Kubernetes group. - Attacker connects to the target EKS cluster using the newly provisioned access.
- Attacker performs a
createoperation on Kubernetes resources (e.g.,ClusterRoleBindingsorServiceAccounts) to create a persistent backdoor. - Attacker executes further malicious commands, such as deploying rogue
DaemonSetsor accessing sensitive secrets within the cluster. - Attacker calls
DeleteAccessEntryvia the EKS API to remove the association between their IAM principal and the cluster. - The EKS access entry is removed, leaving behind the persistent Kubernetes-level backdoor while clearing the primary CloudTrail evidence of access.
Impact
Successful exploitation allows for long-term, stealthy administrative access to EKS-based Kubernetes clusters. Unauthorized access can lead to container escape, exfiltration of sensitive secrets stored in the cluster, and manipulation of workloads. The number of impacted organizations depends on the strength of IAM controls and the visibility into Kubernetes audit logs, which are often siloed from traditional cloud management logs.
Recommendation
- Implement monitoring for the EKS access entry grant-and-revoke cycle using the provided detection logic.
- Review Kubernetes audit logs for
createevents involvingClusterRoleBindings,RoleBindings,ServiceAccounts, orDaemonSetsthat coincide with suspicious EKS access entry creation. - Audit existing Kubernetes RBAC configurations for unauthorized high-privilege service accounts or bindings.
- Restrict
eks:CreateAccessEntryandeks:DeleteAccessEntryIAM permissions to only the most trusted administrative identities or automated CI/CD roles.
Immediate actions
Deploy the detection rule for short-window EKS access entry creation/deletion
Mitigations
Restrict EKS administrative IAM permissions
T1098.006
Detection coverage 1
Detect AWS EKS Access Entry Created Then Deleted by Same Identity
mediumDetects the creation of an Amazon EKS access entry followed by its deletion by the same identity within a 5-minute window, indicative of potential backdoor installation.
Detection queries are available on the platform. Get full rules →