AWS EKS Rapid Secret GET Activity Against Multiple Objects

This rule detects an unusual volume of Kubernetes API get requests against multiple distinct Secret objects from the same client fingerprint (user, source IP, and user agent) within a defined lookback window. This can indicate credential access or in-cluster reconnaissance, where a user or token is used to enumerate and retrieve sensitive data such as service account tokens, registry credentials, TLS material, or application configuration. Failed get requests are also included, as they may reveal RBAC boundaries, confirm the existence of targeted secrets, or reflect automated probing activity.

Elastic rule (View on GitHub)

  1[metadata]
  2creation_date = "2026/08/03"
  3integration = ["aws"]
  4maturity = "production"
  5min_stack_comments = "The AWS integration adds the aws.eks_audit data stream in package 8.9.0, which requires Kibana 9.6.0 or later."
  6min_stack_version = "9.6.0"
  7updated_date = "2026/10/20"
  8
  9[rule]
 10author = ["Elastic"]
 11description = """
 12This rule detects an unusual volume of Kubernetes API get requests against multiple distinct Secret objects from the
 13same client fingerprint (user, source IP, and user agent) within a defined lookback window. This can indicate credential
 14access or in-cluster reconnaissance, where a user or token is used to enumerate and retrieve sensitive data such as
 15service account tokens, registry credentials, TLS material, or application configuration. Failed get requests are also
 16included, as they may reveal RBAC boundaries, confirm the existence of targeted secrets, or reflect automated probing
 17activity.
 18"""
 19from = "now-6m"
 20language = "esql"
 21license = "Elastic License v2"
 22name = "AWS EKS Rapid Secret GET Activity Against Multiple Objects"
 23note = """## Triage and analysis
 24
 25### Investigating AWS EKS Rapid Secret GET Activity Against Multiple Objects
 26This rule surfaces clusters of `get` operations on the `secrets` API where the same identity and client path
 27(`user.name`, `source.ip`, `user_agent.original`) touch several different secret names within the rule lookback window.
 28**Allowed and denied** outcomes are included: successful reads may indicate harvesting; repeated **forbidden** or
 29**unauthorized** responses can still signal reconnaissance, RBAC probing, or scripted spray against secret names that
 30exist in the cluster.
 31
 32### Possible investigation steps
 33
 34- Inspect `Esql.outcome` for a mix of allow vs deny and whether failures cluster on sensitive namespaces.
 35- Map the identity to RBAC and namespace scope; review `Esql.secrets_names` and `Esql.namespaces` for high-value
 36  targets (tokens, registry credentials, TLS bundles, application secrets).
 37- Pivot on the same `source.ip` and user for follow-on API activity (exec, pod create, role changes, broad `list` on
 38  secrets).
 39- Validate against expected automation (CI, GitOps, backup, in-cluster controllers) before treating as malicious.
 40
 41### False positive analysis
 42
 43- Startup, Helm, or controllers may legitimately touch many secrets in one window; tune by user, namespace, or IP
 44  allowlists when baselined.
 45
 46### Response and remediation
 47
 48- If the activity is unauthorized, revoke the token or credentials used, rotate every secret that was read, and reduce
 49  the identity's RBAC to least privilege.
 50- Review the same identity and source IP for pod exec, token creation, or RBAC changes in the surrounding time window."""
 51references = ["https://www.sysdig.com/blog/scarleteel-2-0"]
 52risk_score = 73
 53rule_id = "c626a35b-a4ac-51b3-9b06-090ca10b2ad6"
 54setup = """This rule reads EKS control-plane audit logs collected by the AWS integration
 55into `logs-aws.eks_audit-*`, where the AWS EKS audit ingest
 56pipelines normalize each audit record under `aws.eks.audit.*`.
 57
 58Enable the `audit` control-plane log type on the EKS cluster, send its
 59CloudWatch log group through the AWS integration, and confirm events carry
 60`data_stream.dataset: aws.eks_audit` and
 61`cloud.provider: aws` before enabling this rule.
 62"""
 63severity = "high"
 64tags = [
 65    "Domain: Cloud",
 66    "Domain: Containers",
 67    "Platform: AWS",
 68    "Platform: Kubernetes",
 69    "Data Source: AWS",
 70    "Data Source: Amazon Web Services",
 71    "Data Source: Kubernetes API Server Audit Logs",
 72    "Service: AWS EKS",
 73    "Use Case: Threat Detection",
 74    "Tactic: Credential Access",
 75    "Rule Type: ES|QL",
 76    "Resources: Investigation Guide",
 77    "Profile: Beta",
 78]
 79timestamp_override = "event.ingested"
 80type = "esql"
 81
 82query = '''
 83from logs-aws.eks_audit-* metadata _id, _index, _version
 84| where data_stream.dataset == "aws.eks_audit"
 85    and event.action == "get"
 86    and aws.eks.audit.objectRef.resource == "secrets"
 87    and source.ip is not null and user.name is not null
 88    and not to_string(source.ip) in ("127.0.0.1", "::1")
 89    and not user.name in ("system:kube-controller-manager", "system:kube-scheduler")
 90    and not aws.eks.audit.objectRef.name like "sh.helm.release.*"
 91    and not aws.eks.audit.user.username in (
 92      "system:serviceaccount:flux-system:kustomize-controller",
 93      "system:serviceaccount:flux-system:helm-controller",
 94      "system:serviceaccount:flux-system:source-controller",
 95      "system:serviceaccount:security:trivy-operator"
 96    )
 97| stats
 98    Esql.unique_credentials = count_distinct(aws.eks.audit.objectRef.name),
 99    Esql.secrets_names = values(aws.eks.audit.objectRef.name),
100    Esql.namespaces = values(aws.eks.audit.objectRef.namespace),
101    Esql.event_outcome_values = values(event.outcome),
102    Esql.outcome = values(`aws.eks.audit.annotations.authorization_k8s_io/decision`)
103  by user.name, aws.eks.audit.user.username, source.ip, user_agent.original
104| where Esql.unique_credentials >= 3
105| KEEP user.name, aws.eks.audit.user.username, source.ip, user_agent.original, Esql.*
106'''
107
108
109[[rule.threat]]
110framework = "MITRE ATT&CK"
111[[rule.threat.technique]]
112id = "T1552"
113name = "Unsecured Credentials"
114reference = "https://attack.mitre.org/techniques/T1552/"
115[[rule.threat.technique.subtechnique]]
116id = "T1552.007"
117name = "Container API"
118reference = "https://attack.mitre.org/techniques/T1552/007/"
119
120
121
122[rule.threat.tactic]
123id = "TA0006"
124name = "Credential Access"
125reference = "https://attack.mitre.org/tactics/TA0006/"

Triage and analysis

Investigating AWS EKS Rapid Secret GET Activity Against Multiple Objects

This rule surfaces clusters of get operations on the secrets API where the same identity and client path (user.name, source.ip, user_agent.original) touch several different secret names within the rule lookback window. Allowed and denied outcomes are included: successful reads may indicate harvesting; repeated forbidden or unauthorized responses can still signal reconnaissance, RBAC probing, or scripted spray against secret names that exist in the cluster.

Possible investigation steps

  • Inspect Esql.outcome for a mix of allow vs deny and whether failures cluster on sensitive namespaces.
  • Map the identity to RBAC and namespace scope; review Esql.secrets_names and Esql.namespaces for high-value targets (tokens, registry credentials, TLS bundles, application secrets).
  • Pivot on the same source.ip and user for follow-on API activity (exec, pod create, role changes, broad list on secrets).
  • Validate against expected automation (CI, GitOps, backup, in-cluster controllers) before treating as malicious.

False positive analysis

  • Startup, Helm, or controllers may legitimately touch many secrets in one window; tune by user, namespace, or IP allowlists when baselined.

Response and remediation

  • If the activity is unauthorized, revoke the token or credentials used, rotate every secret that was read, and reduce the identity's RBAC to least privilege.
  • Review the same identity and source IP for pod exec, token creation, or RBAC changes in the surrounding time window.

References

Related rules

to-top