Techniques
Sample rules
Azure AKS Certificate Signing Request Created or Approved
- source: elastic
- technicques:
- T1649
Description
Detects an identity creating a client-authentication CertificateSigningRequest (signer kubernetes.io/kube-apiserver-client) or approving a CSR on AKS (Azure Kubernetes Service), excluding node bootstrap and platform controllers. Adversaries submit and self-approve a CSR against the kube-apiserver-client signer to mint a long-lived client certificate for an arbitrary subject (for example a Common Name in system:masters), giving durable authenticated access that survives token revocation. Coverage includes workload service accounts (system:serviceaccount:*), so a compromised in-cluster token forging a certificate is not excluded.
Detection logic
data_stream.dataset:azure.platformlogs and
event.action:"Microsoft.ContainerService/managedClusters/diagnosticLogs/Read" and
azure.platformlogs.category:("kube-audit" or "kube-audit-admin") and
azure.platformlogs.properties.log.stage:"ResponseComplete" and
azure.platformlogs.properties.log.objectRef.resource:"certificatesigningrequests" and
azure.platformlogs.properties.log.responseStatus.code: "200" and
azure.platformlogs.properties.log.requestObject.status.conditions.type: "Approved" and
(
(
azure.platformlogs.properties.log.verb:"create" and
azure.platformlogs.properties.log.requestObject.spec.signerName:"kubernetes.io/kube-apiserver-client"
) or (
azure.platformlogs.properties.log.verb:("update" or "patch") and
azure.platformlogs.properties.log.objectRef.subresource:"approval"
)
) and
not azure.platformlogs.properties.log.user.username:(
system\:node\:* or system\:bootstrap\:* or "aksService" or "hcpService" or
"readinessChecker" or system\:serviceaccount\:kube-system\:*
)