WEBVTT

00:00.619 --> 00:02.490
>> Welcome to the beginning

00:02.490 --> 00:04.874
>> of Module 4 of
our Nmap Course.

00:04.874 --> 00:06.870
>> In this lesson,
I'll be going through

00:06.870 --> 00:08.985
target specifications in Nmap.

00:08.985 --> 00:10.560
Essentially, we'll be talking

00:10.560 --> 00:11.880
about many different ways to

00:11.880 --> 00:15.295
tell Nmap what host and
ordinate works to scan.

00:15.295 --> 00:18.280
In the next lesson, we'll
walk through a lab.

00:18.280 --> 00:20.700
Thanks for walking
through this with me.

00:20.700 --> 00:22.790
In this lesson,
we're going to focus

00:22.790 --> 00:25.210
on Nmap's target specification.

00:25.210 --> 00:26.960
First, we'll do a review of

00:26.960 --> 00:28.610
targets that I've
already shown you.

00:28.610 --> 00:31.520
Next, I'll provide you with
some additional options,

00:31.520 --> 00:33.410
and finally we'll
go through a lab.

00:33.410 --> 00:37.735
Let's get started. What
is a target in Nmap?

00:37.735 --> 00:40.250
Well, a target is
basically the host or

00:40.250 --> 00:43.295
hosts that you are running
the Nmap scan against.

00:43.295 --> 00:45.590
This can be in the
form of an IPV4

00:45.590 --> 00:48.034
>> address, IPV6 address,

00:48.034 --> 00:50.120
>> fully qualified domain name,

00:50.120 --> 00:52.250
or entire networks using ranges,

00:52.250 --> 00:55.315
lists, or CIDR notation.

00:55.315 --> 00:58.230
Where should you put the
target in the Nmap command?

00:58.230 --> 01:00.105
Well, this is
entirely up to you,

01:00.105 --> 01:01.505
but as I said before,

01:01.505 --> 01:03.785
I think you should pick
a spot and stick to it.

01:03.785 --> 01:05.480
This will help with learning,

01:05.480 --> 01:07.190
and will allow you
to get fast and

01:07.190 --> 01:09.280
efficient with your Nmap scans.

01:09.280 --> 01:11.000
I found that putting the target

01:11.000 --> 01:12.440
closer to the end is helpful,

01:12.440 --> 01:15.300
because if you make a mistake
in your scan statement,

01:15.300 --> 01:16.490
or simply want to run

01:16.490 --> 01:18.845
the same command again
with a different target,

01:18.845 --> 01:20.690
you can hit the up
arrow and easily

01:20.690 --> 01:23.425
get back to the
target and change it.

01:23.425 --> 01:26.180
Let's go through
a quick review of

01:26.180 --> 01:28.500
the common target
specifications.

01:28.500 --> 01:29.890
These are all the
ones we covered

01:29.890 --> 01:31.510
briefly in a previous lesson.

01:31.510 --> 01:33.265
I put examples out to the right.

01:33.265 --> 01:36.500
The first is Nmap,
single IP address.

01:36.500 --> 01:38.685
The second is Nmap,

01:38.685 --> 01:40.770
an IP address range.

01:40.770 --> 01:44.100
The third is Nmap, IP address,

01:44.100 --> 01:46.345
that number of bits that
define the network,

01:46.345 --> 01:48.535
otherwise known
as CIDR notation.

01:48.535 --> 01:50.485
The fourth is Nmap,

01:50.485 --> 01:53.510
domain name and CIDR notation.

01:53.510 --> 01:56.300
We'll go through these
again in the lab.

01:56.520 --> 01:59.950
Now let's talk about some
other target specifications

01:59.950 --> 02:01.870
available to you
while using Nmap.

02:01.870 --> 02:04.490
Some of these can come
in really, really handy.

02:04.490 --> 02:07.710
The first one is Nmap IP address

02:07.710 --> 02:11.250
1 IP address 2, and so forth.

02:11.250 --> 02:13.460
Notice that there
is a space between

02:13.460 --> 02:15.875
each IP address, but no comma.

02:15.875 --> 02:17.840
You also should note
that the target does

02:17.840 --> 02:19.595
not have to be an IP address.

02:19.595 --> 02:20.820
It can also be a host name,

02:20.820 --> 02:23.010
or a fully qualified
domain name.

02:23.010 --> 02:26.435
The point is that you can
scan separate targets

02:26.435 --> 02:27.860
using this command simply by

02:27.860 --> 02:30.035
putting a space
between the targets.

02:30.035 --> 02:34.615
The second one is Nmap -iL,

02:34.615 --> 02:36.485
followed by the name of the file

02:36.485 --> 02:39.170
that has a list of the
targets you wish to scan.

02:39.170 --> 02:41.240
This is really helpful
when you have a big list

02:41.240 --> 02:43.085
of IP addresses, host names,

02:43.085 --> 02:45.230
or fully qualified domain
names that you want to

02:45.230 --> 02:47.890
scan without having to
type each of them in.

02:47.890 --> 02:49.460
This could come in
handy when you're

02:49.460 --> 02:51.380
scanning all critical devices

02:51.380 --> 02:52.670
inside and outside

02:52.670 --> 02:55.385
your company's network
perimeter, for example.

02:55.385 --> 02:58.145
The third one is actually
really interesting.

02:58.145 --> 03:01.845
That is Nmap -iR,

03:01.845 --> 03:04.335
followed by the
number of targets.

03:04.335 --> 03:07.220
This scan allows Nmap
to randomly determine

03:07.220 --> 03:08.900
IP addresses of hosts to

03:08.900 --> 03:11.465
scan outside the perimeter
of your network.

03:11.465 --> 03:12.950
I'm not going to run this one in

03:12.950 --> 03:14.570
the lab because it
would go against what

03:14.570 --> 03:17.390
we talked about in our ethics
and legalities lesson,

03:17.390 --> 03:19.970
but I'm sure it would do
little harm if you create

03:19.970 --> 03:23.155
a polite and very specific
scan from your home.

03:23.155 --> 03:26.645
In other words, don't do
it at work, or at school.

03:26.645 --> 03:28.835
The fourth one is Nmap,

03:28.835 --> 03:31.730
target or targets, dash,

03:31.730 --> 03:33.530
dash, exclude,

03:33.530 --> 03:36.755
IPs or host names to exclude.

03:36.755 --> 03:40.470
Basically this tells Nmap to
scan all of the hosts you

03:40.470 --> 03:43.325
specified except for the ones

03:43.325 --> 03:45.070
in your exclusion statement.

03:45.070 --> 03:48.075
Similarly, the
fifth one is Nmap,

03:48.075 --> 03:50.715
targets, dash, dash,

03:50.715 --> 03:53.780
excludefile, the name
of the file that

03:53.780 --> 03:57.875
contains excluded IP
addresses or host names.

03:57.875 --> 03:59.900
If you want more
information about

03:59.900 --> 04:02.615
target specifications,
you can use help.

04:02.615 --> 04:05.855
Take a look at the Nmap man
page from the command line,

04:05.855 --> 04:09.330
or take a look at the
reference URL on this slide.

