GKE Pod Exec with Curl or Wget to HTTPS

Last updated 7 days ago on 2026-07-15
Created 7 days ago on 2026-07-15

About

Detects successful GKE pod exec sessions where the executed command implies curl or wget fetching an HTTPS URL. Attackers with pods/exec often run one-liners to stage tooling, pull scripts or binaries, or exfiltrate data over HTTPS—activity that should be rare compared to shells, debuggers, or expected health checks. Common cluster health, localhost, and OIDC/JWKS endpoint patterns are excluded to reduce benign automation noise. GKE records the command in gcp.audit.labels.command.gke.io/command when an explicit command is passed to exec.
Tags
Domain: CloudDomain: KubernetesData Source: GCPData Source: GCP Audit LogsData Source: Google Cloud PlatformUse Case: Threat DetectionTactic: ExecutionTactic: Command and ControlLanguage: kuery
Severity
high
Risk Score
73
MITRE ATT&CK™

Execution (TA0002)(external, opens in a new tab or window)

Command and Control (TA0011)(external, opens in a new tab or window)

False Positive Examples
Approved runbooks or support sessions may use kubectl exec with curl/wget to test egress or download vendor tools.
License
Elastic License v2(external, opens in a new tab or window)

Definition

Rule Type
Query (Kibana Query Language)
Integration Pack
Prebuilt Security Detection Rules
Index Patterns
logs-gcp.audit-*
Related Integrations

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

Query
text code block:
data_stream.dataset:gcp.audit and service.name:"k8s.io" and event.outcome:success and event.type:start and event.action:("io.k8s.core.v1.pods.exec.create" or "io.k8s.core.v1.pods.exec.get") and gcp.audit.labels.command.gke.io/command:( (*curl*https* or *wget*https*) and not ( */.well-known/jwks.json* or */.well-known/openid-configuration* or */api/v1/health* or */healthz* or */livez* or */readyz* or */openid-connect/certs* or */openid/v1/jwks* or *127.0.0.1* or *kubernetes.default.svc* or *localhost* ) )

Install detection rules in Elastic Security

Detect GKE Pod Exec with Curl or Wget to HTTPS 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).