Linux File Transfers
Linux File Transfers
Base64 Encoding/Decoding
Encoding and Transferring Files
# Check original file hash
md5sum id_rsa
4e301756a07ded0a2dd6953abf015278 id_rsa
# Encode file to base64
cat id_rsa | base64 -w 0
# Result: LS0tLS1CRUdJTiBPUEVOU1NIIFBSSVZBVEUgS0VZLS0tLS0KYjNCbGJuTnphQzFyWlhr...Decoding on Target System
# Decode base64 string to file
echo -n 'LS0tLS1CRUdJTiBPUEVOU1NIIFBSSVZBVEUgS0VZLS0tLS0KYjNCbGJuTnph...' | base64 -d > id_rsa
# Verify file integrity
md5sum id_rsa
4e301756a07ded0a2dd6953abf015278 id_rsaWeb Downloads
Using wget
Using curl
Fileless Attacks
Direct Execution with curl
Direct Execution with wget
Bash /dev/tcp Downloads
SSH/SCP Transfers
Setting Up SSH Server
Downloading with SCP
Uploading with SCP
Python Web Server
Starting a Web Server
Alternative Web Servers
Web Server with Upload Capability
Setting Up Upload Server
Uploading Files to Server
OpenSSL Transfers
Server Side
Client Side
Netcat Transfers
Receiving Side
Sending Side
Troubleshooting Network Restrictions
Identifying Available Outbound Protocols
Common Errors and Solutions
Best Practices
Last updated