<?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>Scriptblocksmuggling — CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/tags/scriptblocksmuggling/</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/scriptblocksmuggling/feed.xml" rel="self" type="application/rss+xml"/><item><title>Suspicious PowerShell Module DLL Creation</title><link>https://feed.craftedsignal.io/briefs/2024-01-03-powershell-module-dll-creation/</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-powershell-module-dll-creation/</guid><description>The creation of a DLL file within PowerShell module directories can indicate malicious PowerShell activity, such as installing new modules or attempts at ScriptBlock smuggling, and this activity is detected using Sysmon Event ID 11.</description><content:encoded><![CDATA[<p>The creation of DLL files in PowerShell module directories is a common technique used by attackers to introduce malicious functionality into a system. This activity can be indicative of several malicious behaviors, including the installation of rogue modules, attempts at ScriptBlock smuggling to bypass security controls, or other forms of malicious PowerShell exploitation. The detection focuses on monitoring for the creation of new DLLs within the various PowerShell module directories, which is an unusual event during normal system operation. While legitimate module installations can trigger this alert, the high potential for abuse makes it a critical event to monitor. The detection logic is based on Sysmon Event ID 11.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>An attacker gains initial access to the system via phishing or other means.</li>
<li>The attacker leverages PowerShell to download a malicious DLL module.</li>
<li>The attacker uses PowerShell commands to place the malicious DLL into a PowerShell module directory (e.g., <code>C:\Windows\System32\WindowsPowerShell\v1.0\Modules</code>).</li>
<li>Sysmon Event ID 11 logs the creation of the DLL file in the PowerShell module directory.</li>
<li>The attacker then imports the module using <code>Import-Module</code>.</li>
<li>Once the module is imported, the attacker executes malicious code embedded within the DLL.</li>
<li>This allows the attacker to perform actions such as privilege escalation, data exfiltration, or lateral movement.</li>
<li>The attacker achieves persistence by modifying PowerShell profiles or using scheduled tasks to automatically load the malicious module on system startup.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation can lead to a wide range of malicious activities, including persistence, privilege escalation, and data theft. Attackers can use this technique to maintain long-term access to compromised systems and networks. The impact can range from minor data breaches to complete system compromise depending on the attacker&rsquo;s objectives and the permissions of the compromised user account.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Enable Sysmon Event ID 11 logging to capture file creation events, as this is the data source for the detections below.</li>
<li>Deploy the Sigma rule &ldquo;PowerShell Module DLL Created&rdquo; to your SIEM and tune for your environment to detect suspicious DLL creation in PowerShell module directories.</li>
<li>Investigate any alerts generated by the Sigma rule to determine if the DLL creation is legitimate or malicious.</li>
<li>Monitor PowerShell command-line activity for the use of <code>Import-Module</code> and other module-related commands, as these can indicate module loading and execution.</li>
<li>Implement application control policies to restrict the execution of unsigned or untrusted DLLs in PowerShell.</li>
</ul>
]]></content:encoded><category domain="severity">medium</category><category domain="type">advisory</category><category>powershell</category><category>module</category><category>dll</category><category>filecreation</category><category>scriptblocksmuggling</category></item></channel></rss>