Nmap的基本使用:主机发现
河城凌风(kawashiro-ryofu) Lv5

CIDR

CIDR(Classless Inter-Domain Roating),无类别域间路由。通过其可以快速表示一个网络。

192.168.0.1/24等同于在192.168.0.1192.168.0.255之间的所有IP地址。

Nmap主机发现

通过nmap -sP [CIDR]对该网络中所有主机进行Ping扫描,以探测主机存活性。

扫描过程中使用TCP、SYN扫描,ICMP探测主机存活。

1
nmap -sP 192.168.0.1/24
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
PS C:\Users\bkryofu> nmap -sP 192.168.0.1/24
Starting Nmap 7.91 ( https://nmap.org ) at 2021-02-09 21:36 ?D1ú±ê×?ê±??
Nmap scan report for 192.168.0.1
Host is up (0.0019s latency).
MAC Address: 34:71:46:AE:41:A7 (Huawei Device)
Nmap scan report for 192.168.0.103
Host is up (0.58s latency).
MAC Address: 18:BC:5A:E0:DA:AA (Zhejiang Tmall Technology)
Nmap scan report for 192.168.0.104
Host is up (0.58s latency).
MAC Address: B8:24:F0:00:88:15 (Soyo Technology Development)
Nmap scan report for 192.168.0.105
Host is up (0.11s latency).
MAC Address: 34:EA:34:EE:4D:7C (HangZhou Gubei Electronics Technology)
Nmap scan report for 192.168.0.113
Host is up (0.38s latency).
MAC Address: 1C:CC:D6:88:27:98 (Xiaomi Communications)
Nmap scan report for 192.168.0.116
Host is up (0.49s latency).
MAC Address: 34:EA:34:D5:E9:3F (HangZhou Gubei Electronics Technology)
Nmap scan report for 192.168.0.132
Host is up (0.084s latency).
MAC Address: AA:FB:CD:5B:44:C3 (Unknown)
Nmap scan report for 192.168.0.147
Host is up (0.12s latency).
MAC Address: 9C:A5:C0:53:02:56 (vivo Mobile Communication)
Nmap scan report for 192.168.0.204
Host is up (0.00s latency).
MAC Address: 00:1A:A9:91:E1:01 (Fujian Star-net Communication)
Nmap scan report for 192.168.0.250
Host is up (0.00s latency).
MAC Address: E4:F3:F5:7B:2A:1E (Shenzhen Mercury Communication Technologies)
Nmap scan report for 192.168.0.251
Host is up (0.085s latency).
MAC Address: 8E:F2:28:0A:71:66 (Unknown)
Nmap scan report for 192.168.0.109
Host is up.
Nmap scan report for 192.168.0.118
Host is up.
Nmap done: 256 IP addresses (13 hosts up) scanned in 69.44 seconds

输出结果第一行是Nmap scan report for [IP],第二行表示此机器在线,第三行是MAC地址和设备生产厂家。

使用命令nmap -sn [CIDR]也可以达到相同效果。

结果输出

  • -oN [文件名]:将结果保存为普通文本;
  • -oX [文件名]:将结果保存为外部XML;

具体参考nmap -h输出的OUTPUT条目。

 评论
评论插件加载失败
正在加载评论插件