A new attack chain campaign has been discovered, which involves the exploitation of CVE-2023-36884 and CVE-2023-36584. CVE-2023-36884 was a remote code execution vulnerability, and CVE-2023-36584 was a security bypass vulnerability that can be used to exploit CVE-2023-36884.
CVE-2023-36884 was given a severity rating of 8.8 (High), and CVE-2023-36584’s severity rating was 5.4 (Medium). However, the threat actor attributed to the exploit chain was a pro-Russian APT group known as Storm-0978 aka RomCom Group.
In the upcoming webinar, Karthik Krishnamoorthy, CTO and Vivek Gopalan, VP of Products at Indusface demonstrate how APIs could be hacked. The session will cover: an exploit of OWASP API Top 10 vulnerability, a brute force account take-over (ATO) attack on API, a DDoS attack on an API, how a WAAP could bolster security over an API gateway
Windows Search RCE Flaw
As part of the initial attack chain, a .docx file was found that was not tagged as MotW (Mark of the Web), leading to the “protected view” being disabled when opening the document.
An MS-DOCX file is a compressed ZIP archive file that consists of an XML file at word/document.xml and consists of the document’s text and formatting.
However, the document.xml file consists of an anchor for imported external content element altchunk which imports an RTF content. This RTF file afchunk.rtf contains two malicious Object Linking and Embedding (OLE) objects.
First Stage of the Exploit Chain
The malicious OLE objects in afchunk.rtf requests content from two URLs,
If the victim hosts accesses \\104.234.239[.]26\share1\MSHTML_C7\file001.url, the victim’s NTLM credentials, which contain the hostname and username, leaked to the threat actor-controlled SMB server. However, the URLs present two files: file001.url and file001.htm.
Abusing the Windows Search Handler
The file001.htm has a JS that uses iframes to load multiple files. The first filename consists of the victim’s IP address and five five-digit identifier that ends with file001.search-ms. Following this, three HTTP requests using the string .zip_k* in the URLs are made.
New MotW Bypass – CVE-2023-36584
Windows search scans for extensions of each file to determine the contents. When it finds internet files, it writes the file to a temporary directory and adds MotW to it. This operation has a race condition that can be exploited to bypass the MitW.
There were three techniques that were related to Server Side ZIP Swap (Metadata TOCTOU), Server Side Delay (Close Operation) and Server Side Delay (Read Operation).
This technique is exploitable when the ZIP archive is downloaded from a remote server. The zipfldr.dll file reads the ZIP file’s header and caches the data in memory.
Once the file header is read, the ZIP with MotW can be replaced with a legitimate file name using the TOCTOU condition, bypassing the MotW to the file.
Server Side Delay – Close Operation
This technique is associated with the Zone. Identifier ADS, which can be provided with a time delay using a SMB server. This technique was possible due to the SMB2 protocol’s close operation, which contains a close request and a close response.
Server Side Delay – Read Operation
Windows reads a portion of large files that are from a remote share. If there is random data at the end of the file, the writing of the file can be delayed from the SMB server before Windows adds MotW to the file.
The file is usable during the writing process as it is opened with read/write dwShareMode.
A complete report about the attack chain has been published by Palo Alto, which provides detailed information about exploitation techniques, methods of operation, and other information.