WEBVTT

00:00.710 --> 00:01.790
Welcome back everyone.

00:01.790 --> 00:04.460
The sad saga from a degree and this lecture.

00:04.460 --> 00:11.330
We will talk about excessive stored so till now we have covered the excess as reflected which occurs

00:11.420 --> 00:14.370
through the vinyl or the SDP barometer.

00:14.840 --> 00:19.310
But what if the application is storing the request in the database.

00:19.310 --> 00:20.950
Let us go to access a stored.

00:21.080 --> 00:23.930
But before that change the security level too low

00:30.590 --> 00:33.560
now here too you will see that there is the name.

00:33.560 --> 00:42.600
Let me add my name here so seems like there is a character limitation I cannot add E L here.

00:42.600 --> 00:49.560
So let me just remove this and there is the message Hello.

00:49.990 --> 00:57.160
And let's say I press this thing you will see that this message has been stored in the database of the

00:57.240 --> 01:01.810
website and it is being rendered on this page from the database.

01:01.810 --> 01:08.210
If I go to some other tab and I come back on the access is stored it still stays here.

01:08.270 --> 01:09.110
Right.

01:09.170 --> 01:13.130
There is no you order in this case but there is the database in the world.

01:13.400 --> 01:14.340
And that's fair.

01:14.340 --> 01:22.960
The stored accesses comes into deeply when you go in this source page you will see that there is a minuscule

01:23.030 --> 01:29.870
database connection which is actually taking values from database and rendering them on the page itself.

01:29.870 --> 01:30.730
Right.

01:30.740 --> 01:37.070
So to exploit this kind of thing what you do is you test both of these fields.

01:37.340 --> 01:39.620
First of all we will test the message field.

01:39.650 --> 02:01.840
Let's say we test this field.

02:02.180 --> 02:03.550
So this is our payload.

02:03.570 --> 02:05.570
I add saga here.

02:05.570 --> 02:06.050
That's right.

02:06.050 --> 02:11.680
To test this the message field is infected with the stored accesses.

02:11.690 --> 02:19.040
Now whenever someone opens this speech let's say I am on this page and whenever I open this page stored

02:19.580 --> 02:21.250
DECODE AUTOMATICALLY renders.

02:21.260 --> 02:24.010
And that's where this one disability comes right.

02:24.200 --> 02:26.020
Let's test this thing on.

02:26.210 --> 02:30.510
Name as well and you will see that there is the character limitation.

02:30.510 --> 02:34.860
So we will remove this character limitation right click inspect element

02:39.040 --> 02:43.930
and when you go here you will see that the maximum length is 10.

02:43.930 --> 02:50.930
Let's change it to one hundred and ten presenter.

02:51.040 --> 02:58.820
Now this should have been changed let's try to add this now and you see we can type it and I will see

03:02.970 --> 03:04.770
high in this case.

03:04.800 --> 03:05.870
Let me change this.

03:05.870 --> 03:09.260
1 2 2 let's sign this.

03:09.610 --> 03:18.200
Now this first one has came due to the result of this one which we added earlier this second excesses

03:18.290 --> 03:21.830
is coming due to the result which we added in name right now.

03:22.250 --> 03:27.610
So both of these fields are infected with these stored accesses.

03:27.760 --> 03:28.640
Let me do one thing.

03:28.660 --> 03:34.870
Let me go in the Reset database and reset this whole database so that we can again test this.

03:34.900 --> 03:39.710
So I'll say you said database and it has been resettled.

03:39.710 --> 03:44.580
I can go and access is stored and you will see now everything is back to normal.

03:44.600 --> 03:44.940
Right.

03:45.470 --> 03:48.590
Let's change does David W. security to medium

03:51.440 --> 03:58.640
and again when you go in the store accesses you see names saga and let's see message here.

03:58.760 --> 04:05.390
When you tried to sign in it won't work because it's the same procedure it does trying to filter the

04:05.540 --> 04:13.580
script tag but I can see script tag and I can give some variation in this that's a B I mean I can give

04:13.580 --> 04:20.750
variation and this one lets it s and I can then try this thing and it doesn't work either.

04:20.780 --> 04:28.830
So seems like they have implemented some more security let's try to do that in the name tag inspect

04:28.890 --> 04:29.460
element

04:33.610 --> 04:35.930
we go here during 10

04:42.280 --> 04:44.930
we try to give the variation here.

04:50.680 --> 04:53.050
Let's see this thing.

04:53.540 --> 04:55.700
Let's try to sign in and here you go.

04:56.030 --> 05:02.810
So basically in this case message field is not infected with excesses but Name field is still infected

05:02.810 --> 05:04.520
with the excesses.

05:04.520 --> 05:07.220
Let's go ahead and reset the database

05:12.270 --> 05:14.550
let's change the security level to high this time

05:20.250 --> 05:35.210
let's go in the store it accesses and let us change the maximum input.

05:35.590 --> 05:45.140
Now let's try to add the tag in both of these so I will give a variation to S. And this one as well

05:45.290 --> 05:48.370
as you can give any variation it doesn't matter.

05:48.470 --> 05:54.560
We just want to make sure that the script tag is not being filtered

05:58.730 --> 05:59.820
Now let's try to sign in.

05:59.840 --> 06:06.200
So if there is exercise in name it should pop up with one if there is access as in message it should

06:06.200 --> 06:13.510
pop up to you sign in and you'll see that there is no pop up at all it means that both of these are

06:13.510 --> 06:20.380
using some other security mechanism or they are not infected with excesses let's try to use another

06:20.380 --> 06:21.790
element which was body

06:30.160 --> 06:32.280
so there is again the limit.

06:32.290 --> 06:33.850
Let me just change the limit here

06:47.850 --> 06:54.780
I will give the attack as its own load attribute equals and here I can give my payload so alert

06:58.120 --> 07:08.230
1 This is my first payload I will give alert two as my second payload here and let's try this.

07:08.230 --> 07:12.150
So we use this sign and name is infected.

07:12.170 --> 07:20.290
Avoid the excesses but it is filtering this script tag and any variation of script and message is not

07:21.470 --> 07:23.630
infected with accesses at all.

07:23.630 --> 07:31.670
So here we can write in our report that the name is infected with accesses where it does not filtering

07:31.820 --> 07:33.600
all the estimated element.

07:33.660 --> 07:37.610
Now this is how your test stored accesses I'll keep the series going till then.

07:37.610 --> 07:38.380
Have a great day.
