Skip to content

Commit 84c7cb6

Browse files
committed
Add new multicast DNS spoofing tool Dementor
1 parent e862ee8 commit 84c7cb6

File tree

1 file changed

+29
-16
lines changed

1 file changed

+29
-16
lines changed

src/generic-methodologies-and-resources/pentesting-network/spoofing-llmnr-nbt-ns-mdns-dns-and-wpad-and-relay-attacks.md

Lines changed: 29 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
- **LLMNR, NBT-NS, and mDNS**:
1010
- Microsoft and other operating systems use LLMNR and NBT-NS for local name resolution when DNS fails. Similarly, Apple and Linux systems use mDNS.
1111
- 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.
1313
- Further information on service impersonation using Responder can be found [here](spoofing-llmnr-nbt-ns-mdns-dns-and-wpad-and-relay-attacks.md).
1414

1515
### Web Proxy Auto-Discovery Protocol (WPAD)
@@ -18,14 +18,20 @@
1818
- Discovery is facilitated via DHCP, DNS, or fallback to LLMNR and NBT-NS if DNS fails.
1919
- Responder can automate WPAD attacks, directing clients to malicious WPAD servers.
2020

21-
### Responder for Protocol Poisoning
21+
### Responder/Dementor for Protocol Poisoning
2222

2323
- **Responder** is a tool used for poisoning LLMNR, NBT-NS, and mDNS queries, selectively responding based on query types, primarily targeting SMB services.
2424
- It comes pre-installed in Kali Linux, configurable at `/etc/responder/Responder.conf`.
2525
- Responder displays captured hashes on the screen and saves them in the `/usr/share/responder/logs` directory.
2626
- It supports both IPv4 and IPv6.
2727
- Windows version of Responder is available [here](https://github.com/lgandx/Responder-Windows).
2828

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+
2935
#### Running Responder
3036

3137
- To run Responder with default settings: `responder -I <Interface>`
@@ -34,16 +40,23 @@
3440
- WPAD impersonation can be activated with: `responder -I <Interface> --wpad`
3541
- NetBIOS requests can be resolved to the attacker's IP, and an authentication proxy can be set up: `responder.py -I <interface> -Pv`
3642

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+
3750
### DHCP Poisoning with Responder
3851

3952
- Spoofing DHCP responses can permanently poison a victim's routing information, offering a stealthier alternative to ARP poisoning.
4053
- It requires precise knowledge of the target network's configuration.
4154
- Running the attack: `./Responder.py -I eth0 -Pdv`
4255
- This method can effectively capture NTLMv1/2 hashes, but it requires careful handling to avoid network disruption.
4356

44-
### Capturing Credentials with Responder
57+
### Capturing Credentials with Responder/Dementor
4558

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.
4760
- Attempts can be made to downgrade to NetNTLMv1 or disable ESS for easier credential cracking.
4861

4962
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:
204217
| **Service ticket / TGS-REQ ↔ REP** | Bound to one **SPN**; encrypted with the SPN owner’s key | interchangeable if SPNs share account |
205218
| **AP-REQ** | Client sends `TGS` to the service | **what we steal & replay** |
206219

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.
209222
* 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`.
210223

211224
- 2. **What must be true to relay Kerberos**
212225

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..
216229
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.
217230
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.
218231

@@ -282,17 +295,17 @@ You now own **NT AUTHORITY\SYSTEM**.
282295

283296
### **Detection**
284297

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.
288301
* Watch changes to `msDS-AllowedToActOnBehalfOfOtherIdentity` or `msDS-KeyCredentialLink` attributes.
289302

290303
## **Hardening**
291304

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.
296309
5. Alert on **Event 4649** and unexpected loopback Kerberos logons.
297310

298311

0 commit comments

Comments
 (0)