Linux File Transfer

This sections contains different methods to transfer a file to or from a windows machine.

Transfer files to target machine

Base64 Encoding / Decoding

# Check File MD5 hash
md5sum id_rsa

# Encode SSH Key to Base64
cat id_rsa |base64 -w 0;echo

# We copy this content, paste it onto our Linux target machine, and use base64 with the option `-d' to decode it.

# Decode the File
echo -n 'LS0t---S0tLQo=' | base64 -d > id_rsa

# Confirm the MD5 Hashes Match
md5sum id_rsa

Web Downloads with Wget and cURL

# Download a File Using cURL
curl -o /tmp/LinEnum.sh /rebootuser/LinEnum/master/LinEnum.sh

# Download a File Using wget
wget <https://rebootuser/LinEnum/master/LinEnum.sh> -O /tmp/LinEnum.sh

Fileless Attacks Using Linux

Download with Bash (/dev/tcp)

SSH Downloads

Get files from target host to our attack machine

Web Upload

Alternative Web Server Method

SCP Upload

Last updated