Nmap is a free and open-source utility which is used to scan networks and security auditing. Nmap can discover hosts and services on a computer network by sending packets and analyzing the responses. The utility is available on almost every os, it is available for windows, linux and mac.
Download Nmap –
To download Nmap you can simply head towards the official website by clicking here. In case if kali Linux and parrot os, it is already available in there so you will not need to download the utility.
Please note that scanning websites from Nmap is not legal, in some cases if you are trying to too much in deep then you will need written permissions from the owner of the website and the IP holder.
How to launch Nmap?
In Windows hosts you can simply install nmap and run it from the desktop icon using administrator privileges . In linux hosts there are 2 ways of doing it, in case of kali linux and parrot os you can find the icon and click to start and later give it root privileges by entering your password .
The other way is you can simply run
You can use it as a manual for using commands, just scroll down and head towards examples.
How to do simple scans and be legal?
As already mentioned, scanning networks and websites using nmap can be illegal, you may need written permissions to so.
So, to do scans be legal you can use scanme.org, they offer you to perform scans on their website without any issues, but please read their conditions so that you do not harm their website.
Now lets see a simple example to do a scan.
To do so simply use
nslookup command following the website url or address. If you do not know the IP address of the website and using the command.
will give you its address. Now when you get the address you can use the same for scanning the network by
the address should be written as IP address which you found on the previous scan and without quotes.
This is how you can do a simple network scan. Now you can also save your scans in a text file for simplicity by using the command
nslookup 18.104.22.168 >> result.txt
Please note that nmap is a very noisy scanning utility and you need to be anonymous and legal in some cases to do so. Please ensure that you use it for legal and educational purposes.
- Simple Calculator in Bash
- Difference between Spoofing and Phishing
- What is Linux System Administration?
- SetUID, SetGID, and Sticky Bits in Linux File Permissions
- How to speed up the downloading of packages using apt-fast in Ubuntu?
- Create a password generator using shell scripting
- Bash Script to get Low Battery Alert in Linux
- Data Analysis with Unix - Part 1
- How to copy a file's content from Linux terminal?
- Data Analysis with Unix - Part 2
- Cyber Stalking
- 10 Best Linux VPS Hosting
- CrunchBang Plus Plus - #!++ | Debian OS Installation
- How to setup Proxychains in Linux without any Errors?
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.