Black Hat, Endpoint/Device Security, Virtualization, Networking

Windows Downdate attack totally undermines Windows security; fix not yet ready

Share
A Microsoft Surface with the Windows logo is seen

The security of Windows 11 can be completely undermined by corrupting the Windows Update process with a simple edit to the Windows Registry, forcing a downgrade to vulnerable older versions of Windows and other system processes. As of this writing, there is no patch preventing this attack, although Microsoft has offered steps that reduce the risk.

Alon Leviev, a security researcher at Israel-based SafeBreach, demonstrated this attack method at the Black Hat security conference in Las Vegas last week. Using a tool he wrote (but did not make public) called Windows Downdate, Leviev was able to:

  • roll back Windows to earlier, vulnerable versions with known exploits
  • disable the Windows Secure Kernel virtualization process that protects certain security processes
  • steal usernames and hashed passwords for all users
  • disable the built-in Windows Defender endpoint protection software
  • roll back the Windows Hyper-V hypervisor to a vulnerable version

In all instances, Leviev said, the Windows Update tool system check reported that the machine was fully up-to-date despite the hidden sabotage.

"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," Leviev wrote in a SafeBreach blog post that was posted Aug. 7 as his talk began.

The Windows Downdate attacks require a local user with administrative privileges. But that is a low hurdle to clear, as every Windows system makes its first user an administrator by default, and malware that infects a user account will have the same system privileges as the user.

However, in his Black Hat presentation (but not his blog post), Leviev revealed a second downgrade attack involving the temporary Windows.old folder created after a system upgrade. That attack forces Windows to use a malicious version of the Windows.old version during the System Restore process and can be performed by a regular unprivileged user.

In coordination with Leviev's presentation, Microsoft issued two Common Vulnerability and Exposure notices for these attacks, CVE-2024-21302 for the Windows Downdate method and CVE-2024-38202 for the Windows.old method.

No patches are yet available for either one, but Microsoft has recommendations that "do not mitigate the vulnerability but can be used to reduce the risk of exploitation until the security update is available."

On Aug. 13, after this story was initially posted, Microsoft issued "an opt-in revocation policy mitigation" for one aspect of the Windows Downdate attack but added that the mitigation steps themselves created risk.

Inspired by BlackLotus malware

Leviev said his interest in a Windows downgrade attack was piqued by the BlackLotus bootkit of 2022, which rolled back the UEFI system-boot process to use a known vulnerable older version of the Windows Boot Manager.

Microsoft mitigated BlackLotus by revoking the permissions of those vulnerable older versions and rolling out system patches, but Leviev wondered if there might be other Windows processes vulnerable to downgrade attacks.

He picked what he thought might be the least suspicious one of all: Windows Update.

Through trial and error, Leviev said he discovered that while the Windows Update components were impregnable, the file path in the Windows Registry that points to the instructions, or "action list," that Windows Update must follow was not.

With regular administrator privileges, he was able to edit the Registry to point to a different, malicious version of the action list, which in turn pointed to a malicious set of update files.

"All of the integrity verifications were bypassed, since the action list is assumed verified because it is created post-verification," Leviev wrote in his blog post. "I was able to achieve a complete Windows Update takeover with a downgrade attack."

The attack would be invisible to the user because Windows Update would still consider the machine to be fully patched, as well as to endpoint protection software because all the behavior would appear legitimate.

Leviev found that the attack could be made persistent by tweaking the update instructions to perpetually install "empty" updates that made no changes.

It could also be made irreversible because, as he wrote, the "System Integrity Check and Repair utility SFC.exe is not digitally signed and can be patched to never detect or repair corruptions."

Out come the monsters

Attacking Windows Update opens up a Pandora's Box of possible attacks. Most significantly, Leviev found that he could replace Secure Kernel executables during bogus Windows Updates and force Windows 11 to boot without normal system protections.

The Secure Kernel is a shadow Windows system that runs in a virtual machine in Windows 11, protecting security features like password storage and memory access from a potentially corrupted regular system kernel.

This results in what Microsoft calls "virtualization-based security" or VBS. Both the regular instance of Windows and its secure shadow are controlled by a hypervisor that runs on a supposedly inaccessible level.

VBS itself is protected from tampering by a feature called UEFI Lock. The VBS configuration files are not in the Windows Registry, but in the UEFI boot process itself. The files that execute and manage VBS and the hypervisor are digitally signed and cannot be tampered with.

Using his Windows Downdate tool, Leviev replaced the VBS and hypervisor executables with invalid, unsigned versions. He assumed that the machine would boot into Recovery mode when it encountered the invalid files.

But to his surprise, Windows simply skipped the VBS process and booted normally, with no virtualization running to protect sensitive system processes. This happened even with the UEFI lock still enabled.

"I believe [this] to be the first bypass of VBS's UEFI lock," Leviev wrote in his blog post.

By disabling VBS, replacing security features with older, known exploitable versions, and some further trial and error, Leviev was able to "dump" the usernames and hashed passwords.

The hashes included NTLM hashes, which are generally easy to reverse into plaintext. He was also able to disable Windows Defender by replacing the main Defender engine using Windows Downdate.

Leviev found that even the hypervisor was reachable by Windows Downdate. He could roll back the hypervisor version to one that was two years older and likely to have vulnerabilities.

"I found no downgrade mitigation in any component of the virtualization stack," he wrote. "The entire stack was vulnerable to downgrades."

"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," he added.

"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."

A system downgrade anyone can do

As mentioned, the above attacks all require administrative privileges. That wasn't the case with the last attack Leviev disclosed during his Black Hat presentation — even an unprivileged user could pull it off.

When Windows performs a major system upgrade, which normally happens twice a year, the previous version of Windows is stored at "C:Windows.old" for between 10 days and a month in case there's a problem with the upgrade. If so, the user can roll back to the previous version of Windows using System Restore.

Leviev found it wasn't possible to tamper with the contents of the Windows.old folder. But he was able to rename the folder, even as an unprivileged user, and then create a new, malicious Windows.old folder.

If the machine then performs a System Restore to the previous version of Windows, he said, it will use the malicious version of Windows.old, resulting in an attacker-controlled machine.

Given the limited shelf life of Windows.old, this attack might be of limited usefulness, as Windows normally deletes the Windows.old folder between 10 days and a month following a successful upgrade.

Lessons learned

Obviously, Leviev's findings have tremendous implications for Windows 11, and for Windows 10 as well because it uses many of the same mechanisms. Microsoft is working on patches, but Leviev said similar attacks might be possible on Linux and macOS.

"We believe other OSs may be equally susceptible to similar attack vectors and that all OS vendors must be vigilant against the dangers they pose," he wrote in his blog post.

At Black Hat, Leviev put it more succinctly: "There needs to be more awareness that OS downgrade attacks are viable,"

Harkening back to the BlackLotus malware that inspired him, he added: "We need to thoroughly examine and expand in-the-wild attacks."

Paul Wagenseil

Paul Wagenseil is a custom content strategist for CyberRisk Alliance, leading creation of content developed from CRA research and aligned to the most critical topics of interest for the cybersecurity community. He previously held editor roles focused on the security market at Tom’s Guide, Laptop Magazine, TechNewsDaily.com and SecurityNewsDaily.com.

Get daily email updates

SC Media's daily must-read of the most current and pressing daily news

By clicking the Subscribe button below, you agree to SC Media Terms of Use and Privacy Policy.