Thursday, April 16, 2009

» How to build aircrack-ng on openSUSE

aircrack-ng is a well known network security tool that is capable of cracking most wireless encryption algorithms (WEP, WPA, ...). It is a very useful tool to assess the security of your WLAN, but unfortunately, it can also be abused by crackers to penetrate a wireless network. As such, and I cannot stress this enough: it is FORBIDDEN and a CRIMINAL ACT by (a very controversial and unclear) law in Germany to distribute aircrack-ng, as well as similar security cracking tools, -- notwithstanding the usefulness of such a tool for above mentioned security assessments. That is why you won't find a precompiled binary package of aircrack-ng for openSUSE. We do host a nosrc RPM package in the Packman repository though. Such nosrc packages don't contain the upstream sources (in this case, the aircrack-ng tarball from the aircrack website), but merely the RPM recipe on how to properly build the package. If you really know what you're doing and intend to use aircrack-ng for security assessment purposes (and NOT for CRACKING, which is both ETHICALLY CONDEMNABLE and a CRIMINAL ACT in certain if not most countries), here is how to build the binary package on your host (the two first lines have to be performed once, to set up an RPM building environment in your home, in order to build packages with your regular user):
echo "%_topdir $HOME/rpm" >> ~/.rpmmacros
mkdir -p ~/rpm/{BUILD,RPMS/{i586,x86_64},SOURCES,SPECS,SRPMS}

cd ~/rpm/SOURCES
wget http://download.aircrack-ng.org/aircrack-ng-1.0.tar.gz
cd ~/rpm/SRPMS
wget http://ftp.skynet.be/pub/packman/suse/11.1/src/\
aircrack-ng-1.0z+0-0.pm.1.1.nosrc.rpm
rpmbuild --rebuild aircrack-ng-1.0z+0-0.pm.1.nosrc.rpm
Once rpmbuild is done with building the package, you'll find a binary RPM in ~/RPMS/i586 (on 32bit systems) or ~/RPMS/x86_64 (on 64bit systems). Note that rpmbuild may complain about missing build dependencies -- in this case, install the missing packages on your host using YaST2 or zypper. The most comfortable option for installing build dependencies being most probably the following:
zypper si -d ./aircrack-ng-1.0z+0-0.pm.1.1.nosrc.rpm
To have the latest available version, go to the corresponding Packman page and adapt the instructions above to the Packman nosrc.rpm download link as well as the version in the download URL at aircrack-ng.org

Labels:

2 Comments:

Blogger rem said...

Thx ! Added to o-c.o

00:50  
Blogger Ehtesh said...

Thanks a bunch, Loki!

So the $HOME in echo expands to your home directory, huh. Is there a line independent of $HOME you can put into .rpmmacros instead?

07:13  

Post a Comment

<< Home