
nmap获取mac地址
Nmap is a very useful tool. It is used by penetration testers mainly but from an operation perspective, it is used by system administrators too. Nmap has a lot of different features. The mac-related feature can be used to get mac addresses of the hosts in the same network segment. I can be used to get remote systems mac addresses but SNMP should be enabled on remote systems.
Nmap是一个非常有用的工具。 它主要由渗透测试人员使用,但从操作角度来看,它也由系统管理员使用。 Nmap具有许多不同的功能。 与mac相关的功能可用于获取同一网段中主机的mac地址。 我可以用来获取远程系统的mac地址,但是应该在远程系统上启用SNMP。
获取本地系统的Mac地址 (Get Mac Address Of Local System)
Getting local systems mac address is easy and have a lot of different ways. Here we simply use IP tools.
获取本地系统的mac地址很容易,并且有很多不同的方法。 在这里,我们仅使用IP工具。
$ ip link

获取远程但相同网络系统的Mac地址(Get Mac Address Of Remote But Same Network System)
We can use Nmap to get mac address of a host if we are in the same network segment.
如果我们位于同一网段中,则可以使用Nmap获取主机的mac地址。
$ sudo nmap -sP -n 192.168.122.0/24

使用Snmp获取远程系统的Mac地址(Get Mac Address Of Remote System With Snmp)
The more complicated way is using SNMP service. SNMP tools can be used to get the mac address of the hosts. Here we use Nmap SNMP script to query SNMP service simply.
更复杂的方法是使用SNMP服务。 SNMP工具可用于获取主机的mac地址。 在这里,我们使用Nmap SNMP脚本简单地查询SNMP服务。
$ sudo nmap -sU -p 161 -T4 -d -v -n -Pn --script snmp-interfaces ubu1

nmap获取mac地址