参考链接:https://blog.csdn.net/Zero_D_Slayer/article/details/117856681
一、查询系统和安装必要软件
购买的是AC650 11ac 双频无线网卡,实际虚拟机识别的是 Realtek Semiconductor Corp. 802.11ac NIC
1 2 3 4 5 6 7 8 |
┌──(kali㉿kali)-[~] └─$ lsusb Bus 001 Device 002: ID 0bda:c811 Realtek Semiconductor Corp. 802.11ac NIC Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 002 Device 004: ID 0e0f:0008 VMware, Inc. Virtual Bluetooth Adapter Bus 002 Device 003: ID 0e0f:0002 VMware, Inc. Virtual USB Hub Bus 002 Device 002: ID 0e0f:0003 VMware, Inc. Virtual Mouse Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub |
windows 下查询得到是Realtek 8811CU
查询kali 版本
1 2 3 4 5 6 7 8 9 10 11 12 |
┌──(kali㉿kali)-[~] └─$ uname -r 5.16.0-kali7-amd64 ┌──(kali㉿kali)-[~] └─$ apt-cache search linux-headers linux-headers-5.18.0-kali5-amd64 - Header files for Linux 5.18.0-kali5-amd64 linux-headers-5.18.0-kali5-cloud-amd64 - Header files for Linux 5.18.0-kali5-cloud-amd64 linux-headers-5.18.0-kali5-common - Common header files for Linux 5.18.0-kali5 linux-headers-5.18.0-kali5-common-rt - Common header files for Linux 5.18.0-kali5-rt linux-headers-5.18.0-kali5-rt-amd64 - Header files for Linux 5.18.0-kali5-rt-amd64 |
如果 内核版本和内核头文件版本不一致,尝试如下命令,然后重启
1 2 3 4 5 |
apt-get clean apt-get update apt-get upgrade apt-get dist-upgrade |
kali2022.2默认未安装bc,需要安装bc
1 |
apt-get install bc |
二. 安装网卡驱动
故从github下载rtl8811cu驱动(rtl8811cu与rtl8821cu仅差一个蓝牙功能,驱动可通用)
适用内核:Linux 4.4.x – 5.x
1 2 3 |
mkdir build/ cd build/ git clone https://github.com/brektrou/rtl8821CU |
在kali2022.3 版本 尝试了 git clone https://github.com/morrownr/8821cu-20210118,编译成功。
编译安装:
1 2 3 |
cd rtl8821CU/ make make install |
检查是否安装成功
1 2 3 |
# ls /lib/modules/$(uname -r)/kernel/drivers/net/wireless/realtek/rtl8821cu 8821cu.ko |
三. 启动网卡驱动
输入以下命令自动载入8821cu驱动模块:
modprobe 8821cu
已经可以使用无线网卡连接WiFi上网: