A lot of the time we'd be interested into more than just hacking into the website.
So at the moment we can read right download modify files on the current Web server.
But a lot of the time what actually interests us is data that is stored in the database.
So things like usernames and passwords, you won't see them into files.
They'll actually be stored into the database.
So if you want to see these things, if you want to have access to them, you have to hack into the
database.
Most of the programs, for example, did a day and real world programs like what price they all connect
to the database to store stuff in it and in order to be able to connect to the database, they do that
through a file called config.
So there's usually it'll be called Configure Tree C, C, F, G, B, or something similar to that.
So the first thing you want to do is you want to locate the file and read its content.
So this is what we're going we're going to do.
This is going to be our step one.
So we are inva, the DAV.
So I'm just going to go to D.V..
So I'm going to go back once and go to DB the and then I'm going to list.
And you can see that we have a directory called config, so we're going to open that directory.
And we're going to list.
And you can see that we have a file called Config Dot, Dot, BHP, so you can read that using the normal
Cathe command so you can literally just Dukat.
Config that that BHP.
And you'll be able to read the contents.
A lot of the times when you do that, it's not going to work.
So what you want to do is you can do you can use a function that comes in with Waverly.
Again, it's called File Fireweed, and it allows you to read the file using multiple methods.
So if the normal card method didn't work for you, you can use that function to read it.
And let's see how we can use that function.
So we're just going to do file.
We had miners like we always do, and you can see that we have a number of vectors so we can do and
everyone it we can do file get and we can get it in base64.
So, again, you can use you can use that similarly to the way that we were doing it before.
So you just do a minus vector.
And we're going to choose file and then you select the file that you want to read, which is again,
it's called config.
Dirt ink at HP.
And once we read this file, you see that it has information about how to connect to the database,
so this file is actually used by the Web application itself to connect to the database.
So you always see these four things.
You'll see that the host and you can see that it said to the local host here, you can see the database
name is called a the user name is root and Password.
And in this case, it's blank.
Chances are you won't see a root user and you won't see a blank password.
So you'll probably have like some sort of a name in here and you'll actually have a password in here.
Once you have this information, you can connect to the database using an Ezekial Shell, so.
If we go back to the help here.
You see that we have to ask you all modules, one of them is the scale console, and this one will basically
allow you to have a normal and interactive ESKIL console where you can run any Ezekial statement, something
similar to what we got with a school map.
This will not work in this case because our road user is not using any passwords, so it will just not
connect.
But in normal cases, it should work for you.
The second example, which is the more useful example anyway, is the fuel dump, and this will basically
dump the whole database into a file and it will download the file to your current computer so that you
can open it and read the data normally use in a text editor.
So we're going to have a look on this example on the scale dump.
So using using these modules is very similar to what we've been doing so far.
So the scale console is very similar to the module anyway, so.
We're going to do a scaled up.
And we're going to do a minus page to see how to use it.
And you can see that the way to use it is you do a scale dump, you select the database type, you don't
have to do that.
We're not going to do it.
You give it the host, so let's give it the host.
And this is going to be localhost.
Again, we're taking this information from here from the config file after the host, you want to give
it the URL path and this is where the data is going to be saved in your local computer.
So let's store it in route.
And we're going to call it Divi W. a data.
That.
And then you want to select the vector, so I'm going to leave this the way it is, and we're not going
to modify that.
And then you have to select the database again, we'll take this information from here, so the database
is a.
Then you have to give it.
The user, so the user is rude.
And my password is blank, so again, the command is a dump, given that the host where we want to store
the data and then the database is DPW, the user is RWD, password is blank and enter.
And I did something wrong here.
I forgot to put minus Opeth in here.
And enter.
And now telling us that this method has failed, so again, when something fails, we go, we try a
different vector.
So let's try to use my skill dump as.
So we're going to use the same command, but we're going to add minus vector to it.
And this is going to be my Ezekial dump S.H..
Hit enter.
And as you can see now, this worked and it's telling us that the data has been stored to Route A DataDot,
so I'm going to go to my file manager and I'm already en route.
And you can see that we have a file here called Divi, the data that we double click the file.
And right here, we can see information about the whole database, so it might look like gibberish,
but it's not if you just have a closer look at it, you can see that you have the table structure.
You have a table here called Guestbook.
You can see that this table has the following columns.
It has a column called Comment ID.
It has a column called Comment, and it has a column called Name.
And you can see that the primary key is the comment ID going down.
You'll see that we have a table called users, you can see the columns are user ID, first name, last
name, user password and Avatar, and if you go down, you'll actually see the entries.
So you can see that we have a user called admin and this is their password.
This is their working directory.
Again, you have another user called Gordon.
A second name is Brown.
And this is his password, not the passwords are encrypted.
So you can go and try to decrypt these passwords.
But again, this lecture just showed you how to gain access to the database and dump the whole database
into a local storage and then browse it the way you want.
These are actual dump files so you can actually import them into my admin.
So if you have a Web application background, you can go to my admin, create a new database and import
this file into that database.
It will automatically create a database with these tables and you'll be able to easily navigate through
this and read the data.