This article provides a synopsis of the Follina exploit and simple steps you can take to mitigate this severe remote code execution vulnerability within Microsoft Support Diagnostic Tool (MSDT). This vulnerability is triggered via common Windows applications such as Microsoft Word and is being actively exploited by known hacking groups.
The Follina Exploit
A zero-click Remote Code Execution (RCE) vulnerability has started making the rounds which is leveraging functionality within applications such as Microsoft Word. This vulnerability exists when the application calls MSDT using the URL protocol and allows remote attackers to execute PowerShell code on the victim’s device, under the context of the application user. In addition to this, the exploit can be triggered whilst previewing the document only. The exploit has been dubbed “Follina” and is registered as CVE-2022-30190.
Due to the nature of the exploit and how it is triggered, it is expected that an increased amount of exploitation attempts in the wild will be made via threat actors sending malicious files via phishing. You can read more about phishing attacks and how to protect against them in this blog post.
Severity and Proof of Concept
The exploit has been given a CVSSv3 rating of 7.8. The vulnerability was originally reported by crazyman of the Shadow Chaser Group and impacts all Windows versions still receiving security updates (Windows 7+ and Windows Server 2008+). Proof-of-Concept (PoC) exploit code has been released publicly, with a module being released in the popular exploit framework Metasploit.
Official Patch Status
Microsoft have yet to release an update at the time of writing (08/06/2022) to patch this vulnerability, however they have released guidance for mitigating the issue on their Microsoft Security Response Center (MSRC) blog to reduce the attack surface. It is highly recommended that this workaround is applied until an official patch is released by Microsoft.
Mitigation and Workaround Steps
As described by Microsoft, the following actions must be taken to perform the workaround.
Run Command Prompt as Administrator.
To back up the registry key, execute the command “reg export HKEY_CLASSES_ROOT\ms-msdt filename“
Execute the command “reg delete HKEY_CLASSES_ROOT\ms-msdt /f”.
To undo, simply import the backup of the registry key.
Run Command Prompt as Administrator.
To restore the registry key, execute the command “reg import filename”
The MSRC also details how Microsoft Defender solutions can detect and alert on potential exploit activity.
Whilst the remediation steps appear to have no adverse impact on a system during our testing, it should be noted that any modification of the registry can cause unwanted behaviours in Windows operating systems and should be tested thoroughly.
We have created a PowerShell script that will backup the targeted registry key before removing it, automating the workaround steps highlighted above. You can find this script on our public GitHub. This script may be deployed through Microsoft InTune and other MDM solutions to patch multiple vulnerable systems.