PDA

View Full Version : How to patch madwifi/aireplay installed from RPM?


Artefact
06-21-2006, 07:30 PM
Hi friends,

I guess my aircrack/drivers are not patched, and, for I'm a newbee to Linux, I need help.

ASPLinux
kernel 2.6.16-1.2111
madwifi 0.0-0.16.20060128asp
aircrack 2.41-1.fc5.rf
Netgear WG511T

Madwifi & aircrack installed from rpm packages. Is there any way to patch my system to support aireplay injection? I tried fake auth attack, both auth & association were successful, and aireplay -3 sees ARP requests and started sending something, but airodump shows that IVs rate is still the same. I tried "iwconfig ath0 retry 0" which resulted in "operation not supported", and I assume my system needs to be patched.

I tried the regular way of installation, and patched the aircrack source successfully, but make/make install just give lots of errors and then stop.

Any comments are greatly appreciated.

Artefact

markds
06-21-2006, 10:38 PM
It would help if you showed what errors you got, but chances are you don't have the kernel source installed? You should be patching the madwifi drivers (for injection) and not aircrack actually.

Madwifi compiles pretty cleanly from what I've experienced with recompiling the drivers on B|T beta.

Do you have your kernal source in /usr/src/linux?


Hi friends,

I guess my aircrack/drivers are not patched, and, for I'm a newbee to Linux, I need help.

ASPLinux
kernel 2.6.16-1.2111
madwifi 0.0-0.16.20060128asp
aircrack 2.41-1.fc5.rf
Netgear WG511T

Madwifi & aircrack installed from rpm packages. Is there any way to patch my system to support aireplay injection? I tried fake auth attack, both auth & association were successful, and aireplay -3 sees ARP requests and started sending something, but airodump shows that IVs rate is still the same. I tried "iwconfig ath0 retry 0" which resulted in "operation not supported", and I assume my system needs to be patched.

I tried the regular way of installation, and patched the aircrack source successfully, but make/make install just give lots of errors and then stop.

Any comments are greatly appreciated.

Artefact

Artefact
06-22-2006, 01:07 AM
Thanks Markds.

I was talking about patching aireplay because I read this:
http://forums.remote-exploit.org/showthread.php?t=624
and followed instructions that appear in "Patching Aireplay (Aircrack)". If you have a chance could you please look into it?

The directory /usr/src is indeed empty. :-(

May I ask you how to install sources using yum?

The following is my aircrack installation experience (after patching procedure as it is described in the instruction I mentioned)

Please take into account that today is my 3rd day with Linux...

---------------------------------------------
[root@localhost ~]# cd /root/Desktop/WiFi/aircrack-2.4
[root@localhost aircrack-2.4]# make
gcc -g -W -Wall -O2 -D_FILE_OFFSET_BITS=64 -D_MAJ=2 -D_MIN=4 linux/aireplay.c -o aireplay
In file included from linux/aireplay.c:26:
/usr/include/sys/types.h:52: error: conflicting types for ‘ino_t’
/usr/include/linux/types.h:14: error: previous declaration of ‘ino_t’ was here
/usr/include/sys/types.h:62: error: conflicting types for ‘dev_t’
/usr/include/linux/types.h:13: error: previous declaration of ‘dev_t’ was here
/usr/include/sys/types.h:67: error: conflicting types for ‘gid_t’
/usr/include/linux/types.h:27: error: previous declaration of ‘gid_t’ was here
/usr/include/sys/types.h:72: error: conflicting types for ‘mode_t’
/usr/include/linux/types.h:15: error: previous declaration of ‘mode_t’ was here
/usr/include/sys/types.h:77: error: conflicting types for ‘nlink_t’
/usr/include/linux/types.h:16: error: previous declaration of ‘nlink_t’ was here/usr/include/sys/types.h:82: error: conflicting types for ‘uid_t’
/usr/include/linux/types.h:26: error: previous declaration of ‘uid_t’ was here
/usr/include/sys/types.h:90: error: conflicting types for ‘off_t’
/usr/include/linux/types.h:17: error: previous declaration of ‘off_t’ was here
In file included from /usr/include/sys/types.h:133,
from linux/aireplay.c:26:
/usr/include/time.h:105: error: conflicting types for ‘timer_t’
/usr/include/linux/types.h:22: error: previous declaration of ‘timer_t’ was hereIn file included from /usr/include/sys/types.h:220,
from linux/aireplay.c:26:
/usr/include/sys/select.h:78: error: conflicting types for ‘fd_set’
/usr/include/linux/types.h:12: error: previous declaration of ‘fd_set’ was here
In file included from linux/aireplay.c:26:
/usr/include/sys/types.h:248: error: conflicting types for ‘blkcnt_t’
/usr/include/linux/types.h:114: error: previous declaration of ‘blkcnt_t’ was here
make: *** [aireplay] Error 1
[root@localhost aircrack-2.4]# make install
install -d /usr/local/bin
install -m 755 aircrack airdecap arpforge aireplay airodump airmon.sh mergeivs pcap2ivs /usr/local/bin
install: cannot stat `aireplay': No such file or directory
install: cannot stat `airodump': No such file or directory
install: cannot stat `mergeivs': No such file or directory
install: cannot stat `pcap2ivs': No such file or directory
make: *** [install] Error 1
[root@localhost aircrack-2.4]#

markds
06-22-2006, 01:23 AM
Thanks Markds.

I was talking about patching aireplay because I read this:
http://forums.remote-exploit.org/showthread.php?t=624
and followed instructions that appear in "Patching Aireplay (Aircrack)". If you have a chance could you please look into it?
Ok when I have the time, I been up the whole night - will check it out after work and after I get some sleep.

The directory /usr/src is indeed empty. :-(
No need to fret. Get the kernel module from here

http://www.remote-exploit.org/kernel.mo

and do

uselivemod kernel.mo

after downloading to insert the kernel (I hope this is a hdd install of B|T).


May I ask you how to install sources using yum?
Theres a pretty good article here on this :

http://madpenguin.org/Article918.html

The following is my aircrack installation experience (after patching procedure as it is described in the instruction I mentioned)

Please take into account that today is my 3rd day with Linux...

---------------------------------------------
[root@localhost ~]# cd /root/Desktop/WiFi/aircrack-2.4
[root@localhost aircrack-2.4]# make
Try to install the kernel sources first, then compile aircrack again. See how it goes.

Artefact
06-22-2006, 01:27 AM
Thanks again, I'll try to follow you advices and then come back.

Artefact
06-22-2006, 01:35 AM
First feedback:
uselivemod -- command not found

Artefact
06-22-2006, 02:58 AM
Ok, some more info.
I cannot use uselivemod for ASPLinux is a RH-based distro. There must be other way--if the file I've downloaded is the right one for this distro.
Then yum.
I'm really aware of reconfiguring it (the article is quite decent one) because every time I use yum I expect something bad to happen. I've probably damaged yumex as it can not show up and starts in "sleeping" mode according to the system monitor. But even the command line installs and updates with yum work strange. In most cases yum downloads everything from repos (and this is the only thing it's really good at, plus the fact that I use all the repos available for my distro) and then gives something like this:
--------------------------------------------------------------
[root@localhost ~]# yum update
Loading "installonlyn" plugin
Setting up Update Process
Setting up repositories
Reading repository metadata in from local files
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Downloading header for info to pack into transaction set.
info-4.8-11.i386.rpm 100% |=========================| 11 kB 00:00
http://distro.ibiblio.org/pub/linux/distributions/fedora/linux/core/development/i386/os/Fedora/RPMS/info-4.8-11.i386.rpm: [Errno -1] Header is not complete.
Trying other mirror.
info-4.8-11.i386.rpm 100% |=========================| 11 kB 00:00
---> Package info.i386 0:4.8-11 set to be updated
---> Downloading header for libXdamage to pack into transaction set.
libXdamage-1.0.3-2.i386.r 100% |=========================| 5.4 kB 00:00
---> Package libXdamage.i386 0:1.0.3-2 set to be updated
---> Downloading header for expat to pack into transaction set.
expat-1.95.8-8.2.i386.rpm 100% |=========================| 5.3 kB 00:00
---> Package expat.i386 0:1.95.8-8.2 set to be updated
---> Downloading header for vorbis-tools to pack into transaction set.
vorbis-tools-1.1.1-1.2.1. 100% |=========================| 10 kB 00:00
---> Package vorbis-tools.i386 1:1.1.1-1.2.1 set to be updated
---> Downloading header for e2fsprogs to pack into transaction set.

.......
|=========================| 25 kB 00:00
---> Package arts.i386 8:1.5.3-1msiu set to be updated
---> Downloading header for gd to pack into transaction set.
gd-2.0.33-8.i386.rpm 100% |=========================| 8.3 kB 00:00
---> Package gd.i386 0:2.0.33-8 set to be updated
---> Downloading header for libstdc++so7 to pack into transaction set.
libstdc%2B%2Bso7-4.2.0-0. 100% |=========================| 4.0 kB 00:00
---> Package libstdc++so7.i386 0:4.2.0-0.7.20060428 set to be updated
---> Downloading header for libavc1394 to pack into transaction set.
libavc1394-0.5.1-2.2.i386 100% |=========================| 5.9 kB 00:00
---> Package libavc1394.i386 0:0.5.1-2.2 set to be updated
---> Downloading header for libXTrap to pack into transaction set.
libXTrap-1.0.0-3.i386.rpm 100% |=========================| 5.6 kB 00:00
---> Package libXTrap.i386 0:1.0.0-3 set to be updated
---> Downloading header for pyorbit to pack into transaction set.
pyorbit-2.14.1-1.110msiu. 100% |=========================| 5.3 kB 00:00
---> Package pyorbit.i386 0:2.14.1-1.110msiu set to be updated
---> Downloading header for system-config-keyboard to pack into transaction set.system-config-keyboard-1. 100% |=========================| 23 kB 00:00
---> Package system-config-keyboard.noarch 0:1.2.7-1.1 set to be updated
---> Downloading header for system-config-users to pack into transaction set.
system-config-users-1.2.4 100% |=========================| 37 kB 00:03
---> Package system-config-users.noarch 0:1.2.44-1 set to be updated
---> Downloading header for libgail-gnome to pack into transaction set.
libgail-gnome-1.1.3-1.2.1 100% |=========================| 5.4 kB 00:00
---> Package libgail-gnome.i386 0:1.1.3-1.2.110asp set to be updated
---> Downloading header for ffmpeg-libpostproc to pack into transaction set.
Error: failure: i386/ffmpeg-libpostproc-0.4.9-2.3.20051207.110asp.i386.rpm from updates-released: [Errno 256] No more mirrors to try.
[root@localhost ~]#

But I don't want to change the distro, it has all the functions I need (actually it HAD before I started playing with aircrack) and I'm impressed with the speed and simplicity...btw, I tried suse, mandriva, debian and many others and finally have come to ASP.
Th problem MUST be solvable, I believe...

markds
06-22-2006, 06:07 AM
Ok, some more info.
I cannot use uselivemod for ASPLinux is a RH-based distro. There must be other way--if the file I've downloaded is the right one for this distro.
Then yum.
I'm really aware of reconfiguring it (the article is quite decent one) because every time I use yum I expect something bad to happen. I've probably damaged yumex as it can not show up and starts in "sleeping" mode according to the system monitor. But even the command line installs and updates with yum work strange. In most cases yum downloads everything from repos (and this is the only thing it's really good at, plus the fact that I use all the repos available for my distro) and then gives something like this:

Opps - I didn't see that you were using ASP. This is a B|T forum, you should be posting in an Aircrack forum. See if an RPM install will work for you. You can use the new aircrack-ng from here :

http://dag.wieers.com/packages/aircrack-ng/

or the old aircrack from here

http://dag.wieers.com/packages/aircrack/

install with

rpm -i <file.rpm>

where <file.rpm> is the rpm package you downloaded from either of those 2 sites.


But I don't want to change the distro, it has all the functions I need (actually it HAD before I started playing with aircrack) and I'm impressed with the speed and simplicity...btw, I tried suse, mandriva, debian and many others and finally have come to ASP. The problem MUST be solvable, I believe...

You really should try Slackware (what B|T is) then if speed and simplicity are your key concerns. From the looks of your output, ASP seems to be very very stripped down.

Artefact
06-22-2006, 09:26 AM
You can use the new aircrack-ng from here :
http://dag.wieers.com/packages/aircrack-ng/
or the old aircrack from here
http://dag.wieers.com/packages/aircrack/
install with
rpm -i <file.rpm>
where <file.rpm> is the rpm package you downloaded from either of those 2 sites.

Thanks, I already had old aircrack (2.41) installed and working quite smoothly (except THE injection), and now I had taken aircrack-ng from the source you provided me with. Installation went fine and now I have both old and new aircrack working. Injection still doesn't work, at least IMHO, everything else is very similar.

You really should try Slackware (what B|T is) then if speed and simplicity are your key concerns. From the looks of your output, ASP seems to be very very stripped down.

I tried it but it has no system for managing dependencies and requires more proficiency. My ASP is really stripped but I went the same way I always did with Windows: NO SPARE STUFF RUNNING OR STORED. I could agree that my Linux knowledge hardly helps judge what is spare stuff and what's not. :-)

Ok, let's go back to the sty.

Question number one: how can I know for sure that injection is/isn't working in my system? Can "iwconfig ath0 retry 0" be of help? Again, it gives "operation not supported". Is this the only & unique criterion?

Q2: I need madwifi drivers for my kernel (2.6.16-1.2111asp), which don't seem to be present online (I can spot them in Google cache but none of alive, why)? Again, I tried to update kernel to 2.6.16-1.2133_FC6, but could not install the rpm package being lost in references to dependencies that are absent.

Frankly speaking, I'm close to the point where I start hating Linux. :-) Please help me save my soul for the open source, my dear friends.

markds
06-22-2006, 02:58 PM
Injection isn't a problem of aircrack - aircrack makes calls to do injection. That means its the drivers that need to be patched for injection, not aircrack.

You need to patch your madwifi/madwifi-ng drivers for injection.



Thanks, I already had old aircrack (2.41) installed and working quite smoothly (except THE injection), and now I had taken aircrack-ng from the source you provided me with. Installation went fine and now I have both old and new aircrack working. Injection still doesn't work, at least IMHO, everything else is very similar.



I tried it but it has no system for managing dependencies and requires more proficiency. My ASP is really stripped but I went the same way I always did with Windows: NO SPARE STUFF RUNNING OR STORED. I could agree that my Linux knowledge hardly helps judge what is spare stuff and what's not. :-)

Ok, let's go back to the sty.

Question number one: how can I know for sure that injection is/isn't working in my system? Can "iwconfig ath0 retry 0" be of help? Again, it gives "operation not supported". Is this the only & unique criterion?

Q2: I need madwifi drivers for my kernel (2.6.16-1.2111asp), which don't seem to be present online (I can spot them in Google cache but none of alive, why)? Again, I tried to update kernel to 2.6.16-1.2133_FC6, but could not install the rpm package being lost in references to dependencies that are absent.

Frankly speaking, I'm close to the point where I start hating Linux. :-) Please help me save my soul for the open source, my dear friends.

Artefact
06-22-2006, 08:04 PM
Injection isn't a problem of aircrack - aircrack makes calls to do injection. That means its the drivers that need to be patched for injection, not aircrack.
You need to patch your madwifi/madwifi-ng drivers for injection.

I understand that. I just dont't know how to do that if a) I cannot install drivers from the source code as I don't have Linux source code to compile them properly and still have no idea how to get it; b) I can't find an RPM patch that would fix existing drivers.

markds
06-22-2006, 10:47 PM
I understand that. I just dont't know how to do that if a) I cannot install drivers from the source code as I don't have Linux source code to compile them properly and still have no idea how to get it; b) I can't find an RPM patch that would fix existing drivers.

Do :

uname -a

to find out which version of the kernel you have (eg 2.6.15.6)

Then go to http://www.kernel.org/pub/linux/kernel/v2.6/

look for the kernal source matching the version you have and download it, then untar/gunzip into /usr/src

Don't think there is an rpm patch to fix the current drivers. How to do it - read http://www.aircrack-ng.org/ its all right there.

Artefact
06-22-2006, 11:11 PM
Ok, I went a different way, but I've updated kernel using
kernel-2.6.16-1.2115asp.i586.rpm. Now it loads ok.
Then I've installed
kernel-module-madwifi-2.6.16-1.2115asp-0.0-0.16.20060128asp.i686.rpm
which seems to be an exact match.

Now Linux is not able to see the card at all. Kuzdu didn't help.

There is no matching kernel number at kernel.org, do you know which one to choose?

Artefact
06-23-2006, 05:14 AM
Dear markds,

How can you explain this?

After all the manipulations I described above, I've booted up to old kernel and found drivers patched and injection working.

Didn't you access my laptop remotely to fix my problems? I'm ready to believe. :-)

markds
06-23-2006, 06:52 AM
Dear markds,

How can you explain this?

After all the manipulations I described above, I've booted up to old kernel and found drivers patched and injection working.

Didn't you access my laptop remotely to fix my problems? I'm ready to believe. :-)

Gee, thats the kind of skill I *wish* I had :P

No I didn't access your laptop remotely and fix the problem :P

In your /lib/modules, what directories do you have now? Maybe you can paste the output of ls -ld /bin/modules here.

Artefact
06-23-2006, 08:57 AM
In your /lib/modules, what directories do you have now?

2.6.14-1.1653.1asp
2.6.16-1.2096asp
2.6.16-1.2096aspsmp
2.6.16-1.2111asp
2.6.16-1.2115asp

Maybe you can paste the output of ls -ld /bin/modules here.

Hm-m... are you sure? There is no folder "modules" in /bin folder. Your honour, what did you mean by "guilty"? :-)

markds
06-23-2006, 09:30 AM
2.6.14-1.1653.1asp
2.6.16-1.2096asp
2.6.16-1.2096aspsmp
2.6.16-1.2111asp
2.6.16-1.2115asp

Hm-m... are you sure? There is no folder "modules" in /bin folder. Your honour, what did you mean by "guilty"? :-)

Sorry I meant do ls -ld /lib/modules not /bin/modules

And what output do you have for uname -a ?

Artefact
06-23-2006, 08:40 PM
Sorry I meant do ls -ld /lib/modules not /bin/modules

[root@localhost ~]# ls -ld /lib/modules
drwxr-xr-x 7 root root 4096 Jun 22 17:08 /lib/modules

And what output do you have for uname -a ?

[root@localhost ~]# uname -a
Linux localhost 2.6.16-1.2111asp #1 Mon May 22 19:58:18 EEST 2006 i686 i686 i386 GNU/Linux

markds
06-23-2006, 09:23 PM
[root@localhost ~]# ls -ld /lib/modules
drwxr-xr-x 7 root root 4096 Jun 22 17:08 /lib/modules

Another error on my part. Should be ls -ld /lib/modules/*

But it looks like you're not using the new kernel.

Artefact
06-23-2006, 10:21 PM
Another error on my part. Should be ls -ld /lib/modules/*

drwxr-xr-x 3 root root 4096 May 25 10:34 /lib/modules/2.6.14-1.1653.1asp
drwxr-xr-x 5 root root 4096 May 30 00:19 /lib/modules/2.6.16-1.2096asp
drwxr-xr-x 5 root root 4096 May 30 03:49 /lib/modules/2.6.16-1.2096aspsmp
drwxr-xr-x 5 root root 4096 May 30 04:11 /lib/modules/2.6.16-1.2111asp
drwxr-xr-x 5 root root 4096 Jun 22 17:10 /lib/modules/2.6.16-1.2115asp

But it looks like you're not using the new kernel.

Exactly. Please look into #13-14. That is what I can't understand. Another problem gone: before I ***patched*** the drivers my Thinkpad froze sometimes when aircrack apps were working, now I left it alone for the whole night and it's still ok.