> 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/binary-analysis/userinfo-exe-binary-analysis.md).

# UserInfo.exeのバイナリ解析

dnSpyでUserInfo.exeを解析して動作を理解し、.NETバイナリから機密情報を抽出する。

このノートでは、シンプルな Windows `.NET` バイナリ解析のワークフローを示します。制御下での実行、動作の観察、そして dnSpy による検査を通じて機密情報を回収します。

## 準備

ラボ環境を準備し、アーカイブを転送し、必要に応じて名前解決を設定します。

<figure><img src="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-336c5666012c2a04d10a99a66d151be66d39e88f%2Fimage%20(1532).png?alt=media" alt="UserInfo.exe lab preparation"><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-d437fff4d6ce1f99c82def2a9ae4f2f5c5137e65%2Fimage%20(1533).png?alt=media" alt="UserInfo.exe archive transferred"><figcaption></figcaption></figure>

## 制御下での実行

```powershell
./UserInfo.exe find -first * -last *
```

<figure><img src="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-5f14fb65a246282ec34008365edfd123bafc9be9%2Fimage%20(1534).png?alt=media" alt="UserInfo.exe controlled execution"><figcaption></figcaption></figure>

## dnSpy で解析

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

<figure><img src="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-14eda0b0e6a7e38c03998a0c8c761c2bfaa37f14%2Fimage%20(1535).png?alt=media" alt="UserInfo.exe opened in dnSpy"><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-68c6479e98ea649406632bb6893d719647ad6b78%2Fimage%20(1537).png?alt=media" alt="Searching UserInfo.exe code in dnSpy"><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-e1ca7d885fca23b756d5f4e2c062b57004e48b42%2Fimage%20(1538).png?alt=media" alt="Breakpoint set in dnSpy"><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-fccbe4d7d63d2f9e8004e29d9950cd9a4f61e5d8%2Fimage%20(1539).png?alt=media" alt="Recovered runtime secret in dnSpy"><figcaption></figcaption></figure>

## 重要ポイント

* `.NET` バイナリはしばしば簡単に逆コンパイルできます。
* ハードコードされた秘密情報は漏えい済みとして扱うべきです。
* 静的解析は、ラボでの制御下での実行と組み合わせるべきです。


---

# 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/binary-analysis/userinfo-exe-binary-analysis.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.
