Kubernetes Audit: Sidecar Injection via kubectl patch to Deployments

Detects PATCH operations against Kubernetes Deployments that may indicate sidecar-style container injection.

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 flags Kubernetes API audit events where a PATCH is issued in the apps API group targeting deployments, which can be used to modify running workloads to add containers. Sidecar-style additions may allow an attacker to run additional code alongside existing containers without creating a separate, clearly distinguishable pod. It relies on Kubernetes audit telemetry capturing the API verb, API group, and the deployment resource reference for the patch request.

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 Pod exec via API creates exec subresource requests
Kubernetes Audit: Sidecar Injection via kubectl patch to Deployments
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.