|
9 | 9 | - **LLMNR, NBT-NS, and mDNS**: |
10 | 10 | - Microsoft and other operating systems use LLMNR and NBT-NS for local name resolution when DNS fails. Similarly, Apple and Linux systems use mDNS. |
11 | 11 | - These protocols are susceptible to interception and spoofing due to their unauthenticated, broadcast nature over UDP. |
12 | | - - [Responder](https://github.com/lgandx/Responder) can be used to impersonate services by sending forged responses to hosts querying these protocols. |
| 12 | + - [Responder](https://github.com/lgandx/Responder) and [Dementor](https://github.com/MatrixEditor/Dementor) can be used to impersonate services by sending forged responses to hosts querying these protocols. |
13 | 13 | - Further information on service impersonation using Responder can be found [here](spoofing-llmnr-nbt-ns-mdns-dns-and-wpad-and-relay-attacks.md). |
14 | 14 |
|
15 | 15 | ### Web Proxy Auto-Discovery Protocol (WPAD) |
|
18 | 18 | - Discovery is facilitated via DHCP, DNS, or fallback to LLMNR and NBT-NS if DNS fails. |
19 | 19 | - Responder can automate WPAD attacks, directing clients to malicious WPAD servers. |
20 | 20 |
|
21 | | -### Responder for Protocol Poisoning |
| 21 | +### Responder/Dementor for Protocol Poisoning |
22 | 22 |
|
23 | 23 | - **Responder** is a tool used for poisoning LLMNR, NBT-NS, and mDNS queries, selectively responding based on query types, primarily targeting SMB services. |
24 | 24 | - It comes pre-installed in Kali Linux, configurable at `/etc/responder/Responder.conf`. |
25 | 25 | - Responder displays captured hashes on the screen and saves them in the `/usr/share/responder/logs` directory. |
26 | 26 | - It supports both IPv4 and IPv6. |
27 | 27 | - Windows version of Responder is available [here](https://github.com/lgandx/Responder-Windows). |
28 | 28 |
|
| 29 | +- **Dementor** expands on the topics of multicast poisoning and additionally acts as a rogue service provider (including CUPS RCE support) |
| 30 | +- Overall structure is similar to **Responder** with more granular configuration. (default is here: [Dementor.toml](https://github.com/MatrixEditor/dementor/blob/master/dementor/assets/Dementor.toml)) |
| 31 | +- Compatibility between **Dementor** and **Responder** is given here: [Compatibility Matrix](https://matrixeditor.github.io/dementor/compat.html) |
| 32 | +- Intro and Documentation here: [Dementor - Docs](https://matrixeditor.github.io/dementor/intro.html) |
| 33 | +- Fixes capture issues introduced by Responder on certain protocols |
| 34 | + |
29 | 35 | #### Running Responder |
30 | 36 |
|
31 | 37 | - To run Responder with default settings: `responder -I <Interface>` |
|
34 | 40 | - WPAD impersonation can be activated with: `responder -I <Interface> --wpad` |
35 | 41 | - NetBIOS requests can be resolved to the attacker's IP, and an authentication proxy can be set up: `responder.py -I <interface> -Pv` |
36 | 42 |
|
| 43 | +#### Running Dementor |
| 44 | + |
| 45 | +- With detault settings applied: `Dementor -I <interface>` |
| 46 | +- With default settings in analysis mode: `Dementor -I <interface> -A` |
| 47 | +- Automatic NTLM session downgrade (ESS): `Dementor -I <interface> -O NTLM.ExtendedSessionSecurity=Off` |
| 48 | +- Run current session with custom config: `Dementor -I <interface> --config <file.toml>` |
| 49 | + |
37 | 50 | ### DHCP Poisoning with Responder |
38 | 51 |
|
39 | 52 | - Spoofing DHCP responses can permanently poison a victim's routing information, offering a stealthier alternative to ARP poisoning. |
40 | 53 | - It requires precise knowledge of the target network's configuration. |
41 | 54 | - Running the attack: `./Responder.py -I eth0 -Pdv` |
42 | 55 | - This method can effectively capture NTLMv1/2 hashes, but it requires careful handling to avoid network disruption. |
43 | 56 |
|
44 | | -### Capturing Credentials with Responder |
| 57 | +### Capturing Credentials with Responder/Dementor |
45 | 58 |
|
46 | | -- Responder will impersonate services using the above-mentioned protocols, capturing credentials (usually NTLMv2 Challenge/Response) when a user attempts to authenticate against the spoofed services. |
| 59 | +- Responder/Dementor will impersonate services using the above-mentioned protocols, capturing credentials (usually NTLMv2 Challenge/Response) when a user attempts to authenticate against the spoofed services. |
47 | 60 | - Attempts can be made to downgrade to NetNTLMv1 or disable ESS for easier credential cracking. |
48 | 61 |
|
49 | 62 | It's crucial to note that employing these techniques should be done legally and ethically, ensuring proper authorization and avoiding disruption or unauthorized access. |
@@ -204,15 +217,15 @@ For detailed info about this attack check: |
204 | 217 | | **Service ticket / TGS-REQ ↔ REP** | Bound to one **SPN**; encrypted with the SPN owner’s key | interchangeable if SPNs share account | |
205 | 218 | | **AP-REQ** | Client sends `TGS` to the service | **what we steal & replay** | |
206 | 219 |
|
207 | | -* Tickets are encrypted with the **password-derived key of the account that owns the SPN**. |
208 | | -* The **Authenticator** inside the AP-REQ has a 5-minute timestamp; replay inside that window is valid until the service cache sees a duplicate. |
| 220 | +* Tickets are encrypted with the **password-derived key of the account that owns the SPN**. |
| 221 | +* The **Authenticator** inside the AP-REQ has a 5-minute timestamp; replay inside that window is valid until the service cache sees a duplicate. |
209 | 222 | * Windows rarely checks if the SPN string in the ticket matches the service you hit, so a ticket for `CIFS/HOST` normally decrypts fine on `LDAP/HOST`. |
210 | 223 |
|
211 | 224 | - 2. **What must be true to relay Kerberos** |
212 | 225 |
|
213 | | -1. **Shared key:** source and target SPNs belong to the same computer account (default on Windows servers). |
214 | | -2. **No channel protection:** SMB/LDAP signing off and EPA off for HTTP/LDAPS. |
215 | | -3. **You can intercept or coerce authentication:** LLMNR/NBNS poison, DNS spoof, **PetitPotam / DFSCoerce RPC**, fake AuthIP, rogue DCOM, etc.. |
| 226 | +1. **Shared key:** source and target SPNs belong to the same computer account (default on Windows servers). |
| 227 | +2. **No channel protection:** SMB/LDAP signing off and EPA off for HTTP/LDAPS. |
| 228 | +3. **You can intercept or coerce authentication:** LLMNR/NBNS poison, DNS spoof, **PetitPotam / DFSCoerce RPC**, fake AuthIP, rogue DCOM, etc.. |
216 | 229 | 4. **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. |
217 | 230 | 5. 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. |
218 | 231 |
|
@@ -282,17 +295,17 @@ You now own **NT AUTHORITY\SYSTEM**. |
282 | 295 |
|
283 | 296 | ### **Detection** |
284 | 297 |
|
285 | | -* Surge in **Event 4769** for `CIFS/`, `HTTP/`, `LDAP/` from the same source within seconds. |
286 | | -* **Event 4649** on the service indicates replay detected. |
287 | | -* Kerberos logon from **127.0.0.1** (relay to local SCM) is highly suspicious—map via Sigma rule in KrbRelayUp docs. |
| 298 | +* Surge in **Event 4769** for `CIFS/`, `HTTP/`, `LDAP/` from the same source within seconds. |
| 299 | +* **Event 4649** on the service indicates replay detected. |
| 300 | +* Kerberos logon from **127.0.0.1** (relay to local SCM) is highly suspicious—map via Sigma rule in KrbRelayUp docs. |
288 | 301 | * Watch changes to `msDS-AllowedToActOnBehalfOfOtherIdentity` or `msDS-KeyCredentialLink` attributes. |
289 | 302 |
|
290 | 303 | ## **Hardening** |
291 | 304 |
|
292 | | -1. **Enforce LDAP & SMB signing + EPA** on every server. |
293 | | -2. **Split SPNs** so HTTP isn’t on the same account as CIFS/LDAP. |
294 | | -3. Patch coercion vectors (PetitPotam KB5005413, DFS, AuthIP). |
295 | | -4. Set **`ms-DS-MachineAccountQuota = 0`** to stop rogue computer joins. |
| 305 | +1. **Enforce LDAP & SMB signing + EPA** on every server. |
| 306 | +2. **Split SPNs** so HTTP isn’t on the same account as CIFS/LDAP. |
| 307 | +3. Patch coercion vectors (PetitPotam KB5005413, DFS, AuthIP). |
| 308 | +4. Set **`ms-DS-MachineAccountQuota = 0`** to stop rogue computer joins. |
296 | 309 | 5. Alert on **Event 4649** and unexpected loopback Kerberos logons. |
297 | 310 |
|
298 | 311 |
|
|
0 commit comments