Skip to content

Back to the catalog

dfir.chwriteup

Abusing the “search-ms” URI protocol handler

A DFIR analysis by dfir.ch dissecting a real-world phishing campaign that abuses the Windows "search-ms" URI protocol handler embedded in an HTML attachment ("Booking_Confirmation.html") to trigger a WebDAV connection via rundll32/davclnt.dll, present a spoofed Explorer search result, and lure the victim into executing an LNK file. The LNK launches a headless conhost.exe pulling an obfuscated batch script (new.bat) over a trycloudflare.com tunnel, which drops a decoy PDF, downloads a full Python interpreter (FTSP.zip) and additional scripts, and ultimately performs shellcode injection. The post also documents Sysmon process-create telemetry and the HKCU WordWheelQuery registry key as forensic artifacts of the search-ms query.

TL;DR Walkthrough of a phishing campaign abusing Windows' search-ms handler and WebDAV to chain LNK, obfuscated batch, and Python-based shellcode injection, with Sysmon and WordWheelQuery forensic artifacts.
Document

What it is

A DFIR.ch walkthrough of a live sample of the "search-ms" URI phishing chain first documented by Trustwave (whose copy of the payload server was already offline). The author recovered a still-live sample from VirusTotal and reconstructs the full chain — the delivered file is an HTML attachment ("Booking_Confirmation.html") that auto-triggers a fake Windows Search result over WebDAV, serving an LNK ("e_Statement00844301.lnk") that runs conhost.exe --headless against a batch script hosted on a trycloudflare.com tunnel.

How it works

Opening the HTML alone triggers the pop-up — no link click is needed. The search-ms handler searches a remote WebDAV server for the term e_Statement, and a spoofable displayname parameter (set to "Downloads") disguises the result window. WebDAV runs over HTTP, initiated via svchost.exe -k LocalService -p -s WebClient spawning rundll32.exe ... davclnt.dll,DavSetCookie. The LNK then chains conhost --headless → cmd /c \\...@SSL\DavWWWRoot\new.bat.

What to do — detections

The value here is the concrete forensic/hunting artifacts, most of which the summary only gestures at:

  • Hunt for the WebDAV client initiation, a strong signal since it precedes the whole chain:
rundll32.exe C:\Windows\system32\davclnt.dll,DavSetCookie <host>@SSL https://<host>/
  • Hunt for conhost.exe --headless invoking a UNC/WebDAV path (\\...@SSL\DavWWWRoot\...).
  • Deobfuscate the new.bat/startuppp.bat batch obfuscation by prefixing each line with an echo (technique credited to OneConsult) to render readable code.
  • Payload indicators (this sample): C2 float-suppose-msg-pulling.trycloudflare.com; decoy kyvbsa.pdf; DXJS.zip; staged startuppp.bat. The batch uses timeout /t 5 to let the decoy PDF open before the infection routine runs.

Caveats

  • Blocking SMB (445/TCP) does not stop this — WebDAV uses HTTP, so egress SMB filtering is ineffective; the author cites Trellix on this point.
  • IOCs are tied to one recovered sample; the Cloudflare tunnel domain is disposable and will differ across campaigns. The behavioral signatures (davclnt.dll DavSetCookie, conhost --headless over WebDAV) are the durable detections.
flowchart TD
    A[Open HTML attachment] -->|auto pop-up| B{Open Explorer?}
    B -->|cancel| Z[chain stops]
    B -->|open| C[WebDAV over HTTP<br/>davclnt.dll DavSetCookie]
    C --> D[Fake search result: LNK]
    D -->|security warning, user consents| E[conhost --headless new.bat]
    E --> F[decoy PDF]
    E --> G[DXJS.zip + startuppp.bat]

Organisations named here

  • WordWheelQuery

Technologies named here

  • davclnt.dll
  • Windows
  • Windows explorer
  • Sysmon
  • CyberChef
  • Windows Search
  • Google Chrome
  • VirusTotal
  • conhost.exe --headless
  • Python 3.12
  • PowerShell
  • Chrome
  • Cloudflare

Techniques named here

  • search-ms URI protocol handler abuse
  • WebDAV abuse for remote file execution
  • Malicious LNK file execution
  • Batch script obfuscation
  • Decoy document / user deception
  • Staged payload download via PowerShell
  • Hidden folder for staging
  • Shellcode injection via Python