This lecture and the next few lectures we're going to be talking about a popular type of vulnerabilities
called Escurial injections.
Before we start talking about how this occurs and how to exploit it let's first learn what security
is now for if you're you're an apprentice on a certain website chances are this Web site is a little
bit bigger than smaller Web sites.
So it will it's probably use in a database.
Most web sites other than very simple websites use databases and the databases are used to store data.
So there are usernames passwords news articles blog posts pictures anything that anything that happens
on the website literally is stored on a database and web application which is in the database and then
displays the data to you or to the users onscreen when the users do something it'll 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 ask you out.
So let me show you what I mean by database.
This is just an example.
I'm not hacking anything.
I'm literally just going to log in to the database that is installed on our political 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.
Nothing fancy just logging into my ask help.
And then I'm putting the user name is root and my the potable doesn't use the password 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 Escorial injections.
This is just the terminal for my ask you of 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's saved in their.
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 I 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 answer my ask you all the rest have been installed
for each web application so we can see we have 140 we keep.
We have one for us 10 and that's for this one with all day.
We also have one called Masquerier Well we have one called Mrs. Floyd and one for the VW 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 last turn database.
So this is the one that is again this is the one for Mattel day for this web application.
And we can see the table so it's database as a table.
Tables and tables there is information.
So I'm gonna say Joe tables to see the tables that we have and you can see we have a table for our 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.
You can see capture data on credit cards.
So there a table that contains credit cards.
Now this is huge for shopping websites.
They actually would have credit cards they will and the information for the credit cards will be stored
there.
Basically the database will store everything all the data that is used on the website because they don't
get started 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 will be retrieving information from the database.
It will be select instead of updating or deleted.
So I'm doing a select statement here.
Again this is not hacking I'm not doing anything just collecting stuff.
I'm going to select star which means everything from accounts
was fee and as we can see if we can get.
We have the account ID the username the password and then the signature for the person.
And if that person is an oven.
Now these columns depend on the table so it's actually the person who designed the database designs
the tables the columns as well.
And then the data gets inserted by the work application.
So you 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 the same password.
So this is just to show you what databases look like and just to get a feel it because in the future
videos we're going to try to exploit these databases and have access similar to this.
So this I just logged in with a username and password.
Now usually you wouldn't have access like this on the web admin would have that access and the future
videos we're going to try to run some attacks in order to gain access similar to this so that we will
have full control over the database so that we can read stuff and see if we can write or modify things.