psymon
2015-08-13, 03:52
Greetings Kali team!
Great work with Kali 2.0! I was avidly looking forward to try your new baby, and as expected, you did a superbe job! Among all the goodies, I especially like being able to resize my virtualbox window and seeing the KALI Gnome interface resize automatically!
I have beein having this issue since Kali 1.1.0a, and it seems to have followed.
Context:
I want to do some Wifu with an external Alfa USB adapter (OS X/virtualbox/kali), but I am facing few issues preventing me to go full berserk with it.
Kali 1.1.0a without vbox USB2 EHCI support: The wlan0 interface disconnect for no reason after a random period of time. The only way to get it back is to reboot the virtual machine. More details below.
Kali 1.1.0.a with vbox USB2 EHCI support enabled: wlan0 works! but I can't see any trafic anymore.
Kali 2.0 without vbox USB2 EHCI support: wlan0 works, the wpa_supplicant allow me to connect to wifi networks, but I can't put the interface in monitor mode. (more details below)
It feels like a Mac OS X issue or Virtualbox issue, but it did not work better with VMWare fusion.
A Similar issue was observed by at least one other (I remember other posts but did not find them back):
reaganrockz 04-22-2015, 07:44 PM #73 https://forums.kali.org/showthread.php?18-Troubleshooting-Wireless-Drivers&p=44379&viewfull=1#post44379
Hardware:
Macbook Pro 2015 Retina
Alfa Network AWUS036NH (rt2800usb)
also tried with AWUS036H (rtl8187), same result.
Both adaptors has been tried on a raspberry pi2 running Kali and they work perfectly, so it should not be a defect or power issue (assuming), and I hope it is not a heat or cable issue.
Software:
MAC OS X Yosemite up to date
Virtual Box 4.3.30 + without and with Oracle VirtualBox Extension Pack to be able to enable the USB 2.0 (EHCI) support (in one of my attempt to debug by bruteforce)
Also tried with VMWare Fusion (with the Virtualbox OVA image)
Versions of Kali tried:
Kali 1.1.0a (pre wlan0mon update)
Kali 1.1.0a (post wlan0mon update)
Kali 2.0 Virtualbox OVA Import (tested without (default) and with USB 2.0 (EHCI) support
Details on my attempts with Kali 1.1.0a post wlan0mon update
If I boot with the interface connected, it is there and working properly.
root@vmkali:~# lsusb
Bus 001 Device 004: ID 148f:3070 Ralink Technology, Corp. RT2870/RT3070 Wireless Adapter
the interface wlan2 works
[ 9.477796] ieee80211 phy0: rt2x00lib_request_firmware: Info - Loading firmware file 'rt2870.bin'
[ 9.479282] rt2800usb 1-3:1.0: firmware: direct-loading firmware rt2870.bin
[ 9.479288] ieee80211 phy0: rt2x00lib_request_firmware: Info - Firmware detected - version: 0.29
and I can start the monitoring mode
root@vmkali:~# airmon-ng start wlan2
...
PHY Interface Driver Chipset
phy0 wlan2 rt2800usb Ralink Technology, Corp. RT2870/RT3070
(mac80211 monitor mode vif enabled for [phy0]wlan2 on [phy0]wlan2mon)
(mac80211 station mode vif disabled for [phy0]wlan2)
then I can sniff and I see trafic as expected
root@vmkali:~# tcpdump -i wlan2mon
Aug 13 10:52:10 vmkali kernel: [ 242.353428] device wlan2mon entered promiscuous mode
...
10:52:10.562851 1.0 Mb/s 2457 MHz 11b -75dB signal antenna 1 BSSID:00:01:8e:64:e0:4c (oui Unknown) SA:40:f3:08:5d:91:7f (oui Unknown) DA:00:01:8e:64:e0:4c (oui Unknown)
10:52:12.277773 1.0 Mb/s 2457 MHz 11b -71dB signal antenna 1 BSSID:00:01:8e:64:e0:4c (oui Unknown) SA:40:f3:08:5d:91:7f (oui Unknown) DA:00:01:8e:64:e0:4c (oui Unknown)
...
however, after a random period (here 30 minutes), my interface get disconnected.
Aug 13 11:22:32 vmkali kernel: [ 2064.576946] ohci-pci 0000:00:06.0: frame counter not updating; disabled
Aug 13 11:22:32 vmkali kernel: [ 2064.576972] ohci-pci 0000:00:06.0: HC died; cleaning up
Aug 13 11:22:32 vmkali kernel: [ 2064.577701] usb 1-1: USB disconnect, device number 2
Aug 13 11:22:32 vmkali kernel: [ 2064.584808] usb 1-2: USB disconnect, device number 3
Aug 13 11:22:32 vmkali kernel: [ 2064.588621] usb 1-3: USB disconnect, device number 4
Aug 13 11:22:33 vmkali kernel: [ 2066.189431] ieee80211 phy0: rt2800_wait_wpdma_ready: Error - WPDMA TX/RX busy [0xffffffff]
Aug 13 11:22:33 vmkali NetworkManager[2531]: SCPlugin-Ifupdown: devices removed (path: /sys/devices/pci0000:00/0000:00:06.0/usb1/1-3/1-3:1.0/net/wlan2mon, iface: wlan2mon)
Aug 13 11:22:33 vmkali NetworkManager[2531]: <info> radio killswitch /sys/devices/pci0000:00/0000:00:06.0/usb1/1-3/1-3:1.0/ieee80211/phy0/rfkill0 disappeared
tcpdump: pcap_loop: The interface went down
306 packets captured
306 packets received by filter
0 packets dropped by kernel
Google.fu on the error messages, I found issues about mouse and keyboard timing out because of inactivity, but nothing really specific to usb wifi.
So I tried a bunch of stuff like disabling the powersave mode on the interface and on the USB controller itself:
root@vmkali:~# cat /etc/udev/rules.d/70-wifi-powersave.rules
ACTION=="add", SUBSYSTEM=="net", KERNEL=="wlan*", RUN+="/usr/bin/iw dev %k set power_save off"
root@vmkali:~# cat /etc/udev/rules.d/50-usb_power_save.rules
ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="148f", ATTR{idProduct}=="3070", GOTO="power_usb_rules_end"
no difference, the interface still disconnects.
Details on my attempts with MAC OS X Yosemite / Virtual Box || Vmware Fusion / Kali 2.0 Virtualbox OVA
at first, I tried:
- plug usb adaptor, assign the virtualbox filter for the interface
- boot Kali
- login as root
# airmon-ng start wlan0
PHY Interface Driver Chipset
phy0 wlan0 rt2800usb Ralink Technology, Corp. RT2870/RT3070
(mac80211 monitor mode vif enabled for [phy0]wlan0 on [phy0]wlan0mon)
(mac80211 station mode vif disabled for [phy0]wlan0)
# tcpdump -i wlan0mon
---> then nothing.
# airodump-ng wlan0mon
ioctl(SIOCSIWMODE) failed: Device or resource busy
ARP linktype is set to 1 (Ethernet) - expected ARPHRD_IEEE80211,
ARPHRD_IEEE80211_FULL or ARPHRD_IEEE80211_PRISM instead. Make
sure RFMON is enabled: run 'airmon-ng start wlan0mon <#>'
Sysfs injection support was not found either.
# airmon-ng stop wlan0mon
PHY Interface Driver Chipset
phy0 wlan0mon rt2800usb Ralink Technology, Corp. RT2870/RT3070
You are trying to stop a device that isn't in monitor mode.
At this point (first try), the wpa_supplicant was running, so I broke it again (chmod -x /sbin/wpa_supplicant) then rebooted and retried. No difference.
I know that the interface works well because if the wpa_supplicant runs, I can list nearby networks and even connect to them.
If I tcpdump after being associated, I see trafic like I would normally on a wired interface
if I enable the monitoring mode (airmon-ng start wlan0) while being authenticated, wlan0mon is configured, then gets back his lan IP address and sniff in normal mode.
I tried to see if the interface would still disconnect if I had done nothing, and it did
- boot
# tail -f /var/log/syslog
- don't touch anything...
Aug 12 22:54:33 kali2 kernel: [ 80.213638] ieee80211 phy0: rt2x00usb_vendor_request: Error - Vendor Request 0x07 failed for offset 0x1324 with error -110
Aug 12 22:55:06 kali2 kernel: [ 113.123786] ieee80211 phy0: rt2x00usb_vendor_request: Error - Vendor Request 0x07 failed for offset 0x1314 with error -110
...
Aug 12 23:00:59 kali2 kernel: [ 466.042697] ieee80211 phy0: rt2x00usb_vendor_request: Error - Vendor Request 0x07 failed for offset 0x1328 with error -110
Aug 12 23:00:59 kali2 kernel: [ 466.400197] ohci-pci 0000:00:06.0: frame counter not updating; disabled
Aug 12 23:00:59 kali2 kernel: [ 466.400215] ohci-pci 0000:00:06.0: HC died; cleaning up
Aug 12 23:00:59 kali2 kernel: [ 466.400682] usb 1-1: USB disconnect, device number 2
Aug 12 23:00:59 kali2 kernel: [ 466.402469] usb 1-2: USB disconnect, device number 3
Aug 12 23:00:59 kali2 kernel: [ 466.405083] ieee80211 phy0: rt2x00usb_vendor_request: Error - Vendor Request 0x07 failed for offset 0x0500 with error -110
Aug 12 23:00:59 kali2 kernel: [ 466.407109] ieee80211 phy0: rt2x00usb_regbusy_read: Error - Indirect register access failed: offset=0x00000500, value=0xffffffff
Aug 12 23:00:59 kali2 gdm-Xorg-:0[673]: (II) config/udev: removing device VirtualBox USB Tablet
Aug 12 23:00:59 kali2 gdm-Xorg-:0[673]: (II) evdev: VirtualBox USB Tablet: Close
Aug 12 23:00:59 kali2 gdm-Xorg-:0[673]: (II) UnloadModule: "evdev"
Aug 12 23:01:01 kali2 avahi-daemon[888]: Withdrawing workstation service for wlan0.
Aug 12 23:01:01 kali2 kernel: [ 468.008115] ieee80211 phy0: rt2800_wait_wpdma_ready: Error - WPDMA TX/RX busy [0xffffffff]
Aug 12 23:01:01 kali2 NetworkManager[519]: <info> (wlan0): device state change: unavailable -> unmanaged (reason 'removed') [20 10 36]
Aug 12 23:01:01 kali2 NetworkManager[519]: <info> startup complete
Aug 12 23:01:01 kali2 NetworkManager[519]: <info> devices removed (path: /sys/devices/pci0000:00/0000:00:06.0/usb1/1-2/1-2:1.0/net/wlan0, iface: wlan0)
Aug 12 23:01:01 kali2 NetworkManager[519]: <info> radio killswitch /sys/devices/pci0000:00/0000:00:06.0/usb1/1-2/1-2:1.0/ieee80211/phy0/rfkill0 disappeared
A bare metal setup works fine, but it is just not convenient to carry a second laptop..
It all points out like it is not a Kali issue but something with OSX and/or Virtualbox. Any idea how to fix this?
I will update this post if I find something in the meantime.
Great work with Kali 2.0! I was avidly looking forward to try your new baby, and as expected, you did a superbe job! Among all the goodies, I especially like being able to resize my virtualbox window and seeing the KALI Gnome interface resize automatically!
I have beein having this issue since Kali 1.1.0a, and it seems to have followed.
Context:
I want to do some Wifu with an external Alfa USB adapter (OS X/virtualbox/kali), but I am facing few issues preventing me to go full berserk with it.
Kali 1.1.0a without vbox USB2 EHCI support: The wlan0 interface disconnect for no reason after a random period of time. The only way to get it back is to reboot the virtual machine. More details below.
Kali 1.1.0.a with vbox USB2 EHCI support enabled: wlan0 works! but I can't see any trafic anymore.
Kali 2.0 without vbox USB2 EHCI support: wlan0 works, the wpa_supplicant allow me to connect to wifi networks, but I can't put the interface in monitor mode. (more details below)
It feels like a Mac OS X issue or Virtualbox issue, but it did not work better with VMWare fusion.
A Similar issue was observed by at least one other (I remember other posts but did not find them back):
reaganrockz 04-22-2015, 07:44 PM #73 https://forums.kali.org/showthread.php?18-Troubleshooting-Wireless-Drivers&p=44379&viewfull=1#post44379
Hardware:
Macbook Pro 2015 Retina
Alfa Network AWUS036NH (rt2800usb)
also tried with AWUS036H (rtl8187), same result.
Both adaptors has been tried on a raspberry pi2 running Kali and they work perfectly, so it should not be a defect or power issue (assuming), and I hope it is not a heat or cable issue.
Software:
MAC OS X Yosemite up to date
Virtual Box 4.3.30 + without and with Oracle VirtualBox Extension Pack to be able to enable the USB 2.0 (EHCI) support (in one of my attempt to debug by bruteforce)
Also tried with VMWare Fusion (with the Virtualbox OVA image)
Versions of Kali tried:
Kali 1.1.0a (pre wlan0mon update)
Kali 1.1.0a (post wlan0mon update)
Kali 2.0 Virtualbox OVA Import (tested without (default) and with USB 2.0 (EHCI) support
Details on my attempts with Kali 1.1.0a post wlan0mon update
If I boot with the interface connected, it is there and working properly.
root@vmkali:~# lsusb
Bus 001 Device 004: ID 148f:3070 Ralink Technology, Corp. RT2870/RT3070 Wireless Adapter
the interface wlan2 works
[ 9.477796] ieee80211 phy0: rt2x00lib_request_firmware: Info - Loading firmware file 'rt2870.bin'
[ 9.479282] rt2800usb 1-3:1.0: firmware: direct-loading firmware rt2870.bin
[ 9.479288] ieee80211 phy0: rt2x00lib_request_firmware: Info - Firmware detected - version: 0.29
and I can start the monitoring mode
root@vmkali:~# airmon-ng start wlan2
...
PHY Interface Driver Chipset
phy0 wlan2 rt2800usb Ralink Technology, Corp. RT2870/RT3070
(mac80211 monitor mode vif enabled for [phy0]wlan2 on [phy0]wlan2mon)
(mac80211 station mode vif disabled for [phy0]wlan2)
then I can sniff and I see trafic as expected
root@vmkali:~# tcpdump -i wlan2mon
Aug 13 10:52:10 vmkali kernel: [ 242.353428] device wlan2mon entered promiscuous mode
...
10:52:10.562851 1.0 Mb/s 2457 MHz 11b -75dB signal antenna 1 BSSID:00:01:8e:64:e0:4c (oui Unknown) SA:40:f3:08:5d:91:7f (oui Unknown) DA:00:01:8e:64:e0:4c (oui Unknown)
10:52:12.277773 1.0 Mb/s 2457 MHz 11b -71dB signal antenna 1 BSSID:00:01:8e:64:e0:4c (oui Unknown) SA:40:f3:08:5d:91:7f (oui Unknown) DA:00:01:8e:64:e0:4c (oui Unknown)
...
however, after a random period (here 30 minutes), my interface get disconnected.
Aug 13 11:22:32 vmkali kernel: [ 2064.576946] ohci-pci 0000:00:06.0: frame counter not updating; disabled
Aug 13 11:22:32 vmkali kernel: [ 2064.576972] ohci-pci 0000:00:06.0: HC died; cleaning up
Aug 13 11:22:32 vmkali kernel: [ 2064.577701] usb 1-1: USB disconnect, device number 2
Aug 13 11:22:32 vmkali kernel: [ 2064.584808] usb 1-2: USB disconnect, device number 3
Aug 13 11:22:32 vmkali kernel: [ 2064.588621] usb 1-3: USB disconnect, device number 4
Aug 13 11:22:33 vmkali kernel: [ 2066.189431] ieee80211 phy0: rt2800_wait_wpdma_ready: Error - WPDMA TX/RX busy [0xffffffff]
Aug 13 11:22:33 vmkali NetworkManager[2531]: SCPlugin-Ifupdown: devices removed (path: /sys/devices/pci0000:00/0000:00:06.0/usb1/1-3/1-3:1.0/net/wlan2mon, iface: wlan2mon)
Aug 13 11:22:33 vmkali NetworkManager[2531]: <info> radio killswitch /sys/devices/pci0000:00/0000:00:06.0/usb1/1-3/1-3:1.0/ieee80211/phy0/rfkill0 disappeared
tcpdump: pcap_loop: The interface went down
306 packets captured
306 packets received by filter
0 packets dropped by kernel
Google.fu on the error messages, I found issues about mouse and keyboard timing out because of inactivity, but nothing really specific to usb wifi.
So I tried a bunch of stuff like disabling the powersave mode on the interface and on the USB controller itself:
root@vmkali:~# cat /etc/udev/rules.d/70-wifi-powersave.rules
ACTION=="add", SUBSYSTEM=="net", KERNEL=="wlan*", RUN+="/usr/bin/iw dev %k set power_save off"
root@vmkali:~# cat /etc/udev/rules.d/50-usb_power_save.rules
ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="148f", ATTR{idProduct}=="3070", GOTO="power_usb_rules_end"
no difference, the interface still disconnects.
Details on my attempts with MAC OS X Yosemite / Virtual Box || Vmware Fusion / Kali 2.0 Virtualbox OVA
at first, I tried:
- plug usb adaptor, assign the virtualbox filter for the interface
- boot Kali
- login as root
# airmon-ng start wlan0
PHY Interface Driver Chipset
phy0 wlan0 rt2800usb Ralink Technology, Corp. RT2870/RT3070
(mac80211 monitor mode vif enabled for [phy0]wlan0 on [phy0]wlan0mon)
(mac80211 station mode vif disabled for [phy0]wlan0)
# tcpdump -i wlan0mon
---> then nothing.
# airodump-ng wlan0mon
ioctl(SIOCSIWMODE) failed: Device or resource busy
ARP linktype is set to 1 (Ethernet) - expected ARPHRD_IEEE80211,
ARPHRD_IEEE80211_FULL or ARPHRD_IEEE80211_PRISM instead. Make
sure RFMON is enabled: run 'airmon-ng start wlan0mon <#>'
Sysfs injection support was not found either.
# airmon-ng stop wlan0mon
PHY Interface Driver Chipset
phy0 wlan0mon rt2800usb Ralink Technology, Corp. RT2870/RT3070
You are trying to stop a device that isn't in monitor mode.
At this point (first try), the wpa_supplicant was running, so I broke it again (chmod -x /sbin/wpa_supplicant) then rebooted and retried. No difference.
I know that the interface works well because if the wpa_supplicant runs, I can list nearby networks and even connect to them.
If I tcpdump after being associated, I see trafic like I would normally on a wired interface
if I enable the monitoring mode (airmon-ng start wlan0) while being authenticated, wlan0mon is configured, then gets back his lan IP address and sniff in normal mode.
I tried to see if the interface would still disconnect if I had done nothing, and it did
- boot
# tail -f /var/log/syslog
- don't touch anything...
Aug 12 22:54:33 kali2 kernel: [ 80.213638] ieee80211 phy0: rt2x00usb_vendor_request: Error - Vendor Request 0x07 failed for offset 0x1324 with error -110
Aug 12 22:55:06 kali2 kernel: [ 113.123786] ieee80211 phy0: rt2x00usb_vendor_request: Error - Vendor Request 0x07 failed for offset 0x1314 with error -110
...
Aug 12 23:00:59 kali2 kernel: [ 466.042697] ieee80211 phy0: rt2x00usb_vendor_request: Error - Vendor Request 0x07 failed for offset 0x1328 with error -110
Aug 12 23:00:59 kali2 kernel: [ 466.400197] ohci-pci 0000:00:06.0: frame counter not updating; disabled
Aug 12 23:00:59 kali2 kernel: [ 466.400215] ohci-pci 0000:00:06.0: HC died; cleaning up
Aug 12 23:00:59 kali2 kernel: [ 466.400682] usb 1-1: USB disconnect, device number 2
Aug 12 23:00:59 kali2 kernel: [ 466.402469] usb 1-2: USB disconnect, device number 3
Aug 12 23:00:59 kali2 kernel: [ 466.405083] ieee80211 phy0: rt2x00usb_vendor_request: Error - Vendor Request 0x07 failed for offset 0x0500 with error -110
Aug 12 23:00:59 kali2 kernel: [ 466.407109] ieee80211 phy0: rt2x00usb_regbusy_read: Error - Indirect register access failed: offset=0x00000500, value=0xffffffff
Aug 12 23:00:59 kali2 gdm-Xorg-:0[673]: (II) config/udev: removing device VirtualBox USB Tablet
Aug 12 23:00:59 kali2 gdm-Xorg-:0[673]: (II) evdev: VirtualBox USB Tablet: Close
Aug 12 23:00:59 kali2 gdm-Xorg-:0[673]: (II) UnloadModule: "evdev"
Aug 12 23:01:01 kali2 avahi-daemon[888]: Withdrawing workstation service for wlan0.
Aug 12 23:01:01 kali2 kernel: [ 468.008115] ieee80211 phy0: rt2800_wait_wpdma_ready: Error - WPDMA TX/RX busy [0xffffffff]
Aug 12 23:01:01 kali2 NetworkManager[519]: <info> (wlan0): device state change: unavailable -> unmanaged (reason 'removed') [20 10 36]
Aug 12 23:01:01 kali2 NetworkManager[519]: <info> startup complete
Aug 12 23:01:01 kali2 NetworkManager[519]: <info> devices removed (path: /sys/devices/pci0000:00/0000:00:06.0/usb1/1-2/1-2:1.0/net/wlan0, iface: wlan0)
Aug 12 23:01:01 kali2 NetworkManager[519]: <info> radio killswitch /sys/devices/pci0000:00/0000:00:06.0/usb1/1-2/1-2:1.0/ieee80211/phy0/rfkill0 disappeared
A bare metal setup works fine, but it is just not convenient to carry a second laptop..
It all points out like it is not a Kali issue but something with OSX and/or Virtualbox. Any idea how to fix this?
I will update this post if I find something in the meantime.