Testing MySQL with Metasploit
It's well known that Metasploit supports extensive modules for Microsoft's SQL server. However, it supports a number of functionalities for other databases as well. We have plenty of modules for other databases in Metasploit that support popular databases, such as MySQL, PostgreSQL, and Oracle. In this chapter, we will cover Metasploit modules for testing a MySQL database.
If you are someone who comes across MSSQL more often, I have covered MSSQL testing with Metasploit in my Mastering Metasploit book series.
Note
Refer to MSSQL testing from the Mastering Metasploit book series at:https://www.packtpub.com/networking-and-servers/mastering-metasploit-second-edition
So let's conduct a port scan to see if a database has a target machine running on the IP address 172.28.128.3
, as follows:
We can clearly see we have port 3306
open, which is a standard port for the MySQL database.
Using Metasploit's mysql_version module
Let's fingerprint the version of the MySQL instance...