A new unnamed vulnerability class has been detected in the Windows 11 Kernel that could allow a threat actor to execute arbitrary code with Kernel privileges.
This vulnerability, named “File Immutability,” exists due to incorrect assumptions in the design of the Core Windows feature. These assumptions can result in undefined Behaviour and security vulnerabilities.
The list of components and concepts associated with this “File Immutability” vulnerability is as follows:
An attacker can utilize this false file immutability by employing a network redirector to modify PPL’s DLL Server-side and bypass sharing restrictions.
In this case, the PE’s backing an executable image are incorrectly assumed to be immutable. However, this class of vulnerability is called “False File Immutability.”
Further, this vulnerability was also presented at Black Hat Asia 2023. A Windows Kernel vulnerability was disclosed, indicating how bad assumptions in paging can be exploited to inject code into PPL by defeating security features like LSA and Anti-Malware Process Protection.
The attack used False File immutability assumptions for DLLs in PPLs for the presented scenario.
This new vulnerability report, published by Elastic Security, uses authenticode signatures embedded within PE files, which use a detached signature called Security Catalog.
Every PE with an authentihash in the list is considered to be signed by that signer to which Windows keeps a large collection of catalog files in C:\Windows\System32\CatRoot.
Initially, the CI (Code Integrity) maps the file into kernel memory using ZwOpenFile, ZwCreateSection, and ZwMapViewOfSection and then validates the catalog’s digital signature using CI!MinCrypK_VerifySignedDataKModeEx.
If the signature is valid, it parses the hashes with CI!I_MapFileHashes.
After this, the file is opened without FILE_SHARE_WRITE, which means the write sharing is denied.
However, this is intended to prevent modification of the security catalog during processing. Nevertheless, this is a bad assumption and another example of False File Immutability.
The attack flow starts with an attacker planting a security catalog on a storage device they control.
Then, they will install a symbolic link to this catalog in the CatRoot directory to ensure Windows can find it.
Proceeding further with the attack, the attacker can perform the following actions to exploit this vulnerability:
This vulnerability can arise when the victim code reads the same value from an attacker-controlled buffer more than once.
The threat actor may change the value of this buffer between the reads, resulting in unexpected victim behavior.
However, the attack pattern can be executed by setting a packet’s structure’s length field to 16 bytes and then signaling the server to indicate that a packet is ready for processing.
The victim server wakes up and allocates a 16-byte buffer using malloc(pPacket->length). The attacker then changes the length field to 32.
Next, the victim server attempts to copy the packet’s contents into the the new buffer by calling memcpy(pBuffer, pPacket->data, pPacket->length), re-reading the value in pPacket->length, which is now 32.
The victim ends up copying 32 bytes into a 16-byte buffer, overflowing it.
Operation | API | Mitigations |
Image Sections | CreateProcess LoadLibrary | 1. Enable Page Hashes |
Data Sections | MapViewOfFile ZwMapViewOfSection | 1. Avoid double reads\ 2. Copy the file to a heap buffer before processing\ 3. Prevent paging via MmProbeAndLockPages/VirtualLock |
Regular I/O | ReadFile ZwReadFile | 1. Avoid double reads\ 2. Copy the file to a heap buffer before processing |
Protect Your Business Emails From Spoofing, Phishing & BEC with AI-Powered Security | Free Demo
A critical authentication bypass vulnerability in SonicWall firewalls, tracked as CVE-2024-53704, is now being actively…
Researchers have identified a new backdoor malware, written in Go programming language, that leverages Telegram…
A recently discovered Python script has been flagged as a potential cybersecurity threat due to…
A website launched by Elon Musk's Department of Government Efficiency (DOGE) has been found to…
The notorious Lazarus Group, a North Korean Advanced Persistent Threat (APT) group, has been linked…
Job seekers have become the target of a sophisticated ransomware campaign in a recent cybersecurity…