AWS EKS Secrets List Across Cluster or Sensitive Namespaces

Detects list operations on Kubernetes Secrets from a non-loopback client when the request URI targets cluster-wide secrets or list operations under kube-system or default. Useful for spotting broad secret enumeration from remote clients.

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 = """
 12Detects list operations on Kubernetes Secrets from a non-loopback client when the request URI targets cluster-wide
 13secrets or list operations under kube-system or default. Useful for spotting broad secret enumeration from remote
 14clients.
 15"""
 16from = "now-6m"
 17index = ["logs-aws.eks_audit-*"]
 18language = "kuery"
 19license = "Elastic License v2"
 20name = "AWS EKS Secrets List Across Cluster or Sensitive Namespaces"
 21note = """## Triage and analysis
 22
 23### Investigating AWS EKS Secrets List Across Cluster or Sensitive Namespaces
 24Audit events for `list` on the `secrets` resource against `/api/v1/secrets`, paginated cluster lists, or namespace-scoped
 25lists under `kube-system` or `default`, from a source IP that is not localhost.
 26
 27### Possible investigation steps
 28
 29- Confirm the actor (`user.name`, groups) and whether the client is expected (CI, admin bastion, controller).
 30- Review `aws.eks.audit.requestURI`, `user_agent.original`, and follow-on API activity from the same source.
 31- Assess exposure: cluster-wide secret listing can surface many credentials.
 32
 33### False positive analysis
 34
 35- Legitimate controllers or operators listing secrets in `kube-system` / `default` from cluster nodes may match; tune by
 36  source IP, user agent, or service account as needed.
 37
 38### Response and remediation
 39
 40- If the listing is unauthorized, revoke the credentials used, rotate the secrets that were exposed, and tighten RBAC so
 41  that only the required service accounts can list secrets in those namespaces.
 42- Review follow-on activity from the same identity and source IP for secret reads, pod exec, or RBAC changes."""
 43risk_score = 73
 44rule_id = "a4734e68-ae02-53da-892d-5403beceb95f"
 45setup = """This rule reads EKS control-plane audit logs collected by the AWS integration
 46into `logs-aws.eks_audit-*`, where the AWS EKS audit ingest
 47pipelines normalize each audit record under `aws.eks.audit.*`.
 48
 49Enable the `audit` control-plane log type on the EKS cluster, send its
 50CloudWatch log group through the AWS integration, and confirm events carry
 51`data_stream.dataset: aws.eks_audit` and
 52`cloud.provider: aws` before enabling this rule.
 53"""
 54severity = "high"
 55tags = [
 56    "Domain: Cloud",
 57    "Domain: Containers",
 58    "Platform: AWS",
 59    "Platform: Kubernetes",
 60    "Data Source: AWS",
 61    "Data Source: Amazon Web Services",
 62    "Data Source: Kubernetes API Server Audit Logs",
 63    "Service: AWS EKS",
 64    "Use Case: Threat Detection",
 65    "Tactic: Credential Access",
 66    "Tactic: Discovery",
 67    "Rule Type: Custom Query (KQL)",
 68    "Resources: Investigation Guide",
 69    "Profile: Beta",
 70]
 71timestamp_override = "event.ingested"
 72type = "query"
 73
 74query = '''
 75data_stream.dataset:"aws.eks_audit" and event.action:list and
 76aws.eks.audit.objectRef.resource:secrets and
 77aws.eks.audit.requestURI :(/api/v1/secrets or /api/v1/secrets?limit* or /api/v1/namespaces/kube-system/secrets or /api/v1/namespaces/kube-system/secrets?limit* or /api/v1/namespaces/default/secrets or /api/v1/namespaces/default/secrets?limit*) and
 78source.ip:(* and not ("::1" or "127.0.0.1")) and
 79not user.name: (system\:kube-controller-manager or eks\:cloud-controller-manager or eks\:kms-storage-migrator or
 80  "system:serviceaccount:argocd:argocd-application-controller" or
 81  "system:serviceaccount:elastic:kube-state-metrics" or
 82  "system:serviceaccount:cert-manager:cert-manager-cainjector" or
 83  "system:serviceaccount:elastic-system:elastic-agent" or
 84  "system:serviceaccount:longhorn-system:longhorn-service-account") and
 85not aws.eks.audit.user.groups:("system:serviceaccounts:ibm-csi" or "system:serviceaccounts:argocd" or "system:serviceaccounts:elastic")
 86'''
 87
 88
 89[[rule.threat]]
 90framework = "MITRE ATT&CK"
 91[[rule.threat.technique]]
 92id = "T1552"
 93name = "Unsecured Credentials"
 94reference = "https://attack.mitre.org/techniques/T1552/"
 95[[rule.threat.technique.subtechnique]]
 96id = "T1552.007"
 97name = "Container API"
 98reference = "https://attack.mitre.org/techniques/T1552/007/"
 99
100
101
102[rule.threat.tactic]
103id = "TA0006"
104name = "Credential Access"
105reference = "https://attack.mitre.org/tactics/TA0006/"
106[[rule.threat]]
107framework = "MITRE ATT&CK"
108[[rule.threat.technique]]
109id = "T1613"
110name = "Container and Resource Discovery"
111reference = "https://attack.mitre.org/techniques/T1613/"
112
113
114[rule.threat.tactic]
115id = "TA0007"
116name = "Discovery"
117reference = "https://attack.mitre.org/tactics/TA0007/"

Triage and analysis

Investigating AWS EKS Secrets List Across Cluster or Sensitive Namespaces

Audit events for list on the secrets resource against /api/v1/secrets, paginated cluster lists, or namespace-scoped lists under kube-system or default, from a source IP that is not localhost.

Possible investigation steps

  • Confirm the actor (user.name, groups) and whether the client is expected (CI, admin bastion, controller).
  • Review aws.eks.audit.requestURI, user_agent.original, and follow-on API activity from the same source.
  • Assess exposure: cluster-wide secret listing can surface many credentials.

False positive analysis

  • Legitimate controllers or operators listing secrets in kube-system / default from cluster nodes may match; tune by source IP, user agent, or service account as needed.

Response and remediation

  • If the listing is unauthorized, revoke the credentials used, rotate the secrets that were exposed, and tighten RBAC so that only the required service accounts can list secrets in those namespaces.
  • Review follow-on activity from the same identity and source IP for secret reads, pod exec, or RBAC changes.

Related rules

to-top