<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Azure Arc - CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/products/azure-arc/</link><description>Trending threats, MITRE ATT&amp;CK coverage, and detection metadata. Fed continuously.</description><generator>Hugo</generator><language>en</language><managingEditor>hello@craftedsignal.io</managingEditor><webMaster>hello@craftedsignal.io</webMaster><lastBuildDate>Wed, 31 Jan 2024 12:00:00 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/products/azure-arc/feed.xml" rel="self" type="application/rss+xml"/><item><title>Kubernetes Secret or ConfigMap Access via Azure Arc Proxy</title><link>https://feed.craftedsignal.io/briefs/2024-01-31-azure-arc-proxy-secret-configmap-access/</link><pubDate>Wed, 31 Jan 2024 12:00:00 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2024-01-31-azure-arc-proxy-secret-configmap-access/</guid><description>Detection of unauthorized access to Kubernetes secrets or configmaps via the Azure Arc AAD proxy service account, indicating potential abuse of stolen service principal credentials to read, exfiltrate, or modify sensitive data.</description><content:encoded><![CDATA[<p>This detection rule identifies suspicious access patterns within Kubernetes clusters connected to Azure Arc. Specifically, it focuses on activity where secrets or configmaps are accessed, created, modified, or deleted, and the Kubernetes audit logs indicate the Azure Arc AAD proxy service account (<code>system:serviceaccount:azure-arc:azure-arc-kube-aad-proxy-sa</code>) as the user. The <code>impersonatedUser</code> field contains the actual caller identity, suggesting operations are being routed through the Azure ARM API, rather than directly via <code>kubectl</code>.  While Azure Arc-managed workflows legitimately use this proxy, adversaries with compromised service principal credentials can exploit Arc Cluster Connect. This allows them to read, exfiltrate, or modify secrets and configmaps while masking their activity under the guise of the Arc proxy service account in K8s audit logs. The rule excludes known Arc namespaces and Helm release secrets to reduce false positives.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>An attacker compromises an Azure AD service principal with permissions to interact with the Azure Arc-connected Kubernetes cluster.</li>
<li>The attacker authenticates to Azure using the compromised service principal credentials.</li>
<li>The attacker leverages the Azure ARM API to issue commands targeting the Kubernetes cluster, specifically secrets or configmaps. This might involve using <code>LISTCLUSTERUSERCREDENTIAL</code> to initiate an Arc proxy session.</li>
<li>The Azure Arc Cluster Connect proxy receives the request and impersonates the requesting user.</li>
<li>The proxy service account (<code>system:serviceaccount:azure-arc:azure-arc-kube-aad-proxy-sa</code>) in the Kubernetes cluster executes the requested operation (get, list, create, update, patch, or delete) against secrets or configmaps.</li>
<li>Kubernetes audit logs record the activity, showing the Arc proxy service account as the user and the attacker's identity in the <code>impersonatedUser</code> field.</li>
<li>The attacker potentially retrieves sensitive data from secrets (e.g., database credentials, API keys) or configmaps.</li>
<li>The attacker exfiltrates the retrieved data or uses it to further compromise the Kubernetes cluster or connected resources.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation allows attackers to gain unauthorized access to sensitive information stored in Kubernetes secrets and configmaps. This can lead to data breaches, lateral movement within the cluster, and further compromise of the overall cloud environment.  The impact depends on the data stored in the compromised secrets and configmaps, but it could include exposure of database credentials, API keys, or other sensitive configuration data.  Compromised credentials can then be used to access other systems and resources, expanding the scope of the attack.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Deploy the Sigma rule <code>Kubernetes Secret or ConfigMap Access via Azure Arc Proxy</code> to your SIEM and tune for your environment.</li>
<li>Investigate any alerts generated by the Sigma rule by examining the <code>kubernetes.audit.impersonatedUser.username</code> field to identify the actual caller and correlating with Azure Activity Logs.</li>
<li>Regularly review and audit Azure AD service principals with permissions to access Azure Arc-connected Kubernetes clusters.</li>
<li>Monitor Azure Sign-In Logs for suspicious authentication activity related to service principals used for Azure Arc management.</li>
<li>Consider implementing stricter network segmentation to limit the blast radius of compromised service principals.</li>
</ul>
]]></content:encoded><category domain="severity">medium</category><category domain="type">advisory</category><category>kubernetes</category><category>azure-arc</category><category>credential-access</category><category>collection</category></item><item><title>Unusual Source IP for Azure Arc Cluster Credential Access</title><link>https://feed.craftedsignal.io/briefs/2024-01-azure-arc-credential-access/</link><pubDate>Wed, 03 Jan 2024 12:00:00 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2024-01-azure-arc-credential-access/</guid><description>Detects when a service principal or user performs an Azure Arc cluster credential listing operation from a source IP not previously associated with that identity, potentially indicating compromised credentials.</description><content:encoded><![CDATA[<p>This detection identifies anomalous access patterns to Azure Arc-connected Kubernetes clusters. Specifically, it monitors the <code>listClusterUserCredential</code> operation, which provides credentials for the Arc Cluster Connect proxy, enabling <code>kubectl</code> access through the Azure ARM API. An attacker leveraging stolen credentials, such as those belonging to a service principal, may attempt to list cluster credentials from an unfamiliar IP address. The detection leverages a 7-day history to establish baseline IP-to-identity mappings, reducing false positives from legitimate sources like CI/CD pipelines with rotating IPs. This activity is particularly relevant because successful credential access can lead to unauthorized cluster access and potential data exfiltration or resource compromise. The IBM X-Force has identified potential abuse of Azure Arc for hybrid escalation and persistence. The detection logic originates from Elastic's detection rules.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>Attacker compromises a service principal or user account with privileges to manage Azure Arc-connected Kubernetes clusters.</li>
<li>Attacker authenticates to Azure using the compromised credentials.</li>
<li>Attacker invokes the <code>MICROSOFT.KUBERNETES/CONNECTEDCLUSTERS/LISTCLUSTERUSERCREDENTIAL/ACTION</code> operation via the Azure API from a new or unusual source IP address.</li>
<li>The operation returns credentials for the Arc Cluster Connect proxy.</li>
<li>Attacker uses the retrieved credentials to establish a proxy tunnel via <code>az connectedk8s proxy</code>.</li>
<li>Attacker routes <code>kubectl</code> commands through the Azure ARM API, accessing the Kubernetes cluster without direct network connectivity.</li>
<li>Attacker performs reconnaissance within the Kubernetes cluster, identifying valuable resources like secrets and configmaps.</li>
<li>Attacker exfiltrates sensitive data or compromises the cluster's integrity.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>A successful attack can lead to unauthorized access to Kubernetes clusters connected to Azure Arc. Compromised credentials can enable attackers to perform arbitrary actions within the cluster, potentially leading to data theft, service disruption, or the deployment of malicious workloads. The severity depends on the privileges associated with the compromised identity and the sensitivity of the data stored within the cluster. Lateral movement from compromised cloud resources to on-premise Kubernetes clusters is possible.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Deploy the Sigma rule &quot;Azure Arc Cluster Credential Access from Unusual Source&quot; to your SIEM and tune the history window for your environment.</li>
<li>Investigate any alerts generated by the Sigma rule by examining the caller identity (<code>azure.activitylogs.identity.claims.appid</code>), source IP (<code>source.ip</code>), and associated Azure Sign-In Logs.</li>
<li>If a compromise is suspected, revoke the service principal credentials and remove Arc RBAC role assignments as detailed in the investigation guide.</li>
<li>Monitor Azure Activity Logs for <code>MICROSOFT.KUBERNETES/CONNECTEDCLUSTERS/LISTCLUSTERUSERCREDENTIAL/ACTION</code> events, filtering for unexpected source IPs.</li>
<li>Review Kubernetes audit logs for suspicious activity following the <code>listClusterUserCredential</code> operation.</li>
</ul>
]]></content:encoded><category domain="severity">medium</category><category domain="type">advisory</category><category>azure</category><category>azure-arc</category><category>credential-access</category></item></channel></rss>