<?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 CLI — CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/products/azure-cli/</link><description>Trending threats, MITRE ATT&amp;CK coverage, and detection metadata — refreshed continuously.</description><generator>Hugo</generator><language>en</language><managingEditor>hello@craftedsignal.io</managingEditor><webMaster>hello@craftedsignal.io</webMaster><lastBuildDate>Wed, 03 Jan 2024 15:00:00 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/products/azure-cli/feed.xml" rel="self" type="application/rss+xml"/><item><title>Detect Windows Entra User Management Via Azure CLI</title><link>https://feed.craftedsignal.io/briefs/2024-01-03-entra-user-management-cli/</link><pubDate>Wed, 03 Jan 2024 15:00:00 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2024-01-03-entra-user-management-cli/</guid><description>This analytic detects the usage of the Azure CLI to interact with user accounts, such as creating or deleting a user, potentially indicating malicious activity aimed at maintaining persistence and evading detection within an Entra ID environment.</description><content:encoded><![CDATA[<p>This detection identifies the use of the Azure CLI on Windows systems to manage Entra ID user accounts. Threat actors may leverage the Azure CLI to create or manipulate user accounts for persistence, privilege escalation, or to maintain a covert presence within a compromised environment. This activity may be part of a larger attack chain targeting cloud resources and sensitive data. While legitimate administrative use of the Azure CLI is expected, anomalous execution patterns, unexpected users, or unusual parent processes should be carefully scrutinized. The detection focuses on the <code>az.cmd</code> and <code>azure.cli</code> processes, filtering for command-line arguments related to Active Directory (<code>ad</code>) and user management (<code>user</code>). Successful exploitation can lead to unauthorized access, data breaches, and long-term compromise of cloud resources.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>An attacker gains initial access to a compromised Windows system, potentially through phishing or exploitation of a software vulnerability.</li>
<li>The attacker installs or leverages an existing installation of the Azure CLI.</li>
<li>The attacker authenticates to Azure using compromised credentials or a service principal.</li>
<li>The attacker executes the <code>az ad user create</code> command to create a new user account in Entra ID.</li>
<li>The attacker assigns the newly created user account elevated privileges, such as Global Administrator, using <code>az ad role assignment create</code>.</li>
<li>The attacker uses the newly created account to access sensitive cloud resources, such as Azure VMs, storage accounts, or databases.</li>
<li>The attacker may modify existing user accounts using <code>az ad user update</code> to add backdoors or modify authentication methods.</li>
<li>The attacker uses these accounts for lateral movement and further exploitation within the Azure environment, bypassing MFA if possible.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation allows attackers to create rogue accounts within the Entra ID environment, granting them persistent access even if the original compromised account is disabled. This can lead to unauthorized access to sensitive data, disruption of services, and long-term compromise of the organization&rsquo;s cloud infrastructure. The impact can range from data breaches and financial loss to reputational damage and legal liabilities. Depending on the permissions granted to the attacker-created users, the blast radius can encompass the entire Entra ID tenant and connected resources.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Enable Sysmon process-creation logging with command-line auditing to capture the execution of Azure CLI commands (Sysmon EventID 1).</li>
<li>Deploy the Sigma rule <code>Detect Entra User Management via Azure CLI</code> to your SIEM and tune for your environment.</li>
<li>Monitor Windows Event Log Security events with ID 4688 for process creation events related to Azure CLI.</li>
<li>Investigate any alerts generated by the Sigma rule, focusing on unusual parent processes, unexpected users, and anomalous execution patterns.</li>
<li>Implement multi-factor authentication (MFA) for all user accounts, including administrative accounts, to mitigate the risk of credential compromise.</li>
<li>Review and restrict Azure AD role assignments to follow the principle of least privilege.</li>
</ul>
]]></content:encoded><category domain="severity">medium</category><category domain="type">advisory</category><category>azure</category><category>entra-id</category><category>user-management</category><category>persistence</category><category>windows</category></item></channel></rss>