FTP
About
File Transfer Protocol is a standard communication protocol used for the transfer of computer files from a server to a client on a computer network. FTP is built on a client–server model, and by default is using port 21
Usage
Connect
Commands
TFTP
vsFTPd is one of the most used FTP servers on Linux-based distributions. The default configuration of vsFTPd can be found in /etc/vsftpd.conf. Users, for which access to FTP server is forbidden could be found at /etc/ftpusers
file
Dangerous Config Settings
anonymous_enable=YES
- Allowing anonymous login?anon_upload_enable=YES
- Allowing anonymous to upload files?anon_mkdir_write_enable=YES
- Allowing anonymous to create new directories?no_anon_password=YES
- Do not ask anonymous for password?anon_root=/home/username/ftp
- Directory for anonymous.write_enable=YES
- Allow the usage of FTP commands
Bruteforcing
We could do a FTP server bruteforcing or password spraying with Medusa
Options:
-u
for username and-U
for list-p
for password and-P
for list-h
for host-M
for protocol
FTP Bounce Attack
We are using a ftp PORT
command to trick ftp server into running command and getting information from device other than ftp server. As example we could use this to scan the network through ftp. You could look here for more explanation [LINK]. For making ftp bounce attack nmap scan we could use -b
option:
Tips2Hack
Try to use anonymous login, config allows that, you could lurk for some juicy info. For this just use anonymous as login name, and left password empty.
If config allows, you could lurk even faster through directories with recursive listing
ls -R
To download a file you need to use
get
command and to upload you needput
and also you could usestatus
to get more info about server and FTP stateTo download all files you need to use
Check all available nmap ftp scripts:
Last updated