Sunday, January 23, 2011

BackTrack 4 Wireless Driver

This driver is considered stable and working with most aircrack-ng attacks and is loaded by default.
  • To manually load the driver
root@bt:~# modprobe rtl8187
  • To manually unload the driver
root@bt:~# rmmod rtl8187
  • To manually unload all the mac80211 stack:
root@bt:~# rmmod mac80211
root@bt:~# rmmod cfg80211
root@bt:~# rmmod rfkill

SIOCSIFFLAGS Unknown error 132

In VMware environments, this driver has a tendency to switch itself off, often resulting in errors such as "rtl8187: wireless radio switch turned off", "ioctl(SIOCSIFFLAGS) failed: Unknown error 132" and "rtl8187 - [phy0]SIOCSIFFLAGS: Unknown error 132" (for the benefit of Google).
  • Plug in your USB wireless card into BackTrack.
  • Wait for a few seconds, and type: dmesg| tail -20
root@bt:~# dmesg |tail -20
lo: Disabled Privacy Extensions
eth0: no IPv6 routers present
usb 1-1: new high speed USB device using ehci_hcd and address 2
cfg80211: Calling CRDA to update world regulatory domain
cfg80211: World regulatory domain updated:
   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
   (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
   (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
   (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
   (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
   (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
phy0: Selected rate control algorithm 'minstrel'
phy0: hwaddr 00:c0:ca:38:ab:9d, RTL8187vB (default) V1 + rtl8225z2, rfkill mask 2
rtl8187: Customer ID is 0xFF
Registered led device: rtl8187-phy0::radio
Registered led device: rtl8187-phy0::tx
Registered led device: rtl8187-phy0::rx
rtl8187: wireless switch is on
usbcore: registered new interface driver rtl8187
rtl8187: wireless radio switch turned off
root@bt:~#
  • Notice that rfkill has disabled the wireless card. That's the problem.
  • Use the following commands to force the card into an enabled state:
rmmod rtl8187
rfkill block all
rfkill unblock all
modprobe rtl8187
rfkill unblock all
ifconfig wlan0 up
  • Hopefully, the card should be working normally now. You will need to do this every time you plug in your card.

R8187 (old IEEE driver)

If for some reason the rtl8187 drivers fail to work, you can use the IEEE r8187 legacy driver.
  • Unload the new mac80211 rtl8187 driver and stack if loaded
root@bt:~# rmmod rtl8187
root@bt:~# rmmod mac80211
root@bt:~# rmmod cfg80211
Loot@bt:~# rmmod rfkill
  • load the IEEE r8187 driver
root@bt:~# modprobe r8187

Problems with the r8187 legacy driver


-----------------------------------------------------------------------------------
In some cases, the r8187 driver fails to load with a following dmesg error
Linux kernel driver for RTL8187 based WLAN cards
Copyright (c) 2004-2005, Andrea Merello
rtl8187: Initializing module
rtl8187: Wireless extensions version 22
rtl8187: Initializing proc filesystem
rtl8187: Enabling 14 channels.
rtl8187: MAC chip version: 00
rtl8187: Card type: F1
rtl8187: Reported EEPROM chip is a 93c56 (2Kbit)
rtl8187: Card MAC address is 00:68:04:1e:04:1e
rtl8187: RF Chip ID: 2C
rtl8187: WW:Unknown RF module 2c
rtl8187: WW:Exiting...
rtl8187: Initialization failed
rtl8187: wlan driver load failed
usbcore: registered new interface driver rtl8187
root@bt:~# 
----------------------------------------------------------------
If you get this, VMware hates you, and you're screwed.


Tested and working cards

We were able to test the following cards. Note that "passed" means "passed an aireplay -9" injection test. We will be expanding on this list as more feedback domes form the community. From our testing we found that most major chipsets were supported, as well as the most common cards.

  • AWUS036H (rtl8187, r8187) - both mac80211 and IEEE drivers - passed
  • AWUS036NH (Ralink RT2870/3070) - using the mac80211 rt2x00usb drivers - passed
  • BCM4312 802.11b/g LP-PHY (rev 01) - using the mac80211 b43, works well - passed
  • Rockland N3 - (Ralink RT2870/3070) - using the mac80211 rt2x00usb drivers -passed
  • Edimax EW-7318USG USB - (Ralink RT2501/RT2573) - using the mac80211 rt2500usb/rt73usb drivers -passed
  • ASUSTek Computer, Inc. RT2573 - using the mac80211 rt2500usb/rt73usb drivers -passed
  • Linksys WUSB54GC ver 3 - using the mac80211 rt2800usb drivers -passed
  • Ubiquiti SRC - using the mac80211 ath9k drivers-passed
  • Internal Intel Corporation PRO/Wireless 3945ABG - using the mac80211 iwl3945 drivers-passed
  • Dlink WNA-2330 PCMCIA - using the mac80211 ath5k drivers-passed
  • Atheros Communications Inc. AR9285 Wireless Network Adapter (PCI-Express) (rev 01) - using the mac80211 ath9k drivers-passed
  • Netgear wg111v2 - using the mac80211 rtl8187 drivers-passed
  • ZyXEL AG-225H v2 - using the mac80211 zd1211 drivers - passed
  • Intel 4956/5xxx - using the iwlagn drivers - passed

Working, without injection

  • Broadcom Corporation BCM4321 802.11a/b/g/n (rev 03)
  • Broadcom Corporation BCM4322 802.11a/b/g/n Wireless LAN Controller (rev 01)

NON working cards

  • D-Link DWL-122 - using the mac80211 prism2_usb drivers - fail
  • Linksys WUSB600N v2 - using the mac80211 rt2800usb drivers - fail
  • AWUS051NH - fail

1 comment:

  1. problem with the Atheros AR9285 unknow Backtrack 4 R2

    ReplyDelete