<?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>Colibri — CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/tags/colibri/</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/tags/colibri/feed.xml" rel="self" type="application/rss+xml"/><item><title>Get-Variable.exe Hijacking for Persistence</title><link>https://feed.craftedsignal.io/briefs/2024-01-03-get-variable-hijack/</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-03-get-variable-hijack/</guid><description>Attackers can establish persistence by placing a malicious Get-Variable.exe in the WindowsApps folder, hijacking the legitimate PowerShell cmdlet and executing upon PowerShell window initialization, as seen with the Colibri malware.</description><content:encoded><![CDATA[<p>This threat involves the hijacking of the PowerShell <code>Get-Variable</code> cmdlet to achieve persistence. Attackers place a malicious executable named <code>Get-Variable.exe</code> within the <code>C:\Users\&lt;user&gt;\AppData\Local\Microsoft\WindowsApps</code> folder, which is included in the system&rsquo;s PowerShell path. When a PowerShell window is opened, including through scheduled tasks or other automated means, the malicious <code>Get-Variable.exe</code> is executed instead of the legitimate PowerShell cmdlet. This technique allows the attacker to run arbitrary code whenever a PowerShell session is initialized. This activity has been associated with the Colibri malware family. This technique is a stealthy way to maintain access to a compromised system, as the execution is triggered by a standard system process. Defenders need to monitor for unexpected executables running from within the WindowsApps directory to identify and prevent this form of persistence.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>Initial compromise of the system through an unrelated vulnerability or credential theft.</li>
<li>The attacker gains access to the file system with sufficient privileges to write to the <code>C:\Users\&lt;user&gt;\AppData\Local\Microsoft\WindowsApps</code> directory.</li>
<li>The attacker drops a malicious executable named <code>Get-Variable.exe</code> into the <code>WindowsApps</code> folder, effectively hijacking the legitimate PowerShell cmdlet.</li>
<li>The attacker creates or modifies a scheduled task that launches PowerShell.exe.</li>
<li>When the scheduled task triggers the PowerShell.exe execution, the system resolves <code>Get-Variable</code> to the malicious executable in the <code>WindowsApps</code> directory due to path precedence.</li>
<li>The malicious <code>Get-Variable.exe</code> executes the attacker&rsquo;s payload.</li>
<li>The attacker&rsquo;s payload performs malicious activities, such as establishing a reverse shell, downloading additional malware, or exfiltrating data.</li>
<li>The attacker maintains persistent access to the compromised system.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation leads to persistent access on the targeted system. The attacker can execute arbitrary code whenever a PowerShell window is opened, allowing them to perform various malicious activities, including data theft, ransomware deployment, or further propagation within the network. The Colibri malware, which has been associated with this technique, demonstrates the potential for significant compromise. The number of victims and specific sectors targeted vary depending on the attacker&rsquo;s objectives.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Monitor process creation events for <code>Get-Variable.exe</code> executing from within the <code>C:\Users\&lt;user&gt;\AppData\Local\Microsoft\WindowsApps</code> directory using the Sigma rule <code>Detect Get-Variable.exe Execution from WindowsApps</code>.</li>
<li>Investigate any processes executing from the <code>WindowsApps</code> folder, as this is not a typical location for legitimate executables.</li>
<li>Implement application control policies to restrict the execution of unsigned or untrusted executables from the <code>WindowsApps</code> directory.</li>
<li>Enable Sysmon process creation logging to capture the necessary events for the Sigma rules in this brief.</li>
<li>Deploy the Sigma rules in this brief to your SIEM and tune for your environment.</li>
</ul>
]]></content:encoded><category domain="severity">high</category><category domain="type">advisory</category><category>persistence</category><category>powershell</category><category>windowsapps</category><category>colibri</category></item></channel></rss>