WEBVTT

00:01.300 --> 00:07.150
And this lecture, we're going to have a look on file upload vulnerabilities, these are the simplest

00:07.150 --> 00:11.480
type of vulnerabilities because they allow us to upload any type of file.

00:12.130 --> 00:19.540
So, for example, of the target computer can understand, then we can upload any file or a shell and

00:19.540 --> 00:22.180
get full control over the target computer.

00:23.800 --> 00:29.650
Now, is the target computer or the target server understands Python or any other language, then you

00:29.650 --> 00:32.850
can just upload Python Code, Python Shell or Ruby Shell.

00:32.980 --> 00:40.390
You can create these shell using Relevation or Mehta's Floyd or you can use your own PHP or Python Shell.

00:43.590 --> 00:49.360
What we're going to do today, we're going to have a look on a tool called Wavelet that generates shells

00:49.470 --> 00:55.810
and allow us to gain access and do a number of cool things on the target computer.

00:56.430 --> 01:00.870
So, first of all, I have my EDV here.

01:01.650 --> 01:06.600
And usually when you're trying to test a website, what I recommend is before trying to use any tools

01:06.600 --> 01:12.420
or anything, after you do your information gathering, as you just go in and try to browse the websites,

01:12.420 --> 01:17.910
you see what you can see, just get a feel of the website, see what's installed on it and all that,

01:18.150 --> 01:20.560
and try to exploit any features you see.

01:21.120 --> 01:24.510
So, for example, let's say you went on everything and then you reached the upload.

01:25.750 --> 01:28.870
We can see that this website allow us to upload a file.

01:29.050 --> 01:35.770
Now this sometimes in in your penetration testing tasks, it could be a website that allows you to upload

01:35.770 --> 01:37.810
a profile picture a picture.

01:37.810 --> 01:43.510
If it's a classified website, maybe it's allowing you to upload pictures of cars or whatever you're

01:43.510 --> 01:45.190
trying to add in the website.

01:46.230 --> 01:52.260
So as you can see here, the website expects you to choose an image and upload an image, so let's see

01:52.260 --> 01:53.790
if we can upload an image first.

01:53.910 --> 01:58.740
So I'm going to go on my downloads and I have a picture here in the resources.

01:59.690 --> 02:03.890
Just a picture of a car, I'm going to upload it and see if it gets uploaded.

02:05.350 --> 02:11.950
And we can see that the upload was successful and it's stored in this particular location, so it's

02:11.950 --> 02:17.720
dot, dot, dot, dot, which is which means two directories back and then this file name.

02:18.130 --> 02:20.920
So let's see if we can if the picture has actually been uploaded.

02:21.050 --> 02:24.670
So I'm taking away two directories and taking away the vulnerabilities and upload.

02:25.150 --> 02:26.230
I'm only using that.

02:27.350 --> 02:34.390
And then we're going to get this location on the server just to see if the picture was uploaded properly.

02:38.040 --> 02:41.040
And as you can see, the picture has been uploaded, so that's all good.

02:42.450 --> 02:47.940
Now, the next thing we want to do, let's try and upload a file, and to do that, we're going to use

02:47.940 --> 02:53.250
a tool called Waveney, as I said, to create a payload or a shell if you go if you want to call it.

02:53.850 --> 02:59.850
And it's obviously going to be a threshold you can use bittersweet, as I said, to create a payload.

03:00.210 --> 03:06.240
But we're going to be just having a look on a different tool that's designed for Web application penetration

03:06.240 --> 03:06.720
testing.

03:07.810 --> 03:10.140
So it is very easy, we're going to.

03:11.120 --> 03:15.530
Put the towel name, which is wavelet, and then we're going to put generate.

03:17.270 --> 03:22.970
Because we want to generate a payload or a shell file, then we will put a password for that file so

03:22.970 --> 03:28.200
that all the US can access it and control the website when we upload it to the website.

03:28.580 --> 03:31.310
So my password is going to be one, two, three, four, five, six.

03:31.670 --> 03:36.440
And then I'm going to say what I want to store it and I want to store it in route and I'm going to call

03:36.440 --> 03:38.890
it show that BHP.

03:40.320 --> 03:46.470
So very simple, Waverly is the name of the program generated to generate a shell, the password that

03:46.470 --> 03:52.290
the shell is going to authenticators with and it's going to be stored in Shell Dogpatch, we're going

03:52.290 --> 03:54.270
to hit Enter and it's created now.

03:54.270 --> 03:57.780
If I am already in my roots or if I just do this, I should see it.

03:58.970 --> 04:04.220
And we can see it right here, so the next thing is we're just going to go back to our website and try

04:04.220 --> 04:05.210
to upload that show.

04:11.560 --> 04:14.350
And I'm going to look for a show, and here it is.

04:15.380 --> 04:16.430
Going ahead on upload.

04:18.920 --> 04:23.660
And as you can see now, it's telling me the file has been uploaded successfully and it's in the same

04:23.660 --> 04:25.000
place that the picture was.

04:25.310 --> 04:31.880
So all we need to do now is we're going to use the same link and we're going to use Whibley again to

04:31.880 --> 04:34.220
interact with that show that we uploaded.

04:34.460 --> 04:38.550
Now, let's, first of all, see if the show exists and it's been uploaded properly.

04:38.570 --> 04:40.820
So I'm just going to browse through my browser.

04:43.050 --> 04:48.480
Childhood, BHP, and you can see that you get a blank page, so we're not getting four for file not

04:48.480 --> 04:52.200
found, which means that the file has been uploaded and it's there.

04:52.680 --> 04:56.470
So we're going to try to interact with it from wavelet to connect to it.

04:56.490 --> 04:57.720
We're going to type in Evelia.

04:58.970 --> 05:01.650
And then we're going to put the URL where the shell is.

05:01.970 --> 05:06.860
So this is where our shell has been uploaded and then we're going to put the password to my password

05:06.860 --> 05:09.070
was one, two, three, four, five, six.

05:09.080 --> 05:09.620
Very simple.

05:09.630 --> 05:13.770
Whibley The URL where the file is, and one, two, three, four, five, six.

05:13.940 --> 05:19.070
This is very simple, as similar to when you use your multi handler waiting for connections are connected

05:19.220 --> 05:19.990
to your back door.

05:20.150 --> 05:23.260
So we're literally just going to connect the back there that we uploaded.

05:24.050 --> 05:26.590
And as you can see in our in the file system.

05:26.780 --> 05:33.560
So from we believe from this place, you can actually just type in Anula next command and you'll be

05:33.560 --> 05:37.170
able it will be executed on the target computer and you'll see the result here.

05:37.490 --> 05:44.840
So if I do a W.D., you'll see that I'm inva w w w hackable uploads.

05:45.080 --> 05:47.110
And if I do an idea.

05:48.220 --> 05:53.800
I'll see my user at the moment, which is the data, and if you do.

05:54.810 --> 05:59.970
A you name, I just confirmed that this is the Middle East floatable machine, you'll see that this

05:59.970 --> 06:03.330
is the next test portable machine and now it can do anything we want.

06:03.330 --> 06:04.410
We can list the files.

06:04.410 --> 06:05.640
We can navigate.

06:05.880 --> 06:08.300
You can do any command that you want to do.

06:08.310 --> 06:09.690
Now, we have changed.

06:09.690 --> 06:10.830
Our place has been changed.

06:12.060 --> 06:16.110
We also offers much more features than just this.

06:16.380 --> 06:19.740
So it actually allows you to do a number of cool things.

06:19.740 --> 06:25.950
If you type in help, you'll see all the cool stuff that you can do with Waverly so you can try to escalate

06:25.950 --> 06:26.910
your privileges.

06:28.190 --> 06:35.780
As execute scale queries and a lot of cool stuff that is just designed for Web application penetration

06:35.780 --> 06:43.670
testing for now, I'm going to leave it at this and this just shows you how to use a file upload variabilities.
