WEBVTT

00:00.960 --> 00:08.100
Just like we did before in the last video, we put five times back and then we put a password to access

00:08.100 --> 00:14.190
the password file, what we are going to do today is we're going to try to access a file located on

00:14.190 --> 00:15.040
a different server.

00:15.330 --> 00:21.690
So if you are doing this test on an actual Web server, then you need to store the file that you want

00:21.690 --> 00:26.980
to access, needs to be stored on a place with a real IP address or with a domain name.

00:27.690 --> 00:32.940
I'm doing this on my local server, so I'm going to start this on the on the Web server, on the candy

00:32.970 --> 00:35.270
machine, on the 10, 20, 14 to three.

00:35.520 --> 00:37.860
This is then 2014 to 04.

00:37.980 --> 00:41.310
And I'm going to store my file on 10, 20, 14, two or three.

00:42.770 --> 00:45.770
So that, far as I said, can be anything, it could be a Web show.

00:45.950 --> 00:47.420
It could be a payload.

00:47.900 --> 00:51.860
Well, what I'm going to do is I'm going to create a very simple file.

00:52.700 --> 00:56.020
So this is just the start and end of the file.

00:56.450 --> 01:00.560
And what I'm going to put in the file, I'm going to use a function called passthrough.

01:01.340 --> 01:07.100
And in that function, basically what this function does, it executes operating system commands.

01:07.400 --> 01:14.060
So it executes Windows, Linux, or depending on the Web server, it's going to execute commands related

01:14.060 --> 01:14.520
to that.

01:15.500 --> 01:21.500
So you put the command here between the two quotation marks and I'm going to use the same command we

01:21.500 --> 01:27.680
used with the code execution for vulnerability, which was the net cut command, which allowed us to

01:27.680 --> 01:31.950
get a connection or reverse connection from our target.

01:32.270 --> 01:34.180
So going to that here.

01:34.520 --> 01:36.080
So let's just first have a look on this.

01:36.230 --> 01:44.600
So in the end, these are just the start and the end of the file of the file pass through is a function

01:44.600 --> 01:49.490
that I'm going to use which executes any commands that's inserted between the quotations.

01:49.790 --> 01:55.250
And I'm using the same command that we used in the command execution vulnerability, which will just

01:55.370 --> 01:58.280
do a reverse connection to my computer.

01:59.310 --> 02:00.280
So this is all good.

02:00.300 --> 02:04.620
Now, the next step is the most important step, and it's starting this file.

02:04.630 --> 02:06.600
So as I said, if your target.

02:07.660 --> 02:14.170
Was a remote Web server, then you should be stored in this file in a place with a real IP where you

02:14.170 --> 02:16.720
can access it from the remote Web server.

02:16.870 --> 02:22.750
Now, I'm going to be trying to access this from my transplantable machine, which is able to access

02:22.750 --> 02:26.500
files stored on the candy machine because they're both on the same network.

02:26.830 --> 02:31.890
And I'm going to be calling this I'm going to be storing it in my bar w w w html.

02:31.990 --> 02:35.680
So it is being stored on the Karley, not on the floatable.

02:36.100 --> 02:42.270
And I'm going to call it reverse and I'm going to save it as to not be.

02:43.440 --> 02:50.820
And I'm doing this if I started as a viewer, it's going to be executed on the candy machine, so it's

02:50.880 --> 02:53.760
going to create a reverse connection from the candy machine.

02:53.880 --> 02:54.780
And I don't want that.

02:54.780 --> 02:56.120
I don't want to have the machine.

02:56.130 --> 02:58.560
I actually already have access to the candy machine.

02:58.920 --> 03:04.620
The one that I want to hack is demitasse floatable machine, and that one is stored remotely.

03:04.860 --> 03:12.630
So in order to be able to include the code and execute it on the remote machine, we're going to use

03:12.630 --> 03:19.340
it as texte and get it executed or demitasse floatable machine and instead of executing it on my calendar.

03:19.800 --> 03:23.520
So I'm I'm studying it as a text and I'm going to say Sabor.

03:24.650 --> 03:27.890
And now let's just see here, so if I go to my localhost.

03:29.300 --> 03:31.040
And if I say.

03:32.100 --> 03:41.060
Reverse the text, will see our file right here, so again, this is on my localhost, which is not

03:41.120 --> 03:42.360
the floatable machine.

03:42.360 --> 03:48.510
It's 10, 20, 14, two or three, and it's floatable is on to offer.

03:50.030 --> 03:51.810
So how are we going to run this?

03:51.830 --> 03:58.400
First, let me just listen for connections like we did before, so it's just going to be notecard.

03:59.350 --> 04:02.580
The LP 80 80.

04:04.730 --> 04:10.940
And then right here, instead of including a file on the same server, I'm going to include a remote

04:10.940 --> 04:14.470
file and the command is going to be TPE.

04:14.540 --> 04:21.170
So it's just going to be the link to this file so we can access the file here as I'm going to copied

04:21.530 --> 04:22.810
and pasted here.

04:27.300 --> 04:33.670
And also, in some cases, you might need to add a question mark to the end to get this file to be executed.

04:35.280 --> 04:40.650
So I'm just going to go over this again for one more time, including a remote file, which is on a

04:40.650 --> 04:41.490
remote server.

04:41.670 --> 04:48.870
Make sure the remote server is accessible by your target and also make sure you started it, because

04:48.870 --> 04:54.380
if you keep it as this file, the reverse file will be executed on the remote server.

04:54.390 --> 04:58.890
So it will be executed on the two or three instead of being executed on the two or four.

04:59.550 --> 05:01.860
And I'm keeping it this way.

05:01.860 --> 05:07.380
It will be it's going to be executed on the two or four and it's going to give me a remote connection

05:07.530 --> 05:11.220
to this computer, to demitasse floatable computer.

05:12.110 --> 05:19.490
So if I come back here, as you can see, we have a remote connection, if we do a you name A, you'll

05:19.490 --> 05:23.140
see that this is the Mehta's portable machine, not the candy machine.

05:23.150 --> 05:30.170
So we basically have full access to the floatable machine through and a remote file inclusion vulnerability.

05:30.500 --> 05:37.010
Now, if you do, unless we can do a deal to see where we are and we can actually run and in the next

05:37.010 --> 05:42.080
command we want now on the machine and do anything we want, basically, we have full access to that

05:42.080 --> 05:42.530
machine.
