WEBVTT

00:00:00.000 --> 00:00:03.374 align:middle line:90%


00:00:03.374 --> 00:00:04.338 align:middle line:90%
[CLICKING]

00:00:04.338 --> 00:00:06.266 align:middle line:90%
[SOUND LOGO]

00:00:06.266 --> 00:00:10.140 align:middle line:90%


00:00:10.140 --> 00:00:14.970 align:middle line:84%
In the past lab, we used
Hydra to brute force

00:00:14.970 --> 00:00:17.430 align:middle line:90%
a login for a web app.

00:00:17.430 --> 00:00:19.650 align:middle line:84%
In this lab, we're
going to use Burp

00:00:19.650 --> 00:00:23.340 align:middle line:84%
Suite to get through some
basic authentication.

00:00:23.340 --> 00:00:25.410 align:middle line:90%
And it's a little different.

00:00:25.410 --> 00:00:26.900 align:middle line:90%
And I think you'll enjoy it.

00:00:26.900 --> 00:00:28.020 align:middle line:90%
Let's jump into the lab.

00:00:28.020 --> 00:00:35.240 align:middle line:90%


00:00:35.240 --> 00:00:38.870 align:middle line:84%
Let me start these off,
finding our IP address.

00:00:38.870 --> 00:00:48.600 align:middle line:90%
And we're the .2.

00:00:48.600 --> 00:00:52.320 align:middle line:90%
The target is the .3.

00:00:52.320 --> 00:00:58.320 align:middle line:84%
And we can just run
a simple nmap scan

00:00:58.320 --> 00:00:59.760 align:middle line:90%
to see, yup, that's our target.

00:00:59.760 --> 00:01:03.216 align:middle line:90%


00:01:03.216 --> 00:01:04.299 align:middle line:90%
Throw it into the browser.

00:01:04.299 --> 00:01:07.420 align:middle line:90%


00:01:07.420 --> 00:01:08.760 align:middle line:90%
And there we are.

00:01:08.760 --> 00:01:12.300 align:middle line:84%
Well, there is a
special authentication

00:01:12.300 --> 00:01:15.630 align:middle line:84%
for this website, not
just the normal login.

00:01:15.630 --> 00:01:17.530 align:middle line:90%
It's in the basic directory.

00:01:17.530 --> 00:01:22.470 align:middle line:84%
So if we go forward slash
basic, this pops up.

00:01:22.470 --> 00:01:27.500 align:middle line:84%
This is different than we've
seen so far with this web app.

00:01:27.500 --> 00:01:31.680 align:middle line:84%
And we can do test,
and test, and see.

00:01:31.680 --> 00:01:35.420 align:middle line:84%
Nope, nothing terribly
useful comes up.

00:01:35.420 --> 00:01:37.230 align:middle line:90%
But this is unique.

00:01:37.230 --> 00:01:38.270 align:middle line:90%
This is interesting.

00:01:38.270 --> 00:01:40.640 align:middle line:90%
Let's see how it all works.

00:01:40.640 --> 00:01:42.320 align:middle line:90%
I hate cancel.

00:01:42.320 --> 00:01:44.270 align:middle line:90%
Whoa, it did not like that.

00:01:44.270 --> 00:01:47.270 align:middle line:90%


00:01:47.270 --> 00:01:50.135 align:middle line:84%
Can I turn on Burp here,
and then open Burp.

00:01:50.135 --> 00:02:02.240 align:middle line:90%


00:02:02.240 --> 00:02:05.450 align:middle line:84%
And we're going to try
to capture this request

00:02:05.450 --> 00:02:08.180 align:middle line:90%
and see what all is going on.

00:02:08.180 --> 00:02:09.509 align:middle line:90%
Burp is great for that.

00:02:09.509 --> 00:02:15.620 align:middle line:84%
It also is going to allow us
to play with a few things,

00:02:15.620 --> 00:02:19.330 align:middle line:84%
like using repeater
and intruder.

00:02:19.330 --> 00:02:20.890 align:middle line:90%
Intruder, in this case.

00:02:20.890 --> 00:02:27.820 align:middle line:84%
Repeater is not quite the brute
forcing tool that we want.

00:02:27.820 --> 00:02:28.360 align:middle line:90%
Burp is on.

00:02:28.360 --> 00:02:29.440 align:middle line:90%
Burp is turned on.

00:02:29.440 --> 00:02:30.595 align:middle line:90%
Let's do this again.

00:02:30.595 --> 00:02:33.610 align:middle line:90%


00:02:33.610 --> 00:02:35.080 align:middle line:90%
It is basic.

00:02:35.080 --> 00:02:38.110 align:middle line:90%


00:02:38.110 --> 00:02:40.690 align:middle line:90%
It captured it.

00:02:40.690 --> 00:02:42.380 align:middle line:84%
Looks like it's
trying to go there.

00:02:42.380 --> 00:02:46.360 align:middle line:90%
Let's send it.

00:02:46.360 --> 00:02:48.820 align:middle line:90%
And then, this popped up.

00:02:48.820 --> 00:02:54.010 align:middle line:90%
Now let's do test and test.

00:02:54.010 --> 00:02:56.660 align:middle line:90%
And it captured that.

00:02:56.660 --> 00:02:58.780 align:middle line:90%
So it's a get request.

00:02:58.780 --> 00:03:01.780 align:middle line:90%
We don't see it in the URL.

00:03:01.780 --> 00:03:05.380 align:middle line:84%
There's a cookie, and
there is authorization.

00:03:05.380 --> 00:03:06.380 align:middle line:90%
This is different.

00:03:06.380 --> 00:03:11.110 align:middle line:84%
This is a little different
than what we've seen so far.

00:03:11.110 --> 00:03:16.480 align:middle line:84%
This right here, we got
lowercase, we've got uppercase.

00:03:16.480 --> 00:03:18.940 align:middle line:90%
I see a zero.

00:03:18.940 --> 00:03:20.740 align:middle line:90%
This is encoded.

00:03:20.740 --> 00:03:24.400 align:middle line:84%
So I right-click, and I can
go to convert selection.

00:03:24.400 --> 00:03:27.040 align:middle line:84%
And then, this is
Base64 encoded.

00:03:27.040 --> 00:03:28.630 align:middle line:90%
So let's decode it.

00:03:28.630 --> 00:03:29.140 align:middle line:90%
And yeah.

00:03:29.140 --> 00:03:29.800 align:middle line:90%
OK.

00:03:29.800 --> 00:03:30.940 align:middle line:90%
It's test and test.

00:03:30.940 --> 00:03:32.230 align:middle line:90%
That's what I sent.

00:03:32.230 --> 00:03:34.360 align:middle line:84%
So that's-- it's
showing up there.

00:03:34.360 --> 00:03:36.910 align:middle line:90%
Base64 right.

00:03:36.910 --> 00:03:41.500 align:middle line:84%
So it's going to send
whatever we put here.

00:03:41.500 --> 00:03:45.710 align:middle line:84%
And it's going to Base64
encode it and send that.

00:03:45.710 --> 00:03:49.900 align:middle line:84%
So let's send this
whole thing to Intruder.

00:03:49.900 --> 00:03:51.190 align:middle line:90%
Pop over to Intruder.

00:03:51.190 --> 00:03:52.450 align:middle line:90%
Yep.

00:03:52.450 --> 00:03:54.230 align:middle line:90%
Let's pick our positions.

00:03:54.230 --> 00:03:57.190 align:middle line:90%
I don't care about the cookie.

00:03:57.190 --> 00:04:00.920 align:middle line:90%
What I want is this right there.

00:04:00.920 --> 00:04:04.780 align:middle line:90%
So it's test and test.

00:04:04.780 --> 00:04:09.010 align:middle line:90%
Let's get into our payloads.

00:04:09.010 --> 00:04:11.500 align:middle line:84%
Payloads at one, yeah, it's
the only one we've got.

00:04:11.500 --> 00:04:13.270 align:middle line:90%
We'll load.

00:04:13.270 --> 00:04:16.029 align:middle line:84%
I'm going to go with this
100 most common passwords.

00:04:16.029 --> 00:04:20.079 align:middle line:84%
It's on our desktop
as root, right there.

00:04:20.079 --> 00:04:23.860 align:middle line:90%
And that should do it.

00:04:23.860 --> 00:04:25.270 align:middle line:90%
Yeah, open.

00:04:25.270 --> 00:04:26.050 align:middle line:90%
Open that one.

00:04:26.050 --> 00:04:27.930 align:middle line:90%
Sweet.

00:04:27.930 --> 00:04:29.590 align:middle line:90%
A lot of good passwords.

00:04:29.590 --> 00:04:31.600 align:middle line:90%
But that's just passwords.

00:04:31.600 --> 00:04:35.350 align:middle line:84%
Now, we're going to assume
that we know the username.

00:04:35.350 --> 00:04:37.910 align:middle line:90%
It's going to be admin.

00:04:37.910 --> 00:04:41.620 align:middle line:84%
So we need to come down
to payload processing.

00:04:41.620 --> 00:04:43.660 align:middle line:90%
And you go to add.

00:04:43.660 --> 00:04:47.890 align:middle line:84%
And we saw it was a
username colon password.

00:04:47.890 --> 00:04:50.290 align:middle line:90%
So we will add a prefix.

00:04:50.290 --> 00:04:55.360 align:middle line:84%
And it's going to be
admin and a semicolon.

00:04:55.360 --> 00:04:58.000 align:middle line:84%
Not a full colon,
just a semicolon.

00:04:58.000 --> 00:05:00.130 align:middle line:84%
And then, with each
request, that also

00:05:00.130 --> 00:05:03.400 align:middle line:90%
needs to be encoded with Base64.

00:05:03.400 --> 00:05:06.740 align:middle line:90%
So encode with Base64.

00:05:06.740 --> 00:05:10.340 align:middle line:90%


00:05:10.340 --> 00:05:13.170 align:middle line:84%
Now that we've got that set
up, we got the word list.

00:05:13.170 --> 00:05:15.952 align:middle line:84%
We've got our
prefix and encoding.

00:05:15.952 --> 00:05:16.910 align:middle line:90%
Let's start our attack.

00:05:16.910 --> 00:05:19.610 align:middle line:90%


00:05:19.610 --> 00:05:20.630 align:middle line:90%
It's going to be slow.

00:05:20.630 --> 00:05:21.410 align:middle line:90%
That's fine.

00:05:21.410 --> 00:05:29.890 align:middle line:90%


00:05:29.890 --> 00:05:32.240 align:middle line:90%
There it is.

00:05:32.240 --> 00:05:36.630 align:middle line:84%
And it's trying out a
bunch of different stuff.

00:05:36.630 --> 00:05:40.960 align:middle line:84%
And we can take a look at
what it might look like.

00:05:40.960 --> 00:05:43.230 align:middle line:90%
That looks like something.

00:05:43.230 --> 00:05:45.660 align:middle line:90%
We'll just look at this request.

00:05:45.660 --> 00:05:48.480 align:middle line:90%
And let's send it to Decoder.

00:05:48.480 --> 00:05:56.830 align:middle line:90%


00:05:56.830 --> 00:06:01.210 align:middle line:90%
Pull that up first, Decoder.

00:06:01.210 --> 00:06:03.997 align:middle line:90%
OK, here's that code.

00:06:03.997 --> 00:06:05.330 align:middle line:90%
I'm not exactly sure what it is.

00:06:05.330 --> 00:06:07.430 align:middle line:90%
Let's smart decode it.

00:06:07.430 --> 00:06:10.080 align:middle line:90%
Does it come up with anything?

00:06:10.080 --> 00:06:11.330 align:middle line:90%
It could be Base64.

00:06:11.330 --> 00:06:14.450 align:middle line:90%
Let's try decoding as Base64.

00:06:14.450 --> 00:06:15.890 align:middle line:90%
OK, cool.

00:06:15.890 --> 00:06:20.090 align:middle line:90%
It's admin and 242424.

00:06:20.090 --> 00:06:22.100 align:middle line:90%
Perfect.

00:06:22.100 --> 00:06:24.200 align:middle line:84%
And it's doing what
it's supposed to do.

00:06:24.200 --> 00:06:27.100 align:middle line:90%


00:06:27.100 --> 00:06:35.195 align:middle line:84%
Let's get-- do we have any
status codes other than 401?

00:06:35.195 --> 00:06:36.070 align:middle line:90%
Doesn't look like it.

00:06:36.070 --> 00:06:36.760 align:middle line:90%
Not yet.

00:06:36.760 --> 00:06:42.990 align:middle line:90%


00:06:42.990 --> 00:06:44.220 align:middle line:90%
Let's take one more look.

00:06:44.220 --> 00:06:48.380 align:middle line:84%
Let's double click
to open this guy.

00:06:48.380 --> 00:06:55.620 align:middle line:84%
Action, and I want to send it
to Decoder, because I'm worried

00:06:55.620 --> 00:06:57.375 align:middle line:90%
it won't decode properly here.

00:06:57.375 --> 00:07:02.820 align:middle line:90%


00:07:02.820 --> 00:07:03.960 align:middle line:90%
Yep.

00:07:03.960 --> 00:07:05.070 align:middle line:90%
Oh.

00:07:05.070 --> 00:07:10.470 align:middle line:90%
It's because this is not Base64.

00:07:10.470 --> 00:07:13.360 align:middle line:90%
This is a URL.

00:07:13.360 --> 00:07:21.040 align:middle line:84%
So if we decode the URL, oh
yeah, it doesn't like it.

00:07:21.040 --> 00:07:25.310 align:middle line:90%
Thusly, send it all to Decoder.

00:07:25.310 --> 00:07:31.130 align:middle line:84%
And then, we could
try smart decode.

00:07:31.130 --> 00:07:33.390 align:middle line:84%
And it only changed
that last part.

00:07:33.390 --> 00:07:34.970 align:middle line:90%
So that's not great.

00:07:34.970 --> 00:07:35.810 align:middle line:90%
Let's do it again.

00:07:35.810 --> 00:07:38.880 align:middle line:90%


00:07:38.880 --> 00:07:40.260 align:middle line:90%
Decode as a URL.

00:07:40.260 --> 00:07:42.840 align:middle line:90%
That might still be the same.

00:07:42.840 --> 00:07:44.650 align:middle line:90%
That's fine.

00:07:44.650 --> 00:07:50.700 align:middle line:84%
And then decode that as
Base64 admin lollipop.

00:07:50.700 --> 00:07:53.220 align:middle line:90%
OK, neat.

00:07:53.220 --> 00:07:55.260 align:middle line:90%
Nothing really useful yet.

00:07:55.260 --> 00:07:56.550 align:middle line:90%
OK, 301.

00:07:56.550 --> 00:07:58.230 align:middle line:90%
That's a redirect.

00:07:58.230 --> 00:08:01.350 align:middle line:90%
Let's take a look at this guy.

00:08:01.350 --> 00:08:10.160 align:middle line:84%
We got more of those
percentage 3d's.

00:08:10.160 --> 00:08:13.110 align:middle line:84%
We can't do anything
crazy with it here.

00:08:13.110 --> 00:08:17.690 align:middle line:84%
So we'll send this
whole thing to Decoder.

00:08:17.690 --> 00:08:23.130 align:middle line:90%
So action, send to Decoder.

00:08:23.130 --> 00:08:26.370 align:middle line:84%
And I highlighted it, so
it only did that stuff.

00:08:26.370 --> 00:08:27.780 align:middle line:90%
I'll smart decode.

00:08:27.780 --> 00:08:29.010 align:middle line:90%
Looks like it works.

00:08:29.010 --> 00:08:34.230 align:middle line:84%
This part is Base64, but
it was part of the URL.

00:08:34.230 --> 00:08:36.776 align:middle line:84%
The equal signs
weren't making it.

00:08:36.776 --> 00:08:40.530 align:middle line:84%
Base64 you can have
up to two equal signs,

00:08:40.530 --> 00:08:44.130 align:middle line:84%
uppercase, lowercase, and
numerals zero through nine.

00:08:44.130 --> 00:08:46.330 align:middle line:90%
So that's all of them.

00:08:46.330 --> 00:08:49.050 align:middle line:84%
And now, let's decode
this as Base64.

00:08:49.050 --> 00:08:51.645 align:middle line:90%
And we see admin and cookie one.

00:08:51.645 --> 00:08:54.490 align:middle line:90%


00:08:54.490 --> 00:08:54.990 align:middle line:90%
Neat.

00:08:54.990 --> 00:08:57.510 align:middle line:84%
So that should be a
good login right there.

00:08:57.510 --> 00:09:03.520 align:middle line:90%
Then we'll let that one go.

00:09:03.520 --> 00:09:04.190 align:middle line:90%
Why not.

00:09:04.190 --> 00:09:11.695 align:middle line:84%
I'll turn off intercept,
and admin, and cookie one.

00:09:11.695 --> 00:09:15.100 align:middle line:90%


00:09:15.100 --> 00:09:16.060 align:middle line:90%
And it logged us in.

00:09:16.060 --> 00:09:20.060 align:middle line:90%
And we've got our flag here.

00:09:20.060 --> 00:09:23.800 align:middle line:84%
So some neat stuff that
we can do with Burp.

00:09:23.800 --> 00:09:27.740 align:middle line:90%
And it's a lot of fun.

00:09:27.740 --> 00:09:31.690 align:middle line:84%
We're going to go back and do
one more thing with the proxy

00:09:31.690 --> 00:09:33.730 align:middle line:90%
before we end all of these labs.

00:09:33.730 --> 00:09:35.920 align:middle line:84%
And hopefully, now
you've got a taste,

00:09:35.920 --> 00:09:40.430 align:middle line:84%
and you'll be able to do
a little bit of web app

00:09:40.430 --> 00:09:46.870 align:middle line:84%
pen-testing in the full
complete external pen test

00:09:46.870 --> 00:09:48.760 align:middle line:90%
that we're going to do for EJPD.

00:09:48.760 --> 00:09:50.560 align:middle line:90%
So enjoy.

00:09:50.560 --> 00:09:53.250 align:middle line:84%
And I'll see you
in the next one.

00:09:53.250 --> 00:09:54.000 align:middle line:90%