第三章 3.5.6节 关于nmap的小实验

实验环境:windows10

实验过程

  1. windows没有nmap工具,需要手动下载:https://nmap.org/

  2. 检测目标主机某端口的TCP是否开放

  • 无法到达指定的端口,可能是由于防火墙
  1. nmap -sT -p80 192.168.2.220
  2. Starting Nmap 7.80 ( https://nmap.org ) at 2019-12-07 14:48 ?D1ú±ê×?ê±??
  3. Nmap scan report for MI9-jzphone.lan (192.168.2.220)
  4. Host is up (0.074s latency).
  5. PORT STATE SERVICE
  6. 80/tcp filtered http
  7. MAC Address: A8:9C:ED:A7:D9:EC (Xiaomi Communications)
  8. Nmap done: 1 IP address (1 host up) scanned in 2.33 seconds
  • 端口打开
  1. nmap -sT -p80 192.168.2.1
  2. Starting Nmap 7.80 ( https://nmap.org ) at 2019-12-07 14:51 ?D1ú±ê×?ê±??
  3. Nmap scan report for phicomm.me (192.168.2.1)
  4. Host is up (0.0024s latency).
  5. PORT STATE SERVICE
  6. 80/tcp open http
  7. MAC Address: 68:DB:54:CC:6B:BE (Phicomm (Shanghai))
  8. Nmap done: 1 IP address (1 host up) scanned in 1.47 seconds
  • 端口关闭
  1. nmap -sT -p80 192.168.2.239
  2. Starting Nmap 7.80 ( https://nmap.org ) at 2019-12-07 14:56 ?D1ú±ê×?ê±??
  3. Nmap scan report for LAPTOP-3CP7H0GM.lan (192.168.2.239)
  4. Host is up (1.0s latency).
  5. PORT STATE SERVICE
  6. 80/tcp closed http
  7. Nmap done: 1 IP address (1 host up) scanned in 3.38 seconds

必须关闭防火墙,才能检测到closed状态。