WEBVTT

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


00:00:03.367 --> 00:00:06.734 align:middle line:90%
[MUSIC PLAYING]

00:00:06.734 --> 00:00:10.110 align:middle line:90%


00:00:10.110 --> 00:00:12.510 align:middle line:90%
WAF detection with wafw00f.

00:00:12.510 --> 00:00:13.530 align:middle line:90%
What is a WAF?

00:00:13.530 --> 00:00:16.379 align:middle line:84%
A WAF is a Web
Application Firewall.

00:00:16.379 --> 00:00:18.870 align:middle line:84%
And in this video, we're going
to be taking a look at how

00:00:18.870 --> 00:00:22.710 align:middle line:84%
to detect web application
firewalls with a tool called

00:00:22.710 --> 00:00:24.350 align:middle line:90%
wafw00f--

00:00:24.350 --> 00:00:25.290 align:middle line:90%
really cool name.

00:00:25.290 --> 00:00:28.970 align:middle line:84%
So as I said, we're going
to be utilizing Kali Linux.

00:00:28.970 --> 00:00:32.000 align:middle line:84%
And, in this case, I'm going
to be using my own Kali Linux

00:00:32.000 --> 00:00:34.713 align:middle line:84%
VM because, again,
we're doing this on--

00:00:34.713 --> 00:00:37.130 align:middle line:84%
we're essentially going to be
interacting with the website

00:00:37.130 --> 00:00:38.160 align:middle line:90%
on the internet.

00:00:38.160 --> 00:00:39.950 align:middle line:84%
So again, you can
follow along, and we're

00:00:39.950 --> 00:00:41.930 align:middle line:84%
going to be utilizing
the same sites that we've

00:00:41.930 --> 00:00:43.110 align:middle line:90%
been using so far.

00:00:43.110 --> 00:00:49.000 align:middle line:84%
So I'm just going to switch
over to my Kali Linux VM.

00:00:49.000 --> 00:00:52.180 align:middle line:84%
All right, so I am back
on my Kali Linux VM.

00:00:52.180 --> 00:00:55.090 align:middle line:84%
And as you can see, I'm
currently on the wafw00f GitHub

00:00:55.090 --> 00:00:56.585 align:middle line:90%
repository.

00:00:56.585 --> 00:00:59.210 align:middle line:84%
I'll give you a little bit of a
description as to what it does.

00:00:59.210 --> 00:01:01.840 align:middle line:84%
So you can see that wafw00f
is the web application

00:01:01.840 --> 00:01:03.740 align:middle line:90%
firewall fingerprinting tool.

00:01:03.740 --> 00:01:04.629 align:middle line:90%
How does it work?

00:01:04.629 --> 00:01:07.750 align:middle line:84%
It essentially sends
a normal HTTP request

00:01:07.750 --> 00:01:10.070 align:middle line:90%
and analyzes the response.

00:01:10.070 --> 00:01:13.510 align:middle line:84%
This will essentially identify
a number of WAF solutions.

00:01:13.510 --> 00:01:15.760 align:middle line:84%
Now, the really cool
thing about this tool

00:01:15.760 --> 00:01:19.240 align:middle line:84%
is I've used it in
multiple penetration tests,

00:01:19.240 --> 00:01:22.960 align:middle line:84%
and it's really, really cool
or very useful in identifying

00:01:22.960 --> 00:01:25.990 align:middle line:84%
or quickly identifying
whether a website or web

00:01:25.990 --> 00:01:29.590 align:middle line:84%
application is being protected
by a web application firewall.

00:01:29.590 --> 00:01:33.790 align:middle line:84%
And not just that-- it
just doesn't tell you

00:01:33.790 --> 00:01:36.820 align:middle line:84%
that the site is being
protected by a firewall or web

00:01:36.820 --> 00:01:37.870 align:middle line:90%
application firewall.

00:01:37.870 --> 00:01:40.930 align:middle line:84%
It tells you the actual
web application firewall

00:01:40.930 --> 00:01:42.070 align:middle line:90%
that's protecting the site.

00:01:42.070 --> 00:01:45.080 align:middle line:84%
And you'll actually
see this in action.

00:01:45.080 --> 00:01:49.240 align:middle line:84%
So you can view the list of
web application firewalls

00:01:49.240 --> 00:01:51.550 align:middle line:90%
that can be detected by wafw00f.

00:01:51.550 --> 00:01:55.450 align:middle line:84%
So that can be done by
typing in wafw00f and -l.

00:01:55.450 --> 00:01:59.230 align:middle line:84%
Now, I believe wafw00f comes
prepackaged with Kali Linux.

00:01:59.230 --> 00:02:00.650 align:middle line:90%
Let's actually test that out.

00:02:00.650 --> 00:02:02.420 align:middle line:84%
So I'm just going to
open up a terminal,

00:02:02.420 --> 00:02:03.640 align:middle line:90%
and let's see if we have it.

00:02:03.640 --> 00:02:04.490 align:middle line:90%
Yeah, there we are.

00:02:04.490 --> 00:02:05.510 align:middle line:90%
Looks like we have it.

00:02:05.510 --> 00:02:08.979 align:middle line:84%
So we can list out
the list of firewalls

00:02:08.979 --> 00:02:10.330 align:middle line:90%
that wafw00f will detect.

00:02:10.330 --> 00:02:13.600 align:middle line:84%
So you can see you pretty
much have all the proxies, all

00:02:13.600 --> 00:02:17.590 align:middle line:84%
the firewalls or web application
firewalls, like Cloudflare.

00:02:17.590 --> 00:02:21.830 align:middle line:84%
We also have BlockDoS,
Beluga, so on, and so forth.

00:02:21.830 --> 00:02:24.400 align:middle line:84%
We also have BitNinja--
very, very popular.

00:02:24.400 --> 00:02:25.900 align:middle line:84%
And, yeah, this
will just give you

00:02:25.900 --> 00:02:27.817 align:middle line:84%
an idea as to what you're
dealing with, right?

00:02:27.817 --> 00:02:30.370 align:middle line:84%
So whenever you're performing
passive reconnaissance

00:02:30.370 --> 00:02:32.770 align:middle line:84%
on a website, you really want
to know whether it's being

00:02:32.770 --> 00:02:34.900 align:middle line:84%
protected by a web
application firewall

00:02:34.900 --> 00:02:37.900 align:middle line:84%
because, as you've seen
with hackersploit.org

00:02:37.900 --> 00:02:42.430 align:middle line:84%
because it's going
through Cloudflare,

00:02:42.430 --> 00:02:46.300 align:middle line:84%
you firstly cannot identify the
IP address of the actual web

00:02:46.300 --> 00:02:47.800 align:middle line:84%
server that's
hosting the website.

00:02:47.800 --> 00:02:52.720 align:middle line:84%
So identifying that a site
is being protected by a web

00:02:52.720 --> 00:02:56.140 align:middle line:84%
application firewall will
help you better strategize

00:02:56.140 --> 00:02:58.670 align:middle line:90%
what your next steps are.

00:02:58.670 --> 00:03:02.090 align:middle line:84%
So what we're going
to do now is--

00:03:02.090 --> 00:03:03.680 align:middle line:84%
if we take a look
at the instructions,

00:03:03.680 --> 00:03:04.890 align:middle line:90%
it's very easy to use.

00:03:04.890 --> 00:03:08.690 align:middle line:84%
We can just type in wafw00f
and then hackersploit.org.

00:03:08.690 --> 00:03:10.710 align:middle line:84%
And let's see the
output it provides here.

00:03:10.710 --> 00:03:12.470 align:middle line:84%
So it's going to
start it up, and you

00:03:12.470 --> 00:03:17.237 align:middle line:84%
see we have the really cool
dog icon or dog ASCII art here.

00:03:17.237 --> 00:03:19.070 align:middle line:84%
So you can see it's
going to check the site,

00:03:19.070 --> 00:03:20.800 align:middle line:84%
and it tells us the
site hackersploit.org

00:03:20.800 --> 00:03:23.120 align:middle line:90%
is behind Cloudflare.

00:03:23.120 --> 00:03:24.325 align:middle line:90%
Fantastic.

00:03:24.325 --> 00:03:25.700 align:middle line:84%
So we could have
run this before,

00:03:25.700 --> 00:03:29.330 align:middle line:84%
but I wanted to actually
highlight this particular tool

00:03:29.330 --> 00:03:30.260 align:middle line:90%
in its own video.

00:03:30.260 --> 00:03:33.590 align:middle line:84%
Well, let's try and see
whether zonetransfer.me

00:03:33.590 --> 00:03:36.440 align:middle line:84%
is being protected by any
web application firewall

00:03:36.440 --> 00:03:38.960 align:middle line:84%
because that's something
that we really couldn't tell

00:03:38.960 --> 00:03:42.110 align:middle line:84%
from the whois lookup
or the DNS lookup

00:03:42.110 --> 00:03:45.133 align:middle line:84%
or when we performed
DNS reconnaissance

00:03:45.133 --> 00:03:46.050 align:middle line:90%
in the previous video.

00:03:46.050 --> 00:03:51.270 align:middle line:84%
So I'll type in wafw00f, and
the domain is zonetransfer.me.

00:03:51.270 --> 00:03:54.380 align:middle line:84%
So I'll hit Enter, and
let's see what happens,

00:03:54.380 --> 00:03:56.570 align:middle line:84%
or let's see whether
this site is indeed

00:03:56.570 --> 00:04:00.470 align:middle line:84%
being protected by some
form of a web application

00:04:00.470 --> 00:04:02.390 align:middle line:90%
firewall or proxy.

00:04:02.390 --> 00:04:05.600 align:middle line:84%
All right, so you can
see that wafw00f tells us

00:04:05.600 --> 00:04:08.870 align:middle line:84%
that this site is not being
protected by a web application

00:04:08.870 --> 00:04:09.770 align:middle line:90%
firewall.

00:04:09.770 --> 00:04:10.710 align:middle line:90%
Fantastic.

00:04:10.710 --> 00:04:13.190 align:middle line:84%
So that pretty much
means that the IP address

00:04:13.190 --> 00:04:17.060 align:middle line:84%
we identified with DNSdumpster
in the previous video

00:04:17.060 --> 00:04:20.269 align:middle line:84%
could possibly be the IP
address of the server that's

00:04:20.269 --> 00:04:22.670 align:middle line:90%
actually hosting that website.

00:04:22.670 --> 00:04:26.760 align:middle line:84%
Now, let's try this on
hackertube.net, which I own.

00:04:26.760 --> 00:04:31.160 align:middle line:84%
So I'm giving you the permission
to do this, so hackertube.net.

00:04:31.160 --> 00:04:34.610 align:middle line:84%
You should see that this one
is behind a web application

00:04:34.610 --> 00:04:35.113 align:middle line:90%
firewall.

00:04:35.113 --> 00:04:36.530 align:middle line:84%
And in this case,
it tells us it's

00:04:36.530 --> 00:04:38.330 align:middle line:84%
behind LiteSpeed,
which is interesting

00:04:38.330 --> 00:04:41.820 align:middle line:84%
because it's actually behind
Sucuri, but there we are.

00:04:41.820 --> 00:04:44.730 align:middle line:84%
It's fairly simple to use,
fairly simple to understand.

00:04:44.730 --> 00:04:47.600 align:middle line:84%
You can take a look at the
usage instructions provided

00:04:47.600 --> 00:04:49.340 align:middle line:90%
on the GitHub repository.

00:04:49.340 --> 00:04:51.170 align:middle line:84%
As you can see, we
don't really need

00:04:51.170 --> 00:04:54.140 align:middle line:84%
to install it because it
comes prepackaged with Kali.

00:04:54.140 --> 00:04:57.590 align:middle line:84%
And all you need to do is just
specify the actual website

00:04:57.590 --> 00:04:58.260 align:middle line:90%
itself.

00:04:58.260 --> 00:05:00.770 align:middle line:84%
So the correct way
of specifying it

00:05:00.770 --> 00:05:04.940 align:middle line:84%
is by specifying the actual
schema or protocol first.

00:05:04.940 --> 00:05:08.240 align:middle line:84%
And let's see whether that
changes the output of wafw00f.

00:05:08.240 --> 00:05:10.040 align:middle line:84%
Indeed, it doesn't,
and, of course, I'm

00:05:10.040 --> 00:05:11.990 align:middle line:90%
going to assume it doesn't do--

00:05:11.990 --> 00:05:14.930 align:middle line:84%
it'll not change the output
for both the websites

00:05:14.930 --> 00:05:16.650 align:middle line:90%
that we tested earlier.

00:05:16.650 --> 00:05:19.250 align:middle line:84%
So that's pretty much
how to use wafw00f.

00:05:19.250 --> 00:05:21.050 align:middle line:84%
You can take a look
at the documentation.

00:05:21.050 --> 00:05:23.360 align:middle line:90%
It's really well documented.

00:05:23.360 --> 00:05:25.730 align:middle line:84%
And you can test
multiple targets.

00:05:25.730 --> 00:05:27.680 align:middle line:84%
You can test for a
single WAF instance,

00:05:27.680 --> 00:05:30.870 align:middle line:84%
or you can test for all
possible WAF instances.

00:05:30.870 --> 00:05:32.940 align:middle line:90%
So let's try that right now.

00:05:32.940 --> 00:05:38.510 align:middle line:84%
So you can see that if we wanted
to test for all possible WAF

00:05:38.510 --> 00:05:41.250 align:middle line:84%
instances, we can
utilize the -a argument.

00:05:41.250 --> 00:05:43.610 align:middle line:84%
So let's try that
against hackertube.net.

00:05:43.610 --> 00:05:47.270 align:middle line:84%
So I'll just type in -a there
at the end of the argument

00:05:47.270 --> 00:05:49.170 align:middle line:90%
or at the end of the command.

00:05:49.170 --> 00:05:51.650 align:middle line:84%
So it still tells
us-- there we are.

00:05:51.650 --> 00:05:54.030 align:middle line:84%
We actually get the information
we were looking for.

00:05:54.030 --> 00:05:59.270 align:middle line:84%
So it tells us that it's behind
LiteSpeed and/or the Sucuri

00:05:59.270 --> 00:06:02.370 align:middle line:84%
CloudProxy, which is
very, very interesting.

00:06:02.370 --> 00:06:05.630 align:middle line:84%
So you can see that you actually
need to tweak your checks.

00:06:05.630 --> 00:06:08.630 align:middle line:84%
So let's try and do that
for zonetransfer.me just

00:06:08.630 --> 00:06:10.860 align:middle line:90%
to see if we missed anything.

00:06:10.860 --> 00:06:13.520 align:middle line:84%
So I'm just going to
let this complete.

00:06:13.520 --> 00:06:15.890 align:middle line:84%
If it takes longer, then
that means that there really

00:06:15.890 --> 00:06:19.700 align:middle line:84%
isn't a proxy or web application
firewall intercepting

00:06:19.700 --> 00:06:21.810 align:middle line:90%
or filtering the traffic.

00:06:21.810 --> 00:06:24.340 align:middle line:90%
So again, there we are.

00:06:24.340 --> 00:06:26.790 align:middle line:90%
It looks like it is a--

00:06:26.790 --> 00:06:30.690 align:middle line:90%
there doesn't seem to be a WAF.

00:06:30.690 --> 00:06:33.090 align:middle line:84%
But right over
here, you can see,

00:06:33.090 --> 00:06:34.710 align:middle line:84%
when we performed
all the checks,

00:06:34.710 --> 00:06:38.550 align:middle line:84%
it tells that the site
seems to be behind a WAF.

00:06:38.550 --> 00:06:40.620 align:middle line:84%
The only way to
conclusively test this

00:06:40.620 --> 00:06:44.530 align:middle line:84%
would be within the active
information-gathering phase,

00:06:44.530 --> 00:06:47.460 align:middle line:84%
where we can perform
a port scan on the IP

00:06:47.460 --> 00:06:52.260 align:middle line:84%
address of the actual web server
that we were able to identify.

00:06:52.260 --> 00:06:53.170 align:middle line:90%
But there we are.

00:06:53.170 --> 00:06:55.320 align:middle line:84%
That's how to use
wafw00f, and that

00:06:55.320 --> 00:06:58.410 align:middle line:84%
is going to conclude the
practical demonstration

00:06:58.410 --> 00:07:01.490 align:middle line:90%
side of this video.

00:07:01.490 --> 00:07:02.950 align:middle line:84%
All right, in the
next video, we're

00:07:02.950 --> 00:07:05.950 align:middle line:84%
going to be taking a look at
how to perform passive subdomain

00:07:05.950 --> 00:07:06.800 align:middle line:90%
enumeration.

00:07:06.800 --> 00:07:11.320 align:middle line:84%
So the objective here is to
identify the subdomains tied

00:07:11.320 --> 00:07:12.640 align:middle line:90%
to a specific domain.

00:07:12.640 --> 00:07:15.790 align:middle line:84%
And we're going to be
doing this by leveraging

00:07:15.790 --> 00:07:19.030 align:middle line:84%
publicly available
resources and databases.

00:07:19.030 --> 00:07:20.530 align:middle line:90%
So again, this is still passive.

00:07:20.530 --> 00:07:24.310 align:middle line:84%
We're not performing a
subdomain brute force.

00:07:24.310 --> 00:07:27.160 align:middle line:84%
We are going to be utilizing
a tool called Sublist3r.

00:07:27.160 --> 00:07:30.850 align:middle line:84%
So I'll be seeing you
in the next video.

00:07:30.850 --> 00:07:31.350 align:middle line:90%