WEBVTT

00:01.200 --> 00:02.200
I will come back.

00:02.200 --> 00:09.160
In the previous lecture we created the div around scanner or this run scanner method.

00:09.320 --> 00:10.080
You see that?

00:10.080 --> 00:10.480
Okay.

00:11.280 --> 00:20.120
And now it is time to go and learn something about excesses attack.

00:20.120 --> 00:23.840
So what is excesses attack okay we have excesses.

00:23.880 --> 00:26.480
Excesses means cross site script.

00:26.920 --> 00:32.680
Whenever we are trying to use this kind of attack we are going to use JavaScript, JavaScript code.

00:32.680 --> 00:37.240
So JavaScript is a client side programming language.

00:37.480 --> 00:45.840
So that means whenever you're injecting your JavaScript code to a website that only interact with,

00:45.840 --> 00:51.480
uh, with the client side, okay, with this website, with the user interface.

00:51.520 --> 00:52.680
Okay.

00:52.720 --> 00:56.560
Or with, uh, the thing that user sees, okay.

00:56.600 --> 01:02.980
Not with the server or the thing that is this data is stored in.

01:02.980 --> 01:08.380
So you cannot, uh, use this to interact with server.

01:08.420 --> 01:08.700
Okay.

01:08.740 --> 01:11.460
Only it interacts with client side.

01:11.620 --> 01:11.860
So.

01:14.380 --> 01:15.820
Uh, let's come here.

01:17.900 --> 01:20.620
We have, uh, the excesses.

01:20.660 --> 01:21.020
Okay.

01:22.540 --> 01:25.060
Excesses means cross-site scripting.

01:27.980 --> 01:33.420
Let me cross site scripting okay.

01:34.300 --> 01:39.860
So this is XSS and we have three kinds of XSS attack.

01:39.900 --> 01:48.780
The first one is persistent or also it is called stored XSS okay.

01:49.460 --> 02:03.720
And this uh persistent or stored accesses is a kind of attack that it will store your code into the

02:03.720 --> 02:15.040
database then, and whenever someone's use that website and or that web page, your code will be executed.

02:15.080 --> 02:23.200
Okay, so this is, uh, one of those, uh, thing.

02:23.320 --> 02:27.880
The second one is called reflected accesses.

02:27.920 --> 02:28.280
Okay.

02:28.920 --> 02:31.080
So reflected.

02:33.520 --> 02:34.240
Accesses.

02:36.200 --> 02:40.960
This is a kind of a easiest one.

02:41.000 --> 02:42.280
Okay.

02:42.320 --> 02:47.840
Uh, you're injecting your code into a link or into a browser.

02:47.960 --> 02:51.720
And whenever someone click on your link or use your link.

02:52.200 --> 02:58.280
So the code that you write it will be, uh, executed and you will see the result.

02:58.280 --> 03:03.820
And also we have the third one, which is called Dom based excesses.

03:04.980 --> 03:11.780
So this is another kind that will only interact with the client side, and it is not going to store

03:11.780 --> 03:12.900
on the database.

03:12.980 --> 03:21.180
So okay let's come to this website again the Dvwa here.

03:21.340 --> 03:24.540
First let me go to Dvwa security.

03:26.620 --> 03:26.980
Okay.

03:27.020 --> 03:28.300
Put this to low.

03:28.340 --> 03:29.500
Hit the submit button.

03:29.500 --> 03:31.100
So you see right now it is low.

03:31.580 --> 03:34.940
And let's go and see this reflected one here.

03:34.940 --> 03:40.940
For example, if I write anything like name it and then hit the submit button, you will see it will

03:40.940 --> 03:42.340
give me hello name.

03:42.940 --> 03:52.980
Now if I try to do something else like inject a JavaScript code, let's see if it is possible or not.

03:53.460 --> 03:59.790
So whenever you're trying to inject the right a script JavaScript code.

03:59.830 --> 04:03.510
So you need to put them into two tag okay called script.

04:04.750 --> 04:07.230
And also this one.

04:08.350 --> 04:12.710
And inside this we have something some command.

04:12.710 --> 04:15.390
For example we have one of them is alert.

04:16.550 --> 04:24.430
And whatever you put in this alert it will be shown on a text box okay.

04:24.470 --> 04:26.190
On a text box okay.

04:26.230 --> 04:27.670
It will open a window.

04:27.790 --> 04:32.590
It will pop up a window and then show whatever you want in here.

04:32.590 --> 04:41.150
For example, if I just write X and then if I hit the submit button, now you see that it is popping

04:41.150 --> 04:50.590
up and it is giving me that XSS instead of saying that hello x axis and this is the reflected one.

04:50.590 --> 04:55.030
And also I told you that we can do this with the link.

04:55.070 --> 04:55.510
Okay.

04:56.150 --> 05:01.930
So here you see we have name is equal to script and then alert and something like this.

05:02.090 --> 05:05.090
So we can do that very easy in here.

05:05.090 --> 05:06.810
The same thing that we have done there.

05:07.850 --> 05:10.770
Right here I can do that very easy okay.

05:12.330 --> 05:15.170
For example we have this script.

05:17.410 --> 05:20.610
And also the same thing goes here script.

05:20.770 --> 05:25.930
And in here let's write alert and let's say hi.

05:28.450 --> 05:34.410
And now if I hit enter after a while you will see that the window pop up and say hi.

05:34.450 --> 05:39.250
Whatever you enter here it will show that right in here.

05:39.290 --> 05:40.170
Okay.

05:40.210 --> 05:43.090
So it is the reflected waves.

05:44.530 --> 05:47.410
The next one is called XSS stored.

05:47.810 --> 05:51.010
And in here it will allow you to enter something.

05:51.010 --> 05:53.850
It will store it on the database like this.

05:53.850 --> 05:57.230
For example name is going to be here Name.

05:57.630 --> 06:01.470
And also the message is going to be, for example, hello name.

06:03.950 --> 06:07.270
Now, when I hit enter, you see that this data is still here.

06:07.310 --> 06:07.710
Okay.

06:09.270 --> 06:19.350
And now if I try to enter, if I try to use access stored again, I can do the same thing here.

06:19.910 --> 06:21.670
So name it.

06:21.710 --> 06:23.910
The next one is going to be a script.

06:23.950 --> 06:25.830
So I write the script.

06:27.870 --> 06:29.470
Close the tag and then.

06:32.870 --> 06:33.390
Sorry.

06:35.310 --> 06:35.830
Script.

06:35.830 --> 06:37.990
And inside here write your command.

06:38.030 --> 06:38.310
Okay.

06:38.350 --> 06:40.950
For example it's going to be alert.

06:42.270 --> 06:43.590
Let's say hello.

06:47.110 --> 06:47.430
Yeah.

06:48.030 --> 06:52.630
Now when I hit enter you will see that it shows.

06:52.630 --> 06:58.770
Hello there in here and right here, right now it is stored into the database.

06:58.810 --> 06:59.210
Okay.

06:59.730 --> 07:01.450
And if I move somewhere else.

07:01.450 --> 07:08.970
And then if I, whenever I click here I came here and click on this Excel stored my code that is inside

07:08.970 --> 07:11.210
here stored it will be executed.

07:11.250 --> 07:11.690
Okay.

07:12.650 --> 07:20.090
So now whenever whoever for example this user okay.

07:20.250 --> 07:29.770
Whenever he or she tries to access this access store and then came here click on Access Store and my

07:29.890 --> 07:31.770
code will be executed.

07:31.770 --> 07:37.010
That is here and stored inside this okay.

07:37.050 --> 07:37.410
Here.

07:37.970 --> 07:45.490
So it will be executed all the time until you remove this or someone remove this from database okay.

07:45.530 --> 07:50.730
So it is called stored cross site scripting or stored accesses.

07:51.170 --> 07:55.770
So thanks for watching and I will see you in the next lecture with another tutorial.
