MadWifi Support for AR5007 (AR2425) With Injection (Aircrack)
by Jiang 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-project.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 – | patch -Np1
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 ifconfig ath0 down
sudo ifconfig wifi0 down
sudo ./scripts/madwifi-unload
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.
November 6th, 2008: The MadWifi project has a new domain. The SVN location in the guide has been updated.
Popularity: 36%
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 5:45 am
What about Windows… can I use this patch for windows? Or tell me other program which I can use to crack a wep key. I have the wireless wifi collection such as airsnort, aircrack… and I also have Atheros AR5007EG and I cant use them to crack because it says “you must install specified drivers” and I don’t know where to find them. PLEASE HELP… don’t email me just leave a reply because I forgot my pass :S……Excuse my English… THANKS
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.
@Maks:
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.
December 19th, 2008 on 1:47 am
Thanks a lot, works!!
December 31st, 2008 on 12:21 pm
[...] MadWifi Support for AR5007 (AR2425) With Injection (Aircrack) [...]
January 28th, 2009 on 4:29 pm
i need to get my AR5007 to work with my aircrack ng package
but airodump wouldn’t recognize my wireless
i am running windows by the way
how can i get it to work?
thanks
January 28th, 2009 on 5:17 pm
Though it is unsupported, Aircrack-ng does work on Windows. Please have a look at the documentation.
You might want to boot into Linux for this, as you’d be able to work much more efficiently.
March 16th, 2009 on 8:02 pm
I get this error when patching.
patching file ath/if_ath.c
Hunk #1 FAILED at 2950.
Hunk #2 succeeded at 3015 (offset 52 lines).
Hunk #3 succeeded at 3040 (offset 52 lines).
1 out of 3 hunks FAILED — saving rejects to file ath/if_ath.c.rej
Do I need a new patch? I followed the instructions exactly.
Thanks
March 26th, 2009 on 4:52 am
Hi Jiang Yio,
Very good instructions on AR5007 but —
I am VERY new to Linux and am unable to get my AR5007 wifi working with Ubuntu NBR in an Acer One.
Trying to understand your programing but get confused at the new driver building step ” installing build-essential and linux-headers-generic ” — is there more code needed or do I just input ” make clean && make ” at the terminal for this step?
Could you even simplify your very good instructions even further ( ie baby step by step )for a Linux DUMMY like me?
Appreciate if you could email me back at larry.mari@gmail.com
Thank you for your patience and help !!
Larry Kunz
March 27th, 2009 on 1:00 am
You are the man! This noob spent 2 days trying to install drivers. and when I finally figured it out, Aireplay wouldn’t work because I never patched it. This walkthrough is amazing, I wish it had been the first item on my Google search.
By the way, if the links are outdated, just use your browser to check out the http and then adjust the filename and directory accordingly.
Also, for noobs like myself, you can just download the file into the madwifi directory with “wget”(drop “-O – | patch -Np1″). Then, when you’re in the directory, use ” patch -N -p 0 -i madwifi-ng-r3925.patch”
Again, adjust filename accordingly if newer patch.
Then follow my man’s ingenious guide and done!
March 27th, 2009 on 7:56 am
Hi,
I have problem with compilation madwifi ,i will try compiling for windows and i get mistake.
Please help me with that i try witg cygwin
LuRyt@LuRy /home/madwifi/madwifi-hal-0.10.5.6
$ make
/bin/sh: -c: line 0: syntax error near unexpected token `(‘
/bin/sh: -c: line 0: `cd /lib/modules/1.5.25(0.156/4/2)/build && pwd’
Makefile.inc:66: *** /lib/modules/1.5.25(0.156/4/2)/build is missing, please set KERNELPATH. Stop.
June 10th, 2009 on 9:44 am
Is there any peek drivers(for WinXP) for Atheros AR5007EG wireless adaptor??Where can I find it???
I have already tryied all available for other models to wildpack site but nothing
Please HELP!
I’m going CRAZY!!
July 13th, 2009 on 9:59 pm
Is there such a thing as wifi jammers?
August 29th, 2009 on 2:30 am
hey man the download link is not working
can u plz send to me the new download link to my email txxxxx
abu.wish@yahoo.com
October 17th, 2009 on 12:29 pm
hey, are there any Atheros AR5007EG drivers or patches that I can use for Aircrack to support injection? I’m running on Linux, but there doesn’t seem to be anything that will work for this *particular* card. Seems like there’s support for every *other* card, though. Any patches?
October 18th, 2009 on 11:14 pm
Last time I tried, Aircrack-ng worked with ath5k/mac80211, the opensource kernel-based driver for this chipset. Madwifi-ng supposedly works better.
May 25th, 2010 on 11:48 am
ok im trying to run aircrack on my Toshiba that has a AR5007EG card on Windows 7.
Im trying to crack my own wep but when i run Airdump ng it says adapter not supported…
Help please!!!
Can someone upload the driver to megaupload?
Newb here trying to crack my own wep so give me some slack……..