Thursday, February 16, 2017
30 Helpful Nmap Commands For Pentester or System Admins
30 Helpful Nmap Commands For Pentester or System Admins

Nmap is short for Network Mapper. It is an open source security tool for network exploration, security scanning and auditing. However, nmap command comes with lots of options that can make the utility more robust and difficult to follow for new users.
The purpose of this post is to introduce a user to the nmap command line tool to scan a host and/or network, so to find out the possible vulnerable points in the hosts. You will also learn how to use Nmap for offensive and defensive purposes.

More about nmap
From the man page:
NMAP (NETWORK MAPPER) IS AN OPEN SOURCE TOOL FOR NETWORK EXPLORATION AND SECURITY AUDITING. IT WAS DESIGNED TO RAPIDLY SCAN LARGE NETWORKS, ALTHOUGH IT WORKS FINE AGAINST SINGLE HOSTS. NMAP USES RAW IP PACKETS IN NOVEL WAYS TO DETERMINE WHAT HOSTS ARE AVAILABLE ON THE NETWORK, WHAT SERVICES (APPLICATION NAME AND VERSION) THOSE HOSTS ARE OFFERING, WHAT OPERATING SYSTEMS (AND OS VERSIONS) THEY ARE RUNNING, WHAT TYPE OF PACKET FILTERS/FIREWALLS ARE IN USE, AND DOZENS OF OTHER CHARACTERISTICS. WHILE NMAP IS COMMONLY USED FOR SECURITY AUDITS, MANY SYSTEMS AND NETWORK ADMINISTRATORS FIND IT USEFUL FOR ROUTINE TASKS SUCH AS NETWORK INVENTORY, MANAGING SERVICE UPGRADE SCHEDULES, AND MONITORING HOST OR SERVICE UPTIME.
Recommended: Nmap Tutorial: How To Hack ADSL Router Using NMAP Tool
It was originally written by Gordon Lyon and it can answer the following questions easily:
- What computers did you find running on the local network?
- What IP addresses did you find running on the local network?
- What is the operating system of your target machine?
- Find out what ports are open on the machine that you just scanned?
- Find out if the system is infected with malware or virus.
- Search for unauthorized servers or network service on your network.
- Find and remove computers which dont meet the organizations minimum level of security.
Sample setup (LAB)
Port scanning may be illegal in some jurisdictions. So setup a lab as follows:
1 2 3 4 5 6 7 8 9 10 | +---------+ +---------+ | Network | +--------+ | server1 |-----------+ swtich +---------|server2 | +---------+ | (sw0) | +--------+ +----+----+ | |
|