TrumanWong

nmap

Network detection and security audit

Supplementary instructions

nmap command is an open source network detection and security audit tool designed to quickly scan large networks.

grammar

nmap(options)(parameters)

Options

-O: Activate operation detection;
-P0: scan the value and do not ping the host;
-PT: It is the same as TCP ping;
-sV: detect service version information;
-sP: ping scan, only discover whether the target host is alive;
-ps: Send synchronization (SYN) messages;
-PU: send udp ping;
-PE: Force direct ICMPping;
-PB: Default mode, ICMPping and TCPping can be used;
-6: Use IPv6 address;
-v: Get more option information;
-d: Add debugging information output;
-oN: output in a human-readable format;
-oX: Output information to the specified file in xml format;
-oM: Output in machine-readable format;
-A: Use all advanced scanning options;
--resume: continue the last scan;
-P: Specify the port to be scanned, which can be a single port. Use commas to separate multiple ports. Use "-" to indicate the port range;
-e: In a multi-network interface Linux system, specify the network interface used for scanning;
-g: Scan the specified port as the source port;
--ttl: Specify the lifetime of scan packets sent;
--packet-trace: Display statistics of packets sent and received during the scanning process;
--scanflags: Set TCP flags in scan packets.
--send-eth/--send-ip Use raw Ethernet to send/construct the specified IP to send

Parameters

ip address: Specify the TCP address in the packet to be scanned.

Example

Install nmap

yum install nmap

Use nmap to scan the open ports of www.jsdig.com

[root@localhost ~]# nmap www.jsdig.com

Starting Nmap 4.11 ( http://www.insecure.org/nmap/ ) at 2013-12-28 00:06 CST
Interesting ports on 100-42-212-8.static.webnx.com (100.42.212.8):
Not shown: 1678 filtered ports
PORT STATE service
22/tcp open ssh
80/tcp open http

Nmap finished: 1 IP address (1 host up) scanned in 45.870 seconds