Connect
Basic Connection
ftp <target-ip>ftp <target-ip> <target-port>Anonymous Connection
ftp anonymous@<target-ip>ftp anonymous@<target-ip> <target-port>Connect with browser
ftp://<target-ip>ftp://<target-ip>:<target-port>ftp://anonymous:<target-ip>ftp://anonymous:<target-ip>:<target-port>Recon
Banner Grabbing
nc -vz <target-ip> 21nc -vz <target-ip> <target-port>Enumeration
Nmap
nmap -p <target-port> -sVC <target-ip>Attack Vector
Brute Force
hydra -l <username> -P <password-list> ftp://<target-ip>hydra -l <username> -P <password-list> ftp://<target-ip> -s <target-port>Post Exploitation
Common FTP Command
| Command | Description | Usage |
|---|---|---|
| mget | Download multiple files | mget remote-file local-file |
| mput | Upload multiple files | mput local-file remote-file |
| bin | Set binary mode | bin |
| ascii | Set ascii mode | ascii |
| ls | List files | ls |
| cd | Change directory | cd directory |
| pwd | Print working directory | pwd |
| mkdir | Make directory | mkdir directory |
| rmdir | Remove directory | rmdir directory |
| rename | Rename file | rename old-file new-file |
| delete | Delete file | delete file |
| quit | Quit FTP session | quit |
Upload File
put <local-file> <remote-file>Download File
get <remote-file> <local-file>wget -m ftp://<target-ip>wget -m ftp://<target-ip>:<target-port>