Manage Learn to apply best practices and optimize your operations.

Nmap: A valuable open source tool for network security

Open source tool Nmap is a popular choice amongst hackers and security pros alike for network mapping, port-scanning and testing for network vulnerabilities.

This is the first in a series of tips on how to use Nmap in an enterprise network environment.

Arguing for an increase in your IT security budget is often an arduous task, so many administrators turn to free open source tools to help get the job done. But how can they rely on tools with no commercial support and that never get past the beta version? Well, if you think like that, you need to think again. Many open source tools now compare favorably with commercial alternatives in terms of features, reliability and help forums. One in particular, Nmap, has become the tool of choice for many network and security administrators for network mapping and vulnerability testing.

Nmap (Network Mapper) Security Scanner, written by Fyodor and now up to version 4, provides a wide range of port-scanning techniques designed to rapidly scan networks, large and small, for network exploration and security auditing. Nmap port-scanning can determine what hosts are available on a network, what services those hosts are offering, and what type of packet filters and firewalls are in use. It also has the ability to remotely fingerprint a machine's operating system. Most Unix and Windows platforms are supported, as is Mac OS X and several handheld devices. It is available in both command line and graphical user interface modes, a blessing for those system administrators who are less familiar with working at the command prompt.

So why do you need a network scanner? Nmap is a favorite hacker tool, so it makes sense to run your own scan, find open ports and see what information your network is leaking to potential attackers. A Windows machine, for example, can use hundreds of ports to communicate with other machines, and each open port is a potential route in to your network for an attacker. Port scanning with Nmap is a fast and effective way to identify which ports are open, what services are running on them and where weak spots exist in your defenses. When you have identified which ports are open, you can close any that are not required, thus reducing the number of potentially exploitable services. And when you have mapped your network, you can also see if any unexpected changes have occurred since the last scan. For example, a machine infected by a worm will try to open ports in order to listen for instructions from its controller.

Nmap has won numerous awards, including the Linux Journal's Editor's Choice Award for Best Security Tool. Other accolades include being featured in the film Matrix Reloaded and appearing in a photograph of President Bush visiting the NSA. So if you want to add one of the most versatile network tools to your toolbox and discover what hackers can learn about your network, you should download your copy at In upcoming tip in this series, I will explain how to install and configure Nmap on both Linux and Windows machines.

Nmap technical manual

About the author:
Michael Cobb, CISSP-ISSAP, is a renowned security author with over 20 years of experience in the IT industry. He has a passion for making IT security best practices easier to understand and achievable. His website offers free security posters to raise employee awareness of the importance of safeguarding company and client data and of following good practices. He co-authored the book IIS Security and has written many technical articles for leading IT publications. Mike has also been a Microsoft Certified Database Manager and registered consultant with the CESG Listed Advisor Scheme (CLAS).

Next Steps

View a demonstration of using Nmap to scan a network

Read an interview with Nmap inventor Fyodor

Join the discussion: Nmap and the open source debate

This was last published in May 2006

Dig Deeper on Open source security tools and software