inportb

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.

8 comments for this entry:
  1. inportb » Blog Archive » Aircrack for Atheros AR5007EG

    [...] This patch is now obsolete! Please refer to newer information. [...]

  2. kiko barcelona

    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!

  3. Jiang Yio

    @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/

  4. MAK

    What about windows…!! excuse my eng

  5. Maks

    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

  6. Jiang Yio

    @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.

  7. Phiko

    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

  8. Jiang Yio

    In general, Windows is not the right tool for the job. The OmniPeek drivers let you monitor but not inject, reducing efficiency greatly.

Leave a Reply

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...