NMap:无法打开设备 eth1

网络工程 以太网
2021-07-15 21:47:42

编辑:我发现 Nmap 可以在非特权模式下工作。可以在此处找到与相关的问题

我最近在 Windows 7 Home Premium x64 上安装了 NMap 6.49BETA4 和 ZenMap GUI。我根本不熟悉 NMap,所以我希望这是一个非常简单的解决方案。当我运行默认的 scanme.nmap.org, scan 时,我收到了这个错误:

Starting Nmap 6.49BETA4 ( https://nmap.org ) at 2015-07-28 13:26 Eastern Daylight Time
NSE: Loaded 122 scripts for scanning.
NSE: Script Pre-scanning.
Initiating NSE at 13:27
Completed NSE at 13:27, 0.00s elapsed
Initiating NSE at 13:27
Completed NSE at 13:27, 0.00s elapsed
Initiating Ping Scan at 13:27
dnet: Failed to open device eth1
QUITTING!

当我运行 -- 时iflist,我得到了这个回报:

***********************INTERFACES************************
DEV  (SHORT) IP/MASK                      TYPE        UP   MTU  MAC
eth0 (eth0)  fe80::a167:b6ca:c16f:282b/64 ethernet    down 1500 66:6D:57:28:DB:41
eth0 (eth0)  169.254.40.43/4              ethernet    down 1500 66:6D:57:28:DB:41
eth1 (eth1)  fe80::f4e6:8b28:e268:72f0/64 ethernet    up   1500 44:6D:57:28:DB:41
eth1 (eth1)  192.168.1.6/24               ethernet    up   1500 44:6D:57:28:DB:41
eth2 (eth2)  fe80::581e:d69e:7f23:7640/64 ethernet    down 1500 24:00:04:18:00:22
eth2 (eth2)  169.254.118.64/4             ethernet    down 1500 24:00:04:18:00:22
lo0  (lo0)   ::1/128                      loopback    up   -1
lo0  (lo0)   127.0.0.1/8                  loopback    up   -1
tun0 (tun0)  (none)/0                     point2point down 1280
tun1 (tun1)  fe80::5efe:c0a8:106/128      point2point down 1280
tun2 (tun2)  (none)/0                     point2point down 1280
tun3 (tun3)  fe80::e0:0:0:0/64            point2point down 1280
tun4 (tun4)  (none)/0                     point2point down 1280
tun5 (tun5)  (none)/0                     point2point down 1280
DEV  WINDEVICE
eth0 none
eth0 none
eth1 none
eth1 none
eth2 none
eth2 none
lo0  none
lo0  none
tun0 none
tun1 none
tun2 none
tun3 none
tun4 none
tun5 none

我几乎肯定缺少与 eth1 相关联的 WINDEVICE 是问题所在,但我对如何修复它一无所知

附加信息:无线适配器:Atheros AR5B125 无线网络适配器

开始ipconfig /all

Windows IP Configuration

  Host Name . . . . . . . . . . . . : MyName-PC
  Primary Dns Suffix  . . . . . . . :
  Node Type . . . . . . . . . . . . : Broadcast
  IP Routing Enabled. . . . . . . . : Yes
  WINS Proxy Enabled. . . . . . . . : No
  DNS Suffix Search List. . . . . . : home

Wireless LAN adapter Wireless Network Connection:

  Connection-specific DNS Suffix  . : home
   Description . . . . . . . . . . . : Atheros AR5B125 Wireless Network Adapter
   Physical Address. . . . . . . . . : 44-6D-57-28-DB-41
   DHCP Enabled. . . . . . . . . . . : Yes
   Autoconfiguration Enabled . . . . : Yes
   Link-local IPv6 Address . . . . . : fe80::f4e6:8b28:e268:72f0%25(Preferred)
   IPv4 Address. . . . . . . . . . . : 192.168.1.6(Preferred)
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Lease Obtained. . . . . . . . . . : Tuesday, July 28, 2015 11:53:44 AM
   Lease Expires . . . . . . . . . . : Tuesday, July 28, 2015 2:28:11 PM
   Default Gateway . . . . . . . . . : 192.168.1.1
   DHCP Server . . . . . . . . . . . : 192.168.1.1
   DHCPv6 IAID . . . . . . . . . . . : 457469271
   DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-17-28-44-78-E8-40-F2-BE-96->45
   DNS Servers . . . . . . . . . . . : 192.168.1.1
   NetBIOS over Tcpip. . . . . . . . : Enabled

抱歉问了这么长的问题。

4个回答

事实证明,这最终成为 Google 上针对所述错误消息的最高结果。我卸载了 WinPCap(可能不是必需的),然后安装了 Nmap 7.01 版,这为我解决了问题,而没有使用原始问题评论中提到的 cygwin 解决方案。

更新:我相信(对我而言)这实际上可能与 Nessus 使用的 winpcap 版本冲突。我遇到这个问题的两个盒子都安装了。因此,除了上述修复之外,请确保 nessus 服务已关闭(如果已安装)。我还建议(正如其他人所说)获取 winpcap 的合法版本,而不是在 nmap 安装期间安装它(只需在安装程序中取消选中它)。

tl;博士

确保 Nessus 服务未运行(如果已安装)

卸载 WinPCap

从 winpcap.org 安装 WinPCap

安装 Nmap 7.01(在安装程序中取消选中 winpcap)

我做了与 eficker 相反的事情,我删除了在安装 zenmap 期间安装的 npcap,因为我已经为wireshark 安装了 winpcap。删除 npcap 后,zenmap 停止报告 eth0 的问题。

所以这个问题似乎是 npcap 和 winpcap 之间的冲突。如果两者都安装了,则会出现此错误。

tl;dr使用官方winpcap

我还有另一个略有不同的答案。我没有wireshark安装。nmap-7.31现在。

最初,我安装nmapchocolatey. 但它给了我Failed to open device错误。然后我卸载npcapnmap. nmap说:

WARNING: Could not import all necessary Npcap functions. You may need to
upgrade to version 0.07 or higher from http://www.npcap.org. Resorting to
connect() mode -- Nmap may not function completely

但顺利完成。我使用 nmap.org 的安装程序尝试了上述操作,但结果相同。

然后我遇到了以下建议

也请尝试使用官方 WinPcap 4.0.2 安装程序,可从http://www.winpcap.org/install/default.htm 获得首先从“添加或删除程序”中删除 Nmap winpcap,然后运行安装程序。

它奏效了。

卸载 nmap 附带的可执行文件后,从 npcap.org 下载实际的 npcap 可执行文件。那对我有用。没有更多的错误消息找到 eth0。不再有错误消息说 npcap 函数未导入。完毕。