Windows vulnerabilities threaten Web3 security: hackers can control systems to steal Private Keys

robot
Abstract generation in progress

Analysis of Serious Vulnerability in Microsoft Windows System: Potential Major Security Risks for Web3

Last month, a security patch from Microsoft fixed a Windows privilege escalation vulnerability that was being exploited by hackers. This vulnerability mainly exists in earlier versions of Windows and cannot be triggered on Windows 11. Although such vulnerabilities have existed for many years, it is still worth analyzing how attackers continue to exploit them in the context of continually improving security measures.

This analysis is based on the Windows Server 2016 system. It is an undisclosed zero-day vulnerability that allows hackers to take complete control of Windows systems. Once the system is compromised, the consequences may include personal information leakage, system crashes, data loss, financial losses, and more. For Web3 users, private keys may be stolen, and digital assets may be transferred. On a larger scale, this vulnerability could even affect the entire Web3 ecosystem running on Web2 infrastructure.

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

By analyzing the patch, it was found that the issue lies in the handling of object reference counting. Early source code comments indicate that the previous code only locked the window object, without locking the menu object within the window, which could lead to the menu object being incorrectly referenced.

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

To reproduce the vulnerability, we constructed a special multi-layer nested menu structure and set specific properties for each menu to pass the system's related checks. The key is to remove the reference relationship between menus when returning to the user layer, successfully releasing the target menu object. This way, when the kernel function references the menu again, it will access an invalid object.

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

In practical use, we mainly considered two schemes: executing shellcode and modifying the token address using read and write primitives. Considering the security mechanisms of higher version Windows, we chose the latter. The entire exploitation process can be divided into two steps: first, control the cbwndextra value using the UAF vulnerability, and then establish stable read and write primitives based on this.

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

To achieve a stable memory layout, we designed a structure of three consecutive HWND objects, releasing the middle object and occupying it with an HWNDClass object. The HWND objects at the front and back are used for system checks and as the final read/write medium, respectively. We also accurately determine whether the object arrangement meets expectations by leaking the kernel handle address.

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

In terms of reading and writing primitives, we use GetMenuBarInfo() for arbitrary reading and SetClassLongPtr() for arbitrary writing. Apart from TOKEN replacement operations, all other writing operations utilize the class object of the first window object.

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

Overall, although Microsoft is refactoring the relevant kernel code with Rust to improve security, such vulnerabilities still pose a serious threat to existing systems. The exploitation process is relatively simple, mainly relying on the leakage of desktop heap handle addresses. In the future, detecting abnormal memory layouts and window operations may help uncover similar vulnerabilities.

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

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

TOKEN6.45%
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
  • 5
  • Share
Comment
0/400
GasFeeCryvip
· 23h ago
Win lost everything
View OriginalReply0
MiningDisasterSurvivorvip
· 23h ago
Another wave of suckers is about to be played for suckers, just like the private key theft in 2018.
View OriginalReply0
MetaMisfitvip
· 23h ago
I really dare not use Win7.
View OriginalReply0
Whale_Whisperervip
· 23h ago
The old system has hit a snag.
View OriginalReply0
FreeRidervip
· 23h ago
It's good to work as a Mac user!
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)