GKE Anonymous Endpoint Permission Enumeration

Last updated 6 days ago on 2026-07-16
Created 6 days ago on 2026-07-16

About

Detects bursts of GKE API requests from an anonymous identity that probe many distinct actions and resources with mostly failed outcomes. This pattern is consistent with unauthenticated permission enumeration against an exposed API server. On GKE GCP audit logs, unauthenticated probes often omit "client.user.email" (null principal) with Unauthorized failures; those events are included alongside "system:anonymous" / "system:unauthenticated".
Tags
Domain: CloudDomain: KubernetesData Source: GCPData Source: Google Cloud PlatformUse Case: Threat DetectionTactic: DiscoveryTactic: ReconnaissanceLanguage: esql
Severity
medium
Risk Score
47
MITRE ATT&CK™

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

Reconnaissance (TA0043)(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

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 in ("system:anonymous", "system:unauthenticated") or client.user.email is null ) and not gcp.audit.resource_name in ("readyz", "livez", "healthz", "version") | stats Esql.document_count = count(), Esql.failure_count = sum(case(event.outcome == "failure", 1, 0)), Esql.event_action_count_distinct = count_distinct(event.action), Esql.resource_name_count_distinct = count_distinct(gcp.audit.resource_name), Esql.event_action_values = values(event.action), Esql.resource_name_values = values(gcp.audit.resource_name), Esql.event_outcome_values = values(event.outcome), Esql.client_user_email_values = values(client.user.email), Esql.timestamp = VALUES(@timestamp), Esql.data_stream_namespace = VALUES(data_stream.namespace), Esql.user_agent_original_values = VALUES(user_agent.original) by source.ip | where Esql.event_action_count_distinct > 5 and Esql.resource_name_count_distinct > 3 and Esql.document_count < 50 and Esql.failure_count >= 1 | keep Esql.*, source.ip

Install detection rules in Elastic Security

Detect GKE Anonymous 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).