ALFA-AWUS036H - ALFA-AWUS050NH - ALFA-AWUS036NH
Installing drivers RTL8187, r8187, rt2800usb on Ubuntu Lucid & Maverick
Driver RTL8187/Stacks mac80211
(ref. ALFA-AWUS036h WiFi card)
These wireless drivers, for surfing Internet, are more stable than r8187, and
fully compatible with Network-Manager installed by default on Ubuntu
9.04/9.10 and 10.04.
Supports all WiFi 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 mac80211
fragmentation patch.
The RX sensitivity and packet injection is less, related to drivers r8187/ieee80211.
Driver r8187/Stacks-ieee80211
(ref. ALFA-AWUS036h WiFi card)
This wireless driver is recommended for use with the Suite of Aircrack-ng, but
not particularly suitable for ADSL Internet Connections, as less stable and
discontinuous at regular intervals.
The r8187 is compatible with Network-Manager 0.7, installed by default on Ubuntu
9.04, and supporting the Wireless encryption OPEN and WEP (not WPA/WPA2)
To establish Internet connections with your WiFi Access Point (ADSL router) using WPA/WPA2 encryption, require manual configuration of Wpa_Supplicant.
The "injection" and all "attacks" of Aireplay-ng, are supported after installing the appropriate "patch".
IMPORTANT NOTE related to Ubuntu Lucid, Maverick and Natty
At the moment does not allow Internet connections; when acquired the IP address the System freezes. (for surfing Internet use RTL8187 driver)
Driver rt2800usb/Stacks mac80211
(ref. ALFA-AWUS050NH / AWUS036NH Wifi card)
This driver is NOT fully supported but with Compat-Wireless, the
"injection" work partially and supported 4 "attacks" of Aireplay-ng.
Compatible with "Macchanger".
The RX sensitivity and packets injection is less, related to ALFA-AWUS036H wirless card.
Note to Ubuntu Lucid referring to the usb WiFi card ALFA-AWUS050NH & ALFA-AWUS036NH
To establish WiFi Internet connection and surfing Internet on Ubuntu Lucid you must use the RT2870sta.
Update your OS and install these ESSENTIAL and recommended package
NOTE:
Before continuing, make sure NOT to be active in Synaptic the Repositories "Proposed" and "Backports"
Code:
sudo apt-get install linux-headers-$(uname -r) build-essential make patch subversion openssl libssl-dev zlib1g zlib1g-dev libssh2-1-dev libnl1 libnl-dev gettext autoconf tcl8.5 libpcap0.8 libpcap0.8-dev python-scapy python-dev cracklib-runtime macchanger-gtk tshark ethtool
Code:
sudo apt-get install linux-headers-$(uname -r) build-essential make patch subversion openssl libssl-dev zlib1g zlib1g-dev libssh2-1-dev libnl1 libnl-dev gettext autoconf tcl8.5 libpcap0.8 libpcap0.8-dev cracklib-runtime macchanger-gtk tshark ethtool
Install/update "IW"
(Wireless Configuration Utility for drivers based on Stacks-mac80211)
[Firt option] Install iw from Ubuntu Repository
Code:
sudo apt-get install iw
[RECOMMENDED OPTION] Alternatively compiling the latest version available from IW source
Code:
sudo mkdir /usr/src/drivers && cd /usr/src/drivers
sudo wget http://linuxwireless.org/download/iw/iw-3.4.tar.bz2 -O - | sudo tar -jxv
cd iw*
sudo make && sudo make install
Install RT28XX/RT30XX USB series (RT2870/RT2770/RT3572/RT3070) Firmware
Step ONLY for ALFA-AWUS050NH & ALFA-AWUS036NH, If NOT already present the RT2870 Firmware.
(not necessary on latest Ubuntu version because is already installed)
For check Firmware:
Code:
ls -l /lib/firmware/rt2870.bin
-rw-r--r-- 1 root root 4096 2010-11-18 22:20 /lib/firmware/rt2870.bin
Download & Install Firmware
RT2870_Firmware_V22
Code:
sudo unzip RT2870_Firmware_V22.zip && sudo mv RT2870_Firmware_V22/rt2870.bin /lib/firmware
NOTE:
Before proceding,
if installed,
remove the previous version of Compat-Wireless ("linux-backports-modules" or "linux-backports-modules-compat-wireless-
your_installed_version") using Synaptic or Terminal:
Code:
sudo apt-get remove --purge linux-backports-modules-compat-wireless- installed_version
Installing Compat-Wireless patched on Ubuntu Lucid (default Kernel)
(tested with drivers rtl8187, zd1211rw, iwl3945, ath5k, rt73usb, rt2800usb)
NOTE:
this version of Compat-Wireless is compatible on Ubuntu Lucid or BackTrack 4 Final
Blacklist ieee80211 and mac80211 drivers on boot
In this list are included the old driver ieee80211 and new mac80211, but you can change it depending on your usage.
Remember that when you reboot your PC, to use your wireless card will need to manually reload your driver with "modprobe" command.
Code:
sudo cp /etc/modprobe.d/blacklist.conf /etc/modprobe.d/blacklist_orig.conf
echo "blacklist r8187" | sudo tee /etc/modprobe.d/blacklist_r8187.conf
echo "blacklist rt2870sta" | sudo tee /etc/modprobe.d/blacklist_rt2870sta.conf
echo "blacklist rtl8187" | sudo tee /etc/modprobe.d/blacklist_rtl8187.conf
echo "blacklist mac80211" | sudo tee /etc/modprobe.d/blacklist_mac80211.conf
Package already patched for Ubuntu Lucid default Kernel:
(include patch to fix problem in Airodump-ng and Aireplay-ng --> "
fixed channel mon0: -1")
Download & Install
Compat-wireless-aircrack-lucid-patched
NOTE:
Before removing the modules with "modprobe -r" command download the files needed, as during the installation should not be connected to the Internet or have any other card active
Code:
sudo modprobe -r rtl8187 zd1211rw iwl3945 ath5k rt73usb rt2800usb
sudo mkdir /usr/src/drivers
Move or copy the drivers did you download in the directory
-->
/usr/src/drivers
Code:
cd /usr/src/drivers
sudo tar -xjvf compat-wireless-aircrack-lucid-patched.tar.bz2
cd compat-wireless-aircrack-lucid-patched
sudo make && sudo make install && sudo make unload && sudo shutdown -r now
After restarting your computer, if not loaded during startup, loaded the preferred driver using "modprobe" command:
Code:
sudo modprobe driver_name
Installing Compat-Wireless patched on Ubuntu Maverick or Lucid with Kernel from 2.6.35 to 2.6.37
(tested with drivers rtl8187, zd1211rw, iwl3945, ath5k, rt73usb, rt2800usb)
Package for Ubuntu Maverick or Lucid with Kernel from 2.6.35 to 2.6.37
(include patch to fix problem in Airodump-ng and Aireplay-ng --> "
fixed channel mon0: -1")
IMPORTANT NOTE:
Not use this package on Ubuntu Natty because it do not build correctly on Kernel 2.6.38.
(whith Natty, use the new package "compat-wireless-aircrack-natty-patched")
Download & Install drivers
Compat-wireless-aircrack-maverick-patched
Code:
sudo modprobe -r rtl8187 zd1211rw iwl3945 ath5k rt73usb rt2800usb
sudo mkdir /usr/src/drivers
Move or copy the drivers did you download in the directory
-->
/usr/src/drivers
Code:
cd /usr/src/drivers
sudo tar -xjvf compat-wireless-aircrack-maverick-patched.tar.bz2
cd compat-wireless-aircrack-maverick-patched
sudo make && sudo make install && sudo make wlunload
At this point, to use the driver RTL8187/mac80211 with ALFA-AWUS036H, load the appropriate module with this command:
Code:
sudo modprobe -r r8187 && sudo modprobe rtl8187
And check with Airmon-ng:
Code:
sudo airmon-ng | grep "rtl8187"
While, for use ALFA-AWUS050NH or ALFA-AWUS036NH, load driver rt2800usb:
Code:
sudo modprobe -r rt2870sta && sudo modprobe rt2800usb
Intalling driver r8187/Stacks ieee80211 on Ubuntu Karmic and Lucid
(Kernel 2.6.31 and 2.6.32)
Download & Installing driver r8187 (old stacks-ieee80211)
Code:
sudo modprobe -r r8187 rtl8187
sudo mkdir /usr/src/drivers && cd /usr/src/drivers
sudo unzip rtl8187_linux_26.1010.zip && cd rtl8187_linux_26.1010.0622.2006
sudo tar -xzf drv.tar.gz && sudo tar -xzf stack.tar.gz
sudo wget http://patches.aircrack-ng.org/rtl8187_2.6.27.patch -O - | sudo patch -Np1
sudo wget http://patches.aircrack-ng.org/rtl8187_2.6.32.patch -O - | sudo patch -Np1
sudo sed -i 's/-depmod -ae/-depmod -a/' Makefile
sudo make
sudo make install
Step for Ubuntu Maverick, Natty or Lucid with custom Kernel 2.6.35 to 2.6.38
Code:
sudo modprobe -r r8187 rtl8187
sudo mkdir /usr/src/drivers && cd /usr/src/drivers
sudo unzip rtl8187_linux_26.1010.zip && cd rtl8187_linux_26.1010.0622.2006
sudo tar -xzf drv.tar.gz && sudo tar -xzf stack.tar.gz
sudo wget http://patches.aircrack-ng.org/rtl8187_2.6.35-monitor_only.patch -O - | sudo patch -Np1
sudo sed -i 's/-depmod -ae/-depmod -a/' Makefile
sudo make
sudo make install
To load the r8187/ieee80211 driver and use your ALFA-AWUS036H wireless card, use this command
Code:
sudo modprobe -r rtl8187 && sudo modprobe r8187
NOTE:
For use Lucid with two different Kernel (default 2.6.32 and new custom Kernel) read this post:
Thread on Aircrack-ng Forum
IMPORTANT NOTE FOR THE PROPER USE
The drivers RTL8187 and r8187 used by ALFAAWUS036H, works using different Stacks, (mac80211 and ieee80211)
CAN NOT be used in the same time. (cause System CRASH or Kernel PANIC)
Remove and insert the "modules" with the appropriate commands.
For unload driver RTL8187/Stack mac80211
Code:
sudo modprobe -r rtl8187
For unload driver r8187/Stack ieee80211
Code:
sudo modprobe -r r8187
Or use the removal script contained in the folder of driver r8187
Code:
sudo sh /usr/src/drivers/rtl8187_linux_26.1010.0622.2006/wlan0rmv
NOTE:
Before using this script you need to make the file executable with this command.
Code:
sudo chmod +x /usr/src/drivers/rtl8187_linux_26.1010.0622.2006/wlan0rmv
For unload driver rt2800usb, used by ALFA-AWUS050NH or ALFA-AWUS036NH
Code:
sudo modprobe -r rt2800usb
Testing with drivers already patched
Test ALFA-AWUS036H with driver RTL8187/mac80211
Test ALFA-AWUS036H with driver r8187/ieee80211 patched
New tests ALFA-AWUS050NH with Compat-Wireless-Aircrack-Natty-Patched & rt2800usb driver for use Aircrack-ng
Test ArpReply attack Test Chopchop attack
Test Fragment attack Test Internet Connection
Enjoy, Jano
Written: 28/Jun/2010
Updated: 30/Mar/2012
Disclaimer