<?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>AADInternals — CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/products/aadinternals/</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 12:00:00 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/products/aadinternals/feed.xml" rel="self" type="application/rss+xml"/><item><title>Suspicious Azure PowerShell Module Installation via PowerShell Script</title><link>https://feed.craftedsignal.io/briefs/2024-01-azure-powershell-module-install/</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-powershell-module-install/</guid><description>Detection of Azure AD and cloud management modules installation via PowerShell Script Block Logging, potentially indicating reconnaissance, privilege escalation, or persistence operations by adversaries.</description><content:encoded><![CDATA[<p>This threat brief addresses the risk associated with the unauthorized installation of Azure PowerShell modules, such as AADInternals, Az.Resources, AzureAD, and MSOnline, using PowerShell scripts. These modules are powerful tools for managing Azure Active Directory (Azure AD) and cloud resources, granting extensive access to critical objects, user accounts, service principals, and tenant configurations. Adversaries often leverage these modules post-compromise to conduct reconnaissance, escalate privileges, establish persistence, or move laterally within the Azure environment. The use of PowerShell Script Block Logging provides an opportunity to detect such malicious activity, identifying potential threats before they can significantly impact the organization. This activity is often seen after an initial foothold has been established in the environment.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>Initial Access: An attacker gains initial access to a Windows system through various means, such as exploiting a vulnerability or using compromised credentials.</li>
<li>Privilege Escalation: The attacker attempts to escalate privileges on the compromised system to gain higher-level access.</li>
<li>Execution: The attacker executes a PowerShell script designed to install specific Azure AD and cloud management modules.</li>
<li>Module Installation: The PowerShell script utilizes the <code>Install-Module</code> cmdlet to install modules like AADInternals, Az.Resources, AzureAD, or MSOnline.</li>
<li>Reconnaissance: After installing the modules, the attacker uses them to gather information about the Azure AD environment, including user accounts, groups, and permissions.</li>
<li>Lateral Movement: Armed with the gathered information, the attacker attempts to move laterally within the Azure environment, targeting other systems or resources.</li>
<li>Persistence: The attacker establishes persistence mechanisms within Azure AD to maintain access, such as creating new user accounts or modifying existing ones.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation can lead to a full-scale compromise of the Azure AD environment, potentially impacting numerous users, applications, and resources. Attackers can gain unauthorized access to sensitive data, disrupt critical services, and even take complete control of the organization&rsquo;s cloud infrastructure. The broad access granted by these modules makes them a prime target for attackers seeking to establish a persistent foothold and conduct further malicious activities within the Azure environment. The impact can range from data breaches and financial losses to reputational damage and regulatory penalties.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Enable PowerShell Script Block Logging (Event ID 4104) on all Windows systems to capture the execution of PowerShell scripts, enabling detection via the provided Sigma rules.</li>
<li>Deploy the provided Sigma rule <code>Detect Suspicious Azure PowerShell Module Installation</code> to identify instances of suspicious Azure PowerShell module installations, and tune it for your environment.</li>
<li>Review and audit PowerShell script execution within your environment to identify any unauthorized or suspicious activity, using process creation logs.</li>
<li>Implement strict access controls and multi-factor authentication for Azure AD accounts to prevent unauthorized access and module installations.</li>
<li>Monitor the installation of PowerShell modules across your environment, looking for unexpected installations of Azure-related modules.</li>
</ul>
]]></content:encoded><category domain="severity">high</category><category domain="type">advisory</category><category>azure</category><category>powershell</category><category>module-installation</category><category>privilege-escalation</category><category>persistence</category></item></channel></rss>