> 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/acl-security-descriptors-and-permissions/vulnerable-environment-with-vulnad.md).

# 使用 VulnAD 创建易受攻击环境

在这个实验中，我们使用脚本在 Active Directory 中有意创建存在漏洞的用户、组和权限。

目标是能够练习：

* 识别脆弱的 ACL；
* 理解权限路径；
* 利用配置不当的权限；
* 在 BloodHound 中可视化关系。

加载脚本：

{% embed url="<https://github.com/safebuffer/vulnerable-AD/blob/master/vulnad.ps1>" %}

{% code overflow="wrap" %}

```powershell
. ./vulnap.ps1
```

{% endcode %}

然后我们执行：

```powershell
Invoke-VulnAD -UsersLimit 100 -DomainName "whoami.local"
```

<figure><img src="/files/f7666044e095b878d58ae989d984be84e66f9221" alt=""><figcaption></figcaption></figure>

此命令会在域中创建多个对象：

* 用户；
* 组；
* 权限关系；
* 存在漏洞的 ACL；
* 可被利用的权限路径。

<figure><img src="/files/03c9f07480a3df76b9da66b665cccf04631122da" 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/acl-security-descriptors-and-permissions/vulnerable-environment-with-vulnad.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.
