Alright, so in this video we're going to go through and NMAP and its basic uses.
This computer already has it installed so if you go and type in NMAP and hit enter you can
see all of the flags that can be used when writing this program, and there's quite a
lot of them. You can even see in here there are like for example the TCP and UDP scans,
those are different flags for the different modes that you can use so there's a lot of things this
program can do but generally speaking you can get away with just two different commands or versions
of this command. So here I have two different types of scans. There's the ping scan which uses
SP as the flag and then there's the port scan which uses SS both of these require a valid IP
address example this would be a IP address for a host. Or you can do a range when this would
tell it to scan the entire subnet so you just take that IP address and put it into the place holder
up there. So this right here is the IP address for the sample station. So I could take you to
IP address and put it in place of placeholder there so if I go here and type NMAP SP and
the IP address it will do a ping scan of Central Station and it's come back up saying it's found it.
Instead of saying just pinging a single host like an ping an entire subnet
using of just a slight modification of this and if you take in networking you
probably can recognize the slash 24 as being a shorthand for this subnet mask.
Just going back to NMAP same command as before, just going to change it a little bit so that it
will scan an entire subnet and you can see here this is what's currently on the subnet for the
central stations so there's this Central Station itself which is actually this here - is
that central station, have the printer HP printer, have the cube unit and it actually also scanned my
computer which this is the IP address for my computer that kind of just shows that it does
scan the entire subnet. So I can just show right here pretty quickly that this IP address that
it scanned is also my IP address for this computer. All right so just bring up the results for that again.
So there's some interesting hosts here but really the ones that are
more complicated are the more tempting targets, especially ones that are usually
neglected like printers. So what I'm going to do here is I'm going to do a port scan on
this printer. I'm going to use the other form of the command before which is
the NMAP SS and then the IP address of the printer which is .6 I think yeah.
This takes a minute to go through all the ports and then you can see these are the results
of what's currently running and open on the printer. See here there's some interesting
services there's 480 and 443 which are both web services. So this is running its own web, web
server, is also just the standard print protocols. So to sort of illustrate what NMAP is doing I'll
open up Wireshark and I'll set it to just capture traffic passively and let's run the same command
again and you can see here it starts sending out tons of packets to that one IP address.
So over 2,000 packets sent to that machine. And you can see most of them were not successful but few
of them did go through and those are the ones that NMAP returns as being open. Now if you
want to try this you can scan your own computer by using the loopback address 127.0.0.1
So for example here doing the same thing as above but I'm going to use the loopback so it only
scans my own computer and you can see these are some of the services running on my computer.