<?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>Diskcleanup — CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/tags/diskcleanup/</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>Thu, 04 Jan 2024 12:00:00 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/tags/diskcleanup/feed.xml" rel="self" type="application/rss+xml"/><item><title>UAC Bypass via DiskCleanup Scheduled Task Hijack</title><link>https://feed.craftedsignal.io/briefs/2024-01-uac-bypass-diskcleanup/</link><pubDate>Thu, 04 Jan 2024 12:00:00 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2024-01-uac-bypass-diskcleanup/</guid><description>Attackers bypass User Account Control (UAC) by hijacking the DiskCleanup Scheduled Task to stealthily execute code with elevated permissions on Windows systems.</description><content:encoded><![CDATA[<p>This rule identifies User Account Control (UAC) bypass attempts via hijacking the DiskCleanup Scheduled Task. Attackers exploit this method to execute code with elevated privileges, bypassing standard security controls. The technique involves leveraging the <code>cleanmgr.exe</code> or <code>taskhostw.exe</code> executables with specific arguments (<code>/autoclean</code> and <code>/d</code>) outside of their expected paths. This allows attackers to run malicious code under the guise of a legitimate system process, making detection more challenging. This technique is used to gain elevated privileges on a compromised system, allowing for further malicious activities.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>An attacker gains initial access to the system (e.g., via phishing or exploiting a software vulnerability).</li>
<li>The attacker modifies or creates a scheduled task to execute <code>cleanmgr.exe</code> or <code>taskhostw.exe</code> with the <code>/autoclean</code> and <code>/d</code> arguments.</li>
<li>The modified scheduled task is triggered, executing the specified executable with the supplied arguments.</li>
<li>The executable, such as <code>cleanmgr.exe</code>, attempts to run Disk Cleanup.</li>
<li>If the executable path is outside the standard locations (e.g., <code>C:\\Windows\\System32</code> or <code>C:\\Windows\\SysWOW64</code>), it indicates a potential hijack.</li>
<li>Malicious code is executed with elevated privileges due to the UAC bypass.</li>
<li>The attacker uses these elevated privileges to install malware, modify system settings, or perform other malicious activities.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation allows attackers to bypass User Account Control (UAC) and execute code with elevated privileges. This can lead to the installation of malware, modification of system settings, data theft, and other malicious activities. While the exact number of victims is unknown, this technique is effective on systems where UAC is enabled but misconfigured or vulnerable.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Deploy the Sigma rule &ldquo;UAC Bypass via DiskCleanup with Suspicious Path&rdquo; to your SIEM and tune for your environment to detect UAC bypass attempts.</li>
<li>Deploy the Sigma rule &ldquo;UAC Bypass via DiskCleanup and Taskhostw&rdquo; to your SIEM to detect UAC bypass attempts.</li>
<li>Monitor process creation events for <code>cleanmgr.exe</code> and <code>taskhostw.exe</code> with the <code>/autoclean</code> and <code>/d</code> arguments, focusing on executions outside the standard system directories.</li>
<li>Review and harden scheduled tasks to prevent unauthorized modifications.</li>
<li>Ensure that UAC settings are properly configured and enforced across the organization.</li>
</ul>
]]></content:encoded><category domain="severity">medium</category><category domain="type">advisory</category><category>uac-bypass</category><category>privilege-escalation</category><category>windows</category><category>diskcleanup</category><category>scheduled-task</category></item></channel></rss>