And this lecture and the next few lectures were going to be talking about a popular type of vulnerability
is called Eskil injections before we start talking about how this occurs and how to exploit it.
Let's first learn what Pascual is now for.
If you're getting a pen test on a certain website chances are this Web site is a little bit bigger than
smaller Web sites so it'll it's probably using a database.
Most Web sites other than very simple Web sites use databases.
And the databases are used to store data.
So there are there are usernames passwords news articles blog posts pictures anything that anything
that happens on the Web site literally is stored on a database.
And the web application queries the database and then displays the data to you or to the users on screen
when the users do something.
It's either update delete or modify the data that exists in the database.
This interaction between the web application and the database happens using language called you out.
So let me show you what I mean by database.
This is just an example.
I'm not hacking and you think I'm literally just going to log in to the database that is installed on
our first portable machine and then we're just going to see what's being stored on it.
So I'm not doing any hacking.
There is nothing here that nothing fancy just logging into my Eskew URL and then I'm put in the user
name is rude and my the myth exploitable doesn't use passwords for the root which is really bad.
But obviously it's a vulnerable system.
So I'm just going to log in and I'm not hacking anything I'm not doing any SSL injections.
This is just the terminal for my skill which the web application would use to interact with the database.
So I'm just trying to show you what I mean by databases and what saved in there.
So the first thing I'm going to do is I'm just going to type in show databases and that'll show us the
databases that exist on our target server and we can see that we have the information schema.
This is a default database that holds default information information about all the other databases.
So this one gets gets installed by default.
When you install my school the rest have been installed for each web application so we can see we have
one for two weeks.
We have one for us 10.
And that's for this one with all day.
We also have one called my desk.
Well we have one called me to exploit and one for DV W.A. which is the one that we've been using the
web application so you can see for each web application we actually have a database and this database
holds the information that is used by that web application.
Let me show you what's in there.
So I'm going to use the 0 us 10 database so this is the one that is again this is the one for Michelle
de for this web application and we can see the tables so each database has a table tables and tables
there's information.
So I'm gonna say to our tables to see the tables that we have.
And you can see we have a table for accounts so you can assume that this table has information about
the user names passwords and information about the users.
We have a table for blogs so probably has the blog and puts the posts and the comments in there and
you can see captured data credit cards.
So there is a table that contains credit cards.
Now this is huge for shopping Web.
They actually would have credit cards table and the information for the credit cards would be stored
there.
Basically the database will store everything all the data that is used on the Web site because they
don't get stored on files.
It's not efficient.
So let's have a look on the accounts.
And if I just say select.
So this is exactly how the web application would be retrieving information from the database.
It will be selecting stuff updating or deleting.
So I'm doing a select statement here.
Again this is not hacking I'm not doing anything just selecting stuff and I'm going to select star which
means everything from accounts
for a fee.
And as we can see we can get.
We have the account I.D. the user name the password and then the signature for the person.
And if that person is an admin.
Now these columns depend on the table so it's actually the person who designs the database designs the
tables the columns as well.
And then the data gets inserted by the web application so it can see that we have a user called admin
and their password is admin pass we can see we have a user called Adrian and their password is some
password.
So this is just to show you what databases look like and just to get a feel on it because in the future
videos we're going to try to exploit these databases and have access similar to this.
So this I've just logged in with the username and password.
Now usually you wouldn't have access like this.
Only the web admin would have that access in the future videos.
We're going to try to run some attacks in order to gain access similar to this so that we'll have full
control over the database so that we can read stuff and see if we can write or modify things.