Skip to main content

ALFA AWUS036H (rtl8187) and linux kernel 2.6.28 - the ultimate ALFA driver

Notice: This tutorial is not only intended for AWUS036H or rtl8187 users, as the mac80211 stack in 2.6.28 is very nice, this tutorial should be helpful/useful for anyone with a wireless card supported by the mac80211 stack.

Updates:
09/01/09 17:24CET: fixed a bug in "mac80211_2.6.28-rc8-wl_frag+ack_radiotap_2.6.28_mod.patch" please redownload (h t t p : / / astray.fragstore.net/apps/mac80211_2.6.28-rc8-wl_frag+ack_radiotap_2.6.28_mod.patch)

Hey,

it seems like the documentation about the Realtek 8187 chipset and aircrack-ng, as well as some of the
forum posts are a bit outdated - they usually cover the r8187 driver, old mac80211 and ndiswrapper things for WPA authentication.
I've been searching for a complete solution, which allows me to use the ALFA AWUS036H in monitor mode, packet injection, fragmentation
attacks, aswell as authenticating with my AP using WPA or WPA2 without driver switching and other hassles, without much success. (e.g. h t t p : / / forums.remote-exploit.org/showthread.php?t=15497)

So I asked in the aircrack-ng IRC chan about the problem and got an answer by hdm, who told me that the mac80211 implementation in the current 2.6.28 linux kernel is very good.

The outcome of compiling a new 2.6.28 kernel with the current aircrack-ng SVN patches and the aircrack-ng trunk was everything I wanted:
full compatibility to aircrack-ng
wpa_supplicant wpa/wpa2 authentication (without a hassle)
support of all aireplay-ng attack modes
about 500 packets per second injection rate
full iwconfig support including setting TX-Power
All this without driver switching, ndiswrapper scripts or anything.

To perhaps save you guys some time, here are the necessary steps to take after you've compiled/got the new 2.6.28 kernel
(h t t p : / / forums.remote-exploit.org/showpost.php?p=113187&postcount=1):

- have a 2.6.28 final kernel ready (h t t p : / / w w w . kernel.org/pub/linux/kernel/v2.6/linux-2.6.28.tar.bz2), I won't cover how to compile the kernel, as there are several tutorials available (google for "slackware kernel compile"), basically you need to find the .config file of your current kernel, unzip the contents of the new kernel to /usr/src/linux-something/, copy the .config there, then "make oldconfig && make bzImage && make modules && make modules_install && cp arch/x86/bzImage /boot/vmlinuz", and editing your grub/LILO config should do the trick basically

- be sure the mac80211 module is activated in your kernel config

download the following patches:
h t t p : / / trac.aircrack-ng.org/export/1330/trunk/patches/rtl8187-mac80211-injection-speed-2.6.28-rc6.patch
h t t p : / / astray.fragstore.net/apps/mac80211_2.6.28-rc8-wl_frag+ack_radiotap_2.6.28_mod.patch
h t t p : / / astray.fragstore.net/apps/rtl8187-mac80211-pwr.patch

- copy the just downloaded patches to your kernel source folder (will be "/usr/src/linux/" from now on)
- cd /usr/src/linux/
- copy the following files to a safe place:
drivers/net/wireless/rtl818x/rtl8187_dev.c
include/net/ieee80211_radiotap.h
net/mac80211/tx.c
drivers/net/wireless/rtl8187_dev.c (not sure about this one)

Make a dry-run of all patches over your kernel sources:
patch -Np1 --dry-run -i mac80211_2.6.28-rc8-wl_frag+ack_radiotap_2.6.28_mod.patch
patch -Np1 --dry-run -i rtl8187-mac80211-injection-speed-2.6.28-rc6.patch
patch -Np1 --dry-run -i rtl8187-mac80211-pwr.patch

If everything goes without errors, remove "--dry-run" from the commands issued above to finally patch the sources.

Note:
"mac80211_2.6.28-rc8-wl_frag+ack_radiotap_2.6.28_mod.patch" is a modified version of the original 2.6.28-rc8 wl_frag+ack radiotap patch from aircrack SVN (h t t p : / / trac.aircrack-ng.org/browser/trunk/patches/mac80211_2.6.28-rc8-wl_frag%2Back_radiotap.patch), which results in a compiling error because of a duplicate line, in 2.6.28 final.

After patching the sources redo "make modules && make modules_install" and reboot the system.

Known issues:
PWR-tab in airodump-ng shows negative values for me (without the PWR patch it doesn't show any values in PWR-tab)
"airmon-ng start wlan0" and "ifconfig wlan0 up" take about 5 seconds to bring the interface up

Comments

Popular posts from this blog

ALFA-­AWUS036H & ALFA-­AWUS050NH INSTALLING/UPDATING DRIVERS RTL8187, r8187, RT2800usb on UBUNTU

NOTE: For surfing Internet with ALFA-AWUS050NH on Ubuntu Jaunty with rt2870sta driver, you must use the Kernel "2.6.28-11-generic #42-Ubuntu", without change or updates the drivers modules. NOTE: The tutorial is not related to Ubuntu karmic. Driver RTL8187/Stacks-­mac80211 (ref. ALFA-­AWUS036h) ­- These drivers, for surfing Internet, are more stable than r8187, and fully compatible with Network-Manager 0.7 installed by default on Ubuntu 9.04. Network-Manager 0.7 installed by default on Ubuntu 9.04. ­- Supports all encryption without problems. (OPEN, WEP and WPA/WPA2) ­- With Compat-Wireless, the "injection" working, but for support “Fragmentation attack” (opt. -5) you need to install one patch. - The RX sensitivity and packets injection is less, related to drivers r8187. Driver r8187/Stacks-ieee80211 (ref. ALFA-AWUS036h) - This driver is recommended for use with the Suite of Aircrack-ng, but not particularly suitable for Internet connections, as less stable and disc...

TBS5520 Multi-standard TV Tuner USB Box review

Noul TBS5520 Multi-standard TV Tuner USB Box a celor de la TBS se foloseste de RafaelMicro R848 multi-standard tuner si  AVL6882 Demodulator pentru a reda urmatoarele standarde: ETSI EN 302-755 V1.3.1 (DVB-T2/T2-Lite) ETSI EN 300-744 V1.6.1 (DVB-T) ETSI EN 300-429 V1.2.1 (DVB-C) ETSI EN 307-421 V1.2.1 (DVB-S2) ETSI EN 300-421 V1.1.2 (DVB-S) ARIB STD-B31 V1.6-E2 (ISDB-T) ITU-T J.83 Annex B 12/2007 (J.83/B) http://www.tbsdtv.com/products/tbs5520_multi-standard_tv_tuner_usb_box.html Pe aspectul fizic nu insist, sunt destule fotografii pe internet, vreau doar sa punctez cateva aspecte: pentru alimentare este necesar cablu Y USB - este singura modalitate de a furniza energie si de aici avem o limitare in ceea ce priveste functionalitatea cu motor HH mobilitate sporita si posibilitatea alimentarii directe din bateria unui notebook sau chiar conectarea la Tableta Android (de indata ce driverele vor fi gata) “TBS 5520 USB2.0 in warm state” nici rece dar nici fie...

JoikuSpot Light v2.1 Beta S60v3 SymbianOS [Updated - 31st July '08]

JoikuSpot is FREE and SECURE Mobile HotSpot solution that turns Nokia phones to a WLAN HotSpot. JoikuSpot software is installed directly to the phone. When switched on, laptops and iPods can establish instant, secure and fast WLAN connection via smartphone's JoikuSpot HotSpot using phone's own 3G internet connection. Multiple devices can connect to JoikuSpot in parallel and seamlessly share the same 3G internet connection. You can use JoikuSpot to access internet e.g. on the train, car, sailing boat, summer cottage, hotel, while walking, or when at remote office...where ever you are! Release notes for JoikuSpot Light: -Landing page works with all operators -Encryption support with WEP including 128bit key generator -Battery threshold shutting down the client when battery level is too low -Default Access point setting -Support for secure SSH tunnels with Putty -MapSpot 1.0 support for GPS HotSpot location identification with external mapping services such as Google Maps All sett...