<?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>Bits — CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/tags/bits/</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>Fri, 26 Jan 2024 10:00:00 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/tags/bits/feed.xml" rel="self" type="application/rss+xml"/><item><title>Persistence via BITS Job Notify Cmdline</title><link>https://feed.craftedsignal.io/briefs/2024-01-26-bits-persistence/</link><pubDate>Fri, 26 Jan 2024 10:00:00 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2024-01-26-bits-persistence/</guid><description>Adversaries can achieve persistence by abusing the Background Intelligent Transfer Service (BITS) SetNotifyCmdLine method to execute a program after a job finishes, leading to arbitrary code execution and system compromise.</description><content:encoded><![CDATA[<p>The Background Intelligent Transfer Service (BITS) is a Windows service used for asynchronous, prioritized, and throttled file transfers. Attackers can abuse BITS to establish persistence by using the <code>SetNotifyCmdLine</code> method to execute a program after a BITS job completes or enters a specific state. This technique allows adversaries to run arbitrary code with elevated privileges, bypassing traditional security measures. The detection rule identifies suspicious processes initiated by BITS, excluding known legitimate executables like <code>WerFaultSecure.exe</code>, <code>WerFault.exe</code>, <code>wermgr.exe</code>, and <code>directxdatabaseupdater.exe</code>. This behavior can be employed to maintain access to a compromised system, even after a reboot or user logout. Defenders need to monitor BITS activity for unusual command-line executions to detect and prevent potential persistence attempts.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>An attacker gains initial access to a system through other means (e.g., phishing, exploitation of a vulnerability).</li>
<li>The attacker uses the BITSAdmin tool or PowerShell cmdlets to create a new BITS job.</li>
<li>The attacker configures the BITS job to download a malicious payload or execute a malicious script.</li>
<li>The attacker utilizes the <code>SetNotifyCmdLine</code> method to set a command that will be executed upon job completion or a specified state change.</li>
<li>The BITS service executes the specified command, which can be a script interpreter (e.g., <code>powershell.exe</code>, <code>cmd.exe</code>) or a malicious executable.</li>
<li>The malicious command downloads or executes further payloads, establishing persistence on the system.</li>
<li>The attacker maintains persistent access, allowing them to execute commands, steal data, or perform other malicious activities.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation allows attackers to maintain persistent access to compromised systems. This can lead to data theft, further malware deployment, or complete system compromise. The BITS service runs with elevated privileges, so any command executed via <code>SetNotifyCmdLine</code> will also run with those privileges. This persistence mechanism is difficult to detect because BITS is a legitimate Windows service, and its activity can be easily masked as normal system operations.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Monitor process creation events for processes spawned by <code>svchost.exe</code> with arguments containing &ldquo;BITS&rdquo; but not in the exclusion list (WerFaultSecure.exe, WerFault.exe, wermgr.exe, directxdatabaseupdater.exe) using the &ldquo;Persistence via BITS Job Notify Cmdline&rdquo; rule.</li>
<li>Implement the Sigma rule &ldquo;Detect Suspicious BITS Job Creation&rdquo; to identify unusual BITS job creation activities.</li>
<li>Review BITS job configurations on systems to identify and remove any unauthorized or suspicious jobs.</li>
<li>Enable Sysmon process creation logging to capture detailed information about process execution, including parent-child relationships and command-line arguments.</li>
</ul>
]]></content:encoded><category domain="severity">medium</category><category domain="type">advisory</category><category>persistence</category><category>bits</category><category>windows</category></item><item><title>Ingress Transfer via Windows BITS</title><link>https://feed.craftedsignal.io/briefs/2024-01-bits-ingress-transfer/</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-bits-ingress-transfer/</guid><description>Adversaries may leverage Windows Background Intelligent Transfer Service (BITS) to download executable and archive files to evade defenses and establish command and control.</description><content:encoded><![CDATA[<p>The Windows Background Intelligent Transfer Service (BITS) is a legitimate Windows service that allows for prioritized, asynchronous, and throttled transfer of files between a client and a server. Adversaries abuse BITS to download malicious payloads while evading typical security protections, as file transfers occur in the context of the <code>svchost.exe</code> process. This activity can obscure the origin of the download and bypass application whitelisting rules. This detection focuses on identifying file rename events where <code>svchost.exe</code> renames temporary BITS files (BIT*.tmp) to executable or archive file types, indicating a potential malicious download via BITS. This technique is commonly employed to deliver malware, exfiltrate data, or download additional tools.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>An attacker gains initial access to a system (e.g., through phishing or exploiting a vulnerability).</li>
<li>The attacker uses a script or command-line interface (e.g., PowerShell) to create a BITS job.</li>
<li>The BITS job is configured to download a malicious executable or archive from a remote server using the <code>bitsadmin.exe</code> utility.</li>
<li>BITS downloads the file to a temporary location on the system with a <code>BIT*.tmp</code> extension.</li>
<li>The <code>svchost.exe</code> process renames the temporary file to its final name and extension (e.g., .exe, .zip).</li>
<li>The attacker executes the downloaded file, initiating further malicious activities.</li>
<li>The malware establishes persistence through registry keys or scheduled tasks.</li>
<li>The malware communicates with a command and control (C2) server to receive instructions and exfiltrate data.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation enables attackers to download and execute arbitrary code on compromised systems. The use of BITS can bypass traditional security measures, leading to malware infections, data theft, and potentially full system compromise. This technique can be used in conjunction with other attack vectors to establish a persistent foothold within the network. While the rule itself triggers at low severity, the identified activity can be an early warning of more severe attack stages.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Deploy the &ldquo;Ingress Transfer via Windows BITS&rdquo; Sigma rule to your SIEM and tune for your environment.</li>
<li>Enable Sysmon file creation and process creation logging to enhance visibility into BITS-related activities.</li>
<li>Monitor network connections initiated by <code>svchost.exe</code> to identify potentially malicious downloads.</li>
<li>Investigate any instances of <code>bitsadmin.exe</code> being executed, especially with command-line arguments indicative of suspicious downloads.</li>
<li>Review <code>Microsoft-Windows-Bits-Client/Operational</code> Windows logs (event ID 59) for unusual BITS events.</li>
<li>Block known malicious domains or IP addresses associated with BITS-related attacks at the firewall or DNS resolver.</li>
</ul>
]]></content:encoded><category domain="severity">low</category><category domain="type">advisory</category><category>bits</category><category>ingress-transfer</category><category>command-and-control</category><category>defense-evasion</category><category>windows</category></item></channel></rss>