O'Reilly logo

Kali Linux Intrusion and Exploitation Cookbook by Ishan Girdhar, Dhruv Shah

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Cracking MySql and PostgreSQL login using custom wordlist

In this recipe, we will see how to gain access to the MySQL and Postgres databases. We will be using 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...

  1. Once you are on the Metasploit console, enter the 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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required