PDA

View Full Version : Kali, VirtualBox, AWUS1900: no wifi connection



Vinndalf
2019-09-08, 23:51
BASIC SITUATION



My host system is Windows 10.
My AWUS1900 works in Windows 10. I can see (many) nearby wireless APs broadcasting their existence, and I can connect to those I manage. The wifi unit works.
In VirtualBox I am running Kali. VirtualBox does capture the AWUS1900. Kali does show a wlan0 adapter.
But within Kali I am not seeing any APs at all. Kali finds nothing for the wifi to connect to.


More specifically, when I followed the installation instructions at https://online-it.nu/how-to-install-alfa-awus1900-kali-linux-2018-4/ everything appeared to work up to the point where I launched airodump-ng wlan0 to sniff the network. Airodump-ng finds no networks. Similarly if I click the network icon at the top right of my Kali installation (I have the XFCE UI) I see "Wi-Fi Networks" followed by "disconnected" and no list of available networks. Running airmon-ng check kill made no difference to this behavior.

I've found a number of helpful pages around the web for getting Alfa USB units to work in a Kali VM, but none of the pages I found described this particular problem.

I am still relatively new to Linux. I could well be making beginner mistakes.



DETAILS

VirtualBox 6.0.10 r132072
This VM is configured for USB 3.0.

> lsb_release -a
No LSB modules are available.
Distributor ID: Kali
Description: Kali GNU/Linux Rolling
Release: 2019.4
Codename: kali-rolling

> uname -a
Linux KaliVM 5.2.0-kali2-amd64 #1 SMP Debian 5.2.9-2kali1 (2019-08-22) x86_64 GNU/Linux

> lsusb
Bus 001 Device 003: ID 0bda:8813 Realtek Semiconductor Corp. RTL8814AU 802.11a/b/g/n/ac Wireless Adapter
(and some others)

> iwconfig
eth0 no wireless extensions.

lo no wireless extensions.

wlan0 IEEE 802.11 ESSID:off/any
Mode:Managed Access Point: Not-Associated Tx-Power=18 dBm
Retry short limit:7 RTS thr:off Fragment thr:off
Encryption key:off
Power Management:off

> airmon-ng --verbose

No LSB modules are available.
Distributor ID: Kali
Description: Kali GNU/Linux Rolling
Release: 2019.4
Codename: kali-rolling

Linux KaliVM 5.2.0-kali2-amd64 #1 SMP Debian 5.2.9-2kali1 (2019-08-22) x86_64 GNU/Linux
Detected VM using lspci
This appears to be a VirtualBox Virtual Machine
If your system supports VT-d, it may be possible to use PCI devices
If your system does not support VT-d, you can only use USB wifi cards

K indicates driver is from 5.2.0-kali2-amd64
V indicates driver comes directly from the vendor, almost certainly a bad thing
S indicates driver comes from the staging tree, these drivers are meant for reference not actual use, BEWARE
? indicates we do not know where the driver comes from... report this


X[PHY]Interface Driver[Stack]-FirmwareRev Chipset Extended Info

?[phy0]wlan0 88XXau[mac80211]-unavailable Realtek Semiconductor Corp. RTL8814AU 802.11a/b/g/n/ac mode managed

bigbiz
2019-09-10, 00:23
ifconfig wlan0 up

also check
rfkill list all
But that might not work since your not getting any errors

Mister_X
2019-09-10, 02:39
Just FYI: A driver on linux are entirely different than the ones on Windows, in terms of features and in terms of code as well.

However, VirtualBox USB passthrough driver has bugs and drops packets, so it may be due to that.

Two things:
- try to switch from USB 2.0 to 3.0 and vice versa
- Look into dmesg, if there are issues with the driver, they'll be there.

Regarding airodump-ng, how did you put the card in monitor mode? Did you kill the network managers BEFORE putting the card in monitor mode? What is the exact airodump-ng command you ran?

Vinndalf
2019-09-10, 03:57
Thank you for your response.

> Just FYI: A driver on linux are entirely different than the ones on Windows, in terms of features and in terms of code as well.

Yes, I do get that. I only mentioned what happens in Windows as evidence that there are lots of APs active around me. They should be showing up in Kali too. And the card itself does work. It doesn't appear to be a hardware problem.

> try to switch from USB 2.0 to 3.0 and vice versa

I did try that. It didn't help.

> Look into dmesg, if there are issues with the driver, they'll be there.

This looks like it might be the relevant section from dmesg:


[ 3.027002] usb 1-2: new high-speed USB device number 3 using xhci_hcd
[ 3.368783] usb 1-2: New USB device found, idVendor=0bda, idProduct=8813, bcdDevice= 0.00
[ 3.368789] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 3.368793] usb 1-2: Product: 802.11ac NIC
[ 3.368796] usb 1-2: Manufacturer: Realtek
[ 3.368799] usb 1-2: SerialNumber: 123456


> Regarding airodump-ng, how did you put the card in monitor mode? Did you kill the network managers BEFORE putting the card in monitor mode? What is the exact airodump-ng command you ran?[/QUOTE]

These are the commands I used to put the card in monitor mode:


sudo ip link set wlan0 down


sudo iwconfig wlan0 mode monitor

sudo ip link set wlan0 up


And this is my airodump command.



airodump-ng wlan0

Vinndalf
2019-09-10, 04:05
Thank you. I appreciate the help.

> ifconfig wlan0 up

Yes. I also use ip link set wlan0 up.

> Also check rfkill list all

sudo rfkill list all
0: phy0: Wireless LAN
Soft blocked: no
Hard blocked: no

Vinndalf
2019-09-11, 04:44
Possibly this screenshot may clarify my earlier description of what the Kali UI is showing me. The USB wifi card is present but apparently unable to locate or connect to APs.

3594

Mister_X
2019-09-13, 16:12
You forgot to kill network managers that can interfere with capture. Do that before putting the card in monitor mode, ALWAYS.

airmon-ng check kill
airmon-ng start wlan0
airodump-ng wlan0mon

Vinndalf
2019-09-14, 04:43
Thanks for keeping with me Mister_X. I tried these commands but they didn't seem to help:

# airmon-ng check kill

Killing these processes:

PID Name
1301 wpa_supplicant

# airmon-ng start wlan0
PHY Interface Driver Chipset
phy0 wlan0 88XXau Realtek Semiconductor Corp. RTL8814AU 802.11a/b/g/n/ac
(monitor mode enabled)

# airodump-ng wlan0mon
Interface wlan0mon:
ioctl(SIOCGIFINDEX) failed: No such device
Failed initializing wireless card(s): wlan0mon

# airodump-ng wlan0

CH 4 ][ Elapsed: 1 min ][ 2019-09-13 21:43

BSSID PWR Beacons #Data, #/s CH MB ENC CIPHER AUTH ESSID


BSSID STATION PWR Rate Lost Frames Probe

Mister_X
2019-09-14, 23:59
Before you run airmon-ng, clear dmesg (dmesg -c), then run airmon-ng, then airodump-ng, and see what's in dmesg.

Vinndalf
2019-09-15, 01:43
I am grateful for your continued help. I ran dmesg -c, airmon-ng, and then airdump-ng. Running dmesg after that produced nothing:

# dmesg
#

Mister_X
2019-09-22, 16:00
what's the output of 'airmon-ng --verbose'?

Vinndalf
2019-09-22, 16:33
what's the output of 'airmon-ng --verbose'?

It's in my first message.

H4lloween
2019-09-23, 07:54
Hi,
got the same issue but fixed it quickly with the following steps:

1. update Oracle VirtualBox to the current version (6.0.12)
2. install the proper Oracle VM VirtualBox Extension Pack with the same version like your VM is running!!!, since it provides the support for USB 2.0 and USB3.0 Devices on the VM

You can install the extension pack from https://www.virtualbox.org/wiki/Downloads.

3. After the installation, open VirtualBox and go to Preferences -> Extensions -> Add Package Icon and select the proper extension pack.

4. Plug the AWUS1900 into your USB 3.0 port and Boot your KaliVM.

Since you already installed the drivers the Device should now work properly and you are now able to detect networks!!

Don't hesitate to reply if you are still running this issue. ; )

Mister_X
2019-09-23, 15:38
Sorry.

Would you be able to give the output from dmesg regarding the driver itself, I'm trying to figure out what version you are running. Could you also show 'dpkg -l | grep dkms'

Vinndalf
2019-09-25, 00:11
Thanks for your persistence Mister_X. Here's the dpkg output.

# dpkg -l | grep dkms
ii dkms 2.7.1-4 all Dynamic Kernel Module Support Framework
ii realtek-rtl88xxau-dkms 5.2.20.2~20190617-0kali1 all Realtek RTL88xxAU driver in DKMS format
ii virtualbox-guest-dkms 6.0.12-dfsg-1 all x86 virtualization solution - guest addition module source for dkms

Vinndalf
2019-09-25, 00:28
Thanks H4lloween, that was worth a shot: I did not have the extension pack installed. (I get the guest additions with apt.) Even after I've followed your steps, however, Kali still thinks my Wi-Fi Networks are "disconnected."

It really does feel like some kind of configuration error with the OS. I sorta expected this would work!

Mister_X
2019-09-26, 23:21
Could you give a try to VMware workstation (Player is fine), I suspect an issue with VB passthrough driver

Vinndalf
2019-09-28, 17:48
Could you give a try to VMware workstation (Player is fine), I suspect an issue with VB passthrough driver

Mister_X that was a great idea, and at first I thought it worked--well, at first it DID work. Yesterday I had a VMWare Kali image where the network menu in the upper right actually listed available wireless networks, and airodump-ng actually found traffic to monitor.

This morning I went back to VMWare and fired up the same VM with no changes, but it was no longer working. The symptoms now are exactly as they were in VirtualBox: the network menu shows no wireless networks, and airodump-ng observes nothing. :(

And the AWUS1900 continues to work fine in the host OS. This really does feel like some VM-related flakiness, but it's suspicious that the problem occurs in VirtualBox *and* VMWare.

bigbiz
2019-10-01, 00:20
Try right click on virtualbox icon
Select install virtualbox
When the popup appears select fix installation
Wait till its done
Seebif that helps

Vinndalf
2019-10-01, 04:16
That was worth a try. It didn't make a difference, but thank you for suggesting it. If I had thought of that myself I would certainly have tried it sooner.

guptaraghav1999
2019-12-27, 07:16
Same problem. Did you find a solution??

The_Glitch
2019-12-30, 15:45
That was worth a try. It didn't make a difference, but thank you for suggesting it. If I had thought of that myself I would certainly have tried it sooner.


have you figured a fix for this, mine was just like you at the beginning but now it shows the AP but doesnt connect to any. its really frustrating.......:confused:

1XSAT
2020-01-05, 16:50
I have a little problem with the VirtualBox.

I installed Kali Linux on my home PC. Because I don't need Kali Linux in the VirtualBox, I would be happy to do that with my normal PC.

The problem I have:
I can not establish a connection between my PC and the VirtualBox.
I have my own wireless network for this but the VirtaulBox cannot be connected to it.

How can I fix it?

Thank you in advance.

Ginkgo_Balboa
2020-03-06, 11:46
Hi everyone !

I had the same problem : I fixed it by uninstalling the AWUS 1900 windows 10 drivers and installed the drivers for Windows 7 & 8.
It works, finally. But ... the AWUS doesn't work anymore on Windows 10. I guess a problem's solution leads to another problem, etc.. I guess the only solution is to install Kali Linux for real on your computer, so you don't have to go through Windows' driver. If anyone manage to fix this, please let me know !