Hi,
I am currently trying to use two Wi-Fi keys from the same virtual machine (Kali Linux).
These two USB devices have the same characteristics (product ID, vendor ID, serial ID, ...)
Also it is impossible to distinguish them with USB filters. Which is not a problem in itself because I need to use both of the devices on the virtual machine.
The problem is that, if both USB keys get listed with "lsusb", only the first one appears in "iwconfig" and can thus be used.
It is not the case with my host, where both interfaces can be used (according to "iwconfig" output).
Last but not least, the VM crashes completely when I remove the USB devices (status "Aborted" in the VM manager).
Does anyone have an idea on how to achieve this?
Thank you by advance.
Using 2 Wi-Fi USB devices with the same product/vendor ID
-
Quentinv57
- Posts: 5
- Joined: 7. Nov 2016, 15:51
-
mpack
- Site Moderator
- Posts: 39134
- Joined: 4. Sep 2008, 17:09
- Primary OS: MS Windows 10
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Mostly XP
Re: Using 2 Wi-Fi USB devices with the same product/vendor ID
You don't actually need to distinguish the two devices, since you don't care which becomes NIC #1 and which becomes NIC #2.
If it were me I try defining two identical USB filters. Is that what you did?
If it were me I try defining two identical USB filters. Is that what you did?
-
Quentinv57
- Posts: 5
- Joined: 7. Nov 2016, 15:51
Re: Using 2 Wi-Fi USB devices with the same product/vendor ID
No, it is okay this way.
But Kali shows me the two keys with "lsusb". But only one with "iwconfig".
I don't think that the problem comes from Kali because it is Ubuntu-based and it works perfectly for my host using Ubuntu...
But Kali shows me the two keys with "lsusb". But only one with "iwconfig".
I don't think that the problem comes from Kali because it is Ubuntu-based and it works perfectly for my host using Ubuntu...
-
socratis
- Site Moderator
- Posts: 27329
- Joined: 22. Oct 2010, 11:03
- Primary OS: Mac OS X other
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Win(*>98), Linux*, OSX>10.5
- Location: Greece
Re: Using 2 Wi-Fi USB devices with the same product/vendor ID
If 'lsusb' shows two USB cards, then why do you think that it is not a configuration problem in Kali? Maybe the 'lwconfig' tries to configure devices based on their IDs. Did you try to boot your host with the exact same version? Not similar, not close, but exactly the same version. Kali could have bugs, you know...
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
-
Quentinv57
- Posts: 5
- Joined: 7. Nov 2016, 15:51
Re: Using 2 Wi-Fi USB devices with the same product/vendor ID
Indeed.
I just installed a new Virtual Machine with Ubuntu Server (same ISO than on my host).
It's exactly, the same problem, that's to say that it is shown with "lsusb" but only one with "iwconfig".
Here is the output while plugging in the second device:
I just installed a new Virtual Machine with Ubuntu Server (same ISO than on my host).
It's exactly, the same problem, that's to say that it is shown with "lsusb" but only one with "iwconfig".
Here is the output while plugging in the second device:
Code: Select all
ath: phy1: Invalid EEPROM Magic. Endianness mismatch.
ath: phy1: Unable to initialize hardware; initialization status: -22
ath: phy1: Unable to initialize hardware; initialization status: -22
ath9k_htc: Failed to initialize the device-
socratis
- Site Moderator
- Posts: 27329
- Joined: 22. Oct 2010, 11:03
- Primary OS: Mac OS X other
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Win(*>98), Linux*, OSX>10.5
- Location: Greece
Re: Using 2 Wi-Fi USB devices with the same product/vendor ID
OK, diagnostics time, since you never mentioned the host version exactly or the USB device's details.
- Start the VM. Not from a saved or paused state. Clean start.
- Take the steps required to generate/observe the error. In your case plug each of the USB devices. Give it a minute or two between plugging each one. Run the 'lsusb' and 'iwconfig' in between. Record the results.
- Shut down the VM. Not saved, not paused. Complete shut down.
- Right-click on the VM in the VirtualBox Manager. Select "Show Log..."
- Save it (just the first log), ZIP it and attach it in your response (see the "Upload attachment" at the bottom of the form).
- Right-click on the VM in the VirtualBox Manager. Select "Show in Finder/Explorer/Whatever".
- ZIP the selected ".vbox" file and attach it in your response.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
-
Quentinv57
- Posts: 5
- Joined: 7. Nov 2016, 15:51
Re: Using 2 Wi-Fi USB devices with the same product/vendor ID
Thank you for your help, socratis.
Here we go:
1. The VM was down and I started it.
2.Plugging in the Wi-Fi key.
3. Adding the USB device to the VM by clicking on the shortcut at the bottom-right corner ATHEROS USB 2.0 WLAN [0108]. Less than 5 seconds after that, the LED on the USB device is ON. The new "wlan0" interface can be used and appears in ifconfig output.
4. About 5 minutes after this, I'm plugging the second USB device. On the virtual machine, the output of "lsusb" and "iwconfig" is the same as above (see step 3).
5. Same as step 3, clicking on the second occurrence of ATHEROS USB 2.0 WLAN [0108]. Even after 1 minute, the LED of the first USB device is still ON, the second is OFF. The USB logo in the bottom-right corner stays with a red bullet.
6. I've unplugged the USB keys and re-done it from the beginning to collect more data. This time, the red bullet on the USB icon blinks for a moment and then shuts off. But I have the same output of "lsusb" and "iwconfig" than the first time. Only the first key LED is ON.
7. I clicked on one of the two occurrences of ATHEROS USB 2.0 WLAN [0108] to remove the devices "properly". And the VM instantly crashes, which means that the window is closed without any warning and the VM has now the status "aborted" in the VirtualBox Manager.
One more precision. I don't think it comes from here, but I have only activated USB 1.1 and did not install the extension pack.
You will find the two files as required. I just replaced some values by "XXXXXX".
Apparently we have something interesting in the log, which corresponds to step 5 above:
Here we go:
1. The VM was down and I started it.
2.Plugging in the Wi-Fi key.
Code: Select all
# lsusb
Bus 001 Device 002: ID 80ee:0021 VirtualBox USB Tablet
Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
# iwconfig
eth0 no wireless extensions.
lo no wireless extensions.
Code: Select all
# lsusb
Bus 001 Device 003: ID 0cf3:9271 Atheros Communications, Inc. AR9271 802.11n
Bus 001 Device 002: ID 80ee:0021 VirtualBox USB Tablet
Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
# iwconfig
eth0 no wireless extensions.
wlan0 IEEE 802.11 ESSID:off/any
Mode:Managed Access Point: Not-Associated Tx-Power=20 dBm
Retry short limit:7 RTS thr:off Fragment thr:off
Encryption key:off
Power Management:off
lo no wireless extensions.
5. Same as step 3, clicking on the second occurrence of ATHEROS USB 2.0 WLAN [0108]. Even after 1 minute, the LED of the first USB device is still ON, the second is OFF. The USB logo in the bottom-right corner stays with a red bullet.
Code: Select all
# lsusb
Bus 001 Device 004: ID 0cf3:9271 Atheros Communications, Inc. AR9271 802.11n
Bus 001 Device 003: ID 0cf3:9271 Atheros Communications, Inc. AR9271 802.11n
Bus 001 Device 002: ID 80ee:0021 VirtualBox USB Tablet
Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
# iwconfig
eth0 no wireless extensions.
wlan0 IEEE 802.11 ESSID:off/any
Mode:Managed Access Point: Not-Associated Tx-Power=20 dBm
Retry short limit:7 RTS thr:off Fragment thr:off
Encryption key:off
Power Management:off
lo no wireless extensions.
7. I clicked on one of the two occurrences of ATHEROS USB 2.0 WLAN [0108] to remove the devices "properly". And the VM instantly crashes, which means that the window is closed without any warning and the VM has now the status "aborted" in the VirtualBox Manager.
One more precision. I don't think it comes from here, but I have only activated USB 1.1 and did not install the extension pack.
You will find the two files as required. I just replaced some values by "XXXXXX".
Apparently we have something interesting in the log, which corresponds to step 5 above:
Code: Select all
00:05:58.704423 VUSB: Attached '00007f53dd5a2d80[proxy 0cf3:9271]' to port 2
00:05:59.788441 OHCI#0: Lagging too far behind, not trying to catch up anymore. Expect glitches with USB devices
00:06:00.034933 OHCI#0: Lagging too far behind, not trying to catch up anymore. Expect glitches with USB devices- Attachments
-
- Kali-2016-11-07-23-06-00.log.zip
- (18.98 KiB) Downloaded 5 times
-
- Kali.vbox.zip
- (3.52 KiB) Downloaded 5 times
-
socratis
- Site Moderator
- Posts: 27329
- Joined: 22. Oct 2010, 11:03
- Primary OS: Mac OS X other
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Win(*>98), Linux*, OSX>10.5
- Location: Greece
Re: Using 2 Wi-Fi USB devices with the same product/vendor ID
Next time you post a log don't obfuscate it, otherwise my reply is going to be obfuscated too (in binary or GATTACA code).Quentinv57 wrote:I just replaced some values by "XXXXXX".
There is absolutely nothing sensitive in the logs. We have to guess the missing details and that helps no one. Your username is not that sensitive, especially in a virtual environment. On the other hand, it might be the source of the problem. See for example: https://www.virtualbox.org/ticket/15982.
I mean, you obfuscated the UUID of a fake computer? Really? That alone cost me an extra 10 min, which I'm not going to be able to afford next time.
Having said that, I just realized the following:
mpack wrote:If it were me I try defining two identical USB filters. Is that what you did?
Well, apparently not, since it's not working as intended. I'm not saying it will work, but you cannot dismiss it straight away. So, here's the laundry list of what to do. If there is a failure, please state which step failed:Quentinv57 wrote:No, it is okay this way.
- Make sure that the Extension Pack is installed on the host. The same version as VirtualBox. This is not the case now. You have a version mismatch.
- Make sure that at least USB 2.0 is enabled in your VM settings.
- Create a USB filter in your guest settings while the device is plugged in the host. Delete all values except Name, VendorID and ProductID. Check also http://www.linux-usb.org/usb.ids to make sure that you have the numbers correct.
- Unplug the devices.
- Start your guest (the one that you applied the filter to). Let it start completely. Log in if you have to.
- Plug your device(s). The filter should capture it and pass control to your guest. You might get a "New hardware found" wizard on the guest, that's normal.
- Shut down the VM and post the log. Last time, despite the instructions you didn't shutdown the VM.
- With the USB devices plugged in and the VM not running, post the output of the following commands:
VBoxManage list usbhost VBoxManage showvminfo "Your_Virtual_Machine_Name"
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.