WEBVTT

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


00:00:10.140 --> 00:00:12.810 align:middle line:84%
In this lab, we're
going to be practicing

00:00:12.810 --> 00:00:17.040 align:middle line:84%
utilizing a tool called
ZAProxy, ZAP proxy, if you will,

00:00:17.040 --> 00:00:18.270 align:middle line:90%
put up by OWASP.

00:00:18.270 --> 00:00:21.480 align:middle line:84%
It's a great tool for scanning
web apps and websites,

00:00:21.480 --> 00:00:25.620 align:middle line:84%
and it will run some
vulnerability scans for us.

00:00:25.620 --> 00:00:28.530 align:middle line:90%
Let's get it set up.

00:00:28.530 --> 00:00:30.472 align:middle line:84%
We'll jump into
our VM environment.

00:00:30.472 --> 00:00:33.310 align:middle line:90%


00:00:33.310 --> 00:00:38.410 align:middle line:84%
Start off by identifying
our network, and let's

00:00:38.410 --> 00:00:42.790 align:middle line:90%
just run nmap scan on that guy.

00:00:42.790 --> 00:00:52.760 align:middle line:90%


00:00:52.760 --> 00:00:57.130 align:middle line:84%
There is 0 in there
for the network.

00:00:57.130 --> 00:01:00.415 align:middle line:84%
It should be the same IP
address with a dot three.

00:01:00.415 --> 00:01:03.370 align:middle line:90%


00:01:03.370 --> 00:01:04.629 align:middle line:90%
We'll just validate.

00:01:04.629 --> 00:01:12.500 align:middle line:90%


00:01:12.500 --> 00:01:14.660 align:middle line:90%
And it's correct.

00:01:14.660 --> 00:01:19.250 align:middle line:84%
Dot three comes back with
HTTP and MySQL server,

00:01:19.250 --> 00:01:21.470 align:middle line:84%
and this is our
machine, the dot two.

00:01:21.470 --> 00:01:26.000 align:middle line:90%


00:01:26.000 --> 00:01:27.560 align:middle line:90%
So let's grab that.

00:01:27.560 --> 00:01:29.780 align:middle line:90%
It's got port 80 open.

00:01:29.780 --> 00:01:30.710 align:middle line:90%
Let's check it out.

00:01:30.710 --> 00:01:34.340 align:middle line:84%
And we have bWAPP,
another OWASP tool,

00:01:34.340 --> 00:01:38.570 align:middle line:84%
great for learning about
some web bugs, which

00:01:38.570 --> 00:01:40.070 align:middle line:90%
is what we're doing here today.

00:01:40.070 --> 00:01:45.750 align:middle line:90%


00:01:45.750 --> 00:01:48.180 align:middle line:84%
And we can see that we've
got credentials here

00:01:48.180 --> 00:01:49.005 align:middle line:90%
for bee and bug.

00:01:49.005 --> 00:01:51.637 align:middle line:90%


00:01:51.637 --> 00:01:53.220 align:middle line:84%
And we've played
around with this site

00:01:53.220 --> 00:01:55.005 align:middle line:90%
before and other labs.

00:01:55.005 --> 00:01:57.610 align:middle line:90%


00:01:57.610 --> 00:02:02.530 align:middle line:84%
What we haven't played with
much is the different bugs

00:02:02.530 --> 00:02:04.450 align:middle line:90%
that are part of this.

00:02:04.450 --> 00:02:06.610 align:middle line:84%
For example, there's
HTML injection

00:02:06.610 --> 00:02:08.389 align:middle line:90%
reflected in this case.

00:02:08.389 --> 00:02:15.590 align:middle line:84%
So if you put in j m, hit go,
and it prints it out here.

00:02:15.590 --> 00:02:21.990 align:middle line:84%
But we also see that
it's up here in the URL.

00:02:21.990 --> 00:02:28.890 align:middle line:84%
So if I were to, say,
Josh, changing the URL,

00:02:28.890 --> 00:02:31.080 align:middle line:84%
it reflects down
here in the HTML

00:02:31.080 --> 00:02:35.280 align:middle line:90%
as well, which is pretty neat.

00:02:35.280 --> 00:02:38.310 align:middle line:84%
But what I really want
to show you is ZAProxy.

00:02:38.310 --> 00:02:41.100 align:middle line:90%


00:02:41.100 --> 00:02:53.530 align:middle line:90%
So ZAP-- and it's loading up.

00:02:53.530 --> 00:02:59.680 align:middle line:90%


00:02:59.680 --> 00:03:02.890 align:middle line:90%
That is fine.

00:03:02.890 --> 00:03:07.630 align:middle line:84%
It's an older version, but
it hasn't changed much.

00:03:07.630 --> 00:03:10.120 align:middle line:84%
It does not get the
same sort of love

00:03:10.120 --> 00:03:17.440 align:middle line:84%
that some of our
owned tools get.

00:03:17.440 --> 00:03:26.010 align:middle line:84%
We'll put in our URL, and
we want to enable the HUD.

00:03:26.010 --> 00:03:29.250 align:middle line:84%
And we'll launch it, we can
launch in Chrome or Firefox.

00:03:29.250 --> 00:03:32.800 align:middle line:84%
We're doing this manual
explore in OWASP ZAP.

00:03:32.800 --> 00:03:35.670 align:middle line:84%
It's a neat tool, there's
a lot of options here.

00:03:35.670 --> 00:03:37.590 align:middle line:90%
I went with the quick start.

00:03:37.590 --> 00:03:39.510 align:middle line:90%
This is a great way to get--

00:03:39.510 --> 00:03:43.320 align:middle line:84%
to jump into things and
manual explore is neat.

00:03:43.320 --> 00:03:46.770 align:middle line:84%
So we're going to launch it
with the heads-up display,

00:03:46.770 --> 00:03:57.770 align:middle line:84%
with the HUD, and it opens
up and gives us the HUD.

00:03:57.770 --> 00:04:00.980 align:middle line:84%
And there's a whole
tutorial to go through.

00:04:00.980 --> 00:04:07.400 align:middle line:84%
You can install ZAProxy
on your own device

00:04:07.400 --> 00:04:09.770 align:middle line:84%
if you wanted to,
again, practice with it,

00:04:09.770 --> 00:04:15.650 align:middle line:84%
and this bWAP is also
installable locally,

00:04:15.650 --> 00:04:18.685 align:middle line:84%
but we're going to go
through it in this lab here.

00:04:18.685 --> 00:04:20.390 align:middle line:90%
So let's continue to target.

00:04:20.390 --> 00:04:25.640 align:middle line:84%
You can see different
things show up on each side.

00:04:25.640 --> 00:04:31.620 align:middle line:90%
There's already this login.php.

00:04:31.620 --> 00:04:35.430 align:middle line:84%
It's got X-Frame
options header not set.

00:04:35.430 --> 00:04:38.265 align:middle line:84%
And that might matter
to us, it might not.

00:04:38.265 --> 00:04:41.500 align:middle line:90%


00:04:41.500 --> 00:04:46.060 align:middle line:84%
Some of these alerts, again,
might matter, might not,

00:04:46.060 --> 00:04:47.090 align:middle line:90%
it's kind of up to you.

00:04:47.090 --> 00:04:49.525 align:middle line:84%
You can start the spider, you
could see the tree of sites.

00:04:49.525 --> 00:04:53.110 align:middle line:84%
You can run the Ajax spider
and/or an active scan.

00:04:53.110 --> 00:04:54.370 align:middle line:90%
We will get into these.

00:04:54.370 --> 00:04:57.040 align:middle line:84%
They're kind of
neat and powerful.

00:04:57.040 --> 00:04:58.660 align:middle line:84%
And there's different
attack modes,

00:04:58.660 --> 00:05:01.630 align:middle line:84%
and you can watch them
all here from this HUD.

00:05:01.630 --> 00:05:05.210 align:middle line:90%


00:05:05.210 --> 00:05:08.640 align:middle line:84%
Well, let's play around and
let it capture some information

00:05:08.640 --> 00:05:14.920 align:middle line:84%
because as we navigate
around, it adds sites here.

00:05:14.920 --> 00:05:23.350 align:middle line:84%
So we'll log in, and we can
even go back and see, hey,

00:05:23.350 --> 00:05:25.210 align:middle line:90%
we did a post for this login.

00:05:25.210 --> 00:05:29.090 align:middle line:90%


00:05:29.090 --> 00:05:31.220 align:middle line:90%
And we can use that later.

00:05:31.220 --> 00:05:34.167 align:middle line:90%


00:05:34.167 --> 00:05:35.750 align:middle line:84%
We'll just bounce
around a little bit.

00:05:35.750 --> 00:05:42.170 align:middle line:84%
Look at this HTML injection
reflected and watch as it gets

00:05:42.170 --> 00:05:47.840 align:middle line:90%
added to our tree, to our list.

00:05:47.840 --> 00:05:55.590 align:middle line:90%


00:05:55.590 --> 00:05:59.250 align:middle line:84%
And we can go through
several of these,

00:05:59.250 --> 00:06:04.160 align:middle line:84%
go through the drop-down,
look at the post.

00:06:04.160 --> 00:06:08.630 align:middle line:84%
This one is a little
different, but it's, again,

00:06:08.630 --> 00:06:11.810 align:middle line:84%
reflected HTML injection
with a post request instead

00:06:11.810 --> 00:06:13.790 align:middle line:90%
of a get request.

00:06:13.790 --> 00:06:15.920 align:middle line:84%
In this case,
because it's a post,

00:06:15.920 --> 00:06:19.190 align:middle line:84%
it didn't pass it as
variables in the URL.

00:06:19.190 --> 00:06:26.120 align:middle line:84%
I think if we captured it,
we would see here our post

00:06:26.120 --> 00:06:28.800 align:middle line:90%
would have that information.

00:06:28.800 --> 00:06:32.150 align:middle line:84%
This is not Wireshark,
it's not capturing

00:06:32.150 --> 00:06:34.400 align:middle line:84%
all of our information
in that same way

00:06:34.400 --> 00:06:36.740 align:middle line:90%
to make it easily viewable.

00:06:36.740 --> 00:06:39.500 align:middle line:84%
But we'll go through what that
actually does in a little bit.

00:06:39.500 --> 00:06:42.770 align:middle line:90%


00:06:42.770 --> 00:06:46.580 align:middle line:84%
And we can just continue to
bounce through some of these.

00:06:46.580 --> 00:06:51.990 align:middle line:84%
After the post, we could
look at stored for the blog.

00:06:51.990 --> 00:06:59.120 align:middle line:84%
So what happens if you store
some things, nothing too crazy

00:06:59.120 --> 00:07:02.000 align:middle line:84%
that identified us as bee
since we're logged in.

00:07:02.000 --> 00:07:05.890 align:middle line:90%


00:07:05.890 --> 00:07:10.150 align:middle line:84%
Some of this, again, is
fairly straightforward

00:07:10.150 --> 00:07:15.680 align:middle line:84%
and it's not in and
of itself malicious.

00:07:15.680 --> 00:07:19.060 align:middle line:84%
This HTML injection that's
stored for the blog,

00:07:19.060 --> 00:07:23.562 align:middle line:84%
not necessarily, yes, malicious,
but it is-- it could be a bug,

00:07:23.562 --> 00:07:25.270 align:middle line:84%
might not be something
that was intended.

00:07:25.270 --> 00:07:28.800 align:middle line:90%


00:07:28.800 --> 00:07:33.110 align:middle line:84%
Let's check out some
of this SQL injection,

00:07:33.110 --> 00:07:34.770 align:middle line:90%
or SQL injection, if you will.

00:07:34.770 --> 00:07:37.890 align:middle line:90%
And let's search for Joe.

00:07:37.890 --> 00:07:39.360 align:middle line:90%
And hey, this works.

00:07:39.360 --> 00:07:43.230 align:middle line:84%
What happens if we
do or 1 equals 1.

00:07:43.230 --> 00:07:52.637 align:middle line:90%


00:07:52.637 --> 00:07:54.470 align:middle line:84%
We'll play around with
that in a little bit.

00:07:54.470 --> 00:07:56.990 align:middle line:90%


00:07:56.990 --> 00:08:00.140 align:middle line:84%
Just wanted to show what
it's supposed to do.

00:08:00.140 --> 00:08:03.200 align:middle line:84%
You type in Joe, it does a
search, comes up with GI Joe.

00:08:03.200 --> 00:08:06.980 align:middle line:90%


00:08:06.980 --> 00:08:10.040 align:middle line:84%
We'll play more with
what the outcomes are

00:08:10.040 --> 00:08:12.560 align:middle line:90%
going to be in a little bit.

00:08:12.560 --> 00:08:18.670 align:middle line:90%
Once we, again, get into--

00:08:18.670 --> 00:08:20.470 align:middle line:84%
what's going on
in this back end?

00:08:20.470 --> 00:08:23.890 align:middle line:84%
We're just doing some
manual navigation around,

00:08:23.890 --> 00:08:32.299 align:middle line:84%
and that is storing up all of
these sites that we visited.

00:08:32.299 --> 00:08:33.799 align:middle line:84%
The sites that we
visit are going

00:08:33.799 --> 00:08:38.220 align:middle line:84%
to then be part of
what we're looking for.

00:08:38.220 --> 00:08:43.520 align:middle line:84%
So that is pretty
good right there.

00:08:43.520 --> 00:08:46.930 align:middle line:84%
I'm going to go find this
login, the post login.php.

00:08:46.930 --> 00:08:52.360 align:middle line:90%


00:08:52.360 --> 00:08:54.260 align:middle line:90%
Yes.

00:08:54.260 --> 00:08:59.630 align:middle line:84%
And what I'm going to do
here is include in context.

00:08:59.630 --> 00:09:00.810 align:middle line:90%
This is important.

00:09:00.810 --> 00:09:02.600 align:middle line:84%
We want to set
context, and we'll

00:09:02.600 --> 00:09:07.640 align:middle line:84%
set it as default
context, and that's fine.

00:09:07.640 --> 00:09:11.480 align:middle line:84%
And over here on the left, we're
going to choose authentication,

00:09:11.480 --> 00:09:14.270 align:middle line:84%
and we can do form-based
authentication.

00:09:14.270 --> 00:09:16.490 align:middle line:84%
And we can select
which form, we'll

00:09:16.490 --> 00:09:20.000 align:middle line:84%
go over here to the
right, and tell it

00:09:20.000 --> 00:09:23.345 align:middle line:84%
that we want that same form
that was from post login

00:09:23.345 --> 00:09:26.060 align:middle line:90%
we actually logged in.

00:09:26.060 --> 00:09:31.320 align:middle line:84%
It was, see, bee and bug,
this was the post data.

00:09:31.320 --> 00:09:32.750 align:middle line:90%
So we want that.

00:09:32.750 --> 00:09:34.820 align:middle line:84%
We're going to choose
something different here.

00:09:34.820 --> 00:09:36.650 align:middle line:90%
Username parameter.

00:09:36.650 --> 00:09:40.400 align:middle line:84%
It says login, so
we'll go with login.

00:09:40.400 --> 00:09:43.370 align:middle line:84%
And then there's this
Regex pattern identified

00:09:43.370 --> 00:09:46.100 align:middle line:90%
in logout response message.

00:09:46.100 --> 00:09:50.450 align:middle line:84%
And for that, we'll just
put login with a capital L.

00:09:50.450 --> 00:09:54.070 align:middle line:84%
When we log out, it
will show up as login,

00:09:54.070 --> 00:09:55.070 align:middle line:90%
if that makes any sense.

00:09:55.070 --> 00:10:00.160 align:middle line:90%


00:10:00.160 --> 00:10:02.820 align:middle line:84%
And that's important
because we--

00:10:02.820 --> 00:10:05.460 align:middle line:84%
we're about to set things
up, so automatically

00:10:05.460 --> 00:10:07.660 align:middle line:90%
checks for some things for us.

00:10:07.660 --> 00:10:11.370 align:middle line:84%
So telling it-- a Regex pattern
to identify whether it's

00:10:11.370 --> 00:10:13.830 align:middle line:84%
been logged out or
not is important

00:10:13.830 --> 00:10:15.450 align:middle line:84%
because then it
will try to log back

00:10:15.450 --> 00:10:18.315 align:middle line:90%
in and do a few other things.

00:10:18.315 --> 00:10:25.292 align:middle line:90%


00:10:25.292 --> 00:10:26.250 align:middle line:90%
Let's go back to that--

00:10:26.250 --> 00:10:32.720 align:middle line:90%


00:10:32.720 --> 00:10:34.790 align:middle line:84%
or rather I will
in just a second.

00:10:34.790 --> 00:10:54.100 align:middle line:90%


00:10:54.100 --> 00:11:04.800 align:middle line:84%
Didn't get forced-- this
forced user mode disabled,

00:11:04.800 --> 00:11:05.880 align:middle line:90%
wanted to turn that on.

00:11:05.880 --> 00:11:10.755 align:middle line:84%
I forgot to include
users, so bee and bug.

00:11:10.755 --> 00:11:16.990 align:middle line:90%


00:11:16.990 --> 00:11:21.130 align:middle line:84%
And that is important,
we need that checked.

00:11:21.130 --> 00:11:21.730 align:middle line:90%
There you go.

00:11:21.730 --> 00:11:28.360 align:middle line:84%
Now that, that is checked,
we can click up here

00:11:28.360 --> 00:11:32.770 align:middle line:84%
and the forced user mode
enabled, so now it's enabled.

00:11:32.770 --> 00:11:33.410 align:middle line:90%
There we go.

00:11:33.410 --> 00:11:35.780 align:middle line:90%
That'll help us out.

00:11:35.780 --> 00:11:36.710 align:middle line:90%
Important steps.

00:11:36.710 --> 00:11:39.870 align:middle line:90%


00:11:39.870 --> 00:11:43.920 align:middle line:84%
Now we go back, and
this whole site I'm

00:11:43.920 --> 00:11:47.500 align:middle line:84%
going to include in context,
in that default context.

00:11:47.500 --> 00:11:50.820 align:middle line:84%
So now it shows
everything after--

00:11:50.820 --> 00:11:52.470 align:middle line:84%
just the URL is
going to be included.

00:11:52.470 --> 00:11:59.552 align:middle line:90%


00:11:59.552 --> 00:12:01.160 align:middle line:90%
Hit OK on that.

00:12:01.160 --> 00:12:03.460 align:middle line:84%
Now that we have
the context set,

00:12:03.460 --> 00:12:07.300 align:middle line:84%
that context having
the login.php without

00:12:07.300 --> 00:12:14.760 align:middle line:84%
authentication and our user,
going to go back to the full

00:12:14.760 --> 00:12:16.260 align:middle line:90%
URL--

00:12:16.260 --> 00:12:19.440 align:middle line:90%
I'm sorry, I guess the root URL.

00:12:19.440 --> 00:12:23.770 align:middle line:84%
We're going to attack and
we're going to spider it.

00:12:23.770 --> 00:12:28.960 align:middle line:84%
We keep the default context
and we'll pick a user.

00:12:28.960 --> 00:12:31.610 align:middle line:84%
We had set bee in
there as a user to use.

00:12:31.610 --> 00:12:36.460 align:middle line:90%
So that is all good to go.

00:12:36.460 --> 00:12:43.145 align:middle line:84%
And recursive is good, and
we will start the scan.

00:12:43.145 --> 00:12:46.230 align:middle line:84%
This is going to be
a pretty quick scan.

00:12:46.230 --> 00:12:48.990 align:middle line:84%
What it's doing is
it's spidering out.

00:12:48.990 --> 00:12:55.140 align:middle line:84%
You can see now we've got the
spider in all of our sites

00:12:55.140 --> 00:12:56.760 align:middle line:90%
there.

00:12:56.760 --> 00:13:02.940 align:middle line:84%
What it did is it walked
through the whole site

00:13:02.940 --> 00:13:10.640 align:middle line:84%
and included all of those
pages in our list here.

00:13:10.640 --> 00:13:13.370 align:middle line:84%
Since our context
includes everything

00:13:13.370 --> 00:13:18.540 align:middle line:84%
from the root of just the
IP address, now all of these

00:13:18.540 --> 00:13:21.400 align:middle line:90%
are in our context.

00:13:21.400 --> 00:13:23.575 align:middle line:90%
That is helpful.

00:13:23.575 --> 00:13:30.030 align:middle line:84%
And we can see that
we found 201 URLs.

00:13:30.030 --> 00:13:31.750 align:middle line:90%
So that is pretty neat.

00:13:31.750 --> 00:13:34.530 align:middle line:84%
You can even see how they
were found if you wanted

00:13:34.530 --> 00:13:38.570 align:middle line:90%
to go through all these URLs.

00:13:38.570 --> 00:13:42.540 align:middle line:84%
We've done directory and
file busting in the past.

00:13:42.540 --> 00:13:46.200 align:middle line:84%
Well, we just use a spider
to do all that for us.

00:13:46.200 --> 00:13:48.870 align:middle line:84%
And it practiced, it
used the credentials

00:13:48.870 --> 00:13:53.340 align:middle line:84%
that we gave us and did
get requests and post

00:13:53.340 --> 00:13:56.080 align:middle line:90%
requests to find all that.

00:13:56.080 --> 00:13:58.120 align:middle line:90%
Pretty neat.

00:13:58.120 --> 00:14:07.770 align:middle line:84%
Well, now back to the
root here and attack,

00:14:07.770 --> 00:14:09.675 align:middle line:84%
and we're going to
do an active scan.

00:14:09.675 --> 00:14:12.280 align:middle line:90%


00:14:12.280 --> 00:14:16.700 align:middle line:90%
And we'll pick bee as our user.

00:14:16.700 --> 00:14:19.210 align:middle line:84%
Everything else we will
leave as the default,

00:14:19.210 --> 00:14:20.740 align:middle line:90%
and we will start this scan.

00:14:20.740 --> 00:14:30.210 align:middle line:90%


00:14:30.210 --> 00:14:31.860 align:middle line:90%
All right, our scan is complete.

00:14:31.860 --> 00:14:34.660 align:middle line:84%
I changed the window
around a little bit,

00:14:34.660 --> 00:14:37.140 align:middle line:90%
so it's easier to read things.

00:14:37.140 --> 00:14:42.240 align:middle line:84%
But we came across three highly
critical alerts, three medium

00:14:42.240 --> 00:14:45.150 align:middle line:84%
and three low, and some
informational-- let's actually

00:14:45.150 --> 00:14:45.960 align:middle line:90%
look at the alerts.

00:14:45.960 --> 00:14:48.660 align:middle line:90%
There's a tab here.

00:14:48.660 --> 00:14:51.160 align:middle line:90%
14 alert types.

00:14:51.160 --> 00:14:54.180 align:middle line:84%
First one's going to be
cross-site scripting,

00:14:54.180 --> 00:14:57.370 align:middle line:90%
and it's persistent.

00:14:57.370 --> 00:15:02.410 align:middle line:84%
And you can go into
detail about it here.

00:15:02.410 --> 00:15:03.550 align:middle line:90%
I'll talk about it.

00:15:03.550 --> 00:15:05.350 align:middle line:84%
What we just did was
very similar to when

00:15:05.350 --> 00:15:10.960 align:middle line:84%
we ran that Nessus scan in a
previous lab in this pathway.

00:15:10.960 --> 00:15:17.470 align:middle line:84%
This is one tool for utilizing
both directory enumeration

00:15:17.470 --> 00:15:20.200 align:middle line:84%
as well as scanning
for vulnerabilities.

00:15:20.200 --> 00:15:21.580 align:middle line:90%
It'll scan what it knows.

00:15:21.580 --> 00:15:24.640 align:middle line:90%
It'll scan how it knows.

00:15:24.640 --> 00:15:28.290 align:middle line:84%
You don't want to put all
your eggs in one basket.

00:15:28.290 --> 00:15:31.170 align:middle line:84%
Hitting things with ZAP
might be out of scope,

00:15:31.170 --> 00:15:33.450 align:middle line:84%
it might be too much,
It might break things.

00:15:33.450 --> 00:15:37.440 align:middle line:84%
Knowing what tools are in
scope and what you're actually

00:15:37.440 --> 00:15:39.690 align:middle line:84%
getting out of them and what
you're actually providing

00:15:39.690 --> 00:15:41.800 align:middle line:90%
to your client is important.

00:15:41.800 --> 00:15:43.813 align:middle line:84%
So whether you're
going to run Nessus,

00:15:43.813 --> 00:15:46.230 align:middle line:84%
whether you're going to do
this all manually, use a proxy,

00:15:46.230 --> 00:15:50.190 align:middle line:84%
use Burp Suite, whichever it
is, you need to scope that out

00:15:50.190 --> 00:15:53.160 align:middle line:84%
properly, understand what
your tools are doing,

00:15:53.160 --> 00:15:56.550 align:middle line:84%
and then be able to
utilize these findings,

00:15:56.550 --> 00:15:59.820 align:middle line:84%
these alerts, and put
them into a useful report.

00:15:59.820 --> 00:16:02.010 align:middle line:84%
Whenever we came across
directories, be it

00:16:02.010 --> 00:16:08.640 align:middle line:84%
with Dirb, or DirBuster,
GoBuster, or BURP, or ZAProxy,

00:16:08.640 --> 00:16:11.110 align:middle line:84%
we want to take
that information,

00:16:11.110 --> 00:16:13.620 align:middle line:84%
store it somewhere,
maybe manually go

00:16:13.620 --> 00:16:16.200 align:middle line:84%
through each of the sites
that we come across.

00:16:16.200 --> 00:16:18.180 align:middle line:84%
If this is a web app
pen test and you're

00:16:18.180 --> 00:16:21.270 align:middle line:84%
expected to find things
in each of those websites,

00:16:21.270 --> 00:16:24.490 align:middle line:84%
then you want to make
sure you do all of that.

00:16:24.490 --> 00:16:29.730 align:middle line:84%
But let's look at what
these alerts now mean.

00:16:29.730 --> 00:16:34.140 align:middle line:84%
So cross-site scripting,
persistent alert.

00:16:34.140 --> 00:16:38.040 align:middle line:84%
And if you don't know what
cross-site scripting is,

00:16:38.040 --> 00:16:39.930 align:middle line:84%
it's an attack
technique, involves

00:16:39.930 --> 00:16:41.700 align:middle line:84%
echoing an
attacker-supplied code

00:16:41.700 --> 00:16:44.550 align:middle line:90%
into a user's browser instance.

00:16:44.550 --> 00:16:49.200 align:middle line:84%
It gives us a URL where
it was vulnerable.

00:16:49.200 --> 00:16:51.990 align:middle line:90%
So let's navigate there.

00:16:51.990 --> 00:16:56.700 align:middle line:84%
This is the browser
that is running the HUD.

00:16:56.700 --> 00:17:01.350 align:middle line:84%
And we see here that there's
a place to do HTML injection.

00:17:01.350 --> 00:17:07.319 align:middle line:84%
And it tells us if
we use this code here

00:17:07.319 --> 00:17:09.586 align:middle line:90%
that it will do something.

00:17:09.586 --> 00:17:24.510 align:middle line:90%


00:17:24.510 --> 00:17:25.570 align:middle line:90%
And did it freeze.

00:17:25.570 --> 00:17:37.160 align:middle line:90%


00:17:37.160 --> 00:17:37.860 align:middle line:90%
There you go.

00:17:37.860 --> 00:17:39.420 align:middle line:90%
Added to scope.

00:17:39.420 --> 00:17:41.970 align:middle line:84%
Now it's in scope,
not sure why it

00:17:41.970 --> 00:17:46.770 align:middle line:84%
wasn't including in scope
before for the HUD, but it's in.

00:17:46.770 --> 00:17:51.840 align:middle line:84%
Threw in that code that it
got right out of ZAProxy,

00:17:51.840 --> 00:17:55.000 align:middle line:84%
and we run it and we see we get
an alert box with the number 1

00:17:55.000 --> 00:17:55.500 align:middle line:90%
inside.

00:17:55.500 --> 00:18:01.730 align:middle line:90%


00:18:01.730 --> 00:18:03.950 align:middle line:84%
And it was an alert
with 1 inside.

00:18:03.950 --> 00:18:04.800 align:middle line:90%
So that makes sense.

00:18:04.800 --> 00:18:08.570 align:middle line:84%
So this page is vulnerable to
that, also included entries

00:18:08.570 --> 00:18:09.870 align:middle line:90%
for us.

00:18:09.870 --> 00:18:12.140 align:middle line:84%
So that's-- taking
what we found,

00:18:12.140 --> 00:18:19.010 align:middle line:84%
doing a proof of concept,
we can also look over here,

00:18:19.010 --> 00:18:23.040 align:middle line:84%
in the HUD, those same three
high ones show up here.

00:18:23.040 --> 00:18:26.990 align:middle line:84%
So we just did
that htmli stored.

00:18:26.990 --> 00:18:31.390 align:middle line:84%
We go look at this cross-site
scripting reflected.

00:18:31.390 --> 00:18:33.860 align:middle line:84%
Now that says we did something
on the site and we saw it.

00:18:33.860 --> 00:18:37.090 align:middle line:90%


00:18:37.090 --> 00:18:39.700 align:middle line:84%
This one, it's
another technique.

00:18:39.700 --> 00:18:43.030 align:middle line:90%


00:18:43.030 --> 00:18:46.020 align:middle line:90%
So you can go to--

00:18:46.020 --> 00:18:52.180 align:middle line:84%
we can replay this one in the
browser, which is kind of nice.

00:18:52.180 --> 00:18:54.520 align:middle line:84%
It'll take us right
there, and boom,

00:18:54.520 --> 00:18:58.870 align:middle line:84%
it ran the SQLI
with a get request,

00:18:58.870 --> 00:19:05.540 align:middle line:84%
so it utilized the code in the
URL and it gave us the alert.

00:19:05.540 --> 00:19:08.680 align:middle line:90%


00:19:08.680 --> 00:19:11.125 align:middle line:84%
Let's go into the last
critical one that we have here.

00:19:11.125 --> 00:19:13.980 align:middle line:90%


00:19:13.980 --> 00:19:15.810 align:middle line:90%
It is the SQL injection.

00:19:15.810 --> 00:19:19.600 align:middle line:90%


00:19:19.600 --> 00:19:22.390 align:middle line:84%
And we'll just click
on it, navigate there.

00:19:22.390 --> 00:19:26.560 align:middle line:84%
And so SQL injection
may be possible.

00:19:26.560 --> 00:19:30.940 align:middle line:84%
The attack is this
ZAP or 1 equals 1.

00:19:30.940 --> 00:19:37.870 align:middle line:84%
So I'm going to copy that code,
and then we'll navigate here.

00:19:37.870 --> 00:19:39.670 align:middle line:84%
And we can replay
this in the browser.

00:19:39.670 --> 00:19:40.960 align:middle line:90%
We didn't get anything.

00:19:40.960 --> 00:19:49.360 align:middle line:84%
We searched for ZAP and
then this comment plus and 1

00:19:49.360 --> 00:19:51.620 align:middle line:90%
equals 1, that's what--

00:19:51.620 --> 00:19:58.810 align:middle line:84%
this is a URL
encoding for equals.

00:19:58.810 --> 00:20:04.730 align:middle line:84%
If we replace this and
with or, like it showed us,

00:20:04.730 --> 00:20:12.660 align:middle line:84%
and then we run it again, now
we've done some binary math,

00:20:12.660 --> 00:20:13.160 align:middle line:90%
really.

00:20:13.160 --> 00:20:18.690 align:middle line:84%
So we put it in an or gate, and
if either one of them is true,

00:20:18.690 --> 00:20:20.540 align:middle line:90%
then the whole thing is true.

00:20:20.540 --> 00:20:24.140 align:middle line:84%
If the whole thing is true, SQL
is going to spit out everything

00:20:24.140 --> 00:20:24.825 align:middle line:90%
that we've got.

00:20:24.825 --> 00:20:27.200 align:middle line:84%
Haven't really gotten into
SQL injection what it's doing,

00:20:27.200 --> 00:20:28.530 align:middle line:90%
but that's what this is.

00:20:28.530 --> 00:20:32.000 align:middle line:90%
So we searched for ZAP.

00:20:32.000 --> 00:20:37.090 align:middle line:84%
And then what we also
did is do search for ZAP,

00:20:37.090 --> 00:20:39.610 align:middle line:84%
also search for anything
else that's true.

00:20:39.610 --> 00:20:42.760 align:middle line:84%
1 equals 1 is true, it
evaluates this true.

00:20:42.760 --> 00:20:48.040 align:middle line:84%
If your SQL input
is not sanitized

00:20:48.040 --> 00:20:51.790 align:middle line:84%
to not take any
extra characters,

00:20:51.790 --> 00:20:53.920 align:middle line:84%
then this is what
you're able to do.

00:20:53.920 --> 00:20:56.710 align:middle line:90%


00:20:56.710 --> 00:20:58.690 align:middle line:90%
We spit out the whole database.

00:20:58.690 --> 00:21:02.490 align:middle line:90%


00:21:02.490 --> 00:21:07.480 align:middle line:84%
And it's not, in this
situation, terribly important,

00:21:07.480 --> 00:21:11.160 align:middle line:84%
but depending on what
your input is, perhaps

00:21:11.160 --> 00:21:17.400 align:middle line:84%
it's a place to input
data, to be stored,

00:21:17.400 --> 00:21:21.090 align:middle line:90%
or maybe it's a e-commerce site.

00:21:21.090 --> 00:21:24.307 align:middle line:84%
So when you go to the search,
if you're able to inject SQL,

00:21:24.307 --> 00:21:26.640 align:middle line:84%
maybe you get access to things
that you weren't supposed

00:21:26.640 --> 00:21:32.700 align:middle line:84%
to have, including possibly
usernames, passwords, customer

00:21:32.700 --> 00:21:35.970 align:middle line:84%
information, all of those
would be very, very bad

00:21:35.970 --> 00:21:38.910 align:middle line:84%
for your e-commerce site to
leak through SQL injection.

00:21:38.910 --> 00:21:47.470 align:middle line:90%


00:21:47.470 --> 00:21:51.340 align:middle line:84%
And so that's how we can
use both the alerts here

00:21:51.340 --> 00:21:57.670 align:middle line:84%
from ZAProxy or
through the HUD here.

00:21:57.670 --> 00:22:00.880 align:middle line:84%
It's a neat tool, it's
a very helpful tool.

00:22:00.880 --> 00:22:03.940 align:middle line:84%
If you're getting
started and you're not

00:22:03.940 --> 00:22:06.740 align:middle line:84%
super familiar with
how all of this works,

00:22:06.740 --> 00:22:10.120 align:middle line:84%
this is a great
introduction to everything

00:22:10.120 --> 00:22:12.400 align:middle line:84%
that is web app
penetration testing.

00:22:12.400 --> 00:22:16.840 align:middle line:84%
Hopefully now that we've gone
through some of the basics

00:22:16.840 --> 00:22:19.990 align:middle line:84%
and you've seen how a
tool like this works,

00:22:19.990 --> 00:22:25.090 align:middle line:84%
if you come across a website,
you can run a few basic steps

00:22:25.090 --> 00:22:28.880 align:middle line:84%
and maybe learn some information
to include in the report.

00:22:28.880 --> 00:22:31.880 align:middle line:84%
This is not a full web app
penetration testing course.

00:22:31.880 --> 00:22:34.120 align:middle line:84%
We are going to go
through some more tools,

00:22:34.120 --> 00:22:37.690 align:middle line:84%
but at least you will have
something in your toolbox

00:22:37.690 --> 00:22:39.660 align:middle line:90%
ready to go.

00:22:39.660 --> 00:22:40.388 align:middle line:90%