Original Article Text

Click to Toggle View

Phishing emails abuse Windows search protocol to push malicious scripts. A new phishing campaign uses HTML attachments that abuse the Windows search protocol (search-ms URI) to push batch files hosted on remote servers that deliver malware. The Windows Search protocol is a Uniform Resource Identifier (URI) that enables applications to open Windows Explorer to perform searches using specific parameters. While most Windows searches will look at the local device's index, it is also possible to force Windows Search to query file shares on remote hosts and use a custom title for the search window. Attackers can exploit this functionality to share malicious files on remote servers, as Prof. Dr. Martin Johns first highlighted in a 2020 thesis. In June 2022, security researchers devised a potent attack chain that also exploited a Microsoft Office flaw to launch searches directly from Word documents. Trustwave SpiderLabs researchers now report that this technique is used in the wild by threat actors who are using HTML attachments to launch Windows searches on attackers' servers. Abusing Windows Search The recent attacks described in the Trustwave report start with a malicious email carrying an HTML attachment disguised as an invoice document placed within a small ZIP archive. The ZIP helps evade security/AV scanners that may not parse archives for malicious content. The HTML file uses the <meta http-equiv= "refresh"> tag to cause the browser to automatically open a malicious URL when the HTML document is opened. If the meta refresh fails due to browser settings blocking redirects or other reasons, an anchor tag provides a clickable link to the malicious URL, acting as a fallback mechanism. This, however, requires user action. In this case, the URL is for the Windows Search protocol to perform a search on a remote host using the following parameters: Next, the search retrieves the list of files from the remote server, displaying a single shortcut (LNK) file named as an invoice. If the victim clicks on the file, a batch script (BAT) hosted on the same server is triggered. Trustwave couldn't establish what the BAT does, as the server was down at the time of their analysis, but the potential for risky operations is high. To defend against this threat, Trustwave recommends deleting registry entries associated with the search-ms/search URI protocol by executing the following commands: However, this should be done carefully, as it would also prevent legitimate applications and integrated Windows features that rely on this protocol, from working as intended.

Daily Brief Summary

MALWARE // Phishing Campaign Exploits Windows Search to Distribute Malware

A new phishing campaign uses HTML attachments to exploit the Windows search protocol to trigger downloads of malicious scripts.

Attackers are utilizing the search-ms URI, which lets applications open Windows Explorer for searches, to access files on remote servers.

Originally exposed in academic research by Prof. Dr. Martin Johns, this technique has been actively deployed by cybercriminals to deliver malware.

The phishing emails disguise these HTML attachments as invoices within ZIP archives to bypass antivirus scanners.

If a recipient opens the HTML file, it automatically directs the browser to a malicious URL via a meta-refresh tag. If this fails, a clickable link acts as a fallback.

Upon clicking an innocuous-looking file link shown in the search, a batch script from the remote server is executed, the specifics of which were unknown as the server was offline during analysis.

Trustwave SpiderLabs suggests disabling the search-ms/search URI protocol in the registry to mitigate risks, but advises caution as it could affect legitimate applications.