Difference between revisions of "Alpha USB in monitor mode"

From csn
Jump to navigation Jump to search
Line 1: Line 1:
 
These instructions assume that you are using Kali Linux, but there is no reason that it should not also work for Ubuntu. If you are in Ubuntu or Rasbian, I would recommend turning off the wifi adapter in the graphical user interface in the top left of the screen.  
 
These instructions assume that you are using Kali Linux, but there is no reason that it should not also work for Ubuntu. If you are in Ubuntu or Rasbian, I would recommend turning off the wifi adapter in the graphical user interface in the top left of the screen.  
  
First we must connect the USB directly to our Kali VM. Click VM at the top of your virtual machines. You will click:
+
First we must connect the USB directly to our Linux Virtual Machine. Click VM at the top of your virtual machines. You will click:
  
 
  VM->Removeable Devices->Realtek 802.11n NIC->connect
 
  VM->Removeable Devices->Realtek 802.11n NIC->connect
 +
 +
== Establish a baseline ==
  
 
Issue a:
 
Issue a:
Line 17: Line 19:
 
  lsusb
 
  lsusb
  
You should see a line describing the Realtek netork adapter. Now, we need to compile the driver against your kernel headers.
+
You NOT be able to see the Realtex RTL8812AU network adapter. To get this working we need to compile the driver against your kernel headers.
 +
 
 +
== Build the drivers ==
  
 
Install the required build tools:  
 
Install the required build tools:  
Line 42: Line 46:
  
 
  sudo reboot now
 
  sudo reboot now
 +
 +
== Re-check the system ==
 +
 +
Issue a:
 +
 +
sudo ifconfig -a
 +
 +
You should NOT see a wlan0 interface, this is because we have not yet installed the drivers.
 +
 +
Identify which is your wireless interface name. It will probably be wlan0.
 +
 +
Issue an:
 +
 +
lsusb
 +
 +
You NOT be able to see the Realtex RTL8812AU network adapter. To get this working we need to compile the driver against your kernel headers.
 +
 +
== Put the WiFi adapter in Monitor Mode ==
  
 
Now, when you log back in, you must strictly follow the instructions below to get a reliable monitor mode. Do this one line at a time.  
 
Now, when you log back in, you must strictly follow the instructions below to get a reliable monitor mode. Do this one line at a time.  

Revision as of 01:19, 3 August 2021

These instructions assume that you are using Kali Linux, but there is no reason that it should not also work for Ubuntu. If you are in Ubuntu or Rasbian, I would recommend turning off the wifi adapter in the graphical user interface in the top left of the screen.

First we must connect the USB directly to our Linux Virtual Machine. Click VM at the top of your virtual machines. You will click:

VM->Removeable Devices->Realtek 802.11n NIC->connect

Establish a baseline

Issue a:

sudo ifconfig -a

You should NOT see a wlan0 interface, this is because we have not yet installed the drivers.

Identify which is your wireless interface name. It will probably be wlan0.

Issue an:

lsusb

You NOT be able to see the Realtex RTL8812AU network adapter. To get this working we need to compile the driver against your kernel headers.

Build the drivers

Install the required build tools:

sudo apt install git dkms bc

Clone the Git repo

git clone https://github.com/morrownr/8812au.git

Cd into the directory

cd 8812au

Compile

make

Then install

sudo make install 

Now reboot your Ubuntu/Kali virtual machine.

sudo reboot now

Re-check the system

Issue a:

sudo ifconfig -a

You should NOT see a wlan0 interface, this is because we have not yet installed the drivers.

Identify which is your wireless interface name. It will probably be wlan0.

Issue an:

lsusb

You NOT be able to see the Realtex RTL8812AU network adapter. To get this working we need to compile the driver against your kernel headers.

Put the WiFi adapter in Monitor Mode

Now, when you log back in, you must strictly follow the instructions below to get a reliable monitor mode. Do this one line at a time.

sudo ifconfig wlan0 down                         # Make sure the interface is down 
sudo airmon-ng check kill                      # Kill things that might interfere with the process
sudo iwconfig wlan0 mode monitor               # put it in monitor mode
sudo rfkill unblock all                        # Make sure there are no hardware bocks
sudo iwconfig wlan0 channel 1                  # Set the channel
sudo ifconfig wlan0 up                         # Bring the interface back up

Now you should be able to capture on your wireless interface in monitor mode.