GKE Endpoint Permission Enumeration

Last updated 12 days ago on 2026-07-21
Created 12 days ago on 2026-07-21

About

Detects a single authenticated GKE identity from one source IP issuing a burst of API calls across many distinct actions and resources with a mix of successful and failed outcomes. That pattern is consistent with automated RBAC permission enumeration rather than steady-state controller traffic. Anonymous probing is covered by a separate rule.
Tags
Domain: CloudDomain: KubernetesData Source: GCPData Source: Google Cloud PlatformUse Case: Threat DetectionTactic: DiscoveryLanguage: esql
Severity
medium
Risk Score
47
MITRE ATT&CK™

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

False Positive Examples
Administrators troubleshooting RBAC from a workstation or VPN may generate mixed allow/deny results across many APIs in a short window; tune by identity or source IP after validation. Newly deployed workloads with incomplete RoleBindings can probe several APIs during startup and encounter intermittent denials; exclude known service accounts if documented.
License
Elastic License v2(external, opens in a new tab or window)

Definition

Integration Pack
Prebuilt Security Detection Rules
Related Integrations

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

Query
text code block:
from logs-gcp.audit-* metadata _id, _index, _version | where data_stream.dataset == "gcp.audit" and service.name == "k8s.io" and client.user.email is not null and source.ip is not null and to_string(source.ip) != "127.0.0.1" and to_string(source.ip) != "::1" and client.user.email != "system:anonymous" and client.user.email != "system:unauthenticated" and gcp.audit.resource_name != "readyz" and gcp.audit.resource_name != "livez" and gcp.audit.resource_name != "healthz" and gcp.audit.resource_name != "version" | stats Esql.document_count = count(), Esql.event_outcome_count_distinct = count_distinct(event.outcome), Esql.event_action_count_distinct = count_distinct(event.action), Esql.gcp_audit_resource_name_count_distinct = count_distinct(gcp.audit.resource_name), Esql.earliest_timestamp = min(@timestamp), Esql.latest_timestamp = max(@timestamp), Esql.event_action_values = values(event.action), Esql.event_outcome_values = values(event.outcome), Esql.gcp_audit_resource_name_values = values(gcp.audit.resource_name), Esql.user_agent_original_values = values(user_agent.original) by client.user.email, source.ip | where Esql.event_outcome_count_distinct == 2 and Esql.event_action_count_distinct > 5 and Esql.gcp_audit_resource_name_count_distinct > 3 and Esql.document_count < 75 | keep Esql.*, client.user.email, source.ip

Install detection rules in Elastic Security

Detect GKE Endpoint Permission Enumeration 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).