Elastic high stable kql
Azure AKS Kubelet Proxy to Command Execution Endpoint
Detects use of the AKS (Azure Kubernetes Service) API server nodes/proxy subresource to reach a node's Kubelet command-execution endpoints (run, exec, attach, portforward, cri). Unlike benign monitoring that scrapes /metrics and /stats, a request to these endpoints executes commands inside a pod on the node, the core of the kubeletctl and Peirates lateral-movement technique. Even a GET to /exec is command execution because the Kubelet maps the WebSocket upgrade handshake to the RBAC get verb, so nodes/proxy GET is sufficient for remote code execution.
Detection Logic
data_stream.dataset:azure.platformlogs and
event.action:"Microsoft.ContainerService/managedClusters/diagnosticLogs/Read" and
azure.platformlogs.category:"kube-audit" and
azure.platformlogs.properties.log.objectRef.resource:"nodes" and
azure.platformlogs.properties.log.objectRef.subresource:"proxy" and
azure.platformlogs.properties.log.requestURI:(
*/proxy/run/* or */proxy/exec* or */proxy/attach* or
*/proxy/portforward* or */proxy/portForward* or */proxy/cri/*
) and
not azure.platformlogs.properties.log.user.username:(
system\:node\:* or "aksService" or "hcpService" or "readinessChecker"
) False Positives
- ⚠ Legitimate use of the Kubelet run/exec/attach/portforward endpoints via nodes/proxy is rare. Administrative debugging tools that proxy exec through the API server may match; baseline and exclude verified operators.
Field Validations
Loading…
Comments (0)
Loading comments...