After an Internet-wide scan, researchers at cybersecurity firm Kryptos Logic discovered roughly 48,000 Windows 10 hosts vulnerable to attacks targeting the pre-auth remote code execution CVE-2020-0796 vulnerability found in Microsoft Server Message Block 3.1.1 (SMBv3).
Several vulnerability scanners designed to detect Windows devices exposed to attacks are already available on GitHub, including one created by Danish security researcher ollypwn and designed to check if SMBv3 is enabled on the device and if the compression capability that triggers the bug is enabled.
The vulnerability, dubbed SMBGhost, is known to only impact desktop and server systems running Windows 10, version 1903 and 1909, as well as Server Core installations of Windows Server, versions 1903 and 1909.
Microsoft explains that “the vulnerability exists in a new feature that was added to Windows 10 version 1903” and that “older versions of Windows do not support SMBv3.1.1 compression.”
DoS proof-of-concept already demoed
They also shared a demo video of a denial-of-service proof-of-concept exploit developed by researcher Marcus Hutchins (aka MalwareTech).
“The SMB bug appears trivial to identify, even without the presence of a patch to analyze,” according to Kryptos Logic which means that malicious actors might soon be able to develop their own CVE-2020-0796 exploits.
While no malicious scans for Windows 10 hosts without mitigations put in place haven’t yet been detected, the fact that PoC exploits have already been developed and the bug is so easy to analyze leads to the conclusion that malicious attacks are close.
The CVE-2020-0796 pre-auth RCE vulnerability
Microsoft publicly disclosed details about the SMBGhost vulnerability only after some security vendors part of the Microsoft Active Protections Program who get early access to vulnerability information released information during this month’s Patch Tuesday.
After the news of a wormable pre-auth RCE vulnerability affecting SMBv3 spread, Microsoft published a security advisory with info on the leaked bug and mitigation measures designed to block potential attacks.
“Microsoft is aware of a remote code execution vulnerability in the way that the Microsoft Server Message Block 3.1.1 (SMBv3) protocol handles certain requests,” the advisory reads. “An attacker who successfully exploited the vulnerability could gain the ability to execute code on the target SMB Server or SMB Client.”
“To exploit the vulnerability against an SMB Server, an unauthenticated attacker could send a specially crafted packet to a targeted SMBv3 Server. To exploit the vulnerability against an SMB Client, an unauthenticated attacker would need to configure a malicious SMBv3 Server and convince a user to connect to it.”
Microsoft shares mitigation measures for SMB servers
As a workaround until a security update is released, Microsoft’s advisory recommends disabling SMBv3 compression using this PowerShell (Admin) command (no reboot required, does not prevent the exploitation of SMB clients):
Set-ItemProperty -Path "HKLM:SYSTEMCurrentControlSetServicesLanmanServerParameters" DisableCompression -Type DWORD -Value 1 -Force
Additionally, enterprise customers are advised to block the TCP port 445 at the enterprise perimeter firewall to prevent attacks attempting to exploit the flaw.
“This can help protect networks from attacks that originate outside the enterprise perimeter,” Redmond explains. “Blocking the affected ports at the enterprise perimeter is the best defense to help avoid Internet-based attacks.”
“However, systems could still be vulnerable to attacks from within their enterprise perimeter,” Microsoft adds.
We’ve just finished our first internet wide scan for CVE-2020-0796 and have identified 48000 vulnerable hosts. We’ll be loading this data into Telltale for CERTs and organisations to action. We’re also working on a blog post with more details (after patch).
— Kryptos Logic (@kryptoslogic) March 12, 2020