Driver installation tutorial for wireless network card MW310UH under Kali Linux system

Kali driver installation tutorial takes MW310UH wireless network card as an example

       The operating system used in this experiment is: kali-linux-2022.4-vmware-amd64, running in the VMware virtual machine environment.

1. Install the necessary system packages

       Before compiling, use the following command to view the version information of the operating system:

uname -a

 

Four packages need to be installed, namely:

linux-compiler-gcc、linux-headers-xxx-kali3、 linux-headers-xxx-kali3-common和linux-kbuild-xxx。

Enter the Kali system software package download official website: Index of /kali/pool/main/l/linux , select the version and hardware platform corresponding to the operating system, for example, the version I should choose is kali 6.0.x, and the hardware platform is amd64.

as the picture shows:

Copy the downloaded 4 software packages to the Kali system, as shown in the figure:

 

In the current directory, run the following commands in sequence (modify to your own package name)

sudo dpkg -i linux-compiler-gcc-12-x86_6.0.7-1kali1_amd64.deb

sudo dpkg -i linux-kbuild-6.0_6.0.7-1kali1_amd64.deb

sudo dpkg -i linux-headers-6.0.0-kali3-common_6.0.7-1kali1_all.deb

sudo dpkg -i linux-headers-6.0.0-kali3-amd64_6.0.7-1kali1_amd64.deb

After the installation is complete, you need to prepare the corresponding files for compiling the driver.

Enter the /usr/src directory, you can see the kernel header files installed earlier

 

Remember the full address of this folder, you will need it in the next step.

Enter the /usr/lib/modules/ directory

 

You can see that the author's module file directory is 6.0.0-kali3-amd64

Enter this directory and create a new directory named bulid

as the picture shows:

 

Copy all the files in the aforementioned linux-headers-6.0.0-kali3-amd64 to the newly created build directory:

cp -r /usr/src/linux-headers-6.0.0-kali3-amd64/. /usr/lib/modules/6.0.0-kali3-amd64/build/

After the copy is complete, as shown in the figure:

 

Please pay special attention to whether the scripts and tools directories are completely copied. If it is in the form of a soft connection, you must manually copy the scripts and tools from the /usr/src/linux-headers-6.0.0-kali3-amd64/. tools come here.

2. Compile and install the driver

Search engines such as Baidu or Google to find the linux driver of the relevant network card model. For example, the chip used by the WM310UH wireless network card used by the author is rtl8192fu. Daniel has open sourced the driver on gitee. The URL is:

https://gitee.com/BrightXu/rtl8192fu/tree/master

Use the following git clone command to easily clone the source code to the Kali system, or you can download it yourself and copy it to Kali.

git clone https://gitee.com/BrightXu/rtl8192fu.git

After cloning is complete, it will look like this:

 

Enter the driver source directory rtl8192fu:

cd rtl8192fu

Then use the following command:

make -j$(nproc)

sudo make install

sudo modprobe 8192fu

If no error is reported, congratulations, the driver has been compiled and installed successfully. Use the iwconfig command to see the network card information, as shown in the figure:

 

Guess you like

Origin blog.csdn.net/qq_41595148/article/details/128699175