# MITM6 IPv6 Attack

### Overview

The MITM6 attack is a network-based exploitation technique that targets how Windows environments handle IPv6 by default. Even in organizations that don’t actively use IPv6, Windows systems automatically send DHCPv6 requests when they boot or connect to the network.

An attacker running **mitm6** can respond to these requests as a rogue IPv6 DHCP server, assigning the victim machine a malicious DNS server address. Once the victim trusts the attacker’s DNS, all name resolution requests can be intercepted and redirected.

In combination with **ntlmrelayx** from Impacket, this attack becomes especially powerful. By spoofing WPAD (Web Proxy Auto-Discovery Protocol) and relaying NTLM authentication attempts, the attacker can capture or relay credentials to other services.

### Prerequisites

1. IPv6 Enabled on the Network(Default)
2. No Secure IPv6 Configuration
3. Attacker on the Same Network
4. NTLM-Based Authentication in Use(Fallback is also fine)
5. Relay Target Available(Eg: LDAP, LDAPS, SMB etc)

### Steps

1. Run **ntlmrelayx** first and then **mitm6** to spoof IPv6 DNS/DHCPv6.

   ```bash
   impacket-ntlmrelayx -6 -t ldap://dc.toffee.bth -wh anywpad.domain.local -l lootme
   sudo mitm6 -d sequel.htb
   ```
2. As clients boot or reconnect to the network, they use the attacker as DNS and also send authentication attempts.
3. Possible outcomes:
   * LDAP privilege escalation
   * Adding user to privileged groups
   * AD CS certificate abuse
   * DCSync rights assignment
4. Depending on relay target, we can perform DCSync, dump hashes, etc.

### Attack Flow

<figure><img src="/files/io3d28Fo2HW8h4qyMPG5" alt=""><figcaption></figcaption></figure>

### Mitigations

1. Disable WPAD via group policies.
2. Enable LDAP Signing and LDAP Channel Binding.
3. Block DHCPv6 Traffic. Can use Windows Firewall Group Policies.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://gokulkarthik.gitbook.io/pentesting-checklist/windows-and-active-directory/initial-attack-vectors/mitm6-ipv6-attack.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
