WEBVTT

00:01.690 --> 00:04.390
Local file inclusion vulnerabilities.

00:04.840 --> 00:13.450
These exploits or vulnerabilities allow you to read any file that is within the same server so even

00:13.450 --> 00:21.070
if the file exists outside the var w w w you'll be able to read it and read info with it.

00:21.190 --> 00:26.730
Now why this vulnerability is critical because you can read any files.

00:26.800 --> 00:34.120
So if the users are storing some sort of important files or password files then you'll be able to read

00:34.120 --> 00:38.620
them and then from there you can further exploit your target.

00:38.620 --> 00:44.470
Also if there is a number of Web sites on the same server and you manage to find this on a website that

00:44.470 --> 00:50.320
you're not targeting then you might be able to access files related to the to the website that you're

00:50.320 --> 00:53.910
targeting and then further exploit your Web site from there.

00:55.290 --> 01:00.420
So let's have a look on this and we'll also the way we're going to be exploiting this burning ability

01:00.420 --> 01:07.770
is through the URL so usually in our code execution example we were writing the code in here.

01:07.840 --> 01:16.870
Now sometimes you might find the code word vulnerability in the URL so it'll be something like CND and

01:16.870 --> 01:22.050
then you put the command or for example in this case it would be IP equals to the IP.

01:22.050 --> 01:30.840
For example 10 20 14 2 0 3 and then you do you put the sign and then you put your P.W. the after it

01:30.850 --> 01:32.060
for example.

01:32.170 --> 01:39.850
So because our example was just in the text box same is gonna happen here and our file inclusion vulnerability.

01:40.250 --> 01:45.130
So we can see that when you're in here and this your url.

01:45.260 --> 01:54.370
It's saying that this file is gonna take a page and it's loading something called include BHP so it

01:54.370 --> 01:59.890
looks like it's actually loading another page like this current page is loading another page called

01:59.950 --> 02:01.600
include BHP.

02:01.600 --> 02:06.790
So again you'd be browsing the web server and trying to get a feel of it and you see something like

02:06.790 --> 02:12.640
this or you see something called IP equals the IP and then you know that there is a ping for example

02:12.640 --> 02:14.440
for the previous video.

02:14.890 --> 02:20.150
So for this that we know that our targets trying to open a file and the farthest called include the

02:20.200 --> 02:27.430
BHP let's see if there is actually a file called include that BHP.

02:27.500 --> 02:29.870
So I'm just gonna remove everything here

02:32.770 --> 02:39.600
and try to access include the BHP directly and as we can see we actually do have a file called include

02:39.600 --> 02:40.740
that BHP.

02:41.560 --> 02:47.360
It's not running properly but it exists and it's in the same working directory.

02:47.360 --> 02:57.250
So let's try and see if we can read a file that is stored in the computer and we're going to use a file

02:57.280 --> 02:59.050
called ATC password.

02:59.350 --> 03:08.540
So that's the file which contains all the users and their path is on the current web server so let's

03:08.540 --> 03:18.280
have a look on this so ATC this file contains all the users for the current operating system.

03:18.280 --> 03:28.850
So if I just go on my county right here and if I run it here if I just do cut it you see password you'll

03:28.850 --> 03:37.250
see all the users that I have on the current computer and their default path on the current operating

03:37.250 --> 03:37.960
system.

03:38.150 --> 03:42.880
So we're going to try to read this file and to do that.

03:43.080 --> 03:46.220
Let's go back and see our current location.

03:46.230 --> 03:51.200
So our current location is in the FBI file in the FBI directory.

03:51.270 --> 03:59.520
So we need to go back one two three four five times and then go to ATC password.

03:59.520 --> 04:06.140
So going back would be done using the dot dot and let's try and do that.

04:06.140 --> 04:13.490
So at the moment where access in this current file and just to make it easier for you actually let's

04:13.490 --> 04:15.040
just put the full path right here

04:18.900 --> 04:22.470
so on the page it's trying to access this page.

04:22.470 --> 04:27.020
So all we need we actually want a place called ATC password.

04:27.030 --> 04:30.210
So we need to go back five times for these directories.

04:30.240 --> 04:34.090
So this one is gonna be a start them from here.

04:34.200 --> 04:35.190
So we're going

04:38.610 --> 04:42.280
back back back.

04:44.070 --> 04:54.250
And back and then we're going to go to EDC password and as you can see now we have the output of the

04:54.250 --> 04:56.770
ATC password file.

04:56.770 --> 05:03.430
We can copy that and stored here and then you'll be able to read it and just get more information about

05:03.430 --> 05:07.810
the websites that you're targeting right now again.

05:07.820 --> 05:14.270
You can use this to try to access different files sensitive files or files of other Web sites on the

05:14.270 --> 05:14.990
same server.
