Skip to content

Latest commit

 

History

History
141 lines (96 loc) · 3.56 KB

Setup-OS.md

File metadata and controls

141 lines (96 loc) · 3.56 KB

Setup usb wifi

I use tp-link wn725n (chip set rtl8188eus)

Is your wifi support monitor mode ?

iw dev
iw phy phy0 info

Here will show all your wifi card parameters

image

Check connect:

iwconfig

image

when it first connects, it's usually mode: auto, it's actually mode: manager

See information:

lsusb
lsusb -D /dev/bus/usb/<bus>/<device>

image

Setup OS:

You can refer to the following links:

Linux header:

First, update the OS

sudo apt update
sudo apt upgrade
sudo apt-get dist-upgrade
reboot
  1. Method 1: Run the following command to install the kernel header file.
sudo apt-get install linux-headers-$(uname -r)

After running this command, the system will automatically find the matched kernel header file to download and install it. If the Kali server is updated, you may not find the specific file, in this case, you can manually download and install the header file.

  1. Method 2: Manually Download and Compile to Install

Check the system version of Kali

uname -r

Example: 5.15.0-kali3-amd64

image

Go to one of the following link:

Ctrl+F and find linux-kbuild- + 5.15 + _5.15 + xxxxxx + amd64.deb (choose the appropriate version you need)

image

xxxxxx here is .15-1kali2_

Ctrl+F and find linux-headers- + 5.15.0-kali3-amd64 + _5.15 + xxxxxx + _amd64.deb (choose the appropriate version you need)

image

Maybe you will need linux-compiler-gcc-11-x86

image

Go to download directory

sudo dpkg -i linux-kbuild......
sudo dpkg -i linux-compiler......
sudo dpkg -i linux-headers.....
dpkg-query -s linux-headers-$(uname -r)

image

Check the /lib/modules/<kernel-version>/ directory and you will see a build link file

image

Compile driver

Go to the driver directory (rtl8188eus with me). Run the following commands to compile the driver.

make all
make install

If success, you can will a name of the <chip>.ko file is stored in there.

Load the Driver

sudo apt install bc
sudo apt-get install build-essential
sudo apt-get install libelf-dev
sudo apt install dkms
sudo rmmod r8188eu.ko
git clone https://github.com/aircrack-ng/rtl8188eus
cd rtl8188eus
sudo -i
echo 'blacklist r8188eu' | sudo tee -a '/etc/modprobe.d/realtek.conf'
exit
reboot
cd rtl8188eus
sudo make && make install
reboot