WEBVTT

00:01.680 --> 00:09.830
Welcome to the video finding website vulnerabilities with burp in this video we will install and configure

00:09.880 --> 00:17.010
a web site security testing tool called burp configure our browser to proxy all Web site traffic through

00:17.020 --> 00:23.780
burp so that we get a much richer look at what Web sites are doing behind the scenes and we'll use burp

00:23.780 --> 00:28.730
to attack an intentionally vulnerable Web site called the juice shop.

00:28.760 --> 00:33.380
Well I'm sad to say this but we've arrived at the final video of this course.

00:33.860 --> 00:38.840
And yet at the same time I'm excited because we're going to take everything we've learned and use it

00:38.840 --> 00:44.230
to discover vulnerabilities in Web sites and exploit some of those vulnerabilities.

00:45.580 --> 00:49.320
Before we do that though we've got a bit of prep work to do.

00:49.330 --> 00:55.390
We're going to configure a tool called burp suite which is an incredibly popular tool for web application

00:55.390 --> 00:57.530
penetration testers.

00:57.550 --> 01:02.890
In fact I would say if you're going to seek out a career in web at Penn testing you absolutely should

01:02.890 --> 01:03.710
purchase it.

01:04.840 --> 01:10.570
Now there are a couple of different paid versions which you can read more about at Port Swygert dot

01:10.570 --> 01:12.790
net.

01:12.810 --> 01:18.300
Personally I use the professional version which costs a few hundred dollars a year but when compared

01:18.300 --> 01:23.460
to other pen testing tools out in the market I consider burp very affordable.

01:24.540 --> 01:29.910
For the purposes of this video though we can get away with using the free version of burp and we can

01:29.910 --> 01:31.560
run up a few different ways.

01:31.560 --> 01:37.610
In Cali it might be in your dock off to the left here by default.

01:37.630 --> 01:43.570
We can also click the applications menu in the upper left of our Kelly box and we should see it right

01:43.600 --> 01:45.330
in the main menu.

01:45.420 --> 01:51.220
If it's not there check under the Web Application analysis menu.

01:51.470 --> 01:55.650
When you run burp for the first time you may get this message.

01:55.670 --> 02:02.290
That's because at least at the time of this recording burp works best with Java 8.

02:02.500 --> 02:08.110
So I'm going to close all the windows that are open and then I'll drop to the command line and issue

02:08.110 --> 02:18.670
the update tech alternatives space tac tac config space java command from the list that appears choose

02:18.670 --> 02:24.010
the selection that corresponds with this path that I'm highlighting.

02:24.240 --> 02:29.060
So I'll type 2 and hit enter.

02:29.250 --> 02:30.640
Now I'll run burp again.

02:30.690 --> 02:36.580
And we don't get the warning about Java but we do get a warning that a new burp update is available.

02:37.400 --> 02:42.730
So our quick update now and then at the burp website.

02:42.810 --> 02:50.530
I'm going to click the download link next to download for Linux.

02:50.670 --> 02:58.520
Once the packages downloaded all located while I'm in terminal so I'm going to go to CD downloads.

02:59.920 --> 03:07.030
And then if you remember from our last video I need to make this file executable so I'll tape S.H. maade

03:07.120 --> 03:12.000
space plus X and then the name of my file.

03:12.190 --> 03:18.360
And now if I do an ls again note that the file is green to show me it's ready to run.

03:18.560 --> 03:26.590
I'll type slash and in the name of my sweet run file here.

03:26.590 --> 03:32.930
I'm just going to click through all the menus and take all the defaults when the install wizard is done.

03:32.930 --> 03:40.910
You can go to the install location which is slash Opt. slash burp sweet community and then run the burp

03:41.000 --> 03:44.630
sweet community script to make things quick and easy.

03:44.630 --> 03:51.080
I'm going to just click next to create a temporary project and then I'm going to go ahead and take all

03:51.080 --> 03:53.300
the burp defaults as well.

03:53.300 --> 03:54.330
And here we go.

03:54.440 --> 03:58.720
We are ready to start using burp looking at the interface.

03:58.720 --> 04:01.490
Now you might be scratching your head going.

04:01.750 --> 04:04.140
So where's the click to scan button.

04:04.900 --> 04:11.060
So this is probably the right time to emphasize that while burp does have some automatic scanning capabilities.

04:11.170 --> 04:18.490
It's really meant to be more of a precision instrument for specific focused website security testing.

04:18.700 --> 04:23.430
And while we're talking about that you should know that people have created hundreds of great YouTube

04:23.430 --> 04:29.850
videos training courses blog posts and even books about burp.

04:29.860 --> 04:35.260
In fact when I was first getting started with burp I read this book and it continues to be an awesome

04:35.260 --> 04:39.640
resource not just for burp but for web at pen testing in general.

04:40.530 --> 04:46.150
OK so before we can actually test a site with burp we need to configure our web browser to point to

04:46.150 --> 04:52.900
burp because burp is essentially going to be our man in the middle as we test web sites and actually

04:52.900 --> 04:56.570
I kind of like to think of Bert being a bouncer at a club.

04:56.980 --> 05:03.040
Everybody who goes in and out of the club will be seen by the bouncer and if necessary the bouncer can

05:03.070 --> 05:06.180
intercept people on the way in or out of the club.

05:07.600 --> 05:16.230
How to set up our web browser to push traffic through Burke we'll go under Firefox preferences then

05:16.230 --> 05:17.750
hit the Advanced tab.

05:18.450 --> 05:22.300
Then network and then settings.

05:22.540 --> 05:33.080
I'll turn on the manual proxy configuration point to the local IP of 1 2 7 0 0 1 and then set the port

05:33.080 --> 05:39.030
to 80 80 which is what Burleson's on will click OK.

05:40.280 --> 05:44.260
Now in Firefox let's try to go to a site like GWW.

05:44.390 --> 05:46.510
Google dot com.

05:46.630 --> 05:51.490
You may have noticed just a little flash of a window near the top of the screen that had the burp icon

05:51.490 --> 05:52.100
next to it.

05:53.310 --> 05:54.490
Let's head over to Birr.

05:54.810 --> 06:00.350
And we now see that the proxy tab is highlighted as if to call our attention to it.

06:00.720 --> 06:01.700
So let's click that

06:04.520 --> 06:11.330
burp has an option called intercept which can trap requests as they come in and out of our browser.

06:11.330 --> 06:13.690
Kind of like the bouncer example I gave you.

06:13.850 --> 06:18.790
Basically right now burp is acting like a bouncer and is stopping every visitor at the door.

06:19.790 --> 06:23.700
I just want to allow all traffic to flow in and out of my browser for now.

06:23.900 --> 06:30.770
So I'm going to click the intercept is on button which will turn intercept off and if I flip back to

06:30.770 --> 06:34.860
my browser will see that Google is now attempting to load properly.

06:34.870 --> 06:38.410
But I'm getting a warning that my connection is not secure.

06:39.400 --> 06:43.110
And that's because we're now pushing all our web browsing through burp.

06:43.240 --> 06:46.370
So it's acting as a man in the middle to all our traffic.

06:47.300 --> 06:54.740
What we need to do is import burps SSL certificate into our own Firefox browser store so that Firefox

06:54.740 --> 07:00.540
trusts the cert and doesn't complain every time we visit a secure site to do that.

07:00.560 --> 07:06.330
We'll just go to HTP colon slash slash burp.

07:06.520 --> 07:13.280
And then on the right side of the screen we'll click the CA certificate to download it then I'm going

07:13.280 --> 07:15.490
to go back into preferences.

07:15.490 --> 07:24.760
I'll click Advanced then certificates and then view certificates from the window that pops up I'll click

07:24.820 --> 07:32.040
Import then find this search we downloaded and then I'm going to tick the box just to trust this search

07:32.070 --> 07:38.460
for identifying Web sites then I'll click OK to get out of any open menus.

07:38.460 --> 07:45.120
Now if I try to refresh Google again it loads properly with no complaints about security.

07:45.220 --> 07:49.770
And if we flip back to burp we see a ton of information here under the site map.

07:50.120 --> 07:56.230
This is basically a mapping of all the domains and site content that have passed through burp.

07:56.250 --> 07:58.740
It's kind of an unruly amount of information to look at.

07:58.740 --> 08:04.040
So we'll definitely want to narrow our scope to keep our workspace more organized.

08:04.160 --> 08:07.950
However before we do that we need a site to test.

08:08.040 --> 08:14.550
Now we very well could head over to web scan test dot com like we've been using in a past video and

08:14.550 --> 08:19.280
bang away on some of the vulnerabilities they've baked into that site.

08:19.360 --> 08:24.220
But I have a feeling once you discover one vulnerability you're going to be hungry for a lot more to

08:24.220 --> 08:25.970
find.

08:25.980 --> 08:33.510
So I want to point you towards an amazing and free and intentionally vulnerable Web application called

08:33.600 --> 08:35.400
juice shop.

08:35.430 --> 08:40.100
You can find it pretty easily by just googling a wasp juice shop.

08:40.330 --> 08:46.020
And if you do a bit of reading you'll see that juice shop is jam packed with common vulnerabilities.

08:46.030 --> 08:52.280
You would find in real commercial apps today now to get it up and running the juice shop creators give

08:52.280 --> 08:54.290
us several options.

08:54.290 --> 09:01.850
We could set up a cloud instance of it in just a couple of clicks we could build it from source or install

09:01.850 --> 09:05.470
one of several packaged distributions.

09:05.480 --> 09:09.720
Personally I like running juice shop on a VM in my local LAN.

09:09.770 --> 09:14.080
So what I've done is set up a Ubuntu server in VM where fusion on my Mac.

09:14.390 --> 09:20.300
But of course you could use whatever your preferred virtualization software is such as virtual box or

09:20.300 --> 09:22.290
VM Ware player.

09:22.470 --> 09:27.750
And while this course won't cover installing the Ubuntu server these days it's really just about as

09:27.750 --> 09:34.110
simple as downloading the install ISO booting to it in your virtualization software and then clicking

09:34.110 --> 09:35.710
next a bunch of times.

09:37.670 --> 09:44.630
And then what I'll do now is log into that server via S-sh and then I'm just going to copy and paste

09:44.630 --> 09:47.090
the commands right from the setup guide

09:54.290 --> 10:01.130
and next I'm going to open my browser to port 3000 of my Ubuntu server and boom.

10:01.130 --> 10:04.370
Here is the juice shop ready for us to attack.

10:06.200 --> 10:11.810
Now although we could dive right into attacking this host from a web app Penn Tester's perspective let's

10:11.810 --> 10:17.840
go back and use a few of the tools and skills we learned from our past videos.

10:17.890 --> 10:23.080
Let's drop to the command line and do an end map scan just to see if anything out of the ordinary pops

10:23.080 --> 10:25.730
up.

10:25.810 --> 10:31.990
Now seeing as this is my new Ubuntu Linux server I would expect to see the S-sh port open and it looks

10:31.990 --> 10:37.090
like the only thing open besides that is the shop port at 3000.

10:37.540 --> 10:43.070
OK so why don't we then take another step and running nikto scan on the shop.

10:43.090 --> 10:49.350
Now keep in mind Jews shop is running on this weird port of 3000 So we need to specify that in nikto.

10:49.360 --> 10:55.390
By using the TAC p space 3000 option.

10:55.550 --> 11:02.750
Interestingly nikto found in FCP folder a public folder and a log file that may leak application and

11:02.750 --> 11:11.920
system details and just for fun let's see if Derbe finds anything else.

11:11.980 --> 11:16.370
The concept that nikto and Derb have found definitely warrant investigation.

11:16.690 --> 11:21.760
But before we do that you may have noticed in the background here that the juice shop popped up a little

11:21.760 --> 11:28.970
box saying we solved a challenge that we got the juice shop to provoke an error that is not very gracefully

11:28.970 --> 11:30.290
handled.

11:30.380 --> 11:36.340
So what's this message about well if you read some of the incredibly extensive documentation that you

11:36.350 --> 11:42.680
shop creators have made online you will learn that the juice shop has a built in scoring system so that

11:42.680 --> 11:48.080
you can not only know what vulnerabilities to go after within the site but when you've successfully

11:48.080 --> 11:49.350
exploited them.

11:49.670 --> 11:51.390
Now spoiler alert.

11:51.620 --> 11:54.520
I'm going to show you one way to find the hidden scoreboard.

11:55.580 --> 12:03.260
You could simply try guessing variations of it from the address bar here but it doesn't look like I'm

12:03.260 --> 12:04.390
having much luck.

12:05.230 --> 12:11.080
Or we could take a look at the source code and I'm just going to look for anything with the word score

12:11.080 --> 12:11.590
in it.

12:12.440 --> 12:20.550
And I will flip to the results until I find what looks like a u r l path and I see that right there.

12:20.600 --> 12:22.010
We might have a winner.

12:22.840 --> 12:27.670
So let's copy and paste this and see if we hit the jackpot which we did.

12:29.640 --> 12:35.760
Now what we have here is a huge list of challenges ranked by difficulty and again to the awesome part

12:35.760 --> 12:41.220
is that when you complete a challenge you shop will let you know immediately by popping up a green box

12:41.310 --> 12:42.750
in its interface.

12:42.750 --> 12:46.220
Let's do another example here with a one star challenge.

12:46.320 --> 12:52.110
Shop wants us to execute a dumb Exocets attack using this payload.

12:52.240 --> 12:58.810
I'm going to copy it and then one obvious place to try it might be this search box at the top of the

12:58.810 --> 13:08.840
page and boom we popped the excesses box and now look do shop lets us know that this challenge is complete.

13:09.960 --> 13:15.370
So we go back to the scoreboard we can see that the challenge is now marked as solved.

13:15.750 --> 13:21.450
But let's get back to using burp suite for a more focused attack and to do that I want to go after this

13:21.450 --> 13:27.680
specific challenge here where we are to give zero star feedback to the store.

13:27.800 --> 13:32.910
Now before we go hunting for that vulnerability let me flip over to burp and one of the things I want

13:32.910 --> 13:41.560
to do is filter down my scope a bit so that I'm only seeing traffic flowing to and from the Jew shop.

13:41.660 --> 13:47.650
One way to do that is to find the folder for the Jew shop in the site map and in my case it's this one

13:49.020 --> 13:56.130
and I will right click it and say add to scope empurpled then ask if you essentially want to stop logging

13:56.130 --> 13:59.940
requests that are not in the shop scope.

13:59.940 --> 14:07.340
I'll say yes to this and then I'm also going to click this gray filter box and I'm going to choose to

14:07.610 --> 14:14.000
show only in the scope items and then under MIME type I'm going to take everything so that I see all

14:14.000 --> 14:16.420
the content while we're here.

14:16.420 --> 14:22.570
Let's also look under the proxy tab and then the HTP history tab.

14:22.630 --> 14:28.910
This is a log of every request that's come in and out of burp as you can see it's a lot of information.

14:28.930 --> 14:32.090
So I'm going to click up here in this gray filter bar.

14:32.470 --> 14:37.270
And again I'm going to tell Bert to only show me content that's in scope.

14:37.480 --> 14:43.520
And as far as mime type again I'm just going to tick all the boxes so I see everything OK.

14:43.600 --> 14:49.860
So we're looking pretty clean and mean now let's head back over to the juice shop and see where we might

14:49.860 --> 14:53.500
go in order to leave zero star feedback for the store.

14:54.620 --> 15:02.880
It looks like here in the upper right of the shop we can contact the shop owners and I think this is

15:02.880 --> 15:04.890
what they're talking about.

15:04.890 --> 15:12.770
It looks like we can leave a comment and then a one to five star rating but not a zero.

15:12.770 --> 15:19.020
OK so first let's just leave a one star rating with some comment and submit it.

15:19.120 --> 15:24.150
And now let's flip over to a burp and see what that looks like in the HTP history tab.

15:27.170 --> 15:33.620
From the post request we can see our one star rating as well as our comment.

15:33.650 --> 15:39.740
Now the goal is for us to send a zero star rating but how can we do that if the web gooey doesn't allow

15:39.740 --> 15:41.900
us to well.

15:41.920 --> 15:47.380
There are several ways but the way I want to show you is by using the burp intercept.

15:47.530 --> 15:53.160
Remember how we talked about how it can act like a bouncer and sort of stop people at the virtual door

15:53.260 --> 15:55.520
if you will ok.

15:55.530 --> 16:02.890
I'm going to go into proxy and then intercept and click intercept is off so that it gets turned on.

16:04.060 --> 16:08.830
That I'm going to go back to the Jew shop and try to submit feedback one more time.

16:09.790 --> 16:16.280
What I'm hoping we can do is make intercept stop this request before it hits the juice shop and then

16:16.280 --> 16:18.360
we'll have the ability to tamper with it.

16:20.370 --> 16:25.980
OK so let's flip back to burp again and we can see here that intercept has grabbed this request before

16:25.980 --> 16:34.200
it was sent on to the juice shop and we can simply click right into this post request edit it and send

16:34.200 --> 16:35.160
it on its way.

16:36.030 --> 16:38.730
So here where the rating says three.

16:38.730 --> 16:48.690
I'm just going to replace that with a zero then I'll click forward to send the request along to do shop.

16:48.840 --> 16:55.390
And finally I'll click intercept is on to turn it off so that all traffic simply flows like normal again.

16:59.090 --> 17:00.600
And now look at that.

17:00.620 --> 17:04.960
We've successfully given zero star feedback to the shop owners.

17:04.960 --> 17:11.750
And if we head back to our scoreboard we'll see we are making great progress on the one star challenges.

17:13.010 --> 17:19.100
Now we this video we only scratched a tiny bit of this surface when it comes to using burp and attacking

17:19.100 --> 17:20.450
the juice shop.

17:20.540 --> 17:25.700
But my hope is that this gets you excited to set up your own in-house juice shop and start banging away

17:25.700 --> 17:26.480
at it.

17:26.900 --> 17:32.450
It's a fantastic way to sharpen your way about pen testing skills for free from the comfort of your

17:32.450 --> 17:37.740
own home and without any complicated cloud infrastructure to set up.

17:37.820 --> 17:43.700
By the way if you get stuck the juice shop will give you a small hint by hovering over the unsolved

17:43.700 --> 17:45.800
button for any challenge.

17:45.980 --> 17:49.520
And if you're still stuck you can click the box for more help.

17:50.050 --> 17:55.870
But I highly recommend you try this and use hints only when you've given it the old college try as it

17:55.870 --> 18:00.690
is an awesome feeling when you finally start unlocking some of the upper level challenges.
