• home
  • drivers & patch
  • tutorials
  • pentest-tools
  • wordlists
    • wordlists-tools
  
Tweet My status    Share

Improve TX Power by changing the CRDA Regulatory Domain on Ubuntu & BackTrack

(for ALFA-­AWUS036H 500mW/1.000mW with RTL8187/mac­80211)

Image ALFA-AWUSO36H

With the introduction of new drivers Stacks mac80211, unlike previous ieee80211, the TX-Power is adjusted/set automatically by CRDA.

Therefore is not longer possible to use the ALFA-AWUS036H USB wireless adapter (chipset Realtek RTL8187L) with all his power for Wireless connections or during Wardriving.

By analyzing the structure of new configuration of mac80211 files and "udev" recall to the Linux Kernel, we can circumvent the obstacle by adjusting the strength of TX-Power of our Wireless card acting on the CRDA. (Central Regulatory Domain Agent)

Remember, that modification of CRDA, not only affects the settings of the maximum usable/permit power (dBm), but also setup the channels of frequencies/band allocated for the Wireless trasmission, which are set globally and for each Country by specific Laws Regulations, so make sure not to violate the Laws of your Country using frequencies or tx-powers not allowed.

After this brief introducion, we see how to permit the full output power of your wireless card, opting for either of these two solutions.


NOTE:

- The creation and editing of the following files must be done carefully.

­ - Tested on Ubuntu Jaunty - Kernel 2.6.28 and 2.6.30.

­- Tested on BackTrack 4 and 5.

- Compatible with latest Ubuntu version only after making some changes to the procedures described below.

- Make sure not to violate the Laws of your Country using frequencies or power (Tx Powers) not permitted.

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"


Copy sudo dpkg --configure -a && sudo apt-get install -f && sudo apt-get update Copy 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
Install/update "IW"
(Wireless Configuration Utility for drivers based on Stacks-mac80211)

Copy sudo apt-get install iw

[RECOMMENDED OPTION] Alternatively compiling the latest version available from IW source


Copy sudo mkdir /usr/src/drivers && cd /usr/src/drivers/ Copy sudo wget http://kernel.org/pub/software/network/iw/iw-3.11.tar.bz2 -O - | sudo tar -jxv Copy cd iw* && sudo make && sudo make install

FIRST OPTION

Shortcuts to change to 30 dBm the CRDA with a single command

If you use more than one Wireless adapter is convenient to change automatically the CRDA when you need and only for your ALFA-AWUS036H usb card.
Therefore, this first option is recommended to simplify but not permanently change the default data of your System.

Create a new file using your favorite text editor, called "crda_change

Copy sudo gedit /usr/local/bin/crda_change

Copy & paste in the new file created this text

Copy #!/bin/sh
sudo modprobe rtl8187
sleep 2
sudo iw reg set BO

Make file executable

Copy sudo chmod +x /usr/local/bin/crda_change

Make a copy of Backup of the original file and create a new alias, in the example named --> boost

Copy cp ~/.bashrc .bashrc_backup To copy use Ctrl+C:
printf "alias boost=\'sudo /usr/local/bin/crda_change'\n" | tee -a ~/.bashrc

Now close your shell session, and if you want load the driver RTL8187/mac80211 and change automatically the CRDA use boost command in new terminal

Second Option

Option to automate the modification of the CRDA, and put in "mode UP" your ALFA-­AWUS036H when you plugged in to the USB port

­Create a new file called "crda_change" as described in the previous step ­­--> FIRST OPTION

Create, or if it already exists, edit the following file

Copy sudo gedit /etc/udev/rules.d/80programs.rules

Copy and paste the following text

NOTE:

the text, when pasted, must be represented on one line

Copy SUBSYSTEMS=="usb", SYSFS{idVendor}=="0bda", SYSFS{idProduct}=="8187", RUN+="/usr/local/bin/crda_change"

Now, when connecting the usb WiFi adapter into the USB port, the script will run automatically to allow the adjustment of the TX-Power of your usb card connected.

Basic Linux commands to check the CRDA and set the output power (tx power) using IW

To check the current level of output power settings (tx power level)

Copy iwlist wlan0 txpower | grep "Current"
The use of IW to check the Regulatory Domain settings currently in use by your Kernel

Copy iw reg get
The use of IW to verify the frequencies and output powers allowed by change the regulatory domain settingsthe current CRDA
Copy iw phy0 info | fgrep MHz
The use of IW to setting the output power level to 1.000mW/3000mBm (txpower output)

Copy sudo iw dev wlan0 set txpower fixed 3000
Important note regarding the use of IW:

If you use the new configuration utility for Wireless device "IW" instead of "IWCONFIG", remember that the parameters for setting the output power level be expressed in mBm (millibels referenced to 1 milliwatt) and lo longer in dBm (decibels referenced to 1 milliwatt), therefore the scale is as follows: -> 100 mBm = 1 dBm.

Test on Ubuntu

        

Test on BackTrack 5

    

Enjoy, Jano
Written: 22/Mar/2010
Updated: 05/Sep/2013
Disclaimer


Ubuntu Logo
Aircrack-ng Logo



 In this Site & Aircrack-ng


To support this site

©2010-2012 JanoWeb.NET | All Rights Reserved | Terms & Policy |
Valid XHTML 1.0 TransitionalValid CSS 3Creative Commons Licenses WebSite Reputation