A handy post from my original blog which was created on 08/12/2020 which I have managed to recover.
Few Helpful Commands:
lsusb – List USB devices
iwconfig –
airmon-ng – controls how network card behaves
airmon-ng start wlan0 – Enable monitor mode
airdump-ng wlan0 – Starts scanning
Hardware:
AWUS036AC Wireless Adapter
Kali Linux 2020.4 VM (originally 2020.3)
Setting Up:
I was running into issues getting the VM to actually see the device that I am using. The error that I was seeing were issues regarding headers, as you can imagine, this was rather frustrating.
I attempted to move from Kali 2020.3 to 2020.4 to see if this would fix it, unfortunately it did not.
To anyone that is trying to fix this issue, make sure to use –
apt-get update && apt-get install -y linux-headers-$(uname -r)
I believe that was one of the many things that eventually got it working. Try running this multiple times. As it turns out, I was having the same error on both version of Kali. It probably took around two or three hours to figure this out. It might seem easy to someone that’s somewhat familiar with Kali Linux but I, however, am a complete amateur when it comes to it.
The Installation:
I’m logging into root to make life quicker and easier, I know this isn’t always the best practice but I am doing this in a machine that is virtualised and can be trashed.
These are the steps that I have followed –
apt update
apt upgrade -fix-missing
sudo apt upgrade
Worth noting at this point, run the command;
apt-get update && apt-get install -y linux-headers-$(uname -r)
This will update your headers in case you have any issues that I did!
sudo apt-get install dkms
sudo apt-get install libelf-dev
Navigate to Downloads folder with;
cd Downloads
Next we will clone the Git Repository for the driver;
git clone -b v5.6.4.2 https://github.com/aircrack-ng/rtl8812au.git
This is followed by navigating into the folder that’s just created. We’re using wildcard here;
cd rtl*
Finally we make the file and install it;
make dkms_install
There we go. The driver should be installed and ready to go. If you have any issues, try what I have suggested above. It is most probably a header issue!
You don’t really need to but to reboot the machine you can run;
sudo reboot
Check that everything is working;
ip add
iwconfig
The Fun Part:
We put the wireless USB device into monitoring mode followed with airodump to see those WiFi signals;
airmon-ng start wlan0
airodump-ng wlan0
Then we want to save the capture by using this command;
airodump-ng wlan0 --write "filename"
Finally we close airmon by issuing the command;
airmon-ng stop wlan0
That’s it. We’re done, finally!
It wasn’t too difficult, apart from the original issues that took a few hours. If I need to do this again (which I most certainly will) I’ll definitely come back to this blog post to keep myself on the right path!
Just one more thing to note, if you want to see the data that was captured when we used the –write command, use this command to open the file in wireshark itself;
wireshark "filename".cap
Otherwise, you can just opt to use the GUI to open Wireshark.
Leave a Reply