Top 30 Nmap Command Examples For SysAdmins
Top 30 Nmap Command Examples For SysAdmins
Source: https://www.facebook.com/hackinsight
Introduction:
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.
How to install Nmap - visit www.nmap.org
nmap 192.168.1.*
Finally, you scan an entire subnet:
nmap 192.168.1.0/24
169.254.0.0/0 eth0
10.0.0.0/0 ppp0
0.0.0.0/0 eth0 192.168.1.2
Sample outputs:
Starting Nmap 5.00 ( http://nmap.org/
) at 2012-11-27 01:34 IST
Interesting ports on 192.168.1.1:
Not shown: 998 closed ports
PORT STATE SERVICE VERSION
22/tcp open ssh Dropbear sshd 0.52 (protocol 2.0)
80/tcp open http?
1 service unrecognized despite returning data.
19: Scan a host using TCP ACK (PA) and TCP Syn
(PS) ping
If firewall is blocking standard ICMP pings, try the following host discovery methods:
nmap -PS 192.168.1.1
nmap -PS 80,21,443 192.168.1.1
nmap -PA 192.168.1.1
nmap -PA 80,21,200-512 192.168.1.1