GKE Pod Exec Potential Reverse Shell
Detects successful GKE pod exec sessions whose command resembles reverse-shell or bind-shell one-liner patterns, including /dev/tcp and /dev/udp redirection, netcat/ncat exec-style flags, socat shell handoff, mkfifo…
Description
Detects successful GKE pod exec sessions whose command resembles reverse-shell or bind-shell one-liner patterns, including /dev/tcp and /dev/udp redirection, netcat/ncat exec-style flags, socat shell handoff, mkfifo pipelines, and common language socket idioms. Legitimate debug sessions sometimes use similar building blocks, but together these patterns align with post-exploitation interactive access and command-and-control. Common localhost /dev/tcp health-check ports are excluded. GKE records the command in gcp.audit.labels.command.gke.io/command when an explicit command is passed to exec.
Detection logic
Its licence does not clear it for publishing here
Sunturai publishes a detection's own text where the licence it arrived under has been reviewed and permits it, and Elastic License 2.0 has not. The query as its source wrote it, its canonical form and the hash that pins this revision are in the workspace record.
Detection requirements
- Platform
- ContainersESXiIaaSIdentity ProviderLinuxmacOSNetwork DevicesOffice SuiteSaaSWindows
The rule states no platform. This is derived from the 3 ATT&CK techniques it maps to.
- Log source category
- event_index
Known benign triggers
- Security training, CTF-style images, or vendor diagnostics may include bash redirection or /dev/tcp examples. Baseline approved images then expand exclusions as needed.
MITRE ATT&CK mappings
0 exclusive techniques.This is coverage no other published rule has; it is not this rule's total technique count.
References
| Reference | Cited by |
|---|---|
| attack.mitre.org/techniques/T1059/ | 7from 2 sources |
| attack.mitre.org/techniques/T1609/ | 6 |
From the source
- At source
- Open at source
- Upstream identifier
- b5974c88-d584-451c-8ce3-6b19d7456199
- Tagged by the source as
- Data Source: GCPData Source: GCP Audit LogsData Source: Google Cloud PlatformDomain: CloudDomain: ContainersDomain: KubernetesNoise: MediumPerformance: NormalPlatform: GCPPlatform: KubernetesProfile: RecommendedResources: Investigation GuideRule Type: Custom Query (KQL)Tactic: Command and ControlTactic: ExecutionThreat: Reverse ShellUse Case: Threat Detection
Licence
- Published under
- Elastic License 2.0Read the licence
- Attribution
- Required
Authorship
- Written by
- Published
- Sep 20, 2026
- Version
- 3