WEBVTT

00:01.680 --> 00:09.660
Local file, inclusion vulnerabilities, these exploits or vulnerabilities allow you to read any file

00:09.690 --> 00:11.440
that is within the same server.

00:12.840 --> 00:20.480
So even if the file exists outside the VA, w w w you'll be able to read it and read info with it.

00:21.180 --> 00:26.600
Now, why this vulnerability is critical because you can read any files.

00:26.790 --> 00:33.930
So if the users are storing some sort of important files or passwords files, then you'll be able to

00:33.930 --> 00:37.440
read them and then from there you can further exploit your target.

00:38.550 --> 00:44.340
Also, if there is a number of websites on the same server and you managed to find this on a website

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

00:50.010 --> 00:53.770
that you're targeting and then further exploit your website from there.

00:55.290 --> 00:56.730
So let's have a look on this.

00:56.730 --> 01:01.700
And we'll also the way we're going to be exploiting this vulnerability is through the URL.

01:02.340 --> 01:08.310
So usually in our code execution example, we were writing the code in here now.

01:09.270 --> 01:16.950
Sometimes you might find the code one vulnerability in the URL, so it will be something like ACMD and

01:16.950 --> 01:22.680
then you put the command or for example, in this case it would be i.p equals to the IP, for example,

01:22.680 --> 01:27.300
10, 20, 14, two or three.

01:27.300 --> 01:31.450
And then you do you put the sign and then you put your credibility after it, for example.

01:32.160 --> 01:35.340
So because our example was just in the textbooks.

01:36.410 --> 01:42.230
Sam is going to happen here and our final conclusion, vulnerability, so we can see that when you're

01:43.010 --> 01:47.510
in here and this your URL, it's saying that this.

01:48.480 --> 01:55.080
File is going to take a page and it's loading something called includes WHV, so it looks like it's

01:55.080 --> 02:00.650
actually loading another page like this current page is loading another page called Included.

02:01.620 --> 02:05.460
So, again, you'd be browsing the Web server and trying to get a feel of it.

02:05.580 --> 02:11.400
And you see something like this or you see something called IP equals the IP and then you know that

02:11.400 --> 02:14.440
there is a ping, for example, for the previous video.

02:14.880 --> 02:20.940
So for this that we know that our target's trying to open a file and the files called include that BHP.

02:23.290 --> 02:29.920
Let's see if there is actually a file called include that, so I'm just going to remove everything here.

02:32.710 --> 02:39.670
And try to access including me directly, and as we can see, we actually do have a file called include

02:39.720 --> 02:47.980
that it's not running properly, but it exists and it's in the same working directory, so.

02:49.320 --> 02:57.330
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.330 --> 03:05.040
called ATC Password, so that's the file which contains all the users and their path is on the current

03:05.040 --> 03:05.650
Web server.

03:06.570 --> 03:09.420
So let's have a look on this.

03:10.960 --> 03:12.350
So BTC.

03:13.980 --> 03:20.190
This file contains all the users for the current operating system, so if I just go on my card right

03:20.190 --> 03:24.090
here and if I run it here, if I just do cut.

03:25.650 --> 03:32.130
If you see a password, you'll see all the users that I have on the current computer.

03:33.030 --> 03:33.420
And.

03:34.400 --> 03:40.100
Their default path on the current operating system, so we're going to try to read this file.

03:41.410 --> 03:49.510
And to do that, let's go back and see our current location to our current location is in the FBI file

03:49.630 --> 03:52.630
and the FBI directory, so we need to go back.

03:53.600 --> 04:01.310
One, two, three, four, five times, and then go to ETSI password, so going back would be done using

04:01.310 --> 04:02.060
the dot dot.

04:04.110 --> 04:12.120
And let's try and do that, so at the moment, we're accessing this current file and just to make it

04:12.120 --> 04:15.110
easier for you, actually, let's just put the full part right here.

04:18.900 --> 04:22.110
So on the page, it's trying to access this page.

04:22.440 --> 04:29.520
So what we need, we actually want a place called ETEK Password, so we need to go back five times for

04:29.520 --> 04:30.270
these directories.

04:30.290 --> 04:33.690
So this one is going to be to start them from here.

04:34.200 --> 04:35.220
So we're going.

04:36.350 --> 04:36.890
Like.

04:38.600 --> 04:39.170
Bug.

04:40.120 --> 04:40.570
I.

04:41.690 --> 04:42.290
Back.

04:44.230 --> 04:47.170
And back and then we're going to go to ETSI.

04:48.920 --> 04:49.550
Password.

04:51.320 --> 04:55.670
And as you can see now, we have the output of the passport file.

04:56.730 --> 05:03.480
We can copy that and start here, and then you'll be able to read it and just get more information about

05:03.480 --> 05:06.060
the websites that you're targeting right now.

05:07.400 --> 05:14.060
Again, you can use this to try to access different files, sensitive files or files of other websites

05:14.060 --> 05:15.050
on the same server.

05:18.600 --> 05:24.690
Now, let's go to the security settings and I'm going to set this to medium because I just want to show

05:24.690 --> 05:31.410
you that the medium setting is and this is actually can be exploited exactly the same way as the low

05:31.410 --> 05:31.740
level.

05:32.040 --> 05:38.670
So the security settings medium, I'm going to go back to full inclusion and we're going to use the

05:38.670 --> 05:41.070
exploit the exact same way that we did it before.

05:42.630 --> 05:47.250
And as you can see, we managed to get the contents of ATC password.
