WHAT'S NEW?
Loading...

1. Nmap Scanning Basics - Complete Nmap beginners guide





Welcome to the first post in Complete Nmap beginners guide. In this post we'll learn some of the basic Nmap Scanning techniques.

The basic command for scanning a hostname or ip is



where the ip address can also be replaced with host name or domain name. This was simply scanning a single ip/host name but what if you wanna scan multiple host names or ip addresses. You can obviously try this



This will probably work and scan all the three addresses but when you have a bunch of addresses to scan, typing each address will give pain in your ass. So, here's a net little trick. If you wanna scan multiple ip address of the same network, you can use

this will indeed scan all the three IP address(192.168.1.1, 192.168.1.2, 192.168.1.3) and save your time too. But there's one more short cut too. Typing



this will scan 256 address ranging from 192.168.1.1 to 192.168.1.256. You can also use 16 instead of 24 which will scan 65,536 address ranging from 192.168.1.1 to 192.168.255.255. Using 0 will scan the entire internet while using 32 will just scan a single ip address.

Nmap also supports a feature to scan IP address/host names from a text file. For this simply create a text file and write all the IP addresses separating then with lines. Eg
when done, save the file and execute the following : nmap -iL <location of file with file name>

assuming my file is called scan.txt and it's located a the Desktop, command looks like this


-iR <no. of hosts> can be used to scan desired number of random hosts from the internet


The following command will scan 10 random hosts from the Internet.

Excluding hosts


While scanning multiple hosts you can exclude some hosts which you would not like to scan by using : --exclude <host>
This will exclude 192.168.1.10 from those 256 hosts it will scan.

You can also exclude multiple hosts from a text file by using --exclude <destination and name of file>


So, that was Scanning basics of Nmap. In next posts we'll learn about discovering hosts.







1 comment: Leave Your Comments