Cracking MySql and PostgreSQL login using custom wordlist
In recipe, we will see to gain access to the and Postgres databases. We will be the Metasploitable 2 vulnerable server to perform the attacks.
Getting ready
For this exercise, we will be using Metasploit as our module to perform the credential attack, since we have already seen how the other tools work in the previous recipes. Let's start the Metasploit console and start exploiting the SQL servers.
How to do it...
- Once are on the console, enter following commands:
use auxiliary/scanner/mysql/mysql_login set username root set stop_on_success true set rhosts <Target IP address> set pass_file /usr/share/wordlists/rockyou.txt exploit
The output will be as in the following screenshot:
- Once this is done, wait for the script to finish. In this case, since we have given a command to stop on success, once we find the right password it will stop execution of the script. The output will be as shown...