WEBVTT

00:00.180 --> 00:07.290
Now, before we dig any deeper into how to exploit and discover vulnerabilities, I'd like to pause

00:07.290 --> 00:13.070
and just go back for a second and see what exactly happens when a user clicks on a certain link.

00:13.320 --> 00:15.220
So we have here we have the client site.

00:15.240 --> 00:21.080
So this is your computer with the e-mail website that is displayed to the user.

00:21.240 --> 00:25.170
So this this is all loaded on your computer, on the client.

00:25.860 --> 00:31.710
And then we have the server, which contains the code that gets executed if the website is functional

00:31.710 --> 00:32.820
and if it uses code.

00:34.280 --> 00:35.630
So when you click on a link.

00:36.860 --> 00:44.450
The e-mail Web site or the client side, part of the page of the website will generate a request so

00:44.450 --> 00:47.500
it won't actually do any computations most of the time.

00:47.520 --> 00:50.710
Now, sometimes there is client side code and we'll see that.

00:51.080 --> 00:58.460
But usually the client site code will generate a request which is sent to the website, to the Web server,

00:58.760 --> 01:05.840
and the Web server will have some functional code such as BHP or Python, Ruby, any programming language.

01:06.050 --> 01:11.780
And that's most of the time that code interacts with the database, gets some sort of information,

01:11.960 --> 01:18.390
and then send the information as a response to the website, to the browser and the browser will displayed

01:18.440 --> 01:19.360
as HTML.

01:19.790 --> 01:26.960
So the code, the functional code or the computation code is usually stored at the server side.

01:27.200 --> 01:33.680
And the way that most of these websites work is they generate a request, they send it to the server,

01:33.710 --> 01:36.170
the server, execute the request and send it back.

01:37.350 --> 01:43.260
So when we're trying to hack into websites and exploit them, we usually play with the requests and

01:43.260 --> 01:50.280
try to modify that request so that it performs some actions that would help us to gain information or

01:50.550 --> 01:54.240
run some certain type of code that would give us a reverse connection.

01:55.490 --> 02:00.170
Now, there's two type of requests, there is get requests and post requests.

02:01.210 --> 02:07.180
Let's have an example, so if we go here on the final inclusion, you'll see that we have a variable

02:07.180 --> 02:11.550
called Page and the value of that is include that.

02:12.520 --> 02:18.460
So right here, this is a get request because we can see the values of it in the URL.

02:18.460 --> 02:21.250
So we can see that page equals include that.

02:21.940 --> 02:27.610
So this page is requesting another page to include another page called Index Dot.

02:28.240 --> 02:30.520
Now, we won't go into detail of what that means.

02:30.730 --> 02:34.630
All we're concerned about is to have an example, and this is the example.

02:34.660 --> 02:39.700
So this is the variable that we're given a value for, which is Page, and we're giving it a value of

02:39.700 --> 02:41.240
include Dogpatch.

02:41.560 --> 02:43.000
So that's a get request.

02:43.910 --> 02:51.350
An example of a post request is the file upload, so if we go to the file upload when you upload something

02:51.350 --> 02:51.890
in here.

02:53.220 --> 02:55.260
So let me just upload something.

02:58.770 --> 03:04.860
You'll see that the URL doesn't get modified, but the request, a sense of the website, the image

03:04.860 --> 03:09.660
is actually uploaded on the server and all that, but the URL still looks the same.

03:10.500 --> 03:12.510
But the website did send information.

03:12.510 --> 03:16.050
So the Hatami website did send information to the server.

03:16.140 --> 03:22.170
You just didn't see the information in here because it was sent as post instead of get.

03:24.280 --> 03:24.760
So.

03:25.810 --> 03:30.520
The first problem now is we can't see the poster costs, we can't modify them because they're not shown

03:30.520 --> 03:35.350
here in the in the URL in the case of yet, we can modify them straight away from the URL.

03:36.160 --> 03:41.830
Another problem is a lot of these websites in the future are going to be used in security and they're

03:41.830 --> 03:44.020
going to be using client side code.

03:44.260 --> 03:49.560
So if that's used, then the request is actually modified before it gets sent.

03:50.050 --> 03:55.780
So there will be filters and stuff working on the client side that will modify our code before we send

03:55.780 --> 03:55.930
it.

03:57.010 --> 04:03.310
So the best way of intercepting requests and so that we can see the post requests, we're going to use

04:03.310 --> 04:03.960
a proxy.

04:04.910 --> 04:07.530
The proxy that we're going to be using is birth proxy.

04:08.000 --> 04:13.340
So how birth is going to work is we have our client here and we have the Web server, just like we've

04:13.340 --> 04:17.920
seen it before, and we have the e-mail website loaded on our candy machine.

04:18.500 --> 04:25.310
So when we send the request instead, instead of sending it directly to the Web browser, we're actually

04:25.310 --> 04:28.620
going to configure our browser to send the request to berp.

04:29.270 --> 04:30.980
So this is our proxy running here.

04:31.160 --> 04:34.960
Berp will see all the parameters that are being posted to the website.

04:35.180 --> 04:39.410
So we're going to see the post requests to get requests and we'll see them.

04:39.410 --> 04:41.910
After all, the client code has been applied.

04:42.350 --> 04:47.190
So some websites apply Clydeside code, as I said to the request before they send it.

04:47.480 --> 04:52.800
So we're going to be able to see the requests after the client site code has been applied.

04:53.120 --> 04:58.100
This is very important because a lot of websites use filtering as client side and then we'll be able

04:58.100 --> 05:01.390
to bypass all of these filters by intercepting the request.

05:02.180 --> 05:06.750
Then once we modify the request in berp, we're going to forward it to the website.

05:06.770 --> 05:10.130
The website will execute it and give it back to us.

05:11.040 --> 05:18.900
All of this will become clearer in the next lecture as we use berp proxy in practice to intercept and

05:18.900 --> 05:20.250
modify requests.
