Microsoft blocked code signing certs, favored by Chinese hackers and devs, for loading malicious kernel mode drivers via Windows policy exploit.
Windows kernel-mode drivers, at Ring 0, grant utmost privilege, enabling the following abilities:-
- Stealthy persistence
- Undetectable data exfiltration
- Universal process termination
A kernel-mode driver can disrupt the active security tools on a compromised device and perform the following illicit activities:-
- Interrupt the security tools’ operations
- Turn off the advanced protection capabilities of the security solutions
- Make targeted configuration changes for stealthy evasion
Cybersecurity researchers at Cisco Talos recently reported this issue to Microsoft and stated:-
“Actors are leveraging multiple open-source tools that alter the signing date of kernel mode drivers to load malicious and unverified drivers signed with expired certificates. We have observed over a dozen code signing certificates with keys and passwords contained in a PFX file hosted on GitHub used in conjunction with these open source tools.”
It’s a significant risk since once someone gets hold of the central part of the targeted system, they have unrestricted control over the whole system, ultimately leading to complete infiltration.
Windows Policy Changes
Windows Vista brought policy changes, limiting the loading of kernel-mode drivers into the OS. This modification by Microsoft made the Devs must now review and sign their drivers via Microsoft’s portal for compliance.
For legacy app compatibility, Microsoft made exceptions, enabling continued loading of older kernel mode drivers. Here below, we have mentioned those specific exceptions:-
- The PC was upgraded from an earlier release of Windows to Windows 10, version 1607.
- Secure Boot is off in the BIOS.
- Drivers were [sic] signed with an end-entity certificate issued before July 29th, 2015, that chains to a supported cross-signed CA.
To manipulate the signing date of malicious drivers before July 29th, 2015, exploiting the third policy, the Chinese threat actors leverage the following open-source tools:-
- FuckCertVerifyTimeValidity (aka FuckCertVerify)
Threat actors alter signing dates to employ old and leaked certificates that are not revoked for driver signing, and achieving privilege escalation on Windows.
Open Source Tools Analysis
It’s a driver signature forgery tool that uses the Windows API hooking and manual import table modification to give its operator the ability to change the signing date.
This tool was released by “JemmyLoveJenny” in 2019 on “52pojie[.]cn,” and since 2020, it’s available on GitHub. Besides this, HookSignTool is also used to sign the “RedDriver,” a malicious driver and browser hijacker.
Utilizing the Microsoft Detours package, this tool intercepts the “CertVerifyTimeValidity” API call, and to the desired date it sets the timestamp. While it requires the addition of the “FuckCertVerifyTimeValidity.dll!test” function in the import table.
But, unlike the “HookSignTool,” it leaves no trace in signed binaries, making detection challenging. This tool to have been created for signing game cheating software and initially it was released on December 13th, 2018 on GitHub.
Since then, it has been replicated, uploaded, and distributed to different GitHub repositories.
Apart from this, along with the matching private key and password, a non-revoked code-signing certificate that is issued before July 29th, 2015 is required by both tools.
In GitHub repos and Chinese forums, Cisco’s researchers discovered over a dozen certificates that these tools can exploit.
They are extensively employed for the following things:-
- Game cracks
- Bypass DRM checks
- Malicious kernel driver execution
Here below we have mentioned all the recommendations provided by Microsoft:-
- Make sure to install the latest Windows updates.
- Ensure that your antivirus and endpoint detection products are updated with the latest available signatures.
- Make sure to configure the AV and EDR tools properly.
- For optimal defense shields, ensure that all the key security features of AV and EDR tools are enabled.