21 - FTP
Theory
The File Transfer Protocol (FTP) is used to transfer files between a client and a remote server. The latter is used to stock files so you can access them remotely. Sometimes FTP is used by web applications to synchronize the hosted source code (e.g., HTML, JavaScript, etc.). Two secure implementations of FTP are FTPS and SFTP. Secure File Transfer Protocol (SFTP) uses the SSH protocol to transmit files (by default, it uses the same port 22 of SSH). On the other hand, the File Transfer Protocol Secure (FTPS) uses SSL to encrypt the file transfer, and it uses ports 989 and 990 for this purpose.
These are the common weaknesses in the FTP protocol:
Login credentials are sent in clear-text.
File transmission is not encrypted.
Exploitation Scenarios
Credentials brute‐force
Sniffing for clear-text credentials
Sniffing for unencrypted files
Anonymous access
Finding a public exploit associated with the target FTP server version
Practical
Service Scan
Advanced Scripting Scan with Nmap
Brute Forcing
Hydra
-t 10 : Run with 10 parallel threads
-L : Path to the users file
-P : Path to the passwords file
REFERENCES
Last updated