<?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>Commandandcontrol — CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/tags/commandandcontrol/</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/commandandcontrol/feed.xml" rel="self" type="application/rss+xml"/><item><title>Detection of Default Cobalt Strike PowerShell Beacon</title><link>https://feed.craftedsignal.io/briefs/2024-01-cobalt-strike-powershell-beacon/</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-cobalt-strike-powershell-beacon/</guid><description>This brief outlines detection strategies for default Cobalt Strike PowerShell beacons, which are used for command and control, by identifying specific function and variable names within PowerShell script block logs.</description><content:encoded><![CDATA[<p>Cobalt Strike is a popular commercial penetration testing tool often abused by threat actors for command and control (C2) after initial compromise. This brief focuses on detecting the default PowerShell beacon component of Cobalt Strike, which uses recognizable function and variable names in its scripts. By identifying these default names within PowerShell script block logs, defenders can detect Cobalt Strike activity even if the initial delivery mechanism is unknown. This detection is focused on the default variable names and function names within the tool and as such more sophisticated users of the tool may modify their scripts to evade this detection. This brief will aid in detecting default Cobalt Strike PowerShell beacons, giving defenders a chance to respond quickly.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>The attacker gains initial access to a target system through various means (e.g., spear phishing, exploiting a vulnerability).</li>
<li>A PowerShell script is executed on the target system, either through direct execution or by being called from another process (cmd.exe, mshta.exe).</li>
<li>The PowerShell script contains default Cobalt Strike PowerShell beacon code, including functions and variables like <code>func_get_proc_address</code>, <code>$var_unsafe_native_methods</code>, <code>$var_gpa.Invoke</code>, <code>func_get_delegate_type</code>, and <code>$var_type_builder</code>.</li>
<li>The script uses these functions and variables to dynamically load and execute malicious code in memory, bypassing traditional file-based antivirus solutions.</li>
<li>The beacon establishes a connection to the attacker&rsquo;s C2 server, allowing for remote command execution.</li>
<li>The attacker uses the C2 connection to perform reconnaissance, move laterally within the network, and escalate privileges.</li>
<li>The attacker deploys additional tools or malware to achieve their objectives, such as data exfiltration or ransomware deployment.</li>
<li>The attacker maintains persistence on the compromised system to ensure continued access.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation via Cobalt Strike can lead to a complete compromise of the targeted system and potentially the entire network. Attackers can steal sensitive data, deploy ransomware, disrupt business operations, and cause significant financial and reputational damage. While the exact number of victims is unknown, Cobalt Strike is used in a wide range of attacks across various sectors, including healthcare, finance, and government. A successful attack could lead to significant data breaches, system downtime, and regulatory fines.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Enable PowerShell script block logging (Event ID 4104) on all Windows endpoints to capture the necessary data for detection.</li>
<li>Deploy the Sigma rule &ldquo;Detect Default Cobalt Strike PowerShell Beacon&rdquo; to your SIEM and tune for your environment using the included false positive guidance.</li>
<li>Investigate any alerts generated by the Sigma rule, paying close attention to the parent processes and network connections associated with the PowerShell scripts.</li>
<li>Implement network segmentation to limit the lateral movement of attackers within the network after initial compromise.</li>
<li>Review and update PowerShell execution policies to prevent the execution of unsigned or untrusted scripts.</li>
</ul>
]]></content:encoded><category domain="severity">high</category><category domain="type">advisory</category><category>cobaltstrike</category><category>powershell</category><category>beacon</category><category>commandandcontrol</category><category>windows</category></item></channel></rss>