Researchers have found a way to bypass the User Account Control (UAC) security feature on Windows 10 by leveraging the Disk Cleanup utility.
UAC, a feature introduced by Microsoft in Windows Vista, is designed to protect the system against unauthorized changes made by users, applications and malware. Over the past years, hackers have found several methods to bypass UAC, mainly involving privileged files and DLL hijacking.
Researchers Matt Graeber and Matt Nelson have now found a way to bypass UAC on Windows 10 using a method which they claim has several advantages over previously disclosed techniques. The attack method involves Disk Cleanup, the Windows utility designed to free up space on the hard drive.
An analysis of the default scheduled tasks on Windows 10 revealed a task named SilentCleanup, which executes the Disk Cleanup process cleanmgr.exe with the highest privileges, even if executed by an unprivileged user. The process creates a new folder named GUID in the Temp directory and copies an executable and various DLL into it. The executable is then launched and it starts loading the DLLs in a certain order.
If an attacker can replace one of the DLLs with a malicious version before it is loaded by the executable, they can bypass UAC and achieve code execution with high privileges.
Graeber and Nelson tested the attack by replacing the DLL that is loaded last to give them enough time for the operation. The experts wrote a PoC script that monitors the system for the creation of the GUID folder and then replaces the DLL that is loaded last with a malicious file.
The researchers say this technique is more efficient than ones disclosed previously because it does not require any process injection, which makes it less likely to be detected by security solutions. Other advantages include the fact that it doesn’t require copying privileged files, it works even with the UAC level on the highest setting, and the malicious DLL is automatically deleted from the Temp directory after the scheduled cleanup is completed.
The experts informed Microsoft about the bypass last week, but the vendor has determined that it cannot be classified as a vulnerability since UAC is “not a security boundary.”
“This is not a vulnerability but a method of bypassing a defense-in-depth feature, and it requires administrative privileges to work. We recommend customers follow best practices and not run machines in administrator mode full-time.” a Microsoft spokesperson told SecurityWeek.
“This particular technique can be remediated or fixed by disabling the task or removing the requirement for running with highest privileges,” Nelson explained in a blog post. “Further, if you would like to monitor for this attack, you could utilize methods/signatures to look for new WMI events as it is required to monitor for new folder creation for this attack to succeed. Combining this with App/DLL whitelisting and monitoring for abnormal modules being loaded (e.g. Sysmon event ID 7) would also limit the success of such an attack.”
*Updated with statement from Microsoft
Related: Angler Exploit Kit Bypasses Microsoft EMET
Related: Privilege Escalation Flaw in OS X Allows SIP Bypass