When talking about exploitation, a couple of services come to mind, mostly related to the fact that they are common on most targets, and most of the time neglected.
In this recipe, we will exploit one the most common and abused services that you will find in a target environment, MySQL. Most of the time we can exploit MySQL services because they were installed for development purposes, disregarding some best practices such as setting a root password or using strong passwords.
To exploit the MySQL service on the Metasploitable 3 target machine, we will use the MySQL Enumeration Module auxiliary module to enumerate the target, and the Oracle MySQL for the Microsoft Windows Payload Execution exploit module to gain a remote shell:
msf > use auxiliary/admin/mysql/mysql_enum msf auxiliary(mysql_enum) > set RHOST 192.168.216.10 RHOST => 192.168.216.10 msf auxiliary(mysql_enum) > set USERNAME root USERNAME => root msf auxiliary(mysql_enum...