Azure AKS Ephemeral Container Added to Pod
Detects an identity injecting an ephemeral (debug) container into a running AKS (Azure Kubernetes Service) pod via the pods/ephemeralcontainers subresource, excluding known AKS control-plane and platform identities.…
Description
Detects an identity injecting an ephemeral (debug) container into a running AKS (Azure Kubernetes Service) pod via the pods/ephemeralcontainers subresource, excluding known AKS control-plane and platform identities. Ephemeral containers share the target pod's namespaces and give stealthy interactive access to its processes and mounted secrets without creating a new pod. Coverage includes workload service accounts (system:serviceaccount:*), so a compromised in-cluster token used to attach a debug container is not excluded.
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
- Containers
The rule states no platform. This is derived from the ATT&CK technique it maps to.
- Log source category
- event_index
Known benign triggers
- Operators and support tooling use ephemeral containers (kubectl debug) for legitimate troubleshooting. Baseline expected users and exclude verified break-glass or platform identities after review.
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 |
|---|---|
| kubernetes.io/docs/tasks/debug/debug-application/debug-running-pod/#ephemeral-container | 3 |
| microsoft.github.io/Threat-Matrix-for-Kubernetes/ | 15 |
| unit42.paloaltonetworks.com/hildegard-malware-teamtnt/ | 5from 2 sources |
From the source
- At source
- Open at source
- Upstream identifier
- d4209683-ee18-439f-b816-1bbe6ee6bbc8
- Tagged by the source as
- Data Source: AzureData Source: Azure Platform LogsData Source: KubernetesDomain: CloudDomain: ContainersDomain: KubernetesNoise: UnknownPerformance: FastPlatform: AzurePlatform: KubernetesResources: Investigation GuideRule Type: Custom Query (KQL)Tactic: ExecutionUse Case: Threat Detection
Licence
- Published under
- Elastic License 2.0Read the licence
- Attribution
- Required
Authorship
- Written by
- Published
- Sep 20, 2026
- Version
- 3