> 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.md).

# ローカル権限昇格と資格情報

UACバイパス、AlwaysInstallElevated、Mimikatz、SAM抽出、LSASSシークレット、展開ファイルに保存された資格情報を扱うWindowsのローカル権限昇格と資格情報アクセスのメモ。

これらのノートでは、ローカルアクセスを取得した後に役立つ Windows の確認項目を扱います。UAC の設定、昇格した MSI インストール、メモリ内の認証情報、レジストリハイブ、および再利用可能な秘密情報を含む展開ファイルです。

## ローカル確認

1. 現在のトークン、グループ所属、整合性レベル、UAC の状態を確認します。
2. AlwaysInstallElevated の両方のレジストリキーが有効か確認します。
3. ローカルの認証情報ソースを探します: LSASS、SAM、LSA シークレット、レジストリ値、展開ファイル、アプリケーション設定です。
4. 権限昇格を試みる前に、ラボまたは許可された評価環境で各発見事項を検証してください。

## 認証情報の迅速な仕分け

まずは手早く影響の少ない確認を行います。使い回されたローカル管理者パスワードや展開用シークレットは、カーネルエクスプロイトよりも速く安全なことがよくあります。

```cmd
whoami /all
cmdkey /list
net use
dir C:\Users\ /a
```

```powershell
Get-ChildItem -Path C:\Users -Force -ErrorAction SilentlyContinue
Get-Content "$env:APPDATA\Microsoft\Windows\PowerShell\PSReadLine\ConsoleHost_history.txt" -ErrorAction SilentlyContinue
```

確認するとよい場所:

* Windows の展開ファイル: `unattend.xml`, `Autounattend.xml`、および Sysprep の残骸。
* シェル履歴: PowerShell PSReadLine、コンソールのトランスクリプト、および管理者用補助スクリプト。
* アプリケーション設定: IIS `アップロードバイパス、SMBベースのリバースシェル、そしてJuicy Potatoによる権限昇格。`、データベースクライアント、バックアップツール、VPN クライアント、および内部エージェント。
* レジストリ値: autologon、PuTTY セッション、WinSCP セッション、RDP 履歴、そして古いサードパーティ製ソフトウェアのキー。
* ローカルハイブ: `SAM`, `SYSTEM`、および `SECURITY` 現在の権限で安全にエクスポートできる場合。

## レジストリの簡易確認

レジストリの発見事項は通常、3 つに分類されます。インストールポリシーの悪用、保存された認証情報、または通常ユーザーが変更できる自動実行パスです。

```cmd
reg query HKCU\Software\Policies\Microsoft\Windows\Installer /v AlwaysInstallElevated
reg query HKLM\Software\Policies\Microsoft\Windows\Installer /v AlwaysInstallElevated
reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon"
reg query HKCU\Software\Microsoft\Windows\CurrentVersion\Run
reg query HKLM\Software\Microsoft\Windows\CurrentVersion\Run
```

自動実行については、レジストリ値だけで終わらせないでください。ファイルパスと親ディレクトリの権限も確認します:

```cmd
icacls "C:\Path\To\Autorun.exe"
icacls "C:\Path\To"
```

## 手法

<table data-view="cards" data-full-width="false" data-search="false"><thead><tr><th></th><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><h3><i class="fa-box-open" style="color:$primary;">:box-open:</i></h3></td><td><h4>AlwaysInstallElevated</h4></td><td>Windows のローカル権限昇格のために、AlwaysInstallElevated の MSI 設定不備を検出し、悪用します。</td><td><a href="/ja/windows-vulnerabilities/local-privilege-escalation-and-credentials/alwaysinstallelevated-windows-privilege-escalation.md">AlwaysInstallElevatedによるWindows権限昇格</a></td></tr><tr><td><h3><i class="fa-user-shield" style="color:$primary;">:user-shield:</i></h3></td><td><h4>UAC バイパス</h4></td><td>Windows の UAC レベルを確認し、許可されたラボで UAC バイパスの挙動を検証します。</td><td><a href="/ja/windows-vulnerabilities/local-privilege-escalation-and-credentials/bypass-uac-user-account-control.md">UACバイパス</a></td></tr><tr><td><h3><i class="fa-key" style="color:$primary;">:key:</i></h3></td><td><h4>Mimikatz によるハッシュダンプ</h4></td><td>許可されたラボで、Mimikatz または Meterpreter Kiwi を使用して Windows のハッシュとシークレットを抽出します。</td><td><a href="/ja/windows-vulnerabilities/local-privilege-escalation-and-credentials/windows-hash-dumping-with-mimikatz.md">MimikatzによるWindowsハッシュダンプ</a></td></tr><tr><td><h3><i class="fa-file-lines" style="color:$primary;">:file-lines:</i></h3></td><td><h4>Windows ファイル内の認証情報</h4></td><td>展開ファイル、応答ファイル、設定ファイルに保存された Windows の認証情報を探します。</td><td><a href="/ja/windows-vulnerabilities/local-privilege-escalation-and-credentials/windows-credentials-in-files.md">Windowsファイル内の資格情報</a></td></tr><tr><td><h3><i class="fa-key" style="color:$primary;">:key:</i></h3></td><td><h4>cmdkey による保存済み認証情報</h4></td><td>Windows 資格情報マネージャーに保存された認証情報を特定し、runas /savecred により特権実行が可能か評価します。</td><td><a href="/ja/windows-vulnerabilities/local-privilege-escalation-and-credentials/stored-credentials-with-cmdkey.md">cmdkeyで保存された資格情報</a></td></tr><tr><td><h3><i class="fa-key" style="color:$primary;">:key:</i></h3></td><td><h4>Mimikatz による平文パスワード</h4></td><td>許可されたラボで、Mimikatz を使って LSASS のログオンセッションから平文の認証情報を抽出し、検証します。</td><td><a href="/ja/windows-vulnerabilities/local-privilege-escalation-and-credentials/cleartext-passwords-with-mimikatz.md">Mimikatz による平文パスワード</a></td></tr></tbody></table>


---

# 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.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.
