[If your main concern is that you do not have time to apply the April update, stop wasting more time reading this (or anything else about CVE-2022-26809) and start patching] The stand-out vulnerability for this month's Microsoft Patch Tuesday was CVE-2022-26809 [msft]. An integer overflow in MSRPC that, if exploited, allows for arbitrary code execution over the network without requiring authentication or user interaction. There is no doubt that the vulnerability is critical, and the patch must be applied quickly. But how big of an issue is it? How soon should we expect an exploit? And what other mitigation techniques may be helpful? Let me summarize what we know so far: 1 - What is RPCFor the most popular network services (SMTP, DNS, HTTP...), we use specifically assigned ports managed by IANA [iana]. But there are many less common services specific to certain operating systems that do not have ports assigned by IANA. For these services, the "Remote Procedure Call" (RPC) mechanism may be used to standardize communication. Both Windows and Unix implement their own version of this basic idea. In Unix, it is typically called "SUN RPC" (RFC 1057). In Windows, we do have MSRPC. MSRPC allows for messages to be transmitted in several different ways:
The number of hosts exposed on the different ports (based on Shodan.io):
Note that Shodan does not show any Windows hosts listening on ports other than 445. Also, Shodan is usually underestimating the number of exposed hosts. There is a simple Nmap script to enumerate RPC services that may help identify exposed systems: nmap <target> --script=msrpc-enum [nmap] 2 - The VulnerabilitySeveral researchers have been using the patch to find the vulnerability. Akamai published a blog with some details, showing how the patch fixes an integer overflow condition [akamia]. This, in turn, leads to a heap buffer overflow. But nobody has made public means to trigger the vulnerability. The vulnerability was reported to Microsoft by CyberKunLun [kunlun]. CyberKunLun is affiliated with Team Pangu, one of China's leading security research groups and a discoverer of many past vulnerabilities. CyberKunLun reported several different vulnerabilities (30?) fixed by Microsoft in April. CyberKunLun maintains a page with short write-ups and PoC code for vulnerabilities they discovered in the past. Nothing has been added yet about CVE-2022-26809. 3 - Impact and MitigationIf you made it this far, you probably already subscribed to the idea of closing ports 135/139/445 on your firewall. In general, you should only allow ports open that are in use vs. blocking specific "dangerous" ports (expectations are ISPs and likely some Universities). But blocking SMB traffic internally is more tricky. Recent SMB exploits (e.g., remember WannaCry taking advantage of the EternalBlue vulnerability) showed how effective these exploits could be moving lateral inside networks. Microsoft's guidance to secure SMB traffic (linked to by its security advisory) also focuses heavily on firewall rules. Patching is your only REAL fix for this vulnerability. Don't delay it. Patch now and apply the entire April update. It fixes several other critical flaws that may have a similar impact inside your network (e.g., the NFS flaw). You can't "turn off" RPC on Windows if you are wonderings. It will break stuff. RPC does more than SMB. For example, you can't move icons on the desktop if you disable RPC (according to a Microsoft help page). 4 - DetectionDo not expect too much from IDS/IPS rules. Too little is known to create a good IDS rule, and RPC vulnerabilities are notoriously hard to detect on the network. Host-based detection techniques may be more successful—dust off your WannaCry playbook. While WannaCry was an SMB exploit, not an RPC exploit, the behavior will likely be similar. 5 - Final WordsDon't Panic - Patch. I do not see any working exploits (April 14th, 9 am EST). I see some Rick Rolling, and you will likely see fake exploits soon. I have no idea when we will see a working exploit, but I hope we will have until next week. [msft] https://msrc.microsoft.com/update-guide/en-US/vulnerability/CVE-2022-26809 --- Johannes B. Ullrich, Ph.D. , Dean of Research, SANS.edu |
Johannes 4511 Posts ISC Handler Apr 14th 2022 |
|||||||||||||||
Thread locked Subscribe |
Apr 14th 2022 2 months ago |
|||||||||||||||
Excellent point about this being bigger than just SMB/445!
|
Anonymous |
|||||||||||||||
Quote |
Apr 15th 2022 2 months ago |
|||||||||||||||
I'm not sure you can really trust the "os:windows" search parameter on Shodan. Looking at the results I see lots of hits like
SMB Version: 1 OS: Windows 6.1 Software: Samba 4.9.5-Debian So I tried it the other way round and went for "!samba !darwin" to weed out the IP addresses that definitely do not run the Microsoft RPC stack. But as always: Shodan results are ballpark numbers, and not exact science. And yes: definitely patch ASAP. My take on this is here (in German): https://cert.at/de/aktuelles/2022/4/2022-04-windows-patchday |
otmar 4 Posts |
|||||||||||||||
Quote |
Apr 15th 2022 2 months ago |
Sign Up for Free or Log In to start participating in the conversation!