| HOW TO | Scan your network with Nmap

DON'T post new tutorials here! Please use the "Pending Submissions" board so the staff can review them first.
Post Reply
gEEEk
forum buddy
forum buddy
Posts: 11
Joined: 01 Mar 2009, 17:00
15
Contact:

| HOW TO | Scan your network with Nmap

Post by gEEEk »

Hello guys.

Today I'll be quickly going through one of the best features in the network scanner Nmap.

So, what is Nmap?

It's one of the most popular network scanners used by hackers, system administrators and loads of more people. It quickly scans the network by sending out raw IP packets to determinate what hosts are available, what services' they are offering and what type of filter or firewall they are running and what OS they are using and a lot more such as device type, mac adress and reverse DNS names.

The output from Nmap is a table with all the host and what they are running, this is a off course dependent on which parameters you include in your syntax. The state of the service is either: open, filtered, unfiltered and closed.

Open means that the machine is listening for packets on that port, Filtered means that a filter or a firewall is preventing Nmap from scanning that port, and Nmap couldn't really tell whether the port is open or closed.
Unfiltered means that a port is active and responds to Nmap but Nmap can really tell whether the port is opened or closed.


Nmap has tons of features, but I'll be showing the one I like the best.

Let's get going by installing Nmap.

Some of you will be able to simply install the program using apt-get.

The string is: sudo apt-get install nmap

After the install, Nmap should be ready to scan.

Make sure you're connected to a network.

What we will do is simply scan all the computers in a specific IP range to determinate running services and ports.

Why would we want to scan our network?
I suppose everyone should keep an eye on their network, whether it's your sister running a malicious trojan or if your company's server is running any unnecessary dangerous software or maybe a hacker trying to determinate how he will attack a certain victim. Either way, I'm sure you will find a use for this program.

What you need to know:

The IP range in you LAN. The simplest way to obtain this is possibly to check with your DHCP server. Or if you are truly 1337, you might be able to obtain it using your subnet.

Let's get started:

nmap 192.168.1.* -oG nmap-scan.txt

What this will do is scan every computer inside this local IP range and save down the info using the -oG parameter to a certain nmap-scan file. One of the reasons why I like to save the scan down is simply because it's a lot simpler to read.

Then simply check what nmap obtained from your network:

cat nmap-scan.txt | grep open

Since we can filter out any unnecessary information such as closed ports, we'll use the grep command to search for a specific string.

So, read your output file and make sure no one is bleeding any malware on your network!

Questions, comments and complains are more then welcome!

EDITED

/ gEEEk
Last edited by gEEEk on 12 Mar 2009, 02:59, edited 1 time in total.

ebrizzlez
Kage
Kage
Posts: 732
Joined: 31 Mar 2007, 16:00
17
Location: Hidden in a Buffer Protection.
Contact:

Post by ebrizzlez »

It would've been better if you went into details of Nmap's workings. You could've explained the type of scan, the issue behind TCP/UDP protocols, how nmap scans packets and so forth.

And this goes bland about the skiddie theory. All you do is magically type in a few parameters in the command line, and just as magic, you get l33t hacking results. You want to steer your audience from just knowing the parameters, towards knowing how the tool actually performs its operations rather than how to use the tool.

gEEEk I expect more from you, I know you have potential. Just you need to emphasize on it more. :wink:
[img]http://i81.photobucket.com/albums/j205/ebrizzlez/4lsint1.jpg[/img]

User avatar
DNR
Digital Mercenary
Digital Mercenary
Posts: 6114
Joined: 24 Feb 2006, 17:00
18
Location: Michigan USA
Contact:

Post by DNR »

hey Geek welcome to the forum - I like your initiative to write - so keep at it. I do agree with Eb - add more detail please.

don't feel like we are being dicks about how people post here - we just try to encourage members to be the best of the rest. :wink:

embrace the suck!

DNR
-
He gives wisdom to the wise and knowledge to the discerning. He reveals deep and hidden things; he knows what lies in Darkness, and Light dwells with him.

User avatar
nightkid
Fame ! Where are the chicks?!
Fame ! Where are the chicks?!
Posts: 306
Joined: 27 May 2007, 16:00
16
Location: interwebz

Post by nightkid »

hells yes ^_^ well said and welcome to the forums.
[img]http://img.photobucket.com/albums/v328/trenchcoatskrilla/biohazard.gif[/img]

User avatar
bad_brain
Site Owner
Site Owner
Posts: 11636
Joined: 06 Apr 2005, 16:00
19
Location: In your eye floaters.
Contact:

Post by bad_brain »

a good start... :) nmap has a lot of options, so maybe you should start with the different scanning techniques, you'll learn a lot about networking at the same time....even I would have to check the nmap manual again to be able to explain how a xmas scan works... :lol:

gEEEk
forum buddy
forum buddy
Posts: 11
Joined: 01 Mar 2009, 17:00
15
Contact:

Post by gEEEk »

Thank you for all your replies, comments and thoughts!

Mainly, this thread was about this specific feature in Nmap but I'll extend it to a general guide about Nmap. I'll be editing this thread during the weekend due to the fact that my spare time is very limited thanks to school.

/gEEEk

Post Reply