WEBVTT

00:01.360 --> 00:05.280
Section two performing effective network scanning.

00:05.650 --> 00:06.820
Welcome to the video.

00:06.820 --> 00:15.270
Creating a system inventory with unmap in this video we will use a tool called unmap to find all the

00:15.270 --> 00:16.930
live systems on our network.

00:17.740 --> 00:24.040
Use the map tool in combination with additional command flags to get more verbose output out of our

00:24.040 --> 00:31.160
skins and will output the results of our scan into a text file which we will be using heavily in the

00:31.160 --> 00:38.440
next video is in this course and map which is short for network mapper has been around for more than

00:38.440 --> 00:39.730
20 years.

00:39.760 --> 00:46.300
It runs on all major computer operating systems and is well-documented in countless books blogs and

00:46.300 --> 00:47.260
videos.

00:47.680 --> 00:50.210
You should definitely take time to get familiar with that map.

00:50.410 --> 00:55.660
But for the purpose of this course we are just going to jump right in and start using it to learn more

00:55.660 --> 00:57.250
about what's running on our network.

00:58.370 --> 01:04.190
However it's important to note that unmap has a good basic help guide that you can access by simply

01:04.190 --> 01:11.930
typing unmap and hitting enter notice that the screen went by too fast for us to catch everything so

01:11.930 --> 01:18.710
we can simply scroll up to read what we missed or issue the nmap command again with the pipe symbol

01:19.070 --> 01:22.360
plus the word more and hit enter.

01:22.370 --> 01:26.600
That way we can see the unmap help output one screen at a time.

01:27.020 --> 01:34.110
As you can see there are all sorts of options for running and tuning and exporting are scan's.

01:34.120 --> 01:37.710
Now if this was a new network that we didn't know anything about.

01:37.840 --> 01:43.140
One of the first things we may want to do is figure out which hosts reply to a ping.

01:43.150 --> 01:51.810
This is often called a Ping's sweep or Ping's scan and can be done by using unmap with the TAC s n flag

01:52.800 --> 01:57.810
first let's do a quick I-F config command to see which network we're on.

01:58.230 --> 02:08.560
And as we can see it looks like I'm on a 1 9 2 1 6 8 3 x network so I'm going to run and map space TAC

02:08.660 --> 02:16.550
s n space 1 9 2 1 6 8 3 0 slash 24

02:20.180 --> 02:25.670
as you can see the scan finished pretty quickly and has given us a list of live hosts and their MAC

02:25.670 --> 02:26.630
addresses.

02:27.080 --> 02:34.220
But there's no mention here of hosts that didn't respond to a ping any time we want more verbose output

02:34.280 --> 02:35.890
out of our map scan.

02:35.960 --> 02:42.900
We can add the TAC V flag with the V standing for verbose.

02:43.000 --> 02:50.980
So let's run that same map command again this time with the TAC we added And now we can see more information

02:51.010 --> 02:54.550
on all the hosts that did not reply to a ping.

02:54.730 --> 03:02.060
In addition to the ones that did now one of the things we will be doing later in the course is some

03:02.060 --> 03:05.670
deeper scanning on only the Live hosts on our network.

03:05.900 --> 03:11.900
So it's going to be important for us to have a nice clean list of live IPs saved off to a text file

03:12.260 --> 03:14.630
with one host on each line.

03:15.140 --> 03:19.470
We can certainly copy and paste the IPs into a text file one by one.

03:19.670 --> 03:24.710
But I thought it would be fun to show you one of the more advanced commands that can create this text

03:24.710 --> 03:27.410
file for us in one swoop.

03:27.410 --> 03:33.530
First let me type out the command and run it will review the results and then we'll talk through how

03:33.530 --> 03:35.000
they came to be.

03:35.090 --> 03:41.150
Again don't worry if a lot of this looks new or weird I'm skipping ahead simply to show you how powerful

03:41.150 --> 03:50.000
and flexible of a tool and map is especially when combined with other built in Linux tools.

03:50.130 --> 03:55.680
Here we have a nice clean list of live network hosts one on each line.

03:55.680 --> 04:02.070
This is exactly how mapped wants our list of hosts to look like when we do deeper scans in our upcoming

04:02.070 --> 04:02.970
videos.

04:03.360 --> 04:07.310
But let's take a step back and break this down one chunk at a time.

04:09.460 --> 04:16.390
We started with our map space tech and command which again is going to find all the hosts on our network

04:16.420 --> 04:26.480
that respond to a ping then the tack o capital G Flegg is going to export our scan results in a grapple

04:26.590 --> 04:28.140
format.

04:28.150 --> 04:30.390
Now if you've not played with grep that's OK.

04:30.670 --> 04:32.950
Take some time to play around with it on your own.

04:33.100 --> 04:38.930
But for the purposes of this example just think of grep as a way to search for words within a file.

04:39.600 --> 04:45.120
Before we do any grepping though let's just run the first chunk of our command to see what the results

04:45.120 --> 04:45.850
look like.

04:48.810 --> 04:56.160
This output looks pretty much the same as when we ran in map space TAC as in on its own but let's run

04:56.160 --> 05:04.210
the command again this time adding the pipe symbol and then the words grep space up.

05:04.270 --> 05:11.500
What this does is take the results of our and map scan and select or grep only the lines containing

05:11.500 --> 05:13.440
the word up.

05:13.440 --> 05:17.860
This gets us closer to a clean list of IPs but we're not quite there yet.

05:18.090 --> 05:24.670
We still have a lot of extra words like host and status Colan up to get rid of.

05:24.800 --> 05:30.000
This is where the W-K or AHC command comes in.

05:30.080 --> 05:34.560
If you haven't worked with awk add that one to your self-study list to.

05:34.730 --> 05:41.330
But in this example we're using it to essentially say print me out only the second field of data in

05:41.330 --> 05:45.470
the output which in this case is our list of IP addresses.

05:47.700 --> 05:48.140
Ah.

05:48.290 --> 05:52.890
The result is a nice clean list of addresses one address per line.

05:53.690 --> 05:59.100
So the last thing we need to do is save this to a text file for use in our upcoming videos.

06:00.080 --> 06:05.360
We could just copy and paste the list into a file but since we're learning how to save time by chaining

06:05.360 --> 06:13.910
together commands and terminal let's just add a greater than symbol followed by a filename.

06:13.950 --> 06:19.910
What this is going to do is write the output of our long and map commands to a text file for later use.

06:20.950 --> 06:26.830
So at this point we know which hosts are responding to a ping on our network and we have them captured

06:26.830 --> 06:35.230
to a simple text file called targets XTi in the next video we'll build upon our and map knowledge and

06:35.230 --> 06:42.670
begin scanning hostes deeper to discover more about their exposed ports services and underlying operating

06:42.670 --> 06:43.320
system.
