WEBVTT

00:00.780 --> 00:01.440
Hey everyone.

00:01.440 --> 00:05.620
This is soccer from UB degree and in this lecture we are going to continue with this.

00:05.620 --> 00:06.560
Yes.

00:06.720 --> 00:11.250
First of all I would request you to change the security level too low.

00:11.450 --> 00:12.420
And let's get started.

00:13.520 --> 00:22.030
In CSR if you will see when I change the password to anything it's just changed the password and there

00:22.030 --> 00:27.430
is no way to validate that this request was generated by me as a user.

00:27.520 --> 00:28.750
Many real this source

00:32.580 --> 00:35.720
you will see that it is getting the input.

00:35.850 --> 00:45.510
So get input password the new end password confirm right to inputs and then it updates that thing in

00:45.510 --> 00:46.350
the database.

00:46.350 --> 00:52.470
It simply updates that thing you will see that there is no A.C. a sort of token in this.

00:52.980 --> 00:53.790
And that's the thing.

00:53.790 --> 00:56.270
There is no protection at all.

00:56.280 --> 01:02.300
So how do you exploit those kind of things when you get this request right over here.

01:02.580 --> 01:08.520
You can copy this thing or actually you can change this password let's say PASSWORD IS EQUAL TO NEW

01:08.880 --> 01:11.010
THIS A let's say I change it to be

01:13.900 --> 01:16.970
and possibly confirm equals B as well.

01:17.070 --> 01:18.190
Right.

01:18.280 --> 01:22.960
Let us say I copied this thing and I send it to anyone.

01:22.960 --> 01:31.490
Let us say this is a new user and he opens this speech as soon as he opens this speech.

01:31.570 --> 01:33.600
He didn't added any password.

01:33.610 --> 01:40.630
He did not requested any change but because this was a request his password has been changed to be you

01:40.630 --> 01:43.350
can verify that password changed.

01:43.420 --> 01:45.630
This is how out can be dangerous.

01:46.840 --> 01:53.290
Let me show you how the developer tried to protect against this kind of thing on a medium security

01:55.940 --> 01:57.730
so here.

01:57.740 --> 02:05.510
The developer has a view that if there is someone who is going to attack the website using CSR if he

02:05.510 --> 02:12.150
will be sending the request let's say password E and E I say change it to works.

02:12.560 --> 02:20.360
But when you send this same request to someone else let's say this user and you press enter.

02:20.360 --> 02:21.470
It doesn't works.

02:21.500 --> 02:25.070
You can see request didn't look correct.

02:25.220 --> 02:27.600
Why it doesn't works.

02:27.630 --> 02:34.690
Let me show you this source in this case developers thinking that if their request is coming from the

02:34.690 --> 02:37.660
same Web site then it is legit.

02:37.690 --> 02:43.670
Otherwise it is not and that's the main thing here.

02:43.730 --> 02:53.390
If this server as GDP Rafter is equal to this server name what this means it means that if this request

02:53.390 --> 03:02.720
came through anything that was from this Web site local host slash TV WB to show this thing I will show

03:02.720 --> 03:07.930
you in burp sweet it is very important or big and you should know this.

03:07.930 --> 03:09.370
Let me open Barb's read here

03:13.560 --> 03:22.830
and let me set the bar proxy and I hope you have till now learned how to do this I will go in settings

03:23.550 --> 03:37.200
I will see manual proxy and Alicia OK proxy set and burps meet we go and we start a temporary project

03:46.110 --> 03:47.520
and give it a second.

03:47.520 --> 03:55.380
Here you go in proxy then I say intercept his own let me try to change the password intelligent we will

03:55.380 --> 04:02.450
it actually works and I say change and here.

04:02.650 --> 04:04.320
OK digressed and came in

04:09.130 --> 04:12.100
and we do intercept on a Cain let's try again

04:18.110 --> 04:20.540
and seems like we have some problem with the better.

04:20.590 --> 04:24.990
Let's check the network settings again bought it 0 0.

04:25.000 --> 04:26.840
Everything seems fine.

04:27.130 --> 04:34.170
Let's click on Okay let's try to go to the Web site again because it sometimes happens.

04:34.210 --> 04:35.860
Yes it does not working.

04:36.190 --> 04:42.180
You can see the request is coming here I will say intercept off and I will go there first

04:48.530 --> 04:49.190
OK.

04:49.240 --> 04:51.880
Now let's try to intercept the traffic.

04:51.930 --> 04:54.240
I say PASSWORD IS A and E

04:57.180 --> 05:00.860
and I say change and let's see the request.

05:00.960 --> 05:02.280
This is the request.

05:02.280 --> 05:03.780
I will simply cooperate this thing

05:07.170 --> 05:10.140
and I will open a text editor lets in not bad

05:20.950 --> 05:24.700
and let me open a new file and this is their request.

05:24.710 --> 05:25.010
Right.

05:25.010 --> 05:29.730
This is do you request that works so

05:40.840 --> 05:43.300
so request that works.

05:43.290 --> 05:44.390
Now let's see.

05:44.400 --> 05:54.290
Request that doesn't works.

05:54.930 --> 05:57.120
OK let's try to grab the request.

05:57.140 --> 05:58.380
That doesn't works.

05:58.400 --> 06:02.340
I will simply see drop everything and

06:05.840 --> 06:08.000
we will take the same request.

06:08.000 --> 06:10.210
We will close all these tabs.

06:10.310 --> 06:11.150
We don't need them

06:14.900 --> 06:20.390
and now we will intercepted traffic and we will go right over here.

06:20.530 --> 06:23.110
Let press enter.

06:23.620 --> 06:24.970
So this is their request.

06:25.000 --> 06:26.100
That doesn't work.

06:26.140 --> 06:26.560
Right.

06:26.740 --> 06:30.920
Let's copy this this piece did right here

06:36.680 --> 06:37.150
OK.

06:41.480 --> 06:45.530
And let me forward everything and set this off.

06:45.620 --> 06:47.570
So that's all.

06:47.570 --> 06:52.970
Now in this area you will see what's what's different.

06:52.970 --> 06:57.060
Get host user agent except accept a separate right.

06:57.080 --> 07:02.920
These lines you can see they are exactly the same because these lines are seam.

07:03.200 --> 07:09.040
Let's just remove them because they are exactly the same.

07:09.050 --> 07:15.680
And I believe I removed one more line here yes.

07:15.810 --> 07:22.970
So you can just see the clear difference if I just remove these five lines and if I remove these five

07:22.970 --> 07:31.160
lines here as well you will see there is an additional panel meter referent.

07:31.290 --> 07:35.760
So here you have the reference header in the request that works.

07:35.760 --> 07:37.920
You have the reference header in the request.

07:37.920 --> 07:38.850
That doesn't work.

07:38.850 --> 07:40.750
You don't have the header.

07:40.830 --> 07:44.190
So this is the only thing that's bringing this difference.

07:44.310 --> 07:51.950
Now for the reference header you can simply have this request on a page which is on the same website.

07:51.960 --> 07:54.720
Let me tell you what I mean.

07:54.840 --> 08:03.830
So I just copy this thing and let's see this ex restored okay.

08:04.060 --> 08:05.200
Let me just say E..

08:05.740 --> 08:16.190
And let me just add a tag here so it tag and I'll see equals

08:25.570 --> 08:25.880
okay.

08:25.890 --> 08:28.620
There is a limit so I remove the limit here

08:40.960 --> 08:42.260
and I will then we'll.

08:42.260 --> 08:42.700
This

08:45.910 --> 08:46.240
okay.

08:46.250 --> 08:48.350
This is my request and I see

08:52.290 --> 08:53.120
click here.

08:53.130 --> 08:53.880
OK.

08:54.000 --> 08:55.590
I close my tag.

08:56.730 --> 09:03.690
So I basically added a tag that should generate a link which is called click here and the link is going

09:03.720 --> 09:10.090
to take the user to this modified request ISIS sign signing and now.

09:10.120 --> 09:10.570
OK.

09:10.570 --> 09:12.710
We don't see that.

09:12.700 --> 09:16.200
Maybe because we are on a high level of security.

09:17.230 --> 09:19.360
I will go in the security level.

09:19.360 --> 09:20.860
I will change it to law.

09:23.070 --> 09:27.700
Then I will go in the store accesses.

09:27.820 --> 09:29.230
Let me just say E Here

09:32.210 --> 09:33.680
let me just change this thing

10:01.030 --> 10:03.520
OK let me sign this thing in the guest book.

10:03.520 --> 10:05.080
We have click here button.

10:05.110 --> 10:08.730
Let's go back to the same security medium

10:13.530 --> 10:15.700
and let me go in the store.

10:15.990 --> 10:23.100
So now the point which I am trying to see here is that the request doesn't works until the after header

10:23.100 --> 10:24.910
is from the same website.

10:24.990 --> 10:29.850
But let's say this is a chatting app or this is something like Facebook or something where you can post

10:29.910 --> 10:30.720
links.

10:30.870 --> 10:32.130
I added this link.

10:32.130 --> 10:38.430
Now if someone clicks on this link because the link is on the same website different header will also

10:38.430 --> 10:39.070
be the same.

10:39.090 --> 10:40.830
And it will process might exist.

10:40.830 --> 10:43.250
Let me click here and it should work.

10:43.290 --> 10:46.380
I click here and you see password changed.

10:46.380 --> 10:51.250
So this is how you compromised the security when developer is trying to be smart.

10:51.270 --> 10:52.080
Right.

10:52.080 --> 10:58.940
He's trying to validate the reference header but that doesn't helps Anyhow on the high level of security.

10:58.950 --> 11:06.750
I want to tell you something that the developer has done a really great to work when you go here you

11:06.750 --> 11:18.180
go ahead and see the source you will find that the developer is now checking for the A.C. is out of

11:18.180 --> 11:19.060
token.

11:19.080 --> 11:21.870
Let me just show you where he is doing that.

11:22.050 --> 11:26.320
You see check token request user token and session I.D..

11:26.330 --> 11:26.820
All right.

11:26.880 --> 11:30.840
So here the developer has done a fabulous work.

11:30.840 --> 11:36.290
He's taking this a sort of token and this is somewhat secured version.

11:36.360 --> 11:40.790
There is one hypothetical situation where this can be compromised.

11:40.950 --> 11:44.070
Let's say the Web site has another vendor ability.

11:44.130 --> 11:47.850
Let's say the excesses stored or excesses are deflected.

11:47.910 --> 11:56.100
Then we can use some Javascript to steal this token and then redirect the user with the token and a

11:56.100 --> 11:56.790
new password.

11:57.210 --> 12:01.060
But that is a hypothetical situation and you won't get that in the real world.

12:01.080 --> 12:01.380
Right.

12:01.680 --> 12:09.450
So having a CEO sort of token pretty much secures Stevie in an impossible level where the security is

12:09.720 --> 12:11.310
extra secure.

12:11.310 --> 12:18.340
You can see what the developer will do when you go here.

12:18.340 --> 12:23.190
There is the new element which is current password so you can steal the token.

12:23.260 --> 12:25.270
You can steal the request.

12:25.270 --> 12:25.800
Right.

12:25.810 --> 12:28.270
But you can not steal the correct password.

12:28.480 --> 12:33.430
Obviously if you have the current password you can directly log in and reset the password.

12:33.430 --> 12:35.840
You want to do all of this thing right.

12:35.890 --> 12:42.730
And that's what makes this application super secure at this time including the current password and

12:42.730 --> 12:44.860
the request makes it secure.

12:44.860 --> 12:46.620
That's how she is out of work.

12:46.630 --> 12:49.330
I'll continue this series in the next lecture till then.

12:49.330 --> 12:49.930
Have a great day.
