EKS and ECS Cluster Enumeration
EKS
List Clusters
Describe Cluster
endpointPublicAccess: true means the Kubernetes API server is reachable from the internet. If public CIDR ranges are not restricted, valid credentials can reach the API from anywhere.
Node Groups
The nodeRole ARN reveals the IAM role attached to all EC2 nodes in the group. Any pod that escapes to the host inherits this role.
OIDC Provider
EKS uses OIDC for pod-level IAM roles (IRSA). List the OIDC provider:
Roles trusted by an EKS OIDC provider have trust policies matching:
{
"Condition": {
"StringEquals": {
"oidc.eks.$REGION.amazonaws.com/id/$CLUSTER_ID:sub": "system:serviceaccount:$NAMESPACE:$SA_NAME"
}
}
}
Overly broad conditions (e.g. StringLike with wildcards) allow any pod in the namespace to assume the role.
ECS
List Clusters
List Services
Task Definitions
Task definitions contain container configs, environment variables, and the task execution role:
Running Tasks
Task Role
The task role is attached per task definition. Enumerate what it can do:
Then enumerate that role's policies as per IAM Authenticated Enumeration. An ECS task role with broad S3 or SSM access is a high-value lateral movement target.
Was this helpful?
Your feedback helps improve this page.