AWS EKS Multi-Resource Discovery

Last updated 3 days ago on 2026-10-20
Created 3 months ago on 2026-08-03

About

Adversaries who land credentials in a cluster or abuse an over-privileged token, often map the environment before exfiltration or privilege escalation. Rapid get/list traffic across distinct API resource kinds that answer those questions (namespaces, workloads, roles, cluster-wide roles) is a common setup and orientation pattern for both interactive attackers and automated recon scripts. This rule detects cross-resource bursts from a single client fingerprint within a one-minute bucket which may represent reconnaissance.
Tags
Domain: CloudDomain: ContainersPlatform: AWSPlatform: KubernetesData Source: AWSData Source: Amazon Web ServicesData Source: Kubernetes API Server Audit LogsService: AWS EKSUse Case: Threat DetectionTactic: DiscoveryRule Type: ES|QLProfile: BetaLanguage: esql
Severity
medium
Risk Score
47
MITRE ATT&CK™

Discovery (TA0007)(external, opens in a new tab or window)

License
Elastic License v2(external, opens in a new tab or window)

Definition

Integration Pack
Prebuilt Security Detection Rules
Related Integrations

aws(external, opens in a new tab or window)

Query
text code block:
from logs-aws.eks_audit-* metadata _id, _index, _version | eval Esql.time_interval = date_trunc(1 minute, @timestamp) | where data_stream.dataset == "aws.eks_audit" and event.action in ("get", "list") and aws.eks.audit.objectRef.resource in ("namespaces", "nodes", "pods", "roles", "configmaps", "serviceaccounts", "clusterroles", "clusterrolebindings", "rolebindings") and source.ip is not null and user.name IS NOT NULL and not to_string(source.ip) in ("127.0.0.1", "::1") and not user.name rlike """(system:serviceaccount:kube-system:|eks:|system:kube-|arn:aws:sts::.*:assumed-role/AWSServiceRoleForAmazonEKS/).*""" and not aws.eks.audit.user.username in ("system:serviceaccount:flux-system:kustomize-controller", "system:serviceaccount:flux-system:helm-controller", "system:serviceaccount:flux-system:source-controller", "system:serviceaccount:security:trivy-operator") | stats Esql.unique_resources = count_distinct(aws.eks.audit.objectRef.resource), Esql.enumerated_resources = values(aws.eks.audit.objectRef.resource), Esql.enumerated_namespaces = values(aws.eks.audit.objectRef.namespace), Esql.decisions = values(`aws.eks.audit.annotations.authorization_k8s_io/decision`) by user.name, aws.eks.audit.user.username, source.ip, user_agent.original, Esql.time_interval | where Esql.unique_resources >= 3 | keep Esql.*, aws.eks.audit.user.username, user.name, source.ip, user_agent.original

Install detection rules in Elastic Security

Detect AWS EKS Multi-Resource Discovery in the Elastic Security detection engine by installing this rule into your Elastic Stack.

To setup this rule, check out the installation guide for Prebuilt Security Detection Rules(external, opens in a new tab or window).