21 - FTP
Introduction
Port: 21 (TCP)
The File Transfer Protocol (FTP) is a standard network protocol used for transferring files. There are various ways of exploiting the service:
Anonymous Authentication
Directory Path Traversal: An attacker could create or remove files outside the FTP root folder.
Brute Force Attack
Buffer Overflow: There are FTP services that are vulnerable to Buffer overflows.
Enumeration
You can use Nmap to enumerate an FTP server.
Anonymous login
If anonymous login is enabled, you can retrieve files as anonymous with a random password.
Upload/Download binaries
If binary mode is not enabled, your binary files will not upload or download correctly. Thus, you need to type:
Recursive download
If you want to download every file from an FTP service, you can use wget.
mget is also an alternative, but it shall not always work.
Error: Address already in use
We need to enable passive mode:
References
Last updated