Azure AKS API Server Proxying Request to Kubelet
Description
Detects a non-system identity using the AKS (Azure Kubernetes Service) API server nodes/proxy subresource to reach a node's Kubelet. Proxying through the API server reaches the Kubelet API to enumerate pods or run commands on nodes, a lateral-movement and privilege-escalation vector (kubeletctl, Peirates). Node, control-plane, and kube-system service account identities that routinely proxy for monitoring are excluded, so remaining matches, including compromised workload service accounts, are surfaced for review.
Query · kuery
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
not azure.platformlogs.properties.log.user.username:(
system\:node\:* or "aksService" or "hcpService" or "readinessChecker" or
system\:serviceaccount\:kube-system\:*
)
Investigation fields
Pivot points the source recommends for triage.
@timestampevent.actionazure.platformlogs.categoryazure.platformlogs.properties.log.verbazure.platformlogs.properties.log.user.usernameazure.platformlogs.properties.log.sourceIPsazure.platformlogs.properties.log.requestURIazure.platformlogs.properties.log.objectRef.resourceazure.platformlogs.properties.log.objectRef.subresourceazure.platformlogs.properties.log.objectRef.name
Implementation guide
The Azure Fleet integration collecting AKS diagnostic logs with the kube-audit category forwarded through Event Hub into the azure.platformlogs data stream is required for this rule.
Known false positives
- Monitoring and log-collection agents that run outside kube-system (for example a metrics agent in its own namespace) proxy to the Kubelet on every scrape and will match repeatedly. Add targeted exclusions for verified monitoring service accounts and namespaces after review.
Analyst notes
Investigating Azure AKS API Server Proxying Request to Kubelet
AKS kube-audit events are carried under the flattened azure.platformlogs.properties.log.* subtree and share the ARM
operation event.action: Microsoft.ContainerService/managedClusters/diagnosticLogs/Read. The nodes/proxy subresource
tunnels a request through the API server to a node's Kubelet. An identity with this permission can enumerate pods
(/proxy/pods, /proxy/runningpods) or run commands (/proxy/run, /proxy/exec) on nodes without direct network
access to the Kubelet port. This rule excludes the node, control-plane, and kube-system service-account identities that
routinely proxy for monitoring, so remaining matches are workload identities or users that should rarely, if ever, reach
the Kubelet.
Possible investigation steps
- Identify the acting identity in
azure.platformlogs.properties.log.user.usernameand whether a workload service account or user should reach the Kubelet at all. Compromised pod service accounts (system:serviceaccount:<ns>:<name>) are the primary vehicle for this technique. - Inspect the proxied Kubelet endpoint in
azure.platformlogs.properties.log.requestURI./metricsand/statsare monitoring;/podsand/runningpodsare reconnaissance;/run,/exec,/attach, and/portforwardare command execution and warrant immediate escalation. - Evaluate
azure.platformlogs.properties.log.sourceIPs. This is an array; for an externally operated attack the first element is the operator's real client IP, while the trailing entry is the internal API-server/konnectivity hop (172.31.x). A first entry that is not the cluster's own egress is a strong signal. In-cluster pivots show only internal addresses, so absence of an external IP does not clear the event. - Review the target node in
azure.platformlogs.properties.log.objectRef.nameand correlate with subsequent activity on that node's workloads (secret reads, RBAC changes, new pods).
False positive analysis
- Monitoring and log-collection agents outside kube-system proxy to the Kubelet on every scrape and will match repeatedly; add targeted exclusions for verified monitoring service accounts and namespaces.
Response and remediation
- If unauthorized, revoke the acting identity's tokens and review the RBAC that granted
nodes/proxy. - Inspect the target node for command execution, dropped tooling, or credential theft, and rotate credentials reachable from affected pods.
- Note that direct Kubelet access on port 10250 bypasses the API server and does not appear in kube-audit; treat a confirmed proxy abuse as possible evidence of broader Kubelet access.
- Collect kube-audit and identity artifacts per incident response procedures.