iwconfig 未在 kali linux vm 中显示任何无线接口

iwconfig 未在 kali linux vm 中显示任何无线接口

版本

uname -a
Linux kali 5.18.0-kali5-amd64 #1 SMP PREEMPT_DYNAMIC Debian 5.18.5-1kali6 (2022-07-07) x86_64 GNU/Linux

我尝试安装以下反向移植并在期间遇到了一堆错误make

sudo apt-get update && sudo apt-get upgrade && sudo apt-get dist-upgrade
sudo apt-get install linux-headers-$(uname -r)
wget https://mirrors.edge.kernel.org/pub/linux/kernel/projects/backports/stable/v5.15.58/backports-5.15.58-1.tar.xz
tar -xvf backports-5.15.58-1.tar.xz
cd backports-5.15.58-1

其次是

$ sudo make defconfig-wifi

cc -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer   -c -o conf.o conf.c
lex -ozconf.lex.c -L zconf.l
yacc -ozconf.tab.c -t -l zconf.y
zconf.y:34.1-7: warning: POSIX Yacc does not support %expect [-Wyacc]
   34 | %expect 32
      | ^~~~~~~
zconf.y:97.1-11: warning: POSIX Yacc does not support %destructor [-Wyacc]
   97 | %destructor {
      | ^~~~~~~~~~~
cc -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer   -c -o zconf.tab.o zconf.tab.c
cc   conf.o zconf.tab.o   -o conf

WARNING: unmet direct dependencies detected for USB_NET_CDC_SUBSET_ENABLE
  Depends on [n]: USB_NET_DRIVERS [=m] && n && m && BP_MODULES [=y] && USB_NET_CDC_SUBSET [=m]
  Selected by [m]:
  - USB_BELKIN [=y] && USB_NET_DRIVERS [=m] && USB_NET_CDC_SUBSET [=m]
  - USB_ARMLINUX [=y] && USB_NET_DRIVERS [=m] && USB_NET_CDC_SUBSET [=m]

WARNING: unmet direct dependencies detected for USB_NET_CDC_SUBSET_ENABLE
  Depends on [n]: USB_NET_DRIVERS [=m] && n && m && BP_MODULES [=y] && USB_NET_CDC_SUBSET [=m]
  Selected by [m]:
  - USB_BELKIN [=y] && USB_NET_DRIVERS [=m] && USB_NET_CDC_SUBSET [=m]
  - USB_ARMLINUX [=y] && USB_NET_DRIVERS [=m] && USB_NET_CDC_SUBSET [=m]
#
# configuration written to .config
#

以下是发生的事情make(截断)

sudo make               
make[5]: 'conf' is up to date.

WARNING: unmet direct dependencies detected for USB_NET_CDC_SUBSET_ENABLE
  Depends on [n]: USB_NET_DRIVERS [=m] && n && m && BP_MODULES [=y] && USB_NET_CDC_SUBSET [=m]
  Selected by [m]:
  - USB_BELKIN [=y] && USB_NET_DRIVERS [=m] && USB_NET_CDC_SUBSET [=m]
  - USB_ARMLINUX [=y] && USB_NET_DRIVERS [=m] && USB_NET_CDC_SUBSET [=m]

WARNING: unmet direct dependencies detected for USB_NET_CDC_SUBSET_ENABLE
  Depends on [n]: USB_NET_DRIVERS [=m] && n && m && BP_MODULES [=y] && USB_NET_CDC_SUBSET [=m]
  Selected by [m]:
  - USB_BELKIN [=y] && USB_NET_DRIVERS [=m] && USB_NET_CDC_SUBSET [=m]
  - USB_ARMLINUX [=y] && USB_NET_DRIVERS [=m] && USB_NET_CDC_SUBSET [=m]
#
# configuration written to .config
#
Building backport-include/backport/autoconf.h ... done.
warning: the compiler differs from the one used to build the kernel
  The kernel was built by: gcc-11 (Debian 11.3.0-3) 11.3.0
  You are using:           gcc-11 (Debian 11.3.0-5) 11.3.0
  CC [M]  /home/cycl0n3/Desktop/backports-5.15.58-1/compat/main.o
  LD [M]  /home/cycl0n3/Desktop/backports-5.15.58-1/compat/compat.o
  CC [M]  /home/cycl0n3/Desktop/backports-5.15.58-1/drivers/net/wireless/admtek/adm8211.o
In file included from /home/cycl0n3/Desktop/backports-5.15.58-1/include/net/mac80211.h:21,
                 from /home/cycl0n3/Desktop/backports-5.15.58-1/drivers/net/wireless/admtek/adm8211.c:24:
/home/cycl0n3/Desktop/backports-5.15.58-1/include/net/cfg80211.h: In function ‘wdev_address’:
/home/cycl0n3/Desktop/backports-5.15.58-1/include/net/cfg80211.h:5504:36: warning: return discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
 5504 |                 return wdev->netdev->dev_addr;
      |                        ~~~~~~~~~~~~^~~~~~~~~~
In file included from /usr/src/linux-headers-5.18.0-kali5-common/include/linux/string.h:253,
                 from /home/cycl0n3/Desktop/backports-5.15.58-1/backport-include/linux/string.h:3,                    \
      |                           ^
/home/cycl0n3/Desktop/backports-5.15.58-1/drivers/net/wireless/ath/ath6kl/cfg80211.c:3806:9: note: in expansion of macro ‘memcpy’
 3806 |         memcpy(ndev->dev_addr, ar->mac_addr, ETH_ALEN);
      |         ^~~~~~
/home/cycl0n3/Desktop/backports-5.15.58-1/drivers/net/wireless/ath/ath6kl/cfg80211.c:3808:35: error: assignment of read-only location ‘*ndev->dev_addr’
 3808 |                 ndev->dev_addr[0] = (ndev->dev_addr[0] ^ (1 << fw_vif_idx)) |
      |                                   ^
/home/cycl0n3/Desktop/backports-5.15.58-1/drivers/net/wireless/ath/ath6kl/cfg80211.c:3812:43: error: assignment of read-only location ‘*(ndev->dev_addr + 4)’
 3812 |                         ndev->dev_addr[4] ^= 0x80;
      |                                           ^~
make[8]: *** [/usr/src/linux-headers-5.18.0-kali5-common/scripts/Makefile.build:293: /home/cycl0n3/Desktop/backports-5.15.58-1/drivers/net/wireless/ath/ath6kl/cfg80211.o] Error 1
make[7]: *** [/usr/src/linux-headers-5.18.0-kali5-common/scripts/Makefile.build:555: /home/cycl0n3/Desktop/backports-5.15.58-1/drivers/net/wireless/ath/ath6kl] Error 2
make[6]: *** [/usr/src/linux-headers-5.18.0-kali5-common/scripts/Makefile.build:555: /home/cycl0n3/Desktop/backports-5.15.58-1/drivers/net/wireless/ath] Error 2
make[5]: *** [/usr/src/linux-headers-5.18.0-kali5-common/scripts/Makefile.build:555: /home/cycl0n3/Desktop/backports-5.15.58-1/drivers/net/wireless] Error 2
make[4]: *** [/usr/src/linux-headers-5.18.0-kali5-common/Makefile:1858: /home/cycl0n3/Desktop/backports-5.15.58-1] Error 2
make[3]: *** [Makefile.build:13: modules] Error 2
make[2]: *** [Makefile.real:88: modules] Error 2
make[1]: *** [Makefile:43: modules] Error 2
make: *** [Makefile:30: default] Error 2

我尝试make -i忽略这个错误和其他一些错误,然后进行安装并重新启动。但仍然没有检测到无线接口。

答案1

您看到的是您的 Kali Linux VM 看到了以太网连接。我的 Kali(和 Ubuntu)VM 也看到了以太网连接。

在标准虚拟机设置中,这完全正常。来宾 VM 使用虚拟机应用程序提供的网络“硬件”。我在一台计算机上安装了 VMware,在另一台计算机上安装了 Hyper-V。

客户机从虚拟机应用程序获取视频、音频、磁盘、网络连接、鼠标等。

如果您希望 Kali 机器拥有自己的无线网卡,则需要获取 USB 无线网卡,然后使用虚拟机应用程序中的 USB 直通将 USB 卡分配给 Kali。确保该卡具有 Linux 驱动程序。

这是针对 VMware 和 VBOX 的。Hyper-V 不支持直通

相关内容