MadWifi Support for AR5007 (AR2425) With Injection (Aircrack)
by Jiang Yio on Jul.27, 2008, under Computing
A new HAL was recently released that allowed MadWifi to support the AR5007/AR2425 devices by Atheros. Last month, there were still some hiccups with the code, but it seems smooth enough for general consumption now. The new driver supports both 32-bit and 64-bit environments, unlike the older 32-bit-only hack. As a bonus, I successfully patched the code for injection.
The commands required to checkout, patch, build, and install the driver are rather simple. I’m posting it here both as a note to myself and for public benefit.
First, we need to checkout the new driver from svn:
svn checkout http://svn.madwifi.org/madwifi/branches/madwifi-hal-0.10.5.6/ madwifi-hal
pushd madwifi-hal
Injection support is optional. It’s very simple to achieve with the Aircrack-ng patch, however:
wget http://patches.aircrack-ng.org/madwifi-ng-r3745.patch -O ../madwifi-ng.patch
patch -Np1 -i ../madwifi-ng.patch
Now the driver needs to be built. This requires that we have the kernel headers installed. On Ubuntu, it’s a simple matter of installing build-essential and linux-headers-generic (or whichever corresponds to the kernel in use). Then:
make clean
make
Before we install the new driver, it’s best if we stop the wireless device first and unload the current driver:
sudo ifconfig ath0 down
sudo ifconfig wifi0 down
sudo ./scripts/madwifi-unload
Now we can install the driver, which should start working without a reboot:
sudo make install
sudo depmod -ae
sudo modprobe ath_pci
popd
… and we’re done. The files can be removed now, but it’s best that they be kept — the driver will need to be rebuilt and reinstalled whenever a new kernel is installed, like so:
pushd madwifi-hal
make clean
make
sudo make install
sudo depmod -ae
sudo modprobe ath_pci
popd
I hope this guide was useful. For more information about this driver, please refer to this MadWifi support ticket. For more information about Aircrack-ng, please refer to its website.
July 29th, 2008 on 12:53 pm
[...] This patch is now obsolete! Please refer to newer information. [...]
August 25th, 2008 on 12:03 pm
Hi from barcelona!!! nice job Jiang!!!
I am new at linux…
I am trying to aply the patch without installing the driver in a eee pc900-701. Madwifi allready installed out of the box. after download the patch and write down : “patch -Np1 -i ../madwifi-ng.patch”
it says “file to patch:”
What is the name of the file to patch or where i can find it????
i am using backtrack 3.
Hope you can help me …
thanks!
August 25th, 2008 on 3:37 pm
@kiko:
You need to apply the patch to the driver’s source tree. After you’ve done that, you’d compile and install the new driver. The stock madwifi driver does not support injection and needs to be patched for aircrack to work.
I’m not too familiar with BackTrack, but since it’s centered around security auditing, I’d expect it to already have drivers patched for injection. You can find the docs on their wiki: http://wiki.remote-exploit.org/
October 27th, 2008 on 2:56 am
What about windows…!! excuse my eng
October 27th, 2008 on 5:45 am
Can I use this patch for windows?? Or tell me other program which I can crack wep key . I have the wireless wifi cellection such as airsnort aircrack….and I also have atheros AR5007EG and I cant use them to crack becose it says “you must install specified drivers” and I dont know where to find them. PLEASE HELP…dont email me just leave a reply becose i forgot my pass :S……Excuse my english….THANKS
October 27th, 2008 on 12:31 pm
@MAK:
MadWifi is a Linux driver for Atheros chipsets. To use your Atheros device on Windows, you should install the Windows driver provided by Atheros. For Aircrack on Windows, I heard you should use a certain OmniPeek driver instead.
October 29th, 2008 on 6:14 am
Good job Jiang…;) Can you give me the wireless “hack” tools for cracking a wep/wpa for WINDOWS XP SP2 including certain drivers which I`ll use on my atheros AR5007EG???….excuse my english…thanks a lot
October 29th, 2008 on 12:12 pm
In general, Windows is not the right tool for the job. The OmniPeek drivers let you monitor but not inject, reducing efficiency greatly.