kali虚拟机无法发现外置网卡问题

问题描述:环境是win11 下安装的vmware虚拟机,安装的kali桌面版系统,已经将usb无线网卡连接至虚拟机,虚拟机右下角状态按钮为绿,但kali无法发现网卡。
iwconfig查看网卡,显示没有无线设备

┌──(root㉿dsp)-[/home/dsp]
└─# iwconfig
lo        no wireless extensions.
eth0      no wireless extensions.

解决步骤如下

  1. lsusb查看连接的USB设备,可以发现 如下 Device 006即为我连接虚拟机的无线网卡,因此推断应该是kali无法驱动该无线网卡,若检测不到则需要重新检查usb硬件连接情况
└─# lsusb
Bus 003 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 002 Device 005: ID 0e0f:0002 VMware, Inc. Virtual USB Hub
Bus 002 Device 004: ID 0e0f:0002 VMware, Inc. Virtual USB Hub
Bus 002 Device 006: ID 0bda:b711 Realtek Semiconductor Corp. RTL8188GU 802.11n WLAN Adapter (After Modeswitch) 
Bus 002 Device 002: ID 0e0f:0003 VMware, Inc. Virtual Mouse
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 0e0f:0002 VMware, Inc. Virtual USB Hub
Bus 001 Device 002: ID 0e0f:0008 VMware, Inc. Virtual Bluetooth Adapter
Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
  1. 根据网卡型号,下载驱动程序,我这里是rtl8188gu,在git上有该驱动程序
┌──(root㉿dsp)-[/home/dsp]
└─# git clone https://github.com/McMCCRU/rtl8188gu.git
正克隆到 'rtl8188gu'...
remote: Enumerating objects: 838, done.
remote: Counting objects: 100% (30/30), done.
remote: Compressing objects: 100% (19/19), done.
remote: Total 838 (delta 14), reused 18 (delta 11), pack-reused 808
接收对象中: 100% (838/838), 2.98 MiB | 963.00 KiB/s, 完成.
处理 delta 中: 100% (432/432), 完成.
  1. 进入驱动文件夹,make该驱动
┌──(root㉿dsp)-[/home/dsp]
└─# cd rtl8188gu
                                                                             
┌──(root㉿dsp)-[/home/dsp/rtl8188gu]
└─# make           
make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/5.18.0-kali7-amd64/build M=/home/dsq/rtl8188gu  modules
make[1]: 进入目录“/usr/src/linux-headers-5.18.0-kali7-amd64”
  CC [M]  /home/dsq/rtl8188gu/core/rtw_cmd.o
  CC [M]  /home/dsq/rtl8188gu/core/rtw_security.o
  CC [M]  /home/dsq/rtl8188gu/core/rtw_debug.o
  CC [M]  /home/dsq/rtl8188gu/core/rtw_io.o
  CC [M]  /home/dsq/rtl8188gu/core/rtw_ioctl_query.o
  CC [M]  /home/dsq/rtl8188gu/core/rtw_ioctl_set.o
  CC [M]  /home/dsq/rtl8188gu/core/rtw_ieee80211.o
  CC [M]  /home/dsq/rtl8188gu/core/rtw_mlme.o
  CC [M]  /home/dsq/rtl8188gu/core/rtw_mlme_ext.o
  CC [M]  /home/dsq/rtl8188gu/core/rtw_mi.o
  CC [M]  /home/dsq/rtl8188gu/core/rtw_wlan_util.o
  CC [M]  /home/dsq/rtl8188gu/core/rtw_vht.o
  CC [M]  /home/dsq/rtl8188gu/core/rtw_pwrctrl.o
  CC [M]  /home/dsq/rtl8188gu/core/rtw_rf.o
  CC [M]  /home/dsq/rtl8188gu/core/rtw_recv.o
  CC [M]  /home/dsq/rtl8188gu/core/rtw_sta_mgt.o
  CC [M]  /home/dsq/rtl8188gu/core/rtw_ap.o
  CC [M]  /home/dsq/rtl8188gu/core/rtw_xmit.o
  CC [M]  /home/dsq/rtl8188gu/core/rtw_p2p.o
  CC [M]  /home/dsq/rtl8188gu/core/rtw_rson.o
  CC [M]  /home/dsq/rtl8188gu/core/rtw_tdls.o
  CC [M]  /home/dsq/rtl8188gu/core/rtw_br_ext.o
  CC [M]  /home/dsq/rtl8188gu/core/rtw_iol.o
  CC [M]  /home/dsq/rtl8188gu/core/rtw_sreset.o
  CC [M]  /home/dsq/rtl8188gu/core/rtw_btcoex_wifionly.o
  CC [M]  /home/dsq/rtl8188gu/core/rtw_btcoex.o
  CC [M]  /home/dsq/rtl8188gu/core/rtw_beamforming.o
  CC [M]  /home/dsq/rtl8188gu/core/rtw_odm.o
  CC [M]  /home/dsq/rtl8188gu/core/efuse/rtw_efuse.o
  CC [M]  /home/dsq/rtl8188gu/os_dep/osdep_service.o
  CC [M]  /home/dsq/rtl8188gu/os_dep/linux/os_intfs.o
  CC [M]  /home/dsq/rtl8188gu/os_dep/linux/usb_intf.o
  CC [M]  /home/dsq/rtl8188gu/os_dep/linux/usb_ops_linux.o
  CC [M]  /home/dsq/rtl8188gu/os_dep/linux/ioctl_linux.o
  CC [M]  /home/dsq/rtl8188gu/os_dep/linux/xmit_linux.o
  CC [M]  /home/dsq/rtl8188gu/os_dep/linux/mlme_linux.o
  CC [M]  /home/dsq/rtl8188gu/os_dep/linux/recv_linux.o
  CC [M]  /home/dsq/rtl8188gu/os_dep/linux/ioctl_cfg80211.o
  CC [M]  /home/dsq/rtl81

你可能感兴趣的:(linux,运维,服务器,网络安全)