A serious vulnerability in Windows threatens Web3 security, allowing hackers to completely control the system.

Analysis of Critical Vulnerability in Microsoft Windows: Full System Control and Threat to Web3 Security

Last month, Microsoft released a security patch that fixed a Windows system privilege escalation vulnerability being exploited by hackers. This vulnerability mainly exists in earlier versions of Windows and cannot be triggered on Windows 11.

This type of underlying vulnerability in Windows systems has existed for a long time. This article will analyze how hackers may continue to exploit this vulnerability against the backdrop of continually strengthening security defenses. Our analysis environment is Windows Server 2016.

This vulnerability is classified as a zero-day vulnerability, which means it is undisclosed and unpatched. Once a zero-day vulnerability is discovered, it can be maliciously exploited without the user's knowledge, posing a significant threat. Through this Windows system vulnerability, hackers can gain complete control of the system.

The consequences of being hacked and having a system compromised are severe, including personal information theft, system crashes, data loss, financial losses, and the implantation of malware. For individual users, cryptocurrency private keys may be stolen, and digital assets may be transferred. On a larger scale, this vulnerability could threaten Web3 projects that rely on Web2 infrastructure to operate.

Numen Exclusive: Microsoft 0day Vulnerability Can Disrupt Web3 Landscape at System + Physical Level

Analyzing the patch code, the problem seems to be that the reference count of an object has been processed one time too many. According to earlier comments in the win32k source code, the original code only locked the window object and did not lock the menu object within the window object, which could lead to the menu object being incorrectly referenced.

Numen Exclusive: Microsoft 0day Vulnerability Can Disrupt Web3 Game at Both System and Physical Levels

During the implementation of the vulnerability proof of concept ( PoC ), we found that there was an issue in the handling of the menu object in the xxxEnableMenuItem function. The returned menu could be the main window menu, a submenu, or even a sub-submenu. We constructed a special four-layer menu structure to trigger the vulnerability.

Numen Exclusive: Microsoft 0day Vulnerability Can Disrupt Web3 Landscape at System + Physical Level

Before building the (Exp) exploit, we mainly considered two directions: executing shellcode and modifying the token address using read/write primitives. Considering feasibility, we chose the latter. The entire exploitation process is divided into two steps: exploiting the UAF vulnerability to control the cbwndextra value, and then establishing stable read/write primitives.

Numen Exclusive: Microsoft 0day Vulnerability Can Upend Web3 Landscape at System + Physical Level

To achieve the first data write, we utilize the window name object in the window class WNDClass to occupy the released menu object. By carefully constructing the memory layout, we can control the memory data of adjacent objects, thus modifying the cb-extra value of HWNDClass.

Numen Exclusive: Microsoft 0day Vulnerability Can Upset Web3 Game at System + Physical Level

We designed a memory layout for three consecutive HWND objects, occupying the space of the intermediate object with an HWNDClass object after releasing it. The previous HWND object is used for function verification, while the latter is used for final read and write primitives. By leaking the kernel handle address, we can precisely control the order of object arrangement.

Numen Exclusive: Microsoft 0day Vulnerability Can Disrupt Web3 Landscape at System + Physical Level

In terms of reading and writing primitives, we use GetMenuBarInfo() to achieve arbitrary read, and SetClassLongPtr() to achieve arbitrary write. Except for token writing, other writes utilize the class object offset of the first window object.

Numen Exclusive: Microsoft 0day Vulnerability Can Upend Web3 Landscape at System + Physical Level

Overall, although the Windows 11 preview version has started to refactor the win32k code with Rust, such vulnerabilities still pose security risks for older systems. The exploitation process is relatively simple, mainly relying on the leakage of desktop heap handle addresses. The discovery of this vulnerability may benefit from improved code coverage detection. For vulnerability detection, in addition to focusing on the key points of the triggering functions, attention should also be paid to abnormal memory layouts and data read/write operations.

Numen Exclusive: Microsoft 0day Vulnerability Can Disrupt the Web3 Landscape at System and Physical Levels

TOKEN5.36%
View Original
This page may contain third-party content, which is provided for information purposes only (not representations/warranties) and should not be considered as an endorsement of its views by Gate, nor as financial or professional advice. See Disclaimer for details.
  • Reward
  • 6
  • Share
Comment
0/400
FlashLoanLordvip
· 2h ago
It's time to change apples again.
View OriginalReply0
LightningSentryvip
· 2h ago
If you don't upgrade to Win11, do you still dare to be a sucker? You deserve to be sheared.
View OriginalReply0
StakeHouseDirectorvip
· 2h ago
Quickly rise 11, don’t ask, just charge forward.
View OriginalReply0
StablecoinAnxietyvip
· 2h ago
Windows 11 is quite secure.
View OriginalReply0
fomo_fightervip
· 2h ago
Are users at ease?
View OriginalReply0
OnchainDetectiveBingvip
· 3h ago
Win11 is really impressive.
View OriginalReply0
Trade Crypto Anywhere Anytime
qrCode
Scan to download Gate app
Community
English
  • 简体中文
  • English
  • Tiếng Việt
  • 繁體中文
  • Español
  • Русский
  • Français (Afrique)
  • Português (Portugal)
  • Bahasa Indonesia
  • 日本語
  • بالعربية
  • Українська
  • Português (Brasil)