root@kali:~# nmap 192.168.31.13 Starting Nmap 7.70 ( https://nmap.org ) at 2018-08-12 23:02 CST Nmap scan report for 192.168.31.13 Host is up (0.00038s latency). Not shown: 998 closed ports PORT STATE SERVICE 8080/tcp open http-proxy 10010/tcp open rxapi MAC Address: 00:0C:29:99:D3:E6 (VMware)
Nmap done: 1 IP address (1 host up) scanned in 1.85 seconds
可以看出只开放了8080端口和10010端口
nmap -p 端口 IP(域名),判断ip是否开放指定端口
1 2 3 4 5 6 7 8 9 10
root@kali:~# nmap -p 8080 192.168.31.13 Starting Nmap 7.70 ( https://nmap.org ) at 2018-08-12 23:05 CST Nmap scan report for 192.168.31.13 Host is up (0.00045s latency).
PORT STATE SERVICE 8080/tcp open http-proxy MAC Address: 00:0C:29:99:D3:E6 (VMware)
Nmap done: 1 IP address (1 host up) scanned in 0.36 seconds
1 2 3 4 5 6 7 8 9 10
root@kali:~# nmap -p 80 192.168.31.13 Starting Nmap 7.70 ( https://nmap.org ) at 2018-08-12 23:05 CST Nmap scan report for 192.168.31.13 Host is up (0.00049s latency).
PORT STATE SERVICE 80/tcp closed http MAC Address: 00:0C:29:99:D3:E6 (VMware)
Nmap done: 1 IP address (1 host up) scanned in 0.42 seconds
root@kali:~# nmap -sV 192.168.31.13 -p 8080 Starting Nmap 7.70 ( https://nmap.org ) at 2018-08-13 00:02 CST Nmap scan report for 192.168.31.13 Host is up (0.00076s latency).
PORT STATE SERVICE VERSION 8080/tcp open http Apache Tomcat 8.5.14 MAC Address: 00:0C:29:99:D3:E6 (VMware)
Service detection performed. Please report any incorrect results at https://nmap.org/submit/ . Nmap done: 1 IP address (1 host up) scanned in 12.75 seconds
2.操作系统检测(-O),Nmap还能识别目标主机的操作系统。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
root@kali:~# nmap -O 192.168.31.13 Starting Nmap 7.70 ( https://nmap.org ) at 2018-08-13 00:03 CST Nmap scan report for 192.168.31.13 Host is up (0.00072s latency). Not shown: 998 closed ports PORT STATE SERVICE 8080/tcp open http-proxy 10010/tcp open rxapi MAC Address: 00:0C:29:99:D3:E6 (VMware) Device type: general purpose Running: Linux 3.X|4.X OS CPE: cpe:/o:linux:linux_kernel:3 cpe:/o:linux:linux_kernel:4 OS details: Linux 3.2 - 4.9 Network Distance: 1 hop
OS detection performed. Please report any incorrect results at https://nmap.org/submit/ . Nmap done: 1 IP address (1 host up) scanned in 3.49 seconds