Azure Service Principal Sign-In Followed by Arc Cluster Credential Access
Detects when a service principal authenticates to Microsoft Entra ID and then lists credentials for an Azure
Arc-connected Kubernetes cluster within a short time window. The listClusterUserCredential action retrieves tokens
that enable kubectl access through the Arc Cluster Connect proxy. This sequence (service principal sign-in followed by
Arc credential retrieval), represents the exact attack chain used by adversaries with stolen service principal secrets
to establish a proxy tunnel into Kubernetes clusters. Service principals that authenticate externally (as opposed to
managed identities) and immediately access Arc cluster credentials warrant investigation, particularly when the sign-in
originates from an unexpected location or ASN.
Elastic rule (View on GitHub)
1[metadata]
2creation_date = "2026/03/10"
3integration = ["azure"]
4maturity = "production"
5updated_date = "2026/09/18"
6
7[rule]
8author = ["Elastic"]
9description = """
10Detects when a service principal authenticates to Microsoft Entra ID and then lists credentials for an Azure
11Arc-connected Kubernetes cluster within a short time window. The `listClusterUserCredential` action retrieves tokens
12that enable kubectl access through the Arc Cluster Connect proxy. This sequence (service principal sign-in followed by
13Arc credential retrieval), represents the exact attack chain used by adversaries with stolen service principal secrets
14to establish a proxy tunnel into Kubernetes clusters. Service principals that authenticate externally (as opposed to
15managed identities) and immediately access Arc cluster credentials warrant investigation, particularly when the sign-in
16originates from an unexpected location or ASN.
17"""
18false_positives = [
19 """
20 CI/CD pipelines that authenticate as a service principal and then access Arc clusters as part of deployment
21 workflows will trigger this rule. Identify and exclude known automation service principal app IDs.
22 """,
23 """
24 Administrators using service principal credentials to manage Arc-connected clusters during maintenance windows may
25 trigger this rule. Correlate with change management records.
26 """,
27]
28from = "now-30m"
29index = ["logs-azure.signinlogs-*", "logs-azure.activitylogs-*"]
30interval = "15m"
31language = "eql"
32license = "Elastic License v2"
33name = "Azure Service Principal Sign-In Followed by Arc Cluster Credential Access"
34note = """## Triage and analysis
35
36### Investigating Azure Service Principal Sign-In Followed by Arc Cluster Credential Access
37
38This rule detects the complete attack entry point for Arc-proxied Kubernetes attacks: a service principal authenticates
39to Azure AD, then immediately retrieves Arc cluster credentials. This is the prerequisite sequence before any
40Kubernetes-level activity can occur through the Arc proxy.
41
42### Possible investigation steps
43
44- Identify the service principal using the `app_id` from the sign-in event and resolve it in Azure AD — is this a
45 known application?
46- Check the sign-in source IP and geolocation — does it match expected infrastructure locations for this SP?
47- Review when the SP credentials were last rotated — stale credentials are more likely compromised.
48- Check the ASN of the sign-in source — is it from a known cloud provider, corporate network, or unexpected consumer ISP?
49- Examine Azure Activity Logs after the credential listing for any Arc-proxied operations (secret/configmap CRUD).
50- Correlate with Kubernetes audit logs for operations by the Arc proxy service account
51 (`system:serviceaccount:azure-arc:azure-arc-kube-aad-proxy-sa`) in the same time window.
52- Review Azure AD Audit Logs for recent changes to this SP (new credentials, federated identities, owner changes).
53
54### Response and remediation
55
56- Immediately rotate the service principal credentials (secrets and certificates).
57- Revoke active sessions and tokens for the SP.
58- Review and remove any unauthorized Azure role assignments on Arc-connected clusters.
59- Check Kubernetes audit logs for any operations performed through the Arc proxy after credential access.
60- Rotate any Kubernetes secrets that may have been accessed through the proxy tunnel.
61- Enable conditional access policies to restrict service principal authentication by location if supported.
62"""
63references = [
64 "https://learn.microsoft.com/en-us/azure/azure-arc/kubernetes/cluster-connect",
65 "https://learn.microsoft.com/en-us/cli/azure/connectedk8s#az-connectedk8s-proxy",
66 "https://learn.microsoft.com/en-us/entra/identity/monitoring-health/concept-sign-ins",
67 "https://www.ibm.com/think/x-force/identifying-abusing-azure-arc-for-hybrid-escalation-persistence",
68 "https://www.microsoft.com/en-us/security/blog/2025/08/27/storm-0501s-evolving-techniques-lead-to-cloud-based-ransomware/",
69]
70risk_score = 47
71rule_id = "dacfbecd-7927-46a7-a8ba-feb65a2e990d"
72severity = "medium"
73tags = [
74 "Domain: Cloud",
75 "Domain: Identity",
76 "Data Source: Azure",
77 "Data Source: Azure Arc",
78 "Data Source: Microsoft Entra ID",
79 "Data Source: Microsoft Entra ID Sign-In Logs",
80 "Use Case: Threat Detection",
81 "Tactic: Credential Access",
82 "Tactic: Initial Access",
83 "Resources: Investigation Guide",
84 "Noise: Low",
85 "Performance: Fast",
86 "Rule Type: Event Correlation (EQL)",
87 "Platform: Entra ID",
88 "Platform: Azure",
89 "Data Source: Azure Activity Logs",
90]
91timestamp_override = "event.ingested"
92type = "eql"
93
94query = '''
95sequence with maxspan=30m
96[authentication where data_stream.dataset == "azure.signinlogs"
97 and azure.signinlogs.category == "ServicePrincipalSignInLogs"
98 and azure.signinlogs.properties.status.error_code == 0
99] by azure.signinlogs.properties.app_id
100[any where data_stream.dataset == "azure.activitylogs"
101 and azure.activitylogs.operation_name : "MICROSOFT.KUBERNETES/CONNECTEDCLUSTERS/LISTCLUSTERUSERCREDENTIAL/ACTION"
102 and event.outcome : ("Success", "success")
103] by azure.activitylogs.identity.claims.appid
104'''
105
106
107[[rule.threat]]
108framework = "MITRE ATT&CK"
109
110[[rule.threat.technique]]
111id = "T1528"
112name = "Steal Application Access Token"
113reference = "https://attack.mitre.org/techniques/T1528/"
114
115[[rule.threat.technique]]
116id = "T1552"
117name = "Unsecured Credentials"
118reference = "https://attack.mitre.org/techniques/T1552/"
119
120[[rule.threat.technique.subtechnique]]
121id = "T1552.007"
122name = "Container API"
123reference = "https://attack.mitre.org/techniques/T1552/007/"
124
125[rule.threat.tactic]
126id = "TA0006"
127name = "Credential Access"
128reference = "https://attack.mitre.org/tactics/TA0006/"
129
130[[rule.threat]]
131framework = "MITRE ATT&CK"
132
133[[rule.threat.technique]]
134id = "T1078"
135name = "Valid Accounts"
136reference = "https://attack.mitre.org/techniques/T1078/"
137
138[[rule.threat.technique.subtechnique]]
139id = "T1078.004"
140name = "Cloud Accounts"
141reference = "https://attack.mitre.org/techniques/T1078/004/"
142
143[rule.threat.tactic]
144id = "TA0001"
145name = "Initial Access"
146reference = "https://attack.mitre.org/tactics/TA0001/"
147[rule.investigation_fields]
148field_names = [
149 "@timestamp",
150 "azure.signinlogs.properties.app_id",
151 "azure.signinlogs.properties.app_display_name",
152 "azure.signinlogs.properties.service_principal_name",
153 "azure.signinlogs.category",
154 "azure.activitylogs.operation_name",
155 "azure.activitylogs.identity.claims.appid",
156 "azure.resource.id",
157 "source.ip",
158 "source.geo.country_name",
159 "source.geo.city_name",
160 "source.as.organization.name",
161]
Triage and analysis
Investigating Azure Service Principal Sign-In Followed by Arc Cluster Credential Access
This rule detects the complete attack entry point for Arc-proxied Kubernetes attacks: a service principal authenticates to Azure AD, then immediately retrieves Arc cluster credentials. This is the prerequisite sequence before any Kubernetes-level activity can occur through the Arc proxy.
Possible investigation steps
- Identify the service principal using the
app_idfrom the sign-in event and resolve it in Azure AD — is this a known application? - Check the sign-in source IP and geolocation — does it match expected infrastructure locations for this SP?
- Review when the SP credentials were last rotated — stale credentials are more likely compromised.
- Check the ASN of the sign-in source — is it from a known cloud provider, corporate network, or unexpected consumer ISP?
- Examine Azure Activity Logs after the credential listing for any Arc-proxied operations (secret/configmap CRUD).
- Correlate with Kubernetes audit logs for operations by the Arc proxy service account
(
system:serviceaccount:azure-arc:azure-arc-kube-aad-proxy-sa) in the same time window. - Review Azure AD Audit Logs for recent changes to this SP (new credentials, federated identities, owner changes).
Response and remediation
- Immediately rotate the service principal credentials (secrets and certificates).
- Revoke active sessions and tokens for the SP.
- Review and remove any unauthorized Azure role assignments on Arc-connected clusters.
- Check Kubernetes audit logs for any operations performed through the Arc proxy after credential access.
- Rotate any Kubernetes secrets that may have been accessed through the proxy tunnel.
- Enable conditional access policies to restrict service principal authentication by location if supported.
References
Related rules
- Entra ID OAuth Device Code Sign-in to Azure AD Graph Enumeration
- Entra ID OAuth Authorization Code Grant for Unusual User, App, and Resource
- Entra ID OAuth Device Code Grant by Unusual User
- Azure Arc Cluster Credential Access by Identity from Unusual Source
- Entra ID Microsoft Authentication Broker Sign-In with Non-Standard User Agent