Kubernetes Pod exec via API creates exec subresource requests

Detects Pod container exec session creation in Kubernetes audit logs, which can enable remote command execution.

FreeReviewedSigma · Medium · v5
Product
kubernetes
Category
application
Author
Leo Tsaousis (@laripping) (SigmaHQ), DRL 1.1
Published
2024-03-26
Updated
2026-07-31

ATT&CK techniques

Execution
  1. Recon

  2. Resource Dev

  3. Initial Access

  4. Persistence

  5. Priv Esc

  6. Defense Evasion

  7. Cred Access

  8. Discovery

  9. Lateral Movement

  10. Collection

  11. C2

  12. Exfiltration

  13. Impact

What it detects

This rule catches Kubernetes API requests that create the pods/exec subresource, which corresponds to executing commands inside a container (e.g., kubectl exec). Attackers can use this capability to run arbitrary commands in the context of a Pod, potentially enabling persistence, data access, or lateral movement. It relies on Kubernetes audit logs capturing a create verb on the pods exec subresource and the associated target object references.

Related detections4 linkedT1609 — drag to rearrange
Suspicious Command Execution Inside a Kubernetes Pod (via audit)
Malicious Direct etcd Write to Kubernetes Registry via ETCDCTL_API (via process_creation)
Kubernetes audit log signals potential tool and shell enumeration/execution activity
Kubernetes Audit: Sidecar Injection via kubectl patch to Deployments
Kubernetes Pod exec via API creates exec subresource requests
Pivot detection · T1609 · 4 related

Changelog

v5
  1. v5
    Candidate ingested via manual entry.2026-07-31
  2. v4
    Candidate ingested via manual entry.2026-07-31
  3. v3
    Candidate ingested via manual entry.2026-07-31
  4. v2
    Candidate ingested via manual entry.2026-07-31
  5. v1
    No changelog recorded for this version.2026-07-30

Detection content is published as a reviewed draft. Tune thresholds and exclusions against your own telemetry before enabling this rule for alerting.