There are tools inside of Kali that allow us to be able to go through and map out a database server,
whether it be MySQL on the local system or an actual SQL server hosted on its own.
So inside of Kali, as you can see here, and these codes will be, or this syntax will be below in
the code box. We're using SQL map, identifying the actual destination as being the 192.168.0.1
because we installed MySQL on the actual host VM and have a test database for practice.
And we're doing port 3306 and directly connecting to the Chinook database.
And we're using Banner to be able to grab all user agent information and such. And DBS is for
the actual databases that are residing on that actual server. So it could be more than one
database. And then the batch is just basically auto send the command to send prompts because
if you don't have that in there, it'll ask you a bunch of yes or no questions.
So as we run this, as I go back over and press enter, you can see right here, I'll highlight
and then zoom in for us. There we go. And right here, you can see that we have available databases
seven and they list them below. Now you can go even further using this tool,
uh, going for the actual tables themselves. And you can see here as I just ran that command,
all the different tables that are within that database. And you can verify that by going over
to the MySQL workbench. And I show you this screen in particular for one specific reason
is because if you see here that I have root from a host other than local host,
you see in our journeys to be able to access the database directly and be able to inject using
things like SQL map later on in this course, we have to be able to have an account on here
within the database or crack credentials from somebody else, which again is coming up later
in the course to be able to access the system directly. Most times, especially in a default
install, this will pop up as your root or your other accounts made from the local host.
If you don't include an IP address for the actual from host section, when you create an account in
MySQL or any other database, you're not going to, you're generally not going to get any kind
of connection capabilities because that IP address that you're coming from is not allowed.
But when we start getting into manipulating user accounts and actually elevating privileges,
this is one of those things to where this could be integrated inside of, let's say,
Active Directory. And when you have your groups in there and group permissions
from Active Directory, this is where getting into the SQL database can actually be a little bit
easier. But the reason that I've already created that root from 0.53 is for you to be able to go
in and test out the SQL map inside of Kali, just to get an idea of what all commands you
could use to be able to go through there and get some actual syntax practice.