<?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>Script_execution — CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/tags/script_execution/</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/script_execution/feed.xml" rel="self" type="application/rss+xml"/><item><title>Windows Script Interpreter Executing Process via WMI</title><link>https://feed.craftedsignal.io/briefs/2024-01-wmi-script-execution/</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-wmi-script-execution/</guid><description>The rule identifies the use of Windows script interpreters (cscript.exe or wscript.exe) executing a process via Windows Management Instrumentation (WMI), which may indicate malicious activity, especially when initiated by non-system accounts.</description><content:encoded><![CDATA[<p>This detection identifies the use of Windows script interpreters (cscript.exe or wscript.exe) to execute processes via Windows Management Instrumentation (WMI). Adversaries exploit WMI to execute scripts or processes stealthily, often using script interpreters. The rule monitors for these interpreters executing processes via WMI, specifically when initiated by non-system accounts, indicating potential malicious intent. The detection focuses on identifying scenarios where <code>wmiutils.dll</code> is loaded by <code>wscript.exe</code> or <code>cscript.exe</code>, followed by <code>wmiprvse.exe</code> spawning a new process. This is often associated with malicious initial access or execution techniques.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>An attacker gains initial access via phishing (T1566) or other means.</li>
<li>The attacker leverages a script, such as VBScript or JavaScript (T1059.005, T1059.007), to execute commands using WMI.</li>
<li>The script interpreter (<code>cscript.exe</code> or <code>wscript.exe</code>) loads <code>wmiutils.dll</code> to interact with WMI.</li>
<li>The WMI Provider Host process (<code>wmiprvse.exe</code>) is invoked as a parent process, triggered by the script execution.</li>
<li><code>wmiprvse.exe</code> executes a secondary process, such as <code>powershell.exe</code>, <code>cmd.exe</code>, or other executables, often from unusual locations like <code>C:\\Users\\</code> or <code>C:\\ProgramData\\</code>.</li>
<li>The executed process performs malicious actions, such as downloading additional payloads or establishing persistence.</li>
<li>The attacker attempts to maintain persistence by creating scheduled tasks or modifying registry keys.</li>
<li>The ultimate objective is often lateral movement, data exfiltration, or deploying ransomware.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation allows attackers to execute arbitrary code, bypass security controls, and establish persistence on the compromised system. The use of WMI enables stealthy execution, making detection challenging. The impact can range from data theft and system compromise to full network takeover. In some cases, threat actors may deploy ransomware, leading to significant financial losses and operational disruption.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Enable Sysmon Event ID 1 (Process Creation) and Event ID 7 (Image Loaded) logging to provide the necessary data for the provided Sigma rules.</li>
<li>Deploy the provided Sigma rule &ldquo;WMI Scripting Process Creation&rdquo; to detect suspicious process creation events originating from <code>wmiprvse.exe</code>.</li>
<li>Investigate any alerts generated by the provided Sigma rule &ldquo;WMI Scripting Process Creation&rdquo; with a focus on processes spawned by wmiprvse.exe from unusual locations or with suspicious command-line arguments.</li>
<li>Implement endpoint protection policies to block or alert on the execution of high-risk processes when initiated by non-system accounts as mentioned in the overview.</li>
<li>Regularly review and update endpoint protection policies to block or alert on the execution of high-risk processes like those listed in the detection query, especially when initiated by non-system accounts.</li>
</ul>
]]></content:encoded><category domain="severity">medium</category><category domain="type">advisory</category><category>windows</category><category>wmi</category><category>script_execution</category><category>initial_access</category><category>execution</category></item></channel></rss>