Video - Introduction to NMap

16 minutes
Share the link to this page
Copied
  Completed
You need to have access to the item to view this lesson.
One-time Fee
$99.99
List Price:  $139.99
You save:  $40
€96.05
List Price:  €134.47
You save:  €38.42
£78.28
List Price:  £109.60
You save:  £31.31
CA$143.28
List Price:  CA$200.59
You save:  CA$57.31
A$160.13
List Price:  A$224.20
You save:  A$64.06
S$135.03
List Price:  S$189.05
You save:  S$54.02
HK$777
List Price:  HK$1,087.84
You save:  HK$310.83
CHF 88.49
List Price:  CHF 123.89
You save:  CHF 35.40
NOK kr1,126.80
List Price:  NOK kr1,577.57
You save:  NOK kr450.76
DKK kr717.22
List Price:  DKK kr1,004.14
You save:  DKK kr286.92
NZ$176.87
List Price:  NZ$247.63
You save:  NZ$70.75
د.إ367.26
List Price:  د.إ514.17
You save:  د.إ146.91
৳11,929.84
List Price:  ৳16,702.26
You save:  ৳4,772.41
₹8,538.94
List Price:  ₹11,954.85
You save:  ₹3,415.91
RM448.65
List Price:  RM628.13
You save:  RM179.48
₦154,544.52
List Price:  ₦216,368.52
You save:  ₦61,823.99
₨27,792.76
List Price:  ₨38,910.97
You save:  ₨11,118.21
฿3,416.65
List Price:  ฿4,783.45
You save:  ฿1,366.80
₺3,519.17
List Price:  ₺4,926.99
You save:  ₺1,407.81
B$637.56
List Price:  B$892.61
You save:  B$255.05
R1,874.85
List Price:  R2,624.87
You save:  R750.01
Лв188
List Price:  Лв263.20
You save:  Лв75.20
₩145,711.39
List Price:  ₩204,001.77
You save:  ₩58,290.38
₪364.90
List Price:  ₪510.87
You save:  ₪145.97
₱5,865.41
List Price:  ₱8,211.81
You save:  ₱2,346.40
¥15,715.92
List Price:  ¥22,002.92
You save:  ¥6,286.99
MX$2,016.21
List Price:  MX$2,822.78
You save:  MX$806.56
QR363.08
List Price:  QR508.32
You save:  QR145.24
P1,386.50
List Price:  P1,941.15
You save:  P554.65
KSh12,902.70
List Price:  KSh18,064.30
You save:  KSh5,161.60
E£5,082.90
List Price:  E£7,116.27
You save:  E£2,033.36
ብር12,710.92
List Price:  ብር17,795.80
You save:  ብር5,084.87
Kz91,190.88
List Price:  Kz127,670.88
You save:  Kz36,480
CLP$98,919.10
List Price:  CLP$138,490.70
You save:  CLP$39,571.60
CN¥729.82
List Price:  CN¥1,021.78
You save:  CN¥291.96
RD$6,081.12
List Price:  RD$8,513.82
You save:  RD$2,432.69
DA13,508.78
List Price:  DA18,912.83
You save:  DA5,404.05
FJ$231.84
List Price:  FJ$324.58
You save:  FJ$92.74
Q768.97
List Price:  Q1,076.59
You save:  Q307.62
GY$20,886.35
List Price:  GY$29,241.72
You save:  GY$8,355.37
ISK kr13,953.60
List Price:  ISK kr19,535.60
You save:  ISK kr5,582
DH1,006.73
List Price:  DH1,409.47
You save:  DH402.73
L1,841.91
List Price:  L2,578.75
You save:  L736.83
ден5,908.74
List Price:  ден8,272.47
You save:  ден2,363.73
MOP$798.63
List Price:  MOP$1,118.11
You save:  MOP$319.48
N$1,856.28
List Price:  N$2,598.86
You save:  N$742.58
C$3,673.45
List Price:  C$5,142.98
You save:  C$1,469.52
रु13,596.38
List Price:  रु19,035.48
You save:  रु5,439.09
S/371.74
List Price:  S/520.45
You save:  S/148.71
K405.18
List Price:  K567.27
You save:  K162.09
SAR375.47
List Price:  SAR525.68
You save:  SAR150.20
ZK2,762.82
List Price:  ZK3,868.06
You save:  ZK1,105.23
L478.38
List Price:  L669.75
You save:  L191.37
Kč2,417.95
List Price:  Kč3,385.23
You save:  Kč967.27
Ft39,478.73
List Price:  Ft55,271.81
You save:  Ft15,793.07
SEK kr1,088.11
List Price:  SEK kr1,523.40
You save:  SEK kr435.29
ARS$102,698.50
List Price:  ARS$143,782.01
You save:  ARS$41,083.50
Bs689.84
List Price:  Bs965.80
You save:  Bs275.96
COP$441,236.66
List Price:  COP$617,748.98
You save:  COP$176,512.31
₡50,688.88
List Price:  ₡70,966.47
You save:  ₡20,277.58
L2,536.46
List Price:  L3,551.14
You save:  L1,014.68
₲778,577.57
List Price:  ₲1,090,039.75
You save:  ₲311,462.17
$U4,443.67
List Price:  $U6,221.32
You save:  $U1,777.64
zł409.39
List Price:  zł573.17
You save:  zł163.77
Already have an account? Log In

Transcript

Greetings, I'm Professor Kay and initial video presentation we're going to have an introduction to end map and map is short for network mapper and it is a network scanning and host detection tool that is very useful during several steps of penetration testing. And map is not limited to merely gathering information and enumeration but it is also a powerful utility that can be used as a vulnerability detector or a security scanner. And map is a multi purpose tool and it can be run on many different operating systems including Windows, Linux, BSD, and Mac and map is available for both the command line interface and the graphical user interface. The graphical user interface is known as Zen map. For this lab, I'll be using my installation of Kali Linux and another install of meta splittable to for this lab, I have both of my machines configured With their networking set to host only adapter, if you need to update your installation of Kali just hold down the choices that you have for adapter and change it over to bridged adapter.

And then you'll be able to update. Once you're done updating, go back in and switch it back to host only adapter. The reason I like using the host only adapter is that it isolates my installation of Kali and the target machine into their own networking environment. It does not intrude on my host networking environment, or my home network. Using the if config command I have checked the networking address for both of these machines, the Kali and my target, and I see that they're both using the 192 dot 168 dot five six network. The last thing I need to do before we get started with the lab is confirm that I do have network connectivity between my Cali machine and my target to do this.

I'm going to do a ping From my Kali machine over to the target, my target IP address is 192 dot 168 dot five, six dot 101. I'm going to go ahead and just hit Enter, and I see that I am getting positive returns. To break the sequence, I will do a Ctrl C. To clear the terminal and Kali, I just use the clear command on a Windows machine, it would just be CLS. And map is as complicated as you want to make it. It can do basic scanning, and it can do sophisticated scanning using a number of different switches scripts and its engine which we will see in a future lab. In this first example, I'm going to scan a single host, which will be my target.

And this is just a basic scan. That's all it is. I'm not using any switches. I'm using the Nmap command, followed by the IP address of the target. And if I hit Enter, you'll see that it comes back and it gives me all the information about what ports and services are currently running on this session. Address.

And map was able to determine that the target machine is a virtual machine running on Oracle VirtualBox. Using a virtual Nic, I can use my up arrow to come to the clear command. And I'm back to my prompt to scan an entire subnet. I can type in n map followed by the IP address, I want it to start with in that subnet. And then I can give it a slash 24, which is cider. And that stands for the subnet mask that we want to use.

So we can identify what portion of the network will the host IP addresses be located in. Now, I could also type this out as the subnet mask like so and that's the same thing. And what we're saying here is the last octet is the only octet that you have to worry about the slash 24 tells n map that the first three octets are already taken and are full and there's no need to look there. We're telling n map that the only octet that you're going to worry about is the last octet. And that is where the host IPS will be located. So I can go back again, I can just slap slap in the four slash 24.

And this just tells an map that I want you to scan the entire network but only look in the last octet for anything to do with host IP addresses. And if you look at the results that you returned with your Nmap scan on this network, you'll see that it tells you it scan 256 IP addresses, it found four hosts and it completed the scan in the following number of seconds. It said it scan all 1000 ports on 192 dot 168 dot 56 dot 102 but those are closed now. That's because M AP is not capable of scanning its own host machine. So whatever you're running and map on, it won't be able to scan that machine. So it came up and it found a scan for dot 156 dot one.

In this next example, we can see how we can scan multiple targets. So I want to scan just two targets with this particular command. And those two targets are identified by their IP addresses. So I'm going to scan 192 dot 168 dot five, six dot one, and I'm going to scan 192 dot 168 dot five, six dot eight, hit enter. In just a moment, it's going to come back with the results. Now, it did not find the 56 dot eight address it found one host, and that would have been the 192 dot 168 dot five six dot one.

In this example, I'm going to have n map stamp a Pacific range of IP addresses starting at DOT one all the way up to dot 100. To do this, I've just typed in the starting IP address of 192 dot 168 dot five, six dot one, I'm going to put in a dash. And then I'm going to type in the ending IP addresses and now n map will scan all the IP addresses from dot one all the way to 100. It comes back and it gives me the results and didn't find a whole lot here. But we didn't expect that because there's actually only two really live machines on this network this Kali machine in my target machine. But if there had been machines using the range of 192 dot 168 dot five six dot one consecutively through to 100 those results would have been present.

And map comes with many different switches that can be used to obtain a number of different results in his first example of Using a switch, we're going to use the small letter s capital L switch to generate a list of all the IP addresses to be scanned. So I've typed in n map, give it a space, give it a dash. Now you add in the switch, give it a space, type in the IP address or the range of IP addresses that you want to scan. In this case, we're back to scanning the entire subnet of dot 56 dot one all the way up to dot 256. So I'm going to go ahead and just hit enter. Let's see what happens here.

And now you see that we have generated that list of all the IP addresses that we want. In Nmap scan. We can also exclude IP addresses that we don't want an Nmap to scan in this example. I've told it that I want you to scan my entire subnet, but I don't want you to scan dot one. Go ahead and hit enter. Since we do not have a DNS server on this network, we can ignore it The failed to resolve when it talks about resolving is talking about resolving an IP address to a hostname or a host name to an IP address.

And that's what you use DNS for. So we can ignore this error message. And you'll see that it's scanned all the way up to dot 101. And this is the results that we have from the scan. Down here at the bottom. Down here at the bottom, we see that it scan 255 IP addresses and if you'll remember, it normally comes back and it tells you that it scanned 256 but in this case, since we told it to skip that first IP address, it was only going to be able to return results for 255.

Everyone who does pentesting or hacking has their own set of favorite techniques for using an Nmap. Everyone has a different set of switches that they like to use. They like to get a certain amount of information and they want to information displayed in such a way, and so everybody develops their own favorite end map command and scanning techniques. In this first scanning technique, we're going to use a very popular scanning technique called the SYN scan. Now the SYN scan is very popular because it doesn't generate any log files on the receiving target. Now, the reason that is is because the handshake that is normally established between this machine and the target machine is not completed.

Since that's the case, then there will be no log attempts are generated on the target machine, which allows us to remain stealthy or anonymous. So I'm gonna go ahead and hit enter and it comes back and letting us know that the command completed and this is what it found. There will be times when you will not be able to use the sin scan because you don't have root privileges. If that's the case, then you're going to have to use the following command. This is called the T TCP Connect scan. And for this, we're going to use the dash small letter s capital T switch.

Now this is going to complete the connection. So this will generate log files. But it is one of those things that you're going to have to figure out if you're going to use it or not. And if you don't have root privileges on the machine, then of course, you're going to have to move up to another command. In this case it is the TCP Connect command. Now, it should be noted that this is only going to scan for TCP ports.

We'll use another command later on to scan for UDP ports as well. So I'm gonna go ahead and hit Enter. And you see that comes back with some really nice results. But this didn't complete the connection. So we did generate a log file. This phone command is going to scan for UDP ports only.

So in our previous scan, you saw how we scan for TCP ports. Now we're going to scan for UDP. ports. So I'm gonna go ahead and hit enter. If you want to know what the status of an end map scan is, because it's taken a long time, all you have to do is hit Enter, and it'll come back up and it'll tell you the following. It will tell you the stats, how many machines have been scanned, and how long it's taken and how much longer it's going to take.

Sometimes a normal TCP SYN scan is not the best solution because of the firewall. Also, IDs and IPS filtering can block the SYN packets from reaching their destination. The target, a fin scan sends the packet with only a fin flag. So it is not required to complete the TCP handshake. And if that's the case, then no log will be generated. But if they do configure the IDs or the IPS to either warn or block because of a fin flag, then this won't work either.

So we're going to go ahead and hit it. through here, and it comes back, and the command completed successfully. But then again, I don't have a firewall. And again, I don't have an IDS IPS in place. And this next command, we see that we can configure and map to perform a simple ping test. Now this is not going to return any results about ports or services.

But it will tell us whether or not the machine is up and available on the network. So we're going to use this dash small letter as capital P command to have an Nmap ping the target. I'm gonna go ahead and hit Enter, and it comes back and it says, host is up the MAC address, it returns that and it tells us that it is an Oracle VirtualBox with using a virtual Nic. This next command uses a combination of a SYN scan, and a version scan to determine what version of software is currently running on the target machine. So we're going to first conduct a SYN scan and we're going Going to find the ports. And then the V is going to be able to tell us what version of software is running on those particular ports.

So I'm gonna go ahead and hit enter. When the results come back, you see, we have the port, the state of the port, the service that is running on the port, and the version of the software. So this is very useful for finding vulnerabilities on the target machine. Because once we find that these ports are open running a certain service, we can then determine if that particular version of that software is vulnerable or not. Another very useful in maps, which is the dash capital O. This is going to come back and give us all the information that in map confined about the current version of the operating system that is running on the target.

Let's go ahead and hit enter. So down here at the bottom, you'll see that the LSD testing was performed. And it tells us that the OS is running Linux kernel and LS detail, it is running Linux version two dot six nine through two dot six dot 33. Now, that's information that you need to know about if you're going to try to attack this machine and go after the operating system. So OS fingerprinting is a very popular technique and it can be used to discover routers, workstations and the like. It also tells you the operating system that is running on the machine and it gives you other OS details.

It also gives you the network distance in this case, it tells us that it is just one hop away. If the target is filtering out connections using a firewall and IDs or an IPS, we can use the following pn command to ensure that we do not ping defined the remote operating system. The dash pn tells Nmap not to ping the remote computer, since sometimes firewalls will block the request. So I'm going to go ahead and just hit enter See what happens here. Now there will be times that end map will not be able to determine what operating system is running on the target for a number of reasons, probably too much information or not enough details. There's a lot of different reasons why you'll get that command up too many fingerprints match this host to get the specifics on EOS details.

If N map cannot detect the remote less accurately, you have the option of using the end maps yes feature. This will come up with as much information as it possibly can and it will make its best effort to guess what the operating system actually is. On the remote target. I'm gonna go ahead and hit enter. Here in the results, we see that it found something to do with a Windows operating system but it can't really determine what the operating system is. So it's going to come back with his best possible guess.

And that's all you can hope for if it doesn't have all the information that it needs. This video and lab provided a good overview Or an introduction and map now there's a lot more to it. If you were to go to the internet and download the end map User Guide, you would have to go out and purchased about a four inch three ring binder. And that might not be big enough. That's how powerful this utility is. That's going to conclude this short video presentation on your introduction to end map.

Now if you have any questions or concerns about any of the material that was covered in the lab or in this video, please do not hesitate to reach out and contact your instructor and I'll see you in my next video.

Sign Up

Share

Share with friends, get 20% off
Invite your friends to LearnDesk learning marketplace. For each purchase they make, you get 20% off (upto $10) on your next purchase.