> 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/kerberos/as-rep-roasting-with-wireshark.md).

# 使用 Wireshark 进行 AS-REP Roasting

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

### 手动观察

在实验室中，我们可以在身份验证尝试期间使用 Wireshark 抓包。

我们特别观察到：

```bash
AS-REQ
AS-REP
```

<figure><img src="https://1574813340-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-779f9c1d3758cda52732a345b95d9ce547fa68b5%2F%7B6132E58F-EE11-4BDC-A7C9-F04B2A124A4F%7D.png?alt=media" alt=""><figcaption></figcaption></figure>

在 Kerberos 数据包中，我们可以分析：

```bash
padata
padata-value
加密算法
盐值
```

<figure><img src="https://1574813340-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-b091377529565ea9e14a2ec1f28a5a6bf990b3ce%2F%7BFEB3F6F8-0F32-44F5-9C43-D4FFD878F4A4%7D.png?alt=media" alt=""><figcaption></figcaption></figure>

这些值可用于重建哈希，格式兼容 John 或 Hashcat。

<figure><img src="https://1574813340-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-a737d78df3fdfb7c4e5bb4d1c7de1b6b514c082d%2F%7B4BA06317-6918-4F5C-90EE-37E8215F8BDA%7D.png?alt=media" alt=""><figcaption></figcaption></figure>

### Hashcat 19900 格式

对于某些与 Kerberos 预认证相关的情况，Hashcat 可以使用以下模式：

```
19900
```

{% embed url="<https://hashcat.net/wiki/doku.php?id=example_hashes>" %}

<figure><img src="https://1574813340-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-b3893825d8df1d1dccb97e78cd7bce5abecfb9ef%2F%7B86797DC1-24E5-4962-A4EC-EE071997E113%7D.png?alt=media" alt=""><figcaption></figcaption></figure>

示例结构：

```
$krb5pa$18$user$DOMAIN$SALT$CIPHER
```

适用于实验室的示例：

{% code overflow="wrap" %}

```bash
$krb5pa$18$Administrador$WHOAMI.LOCAL$WIN-D4TRD7S7IHPAdministrador$96c289009b05181bfd32062962740b1b1ce5f74eb12e0266cde74e81094661addab08c0c1a178882c91a0ed89ae4e0e68d2820b9cce69770
```

{% endcode %}

然后，我们可以运行 John：

{% code overflow="wrap" %}

```bash
john --wordlist=passwords.txt hash
```

{% endcode %}

<figure><img src="https://1574813340-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-90b0f6a2dc11eb46b903ddf0ecd3caffa532ca84%2Fimage%20(3285).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/kerberos/as-rep-roasting-with-wireshark.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.
