<?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>Share-Enumeration — CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/tags/share-enumeration/</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, 09 Jan 2024 15:00:00 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/tags/share-enumeration/feed.xml" rel="self" type="application/rss+xml"/><item><title>PowerShell Share Enumeration via ShareFinder or Native APIs</title><link>https://feed.craftedsignal.io/briefs/2024-01-09-powershell-share-enumeration/</link><pubDate>Tue, 09 Jan 2024 15:00:00 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2024-01-09-powershell-share-enumeration/</guid><description>Detection of PowerShell scripts employing ShareFinder functions or Windows share enumeration APIs to discover accessible network shares for reconnaissance, lateral movement, or ransomware deployment.</description><content:encoded><![CDATA[<p>This detection identifies PowerShell scripts utilizing ShareFinder functions (Invoke-ShareFinder/Invoke-ShareFinderThreaded) or native Windows API calls for share enumeration. These techniques are commonly used by attackers to map accessible network shares within an environment. This reconnaissance is often a precursor to data collection, lateral movement, or the deployment of ransomware. The activity is detected via script block logging, and focuses on identifying specific function calls and API usage within the PowerShell script content. Defenders should be aware of this activity, particularly when performed by unexpected users or on unusual systems, as it may indicate malicious reconnaissance within the network. The references indicate that this activity can lead to corporate insurance policy exfiltration or Conti ransomware deployment.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>An attacker gains initial access to a Windows system, potentially through phishing or compromised credentials.</li>
<li>The attacker executes a PowerShell script, either directly or through a fileless execution method.</li>
<li>The PowerShell script utilizes ShareFinder functions (Invoke-ShareFinder, Invoke-ShareFinderThreaded) or Windows share enumeration APIs (NetShareEnum, NetApiBufferFree) to discover network shares.</li>
<li>The script identifies accessible network shares by leveraging API calls and parsing the results for share names (shi1_netname) and remarks (shi1_remark).</li>
<li>The attacker analyzes the identified shares to determine those that are accessible and contain valuable data.</li>
<li>The attacker may then attempt to access these shares using compromised credentials or exploiting existing vulnerabilities.</li>
<li>Once access is gained, the attacker may collect sensitive data from the shares, move laterally to other systems, or deploy ransomware.</li>
<li>The ultimate goal is data exfiltration, system compromise, or financial gain through ransomware.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation of this reconnaissance technique can lead to significant data breaches, lateral movement within the network, and potential ransomware deployment. Organizations that fail to detect and prevent share enumeration may suffer financial losses, reputational damage, and operational disruption. The referenced &ldquo;Stolen Images&rdquo; campaign led to Conti ransomware deployment, and the &ldquo;Hunting for corporate insurance policies&rdquo; post highlights data exfiltration.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Enable PowerShell script block logging to capture the necessary events for detection (as referenced in the rule setup).</li>
<li>Deploy the Sigma rule &ldquo;PowerShell Share Enumeration Script via Invoke-ShareFinder&rdquo; to your SIEM and tune for your environment.</li>
<li>Deploy the Sigma rule &ldquo;PowerShell Share Enumeration via NetShareEnum API&rdquo; to detect share enumeration using native Windows APIs.</li>
<li>Investigate any alerts generated by these rules, focusing on the PowerShell launch context and the scope of the share discovery (see triage steps in the original rule).</li>
<li>Review and restrict PowerShell execution policies to prevent unauthorized script execution, especially from user-writable locations.</li>
</ul>
]]></content:encoded><category domain="severity">high</category><category domain="type">advisory</category><category>discovery</category><category>powershell</category><category>share-enumeration</category><category>lateral-movement</category><category>ransomware</category></item></channel></rss>