“Perfect” Windows downgrade attack turns fixed vulnerabilities into zero-days
A researcher has developed a downgrade attack that can make Windows machines covertly, persistently and irreversibly vulnerable, even if they were fully patched before that.
A downgrade attack exploiting the Windows Update process
The direction of SafeBreach researcher Alon Leviev’s probing was inspired by the BlackLotus UEFI bootkit, which was able to bypass the UEFI Secure Boot by exploiting a vulnerability, as well as disable Windows security mechanisms (e.g., BitLocker, HVCI, and Windows Defender) and persist on compromised machines.
He concentrated on finding ways to co-opt the Windows Update process, so that the attack cannot be spotted by Windows’ security mechanisms or endpoint security solutions.
The Windows Update process, he outlined, is started by the machine “putting in” a request for an update in an update folder located on the machine. Once its integrity is verified by Microsoft’s update server, that same folder is saved to a server-controlled folder, along with a list – Pending.xml – of update actions to be performed (such as create/delete/move files, create/delete registry keys and values, etc.) when the OS is rebooted.
After testing different approaches, he discovered the action list path in the registry, along with a key – PoqexecCmdline – that holds the executable that parses the list and the list path.
“I then looked at the security attributes of this key and noticed that it is not Trusted Installer enforced! This would allow me to control all the update actions,” he explained. “In order to downgrade, I could use the hard-link file action and the source would replace the destination.”
Then he simply updated the system with a custom, downgrading action list. The attack was not detected by security mechanisms, as it was performed in a legitimate way, and nobody would know that the machine is not fully updates, since – technically – an update did happen.
He also found that he could patch the action list parser – poqexec.exe – to install empty updates, so that newer updates would not get installed. Lastly, he discovered he could patch the integrity and repair utility – SFC.exe – so that it would no longer detect any corruptions.
“Armed with these capabilities, I then managed to downgrade critical OS components, including dynamic link libraries (DLLs), drivers, and even the NT kernel. I then aimed higher and found that the entire virtualization stack was at risk as well. I successfully downgraded Credential Guard’s Isolated User Mode Process, Secure Kernel, and Hyper-V’s hypervisor to expose past privilege escalation vulnerabilities,” he outlined.
He also find ways to disable Windows virtualization-based security (VBS), Credential Guard and Hypervisor-Protected Code integrity (HVCI), by bypassing their UEFI locks.
“As a result, I was able to make a fully patched Windows machine susceptible to thousands of past vulnerabilities, turning fixed vulnerabilities into zero-days and making the term ‘fully patched’ meaningless on any Windows machine in the world,” he concluded.
Two zero-days, yet unpatched
The researcher exploited two currently unpatched zero-day elevation of privilege vulnerabilities (CVE-2024-38202, CVE-2024-21302) in the Windows Update Stack and Windows Secure Kernel, respectively, to reintroduce previously mitigated vulnerabilities, circumvent some VBS features, and exfiltrate data protected by VBS.
He also created a tool – Windows Downdate – that allowed him to do it.
Leviev shared his discoveries with Microsoft back in February 2024, and the company is developing a security update to mitigate the two flaws. In the meantime, customers are advised to reduce the risk of exploitation by performing permissions audits and implement an Access Control List or Discretionary Access Control Lists.
“Microsoft is not aware of any attempts to exploit this vulnerability. However, a public presentation regarding this vulnerability was hosted at Black Hat on August 7, 2024. The presentation was appropriately coordinated with Microsoft but may change the threat landscape,” the company said.
But Leviev says his research should be a wake-up call for developers of other operating systems.
“Design features within an OS should always be reviewed and regarded as a relevant attack surface, regardless of how old the feature may be,” he noted.
“The downgrade attack I was able to achieve on the virtualization stack within Windows was possible due to a design flaw that permitted less privileged virtual trust levels/rings to update components residing in more privileged virtual trust levels/rings. This was very surprising, given Microsoft’s VBS features were announced in 2015, meaning the downgrade attack surface I discovered has existed for almost a decade.”
source: HelpNetSecurity
Free security scan for your website
Top News:
Massive PSAUX ransomware attack targets 22,000 CyberPanel instances
October 30, 2024Microsoft SharePoint RCE bug exploited to breach corporate network
November 2, 2024