For the complete documentation index, see llms.txt. This page is also available as Markdown.

AZ_LIST_CLUSTER_ADMIN_CREDENTIALS

Summary

Forestall ACL Alias

AZ_LIST_CLUSTER_ADMIN_CREDENTIALS

Azure Alias

AKS List Cluster Admin Credentials

Affected Object Types

Managed Kubernetes Clusters (AKS)

Exploitation Certainty

Certain

Severity

Critical

Azure RBAC Roles

Azure Kubernetes Service Cluster Admin Role (0ab0b1a8-8aac-4efd-b8c2-3ee1fb270be8), Azure Kubernetes Service Contributor Role (ed7f3fbd-7b88-4dd4-9017-9adb7ce333f8)

Custom Role Actions:

  • Microsoft.ContainerService/managedClusters/listClusterAdminCredential/action

Description

This edge allows retrieving the cluster-admin kubeconfig for an AKS cluster. The returned kubeconfig grants full cluster-admin privileges, bypassing any Microsoft Entra / Kubernetes RBAC integration.

With cluster-admin access an attacker can:

  • Read all Kubernetes secrets (credentials, tokens, connection strings)

  • Deploy or modify workloads to run arbitrary code

  • Access the cluster's managed identity for lateral movement

  • Pivot to internal resources reachable from the cluster network

Note: When local accounts are disabled (--disable-local-accounts), this action is blocked.

Related edges: AZ_AKS_CONTRIBUTOR | AZ_EXECUTE_COMMAND

Identification

PowerShell (Az Module)

Azure Portal

  1. Navigate to the AKS cluster -> Access control (IAM) -> Role assignments.

  2. Azure Kubernetes Service Cluster Admin Role, or Azure Kubernetes Service Contributor Role.

  3. Under Settings -> Cluster configuration, verify if Local accounts are enabled.

Exploitation

Retrieve the cluster-admin kubeconfig

Dump kubeconfig and list nodes

Dump Kubernetes secrets

kubectl get all secrets

Steal the node managed identity token

Pods run on VMSS worker nodes. Each node has a kubelet managed identity accessible via IMDS (169.254.169.254). By default, all nodes share the same identity.

Step 1 - Get the kubelet identity client ID:

Get AKS client ID

Step 2 - Request token from inside a pod:

Get managed identity token

Mitigation

  1. Disable local accounts - Set --disable-local-accounts to block listClusterAdminCredential entirely.

  2. Restrict role assignments - Limit Cluster Admin Role assignments; use Cluster User Role for day-to-day access.

  3. Scope to cluster level - Avoid subscription or resource group scope when cluster scope suffices.

  4. Enable Microsoft Entra Kubernetes RBAC - Enforce least privilege within the cluster.

Detection

Use the Azure Portal and Microsoft Entra admin center:

  1. Open Azure Portal -> target AKS cluster.

  2. Open Activity log and filter Operation for listClusterAdminCredential.

  3. Review Caller, IP address, Timestamp, Resource, and Status for unexpected credential retrieval.

  4. Open Microsoft Entra admin center -> Identity -> Monitoring & health -> Sign-in logs and review sign-ins related to the identity that retrieved the cluster admin credentials.

References

Last updated

Was this helpful?