<?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>Netsh — CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/tags/netsh/</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>Tue, 30 Jan 2024 12:00:00 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/tags/netsh/feed.xml" rel="self" type="application/rss+xml"/><item><title>Wireless Credential Dumping via Netsh</title><link>https://feed.craftedsignal.io/briefs/2024-01-30-wireless-creds-dumping/</link><pubDate>Tue, 30 Jan 2024 12:00:00 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2024-01-30-wireless-creds-dumping/</guid><description>Adversaries use the Windows built-in utility Netsh to dump Wireless saved access keys in clear text, potentially leading to credential compromise.</description><content:encoded><![CDATA[<p>Attackers often target wireless credentials to gain unauthorized network access. This involves using the legitimate Windows command-line tool <code>netsh.exe</code> to extract Wi-Fi passwords stored on a compromised system. By leveraging <code>netsh</code>, attackers can bypass traditional security measures and retrieve sensitive information without deploying custom malware. The technique involves specific command-line arguments that instruct <code>netsh</code> to display wireless keys in cleartext, exposing the network passwords. Defenders must monitor <code>netsh</code> command-line activity to identify potential credential access attempts. This activity can lead to lateral movement within the network.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>The attacker gains initial access to a Windows system (e.g., via phishing or exploiting a software vulnerability).</li>
<li>The attacker executes <code>netsh.exe</code> with specific arguments to list available wireless profiles.</li>
<li>The attacker identifies a target wireless profile from the list.</li>
<li>The attacker executes <code>netsh.exe</code> again, this time specifying the target profile and requesting the key to be displayed in cleartext using the <code>key=clear</code> argument.</li>
<li><code>Netsh.exe</code> retrieves the Wi-Fi password from the Windows Wireless LAN service.</li>
<li>The password is displayed in the command output, which the attacker captures.</li>
<li>The attacker uses the obtained Wi-Fi password to connect to the wireless network.</li>
<li>The attacker can now perform lateral movement and access internal resources.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful credential dumping allows attackers to gain unauthorized access to wireless networks. This can lead to lateral movement within the organization&rsquo;s network, access to sensitive data, and further compromise of systems and resources. The impact includes potential data breaches, financial losses, and reputational damage. This technique allows attackers to bypass traditional network access controls.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Deploy the Sigma rule <code>Detect Wireless Credential Dumping via Netsh</code> to identify suspicious <code>netsh.exe</code> commands in your environment.</li>
<li>Enable Sysmon process creation logging to capture the <code>netsh.exe</code> command-line arguments.</li>
<li>Investigate any alerts triggered by the Sigma rule, focusing on the process lineage and user context as outlined in the &ldquo;Triage and analysis&rdquo; section of the source.</li>
<li>Implement strong password policies for Wi-Fi networks, including the use of WPA2 or WPA3 encryption.</li>
<li>Review and restrict the use of <code>netsh.exe</code> on systems where it is not required, using application control solutions.</li>
<li>Monitor for related alerts indicating lateral movement, staging, remote access, or persistence, as mentioned in the &ldquo;Triage and analysis&rdquo; section of the source.</li>
</ul>
]]></content:encoded><category domain="severity">high</category><category domain="type">advisory</category><category>credential-access</category><category>netsh</category><category>windows</category></item><item><title>Netsh Helper DLL Persistence</title><link>https://feed.craftedsignal.io/briefs/2024-01-netsh-helper-dll/</link><pubDate>Tue, 30 Jan 2024 12:00:00 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2024-01-netsh-helper-dll/</guid><description>Attackers may abuse the Netsh Helper DLL functionality by adding malicious DLLs to execute payloads every time the netsh utility is executed via administrators or scheduled tasks, achieving persistence.</description><content:encoded><![CDATA[<p>The <code>netsh.exe</code> utility in Windows supports the addition of Helper DLLs to extend its functionality. An attacker can abuse this mechanism to establish persistence by adding a malicious DLL. When <code>netsh.exe</code> is executed, the malicious DLL is loaded and executed, allowing the attacker to run arbitrary code with the privileges of the user or process that initiated <code>netsh.exe</code>. This can be done by administrators or scheduled tasks, making it a stealthy and effective persistence technique. The registry key targeted by this technique is <code>HKLM\Software\Microsoft\netsh\</code>.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>Attacker gains initial access to the target system through unspecified means.</li>
<li>Attacker creates a malicious DLL to be used as a Netsh Helper DLL.</li>
<li>Attacker modifies the Windows Registry to add the malicious DLL as a Netsh Helper DLL under <code>HKLM\Software\Microsoft\netsh\</code>.</li>
<li>The system administrator or a scheduled task executes <code>netsh.exe</code>.</li>
<li><code>netsh.exe</code> loads and executes the malicious DLL, granting the attacker code execution.</li>
<li>The malicious DLL performs its intended actions, such as establishing a reverse shell or deploying additional malware.</li>
<li>The attacker maintains persistence on the system through the malicious Netsh Helper DLL.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation allows attackers to establish persistent access to a compromised system. This can lead to data theft, system compromise, and further malicious activities. While the risk score is low, the persistence mechanism can allow attackers to maintain a foothold for extended periods, increasing the potential for significant damage.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Monitor registry modifications under the <code>HKLM\Software\Microsoft\netsh\</code> path for suspicious DLL additions using the &ldquo;Netsh Helper DLL Registry Modification&rdquo; Sigma rule.</li>
<li>Enable Sysmon registry event logging to collect the necessary data for the Sigma rule.</li>
<li>Investigate any alerts generated by the Sigma rule by reviewing the DLL file properties, timestamps, and related processes.</li>
</ul>
]]></content:encoded><category domain="severity">low</category><category domain="type">advisory</category><category>persistence</category><category>windows</category><category>netsh</category><category>registry</category></item><item><title>Windows Netsh Tool Used for Firewall Discovery</title><link>https://feed.craftedsignal.io/briefs/2024-01-netsh-firewall-discovery/</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-netsh-firewall-discovery/</guid><description>The analytic detects the execution of the Windows built-in tool netsh.exe to display the state, configuration, and profile of the host firewall, potentially leading to unauthorized network access or data exfiltration.</description><content:encoded><![CDATA[<p>This detection focuses on identifying instances where the <code>netsh.exe</code> utility is used to query firewall configurations on a Windows system. While <code>netsh.exe</code> is a legitimate tool for network configuration, adversaries can leverage it to gather information about firewall rules and settings. This information can then be used to plan further attacks, such as bypassing firewall restrictions or identifying vulnerable network services. This activity is typically seen during the reconnaissance phase of an attack. The scope of this detection covers any Windows environment where Endpoint Detection and Response (EDR) logs are available.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>An attacker gains initial access to a compromised system through various means, such as phishing or exploiting a vulnerability.</li>
<li>The attacker executes <code>netsh.exe</code> with specific commands to enumerate firewall rules and configurations (e.g., <code>netsh firewall show state</code>, <code>netsh firewall show config</code>).</li>
<li>The <code>netsh.exe</code> process retrieves the requested firewall information from the Windows operating system.</li>
<li>The collected firewall information is parsed to identify potential weaknesses or misconfigurations.</li>
<li>The attacker uses the gathered information to modify existing firewall rules or create new rules to allow unauthorized access.</li>
<li>The attacker leverages the modified firewall configuration to establish a covert communication channel or to move laterally within the network.</li>
<li>The attacker attempts to exfiltrate sensitive data or deploy ransomware.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation can lead to unauthorized network access, data exfiltration, or the deployment of ransomware. The enumeration of firewall configurations can provide attackers with valuable insights into the network&rsquo;s security posture, enabling them to bypass security controls and compromise critical assets. This can result in significant financial losses, reputational damage, and disruption of business operations.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Deploy the Sigma rule <code>Detect Suspicious Netsh Firewall Discovery</code> to your SIEM and tune for your environment to detect netsh.exe executions with firewall discovery commands.</li>
<li>Enable Sysmon process-creation logging (Event ID 1) to capture the necessary command-line details.</li>
<li>Investigate any identified instances of <code>netsh.exe</code> being used to query firewall settings, especially when initiated from unusual processes or user accounts.</li>
<li>Monitor parent-child process relationships to identify suspicious process spawning, as highlighted by the <code>Processes.parent_process_name</code> field.</li>
<li>Review firewall configurations regularly to identify and remediate any misconfigurations or overly permissive rules.</li>
</ul>
]]></content:encoded><category domain="severity">medium</category><category domain="type">advisory</category><category>discovery</category><category>windows</category><category>netsh</category><category>firewall</category></item><item><title>Netsh Used to Enable Remote Desktop Protocol (RDP) in Windows Firewall</title><link>https://feed.craftedsignal.io/briefs/2024-01-netsh-rdp-enable/</link><pubDate>Tue, 02 Jan 2024 12:00:00 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2024-01-netsh-rdp-enable/</guid><description>Adversaries may use the `netsh.exe` utility to enable inbound Remote Desktop Protocol (RDP) connections in the Windows Firewall, potentially allowing unauthorized remote access to compromised systems.</description><content:encoded><![CDATA[<p>Attackers can leverage the native Windows command-line tool <code>netsh.exe</code> to modify Windows Firewall rules and enable inbound Remote Desktop Protocol (RDP) connections. This can be used as a defense evasion technique to bypass existing firewall restrictions, allowing them to establish remote access to a compromised host. Ransomware operators and other malicious actors frequently utilize RDP to access victim servers, often using privileged accounts, to further their objectives. This activity can be conducted post-compromise to facilitate lateral movement and the deployment of malicious payloads. The behavior was observed being detected by Elastic Defend, Microsoft Defender XDR, SentinelOne Cloud Funnel, and Crowdstrike.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>An attacker compromises a Windows host through initial access methods (e.g., phishing, exploitation of a vulnerability).</li>
<li>The attacker gains a foothold on the system and escalates privileges as needed.</li>
<li>The attacker executes <code>netsh.exe</code> with specific arguments to modify the Windows Firewall configuration.</li>
<li>The <code>netsh</code> command creates or modifies an inbound rule to allow RDP traffic (TCP port 3389).</li>
<li>The attacker establishes an RDP connection to the compromised host.</li>
<li>The attacker uses the RDP session to perform reconnaissance, move laterally, or deploy malware.</li>
<li>The attacker may attempt to disable or modify security tools to further evade detection.</li>
<li>The attacker achieves their objective, such as data exfiltration or ransomware deployment.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation of this technique can lead to unauthorized remote access to systems, enabling lateral movement, data theft, and ransomware deployment. If RDP is enabled on a large number of systems, the attacker can move laterally through the environment. The impact can range from data breaches to complete operational disruption.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Monitor process creation events for <code>netsh.exe</code> executing with arguments related to enabling inbound RDP traffic using the &ldquo;Remote Desktop Enabled in Windows Firewall by Netsh&rdquo; rule.</li>
<li>Implement the Sigma rule provided below to detect instances of <code>netsh.exe</code> being used to modify firewall rules related to RDP.</li>
<li>Enforce the principle of least privilege and restrict the use of <code>netsh.exe</code> to authorized personnel only.</li>
<li>Review existing firewall rules and remove any unnecessary or overly permissive rules.</li>
<li>Enable Sysmon process creation logging for enhanced visibility into process execution events.</li>
</ul>
]]></content:encoded><category domain="severity">medium</category><category domain="type">advisory</category><category>defense-evasion</category><category>lateral-movement</category><category>windows</category><category>netsh</category><category>rdp</category></item></channel></rss>