WEBVTT

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


00:00:10.110 --> 00:00:12.510 align:middle line:84%
Introduction to
Information Gathering.

00:00:12.510 --> 00:00:15.090 align:middle line:84%
In this video, we're going
to get a formal introduction

00:00:15.090 --> 00:00:16.530 align:middle line:90%
to information gathering.

00:00:16.530 --> 00:00:20.100 align:middle line:84%
We're going to learn more
about it, what it entails,

00:00:20.100 --> 00:00:22.800 align:middle line:84%
and that the two types
of information gathering,

00:00:22.800 --> 00:00:27.540 align:middle line:84%
or reconnaissance, that's a
word that you'll typically see

00:00:27.540 --> 00:00:29.610 align:middle line:84%
interchanged with
information gathering.

00:00:29.610 --> 00:00:33.810 align:middle line:84%
So whenever you hear information
gathering, or reconnaissance,

00:00:33.810 --> 00:00:36.120 align:middle line:84%
buddied around, just know
that they're essentially

00:00:36.120 --> 00:00:40.090 align:middle line:84%
referring to the same
thing or the same process.

00:00:40.090 --> 00:00:42.492 align:middle line:84%
So what is
information gathering?

00:00:42.492 --> 00:00:43.950 align:middle line:84%
Well, the first
thing that you need

00:00:43.950 --> 00:00:45.570 align:middle line:84%
to know about
information gathering

00:00:45.570 --> 00:00:48.750 align:middle line:84%
is it is the first phase
of any penetration test.

00:00:48.750 --> 00:00:51.480 align:middle line:84%
And it essentially involves
gathering or collecting

00:00:51.480 --> 00:00:54.990 align:middle line:84%
information about an individual,
company, or website, or system

00:00:54.990 --> 00:00:56.220 align:middle line:90%
that you are targeting.

00:00:56.220 --> 00:00:57.845 align:middle line:84%
Now this can be a
little bit confusing.

00:00:57.845 --> 00:00:59.762 align:middle line:84%
Because you may be
thinking to yourself, well,

00:00:59.762 --> 00:01:00.580 align:middle line:90%
where do we start?

00:01:00.580 --> 00:01:03.210 align:middle line:84%
Well, again, that statement
is a bit misleading.

00:01:03.210 --> 00:01:05.790 align:middle line:84%
Because I'm referring
to a lot of targets.

00:01:05.790 --> 00:01:08.280 align:middle line:84%
Well, let's say a
company has hired

00:01:08.280 --> 00:01:11.260 align:middle line:84%
you to perform a penetration
test on their website,

00:01:11.260 --> 00:01:11.850 align:middle line:90%
for example.

00:01:11.850 --> 00:01:15.750 align:middle line:84%
Well, during the first phase
of a penetration test, which

00:01:15.750 --> 00:01:18.570 align:middle line:84%
is information
gathering, our objective

00:01:18.570 --> 00:01:21.570 align:middle line:84%
is to essentially learn
more about the website

00:01:21.570 --> 00:01:24.012 align:middle line:84%
that we are performing
the penetration test on.

00:01:24.012 --> 00:01:24.970 align:middle line:90%
So what does this mean?

00:01:24.970 --> 00:01:28.170 align:middle line:84%
Well, we need to identify
what web technology is

00:01:28.170 --> 00:01:29.490 align:middle line:90%
being used on the website.

00:01:29.490 --> 00:01:32.670 align:middle line:84%
We need to identify
any vulnerabilities

00:01:32.670 --> 00:01:34.110 align:middle line:90%
that website may have.

00:01:34.110 --> 00:01:37.890 align:middle line:84%
We need to know more about the
IP address of the server that's

00:01:37.890 --> 00:01:39.630 align:middle line:90%
hosting that website.

00:01:39.630 --> 00:01:42.660 align:middle line:84%
And we're essentially getting
a better understanding

00:01:42.660 --> 00:01:44.310 align:middle line:90%
of what we are targeting.

00:01:44.310 --> 00:01:47.820 align:middle line:84%
And as I said, this can
be as wide or as narrow,

00:01:47.820 --> 00:01:50.760 align:middle line:84%
depending on the scope
of your penetration test.

00:01:50.760 --> 00:01:52.480 align:middle line:90%
Let's take another example.

00:01:52.480 --> 00:01:54.390 align:middle line:84%
Let's say you have
been contracted

00:01:54.390 --> 00:01:57.390 align:middle line:84%
to perform a penetration
test for a company.

00:01:57.390 --> 00:01:59.040 align:middle line:84%
And they've given
you a scope, where

00:01:59.040 --> 00:02:02.130 align:middle line:84%
you can target a few public
facing assets, like a web

00:02:02.130 --> 00:02:04.950 align:middle line:84%
server that's hosting
a website, and also,

00:02:04.950 --> 00:02:07.650 align:middle line:84%
maybe a couple of
internal systems

00:02:07.650 --> 00:02:09.150 align:middle line:90%
within the internal network.

00:02:09.150 --> 00:02:13.110 align:middle line:84%
Well, we can gain access
to the internal network

00:02:13.110 --> 00:02:18.300 align:middle line:84%
probably through the
public facing asset,

00:02:18.300 --> 00:02:19.260 align:middle line:90%
like the web server.

00:02:19.260 --> 00:02:22.590 align:middle line:84%
That may be one vector,
one access vector.

00:02:22.590 --> 00:02:26.700 align:middle line:84%
Or alternatively, during the
information gathering phase,

00:02:26.700 --> 00:02:29.850 align:middle line:84%
we can start learning more
about the employees that

00:02:29.850 --> 00:02:31.260 align:middle line:90%
work for the company.

00:02:31.260 --> 00:02:33.100 align:middle line:90%
And what do I mean by this?

00:02:33.100 --> 00:02:36.210 align:middle line:84%
Well, the most important piece
of information in this context

00:02:36.210 --> 00:02:39.750 align:middle line:84%
would be to identify their
names and their email addresses.

00:02:39.750 --> 00:02:42.270 align:middle line:84%
Well, what do we do
with that information?

00:02:42.270 --> 00:02:44.860 align:middle line:84%
Or why is this
information so important?

00:02:44.860 --> 00:02:48.240 align:middle line:84%
Well, when we move on to the
latter stages of a penetration

00:02:48.240 --> 00:02:51.930 align:middle line:84%
test, like exploitation
or initial access,

00:02:51.930 --> 00:02:54.540 align:middle line:84%
this is where this information
starts becoming useful.

00:02:54.540 --> 00:02:57.870 align:middle line:84%
Because for example, instead
of exploiting the web server

00:02:57.870 --> 00:03:00.360 align:middle line:84%
in order to gain
access to their network

00:03:00.360 --> 00:03:02.580 align:middle line:84%
and consequently
their internal network

00:03:02.580 --> 00:03:06.570 align:middle line:84%
through a pivot, what we
can do is try and perform

00:03:06.570 --> 00:03:09.120 align:middle line:84%
a phishing attack on
one of the employees

00:03:09.120 --> 00:03:10.470 align:middle line:90%
to obtain their credentials.

00:03:10.470 --> 00:03:13.920 align:middle line:84%
Alternatively, we could
send a malicious attachment

00:03:13.920 --> 00:03:16.410 align:middle line:84%
to one of the
employees via email.

00:03:16.410 --> 00:03:19.200 align:middle line:84%
Once they click on
it on their computer

00:03:19.200 --> 00:03:23.040 align:middle line:84%
within the internal network,
they execute, or run, the macro

00:03:23.040 --> 00:03:27.750 align:middle line:84%
maybe within a Word
file or an Excel file.

00:03:27.750 --> 00:03:31.380 align:middle line:84%
Then that could provide us with
access to their target system

00:03:31.380 --> 00:03:33.140 align:middle line:84%
and consequently,
the internal network.

00:03:33.140 --> 00:03:35.920 align:middle line:84%
So from this point, or
from this perspective,

00:03:35.920 --> 00:03:38.850 align:middle line:84%
you can start to see why
information gathering is

00:03:38.850 --> 00:03:39.670 align:middle line:90%
so important.

00:03:39.670 --> 00:03:42.180 align:middle line:84%
And that's why we always have
the saying as penetration

00:03:42.180 --> 00:03:45.150 align:middle line:84%
testers, the more you
know about your target,

00:03:45.150 --> 00:03:48.930 align:middle line:84%
the more successful you will
be during the latter stages

00:03:48.930 --> 00:03:50.190 align:middle line:90%
of your penetration test.

00:03:50.190 --> 00:03:52.560 align:middle line:84%
Because all of this
information adds up.

00:03:52.560 --> 00:03:54.660 align:middle line:84%
And if you know more
about the target

00:03:54.660 --> 00:03:56.430 align:middle line:84%
that you're trying
to exploit or you're

00:03:56.430 --> 00:03:59.130 align:middle line:84%
trying to perform a
penetration test on,

00:03:59.130 --> 00:04:00.630 align:middle line:90%
then the easier it will be.

00:04:00.630 --> 00:04:02.400 align:middle line:84%
Whereas, if you
didn't know anything

00:04:02.400 --> 00:04:04.140 align:middle line:84%
or didn't know much
about your target,

00:04:04.140 --> 00:04:06.720 align:middle line:84%
then you may be
wondering, well, I really

00:04:06.720 --> 00:04:10.500 align:middle line:84%
don't know how to gain
access to this company

00:04:10.500 --> 00:04:13.930 align:middle line:84%
or to this company's
digital infrastructure.

00:04:13.930 --> 00:04:16.560 align:middle line:84%
So always remember that
information gathering

00:04:16.560 --> 00:04:18.720 align:middle line:84%
is the first phase of
a penetration test.

00:04:18.720 --> 00:04:21.089 align:middle line:84%
And it's arguably the
most important phase.

00:04:21.089 --> 00:04:25.140 align:middle line:84%
Because all of the other
phases of a penetration test,

00:04:25.140 --> 00:04:29.550 align:middle line:84%
like enumeration, exploitation,
post exploitation,

00:04:29.550 --> 00:04:34.230 align:middle line:84%
et cetera all depend on the
information that you gather

00:04:34.230 --> 00:04:36.630 align:middle line:84%
or that you obtain
within this phase.

00:04:36.630 --> 00:04:39.150 align:middle line:84%
Now, information
gathering is typically

00:04:39.150 --> 00:04:42.760 align:middle line:84%
broken down into two
phases or into two types.

00:04:42.760 --> 00:04:44.550 align:middle line:84%
You have passive
information gathering.

00:04:44.550 --> 00:04:46.770 align:middle line:84%
And you have active
information gathering.

00:04:46.770 --> 00:04:48.720 align:middle line:84%
Passive information
gathering involves

00:04:48.720 --> 00:04:52.140 align:middle line:84%
gathering as much information
as possible without actively

00:04:52.140 --> 00:04:53.650 align:middle line:90%
engaging with the target.

00:04:53.650 --> 00:04:56.280 align:middle line:84%
So let's go back to the
example of performing a pen

00:04:56.280 --> 00:04:57.630 align:middle line:90%
test on a website.

00:04:57.630 --> 00:04:59.970 align:middle line:84%
When performing passive
information gathering,

00:04:59.970 --> 00:05:02.430 align:middle line:84%
we're essentially
utilizing publicly

00:05:02.430 --> 00:05:07.010 align:middle line:84%
available or accessible
information, or resources,

00:05:07.010 --> 00:05:09.660 align:middle line:84%
to learn more about
that particular website.

00:05:09.660 --> 00:05:12.110 align:middle line:84%
So this would typically
involve analyzing

00:05:12.110 --> 00:05:14.450 align:middle line:84%
the website from an
end user's perspective

00:05:14.450 --> 00:05:17.420 align:middle line:84%
through your browser, learning
more about the web technologies

00:05:17.420 --> 00:05:21.410 align:middle line:84%
on that site, the IP address
of the actual web server that's

00:05:21.410 --> 00:05:25.280 align:middle line:84%
being used to host this
particular website,

00:05:25.280 --> 00:05:26.870 align:middle line:90%
stuff like that.

00:05:26.870 --> 00:05:29.450 align:middle line:84%
And we then have active
information gathering,

00:05:29.450 --> 00:05:31.250 align:middle line:84%
which essentially
involves gathering

00:05:31.250 --> 00:05:35.180 align:middle line:84%
as much information as
possible by actively engaging

00:05:35.180 --> 00:05:36.300 align:middle line:90%
with the target system.

00:05:36.300 --> 00:05:38.780 align:middle line:84%
So again, let's go back to
the example of the website.

00:05:38.780 --> 00:05:41.510 align:middle line:84%
Let's say from the passive
information gathering

00:05:41.510 --> 00:05:45.050 align:middle line:84%
phase we identified the IP
address of the web server

00:05:45.050 --> 00:05:46.370 align:middle line:90%
that's hosting that website.

00:05:46.370 --> 00:05:49.160 align:middle line:84%
Well, now in active
information gathering,

00:05:49.160 --> 00:05:52.160 align:middle line:84%
or within the active
information gathering phase,

00:05:52.160 --> 00:05:54.350 align:middle line:84%
we can start
performing a port scan

00:05:54.350 --> 00:05:56.960 align:middle line:84%
on that IP address
with Nmap to identify

00:05:56.960 --> 00:05:59.810 align:middle line:84%
the open ports and the
respective services that are

00:05:59.810 --> 00:06:01.070 align:middle line:90%
running on those open ports.

00:06:01.070 --> 00:06:02.990 align:middle line:84%
And we can then use
that information

00:06:02.990 --> 00:06:05.930 align:middle line:84%
to identify vulnerabilities
that can be exploited

00:06:05.930 --> 00:06:10.280 align:middle line:84%
that can consequently provide us
with access to that web server.

00:06:10.280 --> 00:06:12.380 align:middle line:84%
So you can start to
see the difference.

00:06:12.380 --> 00:06:15.080 align:middle line:84%
With passive, we are
not engaging actively

00:06:15.080 --> 00:06:17.180 align:middle line:90%
with the target system.

00:06:17.180 --> 00:06:20.270 align:middle line:84%
We're using what's available
on the internet anyway

00:06:20.270 --> 00:06:21.920 align:middle line:90%
or what's publicly available.

00:06:21.920 --> 00:06:25.760 align:middle line:84%
With active, we're now
really shaking the hand

00:06:25.760 --> 00:06:27.560 align:middle line:90%
of whatever we're targeting.

00:06:27.560 --> 00:06:29.570 align:middle line:84%
And we're making
ourselves known.

00:06:29.570 --> 00:06:34.940 align:middle line:84%
So these two need
to be understood

00:06:34.940 --> 00:06:37.730 align:middle line:84%
within their own
respective domains.

00:06:37.730 --> 00:06:41.000 align:middle line:84%
Now, one important thing to
note about active information

00:06:41.000 --> 00:06:43.880 align:middle line:84%
gathering is that
because you're actively

00:06:43.880 --> 00:06:46.520 align:middle line:84%
engaging with the target
system, that means

00:06:46.520 --> 00:06:47.900 align:middle line:90%
you're communicating with it.

00:06:47.900 --> 00:06:49.070 align:middle line:90%
You're interacting with it.

00:06:49.070 --> 00:06:51.650 align:middle line:84%
You're making it work
in a different way.

00:06:51.650 --> 00:06:55.400 align:middle line:84%
You will require
authorization from the company

00:06:55.400 --> 00:06:57.860 align:middle line:84%
that you're performing
the penetration

00:06:57.860 --> 00:07:02.150 align:middle line:84%
test for in order to perform
active information gathering.

00:07:02.150 --> 00:07:03.180 align:middle line:90%
What does this mean?

00:07:03.180 --> 00:07:07.790 align:middle line:84%
It means do not target any
systems that you do not

00:07:07.790 --> 00:07:10.280 align:middle line:84%
have permission to
target and do not

00:07:10.280 --> 00:07:11.840 align:middle line:90%
perform an Nmap scan on them.

00:07:11.840 --> 00:07:15.480 align:middle line:84%
Do not do anything that
might be considered active.

00:07:15.480 --> 00:07:18.260 align:middle line:84%
So again, that's just something
that I want to point out.

00:07:18.260 --> 00:07:21.110 align:middle line:84%
I had mentioned it in the
previous video as a disclaimer.

00:07:21.110 --> 00:07:22.580 align:middle line:90%
Be very careful with this.

00:07:22.580 --> 00:07:25.970 align:middle line:84%
Because if you target a
system that you do not

00:07:25.970 --> 00:07:28.550 align:middle line:84%
have the permission
to target, you

00:07:28.550 --> 00:07:29.840 align:middle line:90%
could potentially go to jail.

00:07:29.840 --> 00:07:31.820 align:middle line:90%
So do keep that in mind.

00:07:31.820 --> 00:07:34.640 align:middle line:84%
That's very, very
important and is actually

00:07:34.640 --> 00:07:38.510 align:middle line:84%
a huge part of the code of
ethics of a penetration tester.

00:07:38.510 --> 00:07:42.470 align:middle line:84%
Don't do anything that might
lead to you being prosecuted.

00:07:42.470 --> 00:07:44.790 align:middle line:90%
So just be aware of that.

00:07:44.790 --> 00:07:48.110 align:middle line:84%
Now, when it comes down
to information gathering,

00:07:48.110 --> 00:07:50.300 align:middle line:84%
or reconnaissance,
what are we looking

00:07:50.300 --> 00:07:53.570 align:middle line:84%
for in both cases, in the
case of passive information

00:07:53.570 --> 00:07:55.820 align:middle line:84%
gathering and active
information gathering?

00:07:55.820 --> 00:07:58.820 align:middle line:84%
Now, I just want to make
something clear that this list

00:07:58.820 --> 00:08:00.600 align:middle line:90%
is not comprehensive.

00:08:00.600 --> 00:08:03.380 align:middle line:84%
There's a ton of information
you can gather in each phase

00:08:03.380 --> 00:08:06.680 align:middle line:84%
or in each form of
information gathering.

00:08:06.680 --> 00:08:09.390 align:middle line:84%
This is just really the
most important information.

00:08:09.390 --> 00:08:14.810 align:middle line:84%
So you want to identify the
IP addresses of the targets

00:08:14.810 --> 00:08:17.450 align:middle line:90%
and of course, DNS information.

00:08:17.450 --> 00:08:20.360 align:middle line:84%
You want to identify domain
names and domain ownership

00:08:20.360 --> 00:08:23.930 align:middle line:84%
information, identify email
addresses and social media

00:08:23.930 --> 00:08:26.780 align:middle line:84%
profiles, identify the
web technologies being

00:08:26.780 --> 00:08:29.690 align:middle line:84%
used on target sites,
identify subdomains,

00:08:29.690 --> 00:08:31.160 align:middle line:90%
et cetera, et cetera.

00:08:31.160 --> 00:08:33.770 align:middle line:84%
And within active
information gathering,

00:08:33.770 --> 00:08:37.159 align:middle line:84%
that of course, as I said,
involves discovering open ports

00:08:37.159 --> 00:08:39.169 align:middle line:84%
on target systems,
learning about

00:08:39.169 --> 00:08:42.890 align:middle line:84%
the internal infrastructure of a
target network or organization,

00:08:42.890 --> 00:08:45.690 align:middle line:84%
and of course enumerating
information from target

00:08:45.690 --> 00:08:46.190 align:middle line:90%
systems.

00:08:46.190 --> 00:08:48.200 align:middle line:84%
Now, in this course,
we will not be

00:08:48.200 --> 00:08:53.330 align:middle line:84%
covering the enumeration
aspect of active information

00:08:53.330 --> 00:08:54.110 align:middle line:90%
gathering.

00:08:54.110 --> 00:08:56.690 align:middle line:84%
That is going to be covered
within its own course.

00:08:56.690 --> 00:09:00.060 align:middle line:84%
Because enumeration is
quite an extensive topic.

00:09:00.060 --> 00:09:02.210 align:middle line:84%
So I just wanted
to point that out.

00:09:02.210 --> 00:09:06.020 align:middle line:84%
All right, so now that we have
an idea as to what information

00:09:06.020 --> 00:09:09.890 align:middle line:84%
gathering is and the two types
of information gathering,

00:09:09.890 --> 00:09:12.260 align:middle line:84%
or reconnaissance,
that we have, we

00:09:12.260 --> 00:09:14.870 align:middle line:84%
can actually get started
with the first section

00:09:14.870 --> 00:09:17.610 align:middle line:84%
of this course, which is going
to cover passive information

00:09:17.610 --> 00:09:18.110 align:middle line:90%
gathering.

00:09:18.110 --> 00:09:21.795 align:middle line:84%
So I'll be seeing you
in the next video.

00:09:21.795 --> 00:09:22.295 align:middle line:90%