Skip to main content

The quest for a Kali compatible wifi adaptor

·986 words· 0 ·
ekwska
Author
ekwska
Just a bird.

Since I became interested in the cyberpunk genre a few years ago, and in general reading more sci-fi, I thought it would be cool to learn about hacking (ethically). And yes my motivation was I just thought it would be cool and I’m okay with that. This coincides with me reminiscing about Ghost in the Shell (1995) and starting a new Cyberpunk 2077 run with a netrunner build and of course wanting to become that IRL…

During my MSc, networking was something I got a rough grounding in via a module about mobile sensor networks, but I never dove deeper into apart from the required learning for the exams. So after buying the course ‘ Learn Ethical Hacking From Scratch’ on Udemy, I thought I would blog about anything interesting I learn, as it helps me retain information better (and there’s a digital memento to look back on)!

Buying a wifi card supported by Kali Linux #

After completing the introduction section of the course, I realised that I needed to buy a wifi card that would support all the Ethically Nefarious actions we were going to learn. Apparently not just any wifi card will work with the actions we will do in Kali, which are:

  • Monitor mode: Allows using a sniffer to capture the traffic from any of the wireless networks in an area, that it is not currently associated with, without restriction.

  • Packet injection: Forging/spoofing packets to make them look like expected packets and injecting them into a data stream

  • Access Point (AP) mode: Used for fake access point attacks, where an attacker uses software to create a malicious AP that is live and broadcasting out to wireless clients.

I have a MSI B550 Tomahawk motherboard, which does not have a wifi card as it sits next to my router so I have free reign over the ethernet. So I didn’t need to worry about an integrated one not being supported.

After doing some research, I found that as long as the card has one of the below chipsets then it should support the things we will be doing in the wireless section of the course:

  • RTL8811AU

  • Atheros AR9271

There are many other chipsets too, but these are recommended for the course. As I’m just doing this for learning and fun (and I’m not going to be out in the wild doing anything ofc 😇), ideally something around £10-20 fits my bill. I decided to go for the TP-Link AC600 High Gain USB Wi-Fi Adaptor. It should arrive tomorrow, so let’s wait and see 💤

Okay the wifi card has arrived #

This purchase gave me an unreasonable amount of nerdy joy.

Drivers?! #

Initially I thought I would need to follow the instructions for installing the drivers using steps in https://github.com/morrownr/8821au-20210708. However the creator of the online course actually provides a Kali VM, which thankfully has all the drivers installed for Atheros AR9271, RTL8812AU drivers, and Realtek RT5370 drivers! I’ve read that installing drivers into Kali can be a bit of a pain, so I’m very grateful for this 🙏

To test that the adaptor was recognised, I connected it to the VM once it had started (therefore disconnecting it from the host) and ran ifconfig.

root@kali:~# ifconfig
eth0: ...

lo: ...

wlan0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 2312
        ether ...  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

Looks like it was recognised, which is a good start!

Enabling monitor mode #

First we run iwconfig to see the current configuration of the adaptor.

root@kali:~# iwconfig
lo        no wireless extensions.

eth0      no wireless extensions.

wlan0     unassociated  ESSID:""  Nickname:"<WIFI@REALTEK>"
          Mode:Managed  Frequency=2.412 GHz  Access Point: Not-Associated   
          Sensitivity:0/0  
          Retry:off   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:off
          Link Quality=0/100  Signal level=0 dBm  Noise level=0 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

Next we want to change it to use monitor mode. So we take the adaptor down, and also as an optional step use airmon-ng to kill any processes that may interfere with monitor mode. This also has the side-effect of killing the internet connection to the VM, but that is fine as TIL you don’t need internet connectivity to be in monitor mode (makes sense, as you’re just soaking up all the packets).

root@kali:~# ifconfig wlan0 down
root@kali:~# airmon-ng check kill 

Killing these processes:

    PID Name
   2280 wpa_supplicant

Now we switch the mode to monitor, and start the adaptor again.

root@kali:~# iwconfig wlan0 mode monitor
root@kali:~# ifconfig wlan0 up
root@kali:~# iwconfig
lo        no wireless extensions.

eth0      no wireless extensions.

wlan0     IEEE 802.11b  ESSID:""  Nickname:"<WIFI@REALTEK>"
          Mode:Monitor  Frequency:2.412 GHz  Access Point: Not-Associated   
          Sensitivity:0/0  
          Retry:off   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:off
          Link Quality=0/100  Signal level=-100 dBm  Noise level=0 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

The adaptor supports monitor mode - again validating that my purchase was a correct one 💪

Parting notes about this blog #

This was just a short post, as I’m going to be doing some more online courses and projects over the next few weeks. I hope that documenting them incrementally will hopefully keep my motivation up, and allow me to reconnect with blogging. In the past I’ve put too much pressure on myself to create Very Serious, Long and Perfect posts to ‘prove’ I Know Stuff, when really I enjoy reading and writing posts like this a lot more. I Know Some Stuff, and I Don't Know Other Stuff, and that’s okay.


If you enjoyed this post, please show support by hitting the heart at the top of the page. If you want to donate for any reason, just click the coffee icon in the bottom right corner. Anything is always appreciated 💛