This is an old revision of the document!
Table of Contents
Installing Aircrack-ng from Source
- OpenSSL development package or libgcrypt development package.
- pkg-config (pkgconf on FreeBSD)
- Airmon-ng requires ethtool and rfkill
- LibNetlink 1 (libnl-dev) or 3 (libnl-3-dev and libnl-genl-3-dev) development packages. It can be disabled by passing –disable-libnl to configure.
- Kernel headers and gcc as well as make have to be installed on your system (build-essential on Debian based distributions)
- make and Standard C++ Library development package (Debian: libstdc++-dev)
- w32api is required
- Airpcap: developer directory from the Airpcap CD.
- if using clang, libiconv and libiconv-devel
- make and Standard C++ Library development package (Debian: libstdc++-dev)
Install the following via macports:
- gmake 3.81
FreeBSD, OpenBSD, NetBSD, Solaris
Install the following via pkg:
- gcc5 optional (50-70% speed gains compared to gcc 4)
- If you want SSID filtering with regular expression in airodump-ng (-essid-regex) pcre development package is required.
- If you want to use airolib-ng and '-r' option in aircrack-ng, SQLite development package >= 3.3.17 (3.6.X version or better is recommended)
- If you want to use Airpcap, the 'developer' directory from the CD is required.
- For best performance on FreeBSD (50-70% more), install gcc5 via: pkg install gcc5 Then compile with: gmake CC=gcc5 CXX=g++5
Compiling and installing
- On OS X, *BSD and Solaris, use 'gmake' instead of 'make'.
- In order to compile with clang instead of gcc, add 'CC=clang CXX=clang++' to the configure command.
wget http://download.aircrack-ng.org/aircrack-ng-1.2.tar.gz tar -zxvf aircrack-ng-1.2.tar.gz cd aircrack-ng-1.2 autoreconf -i ./configure --with-experimental make make install
Compiling with AirPcap support (cygwin only)
- Copy 'developer' directory from the AirPcap CD at the same level as 'Aircrack-ng' directory
- Append '- -with-airpcap=../developer' parameter to configure:
Compiling on *BSD/OSX
Commands are exactly the same as Linux but instead of make, use gmake (or CC=gcc5 or any other installed gcc version).
Latest Git (development) Sources
Note: Compilation parameters can also be used with the sources from our git repository.
git clone https://github.com/aircrack-ng/aircrack-ng cd aircrack-ng autoreconf -i ./configure --with-experimental make make install
wget http://download.aircrack-ng.org/aircrack-ng-0.9.3.tar.gz tar -zxvf aircrack-ng-0.9.3.tar.gz cd aircrack-ng-0.9.3 make make install
When configuring, the following flags can be used and combined to adjust the suite to your choosing:
- with-airpcap=DIR: needed for supporting airpcap devices on windows (cygwin or msys2 only) Replace DIR above with the absolute location to the root of the extracted source code from the Airpcap CD or downloaded SDK available online.
- with-experimental: needed to compile tkiptun-ng, easside-ng (and buddy-ng) and wesside-ng. Building besside-ng-crawler requires LibPCAP (development package). On debian based distro, install libpcap-dev
- with-ext-scripts: needed to build airoscript-ng, versuck-ng, airgraph-ng and airdrop-ng. Note: Experimental. Each script has its own dependences. Note: It's only required in install phase.
- with-gcrypt: Use libgcrypt crypto library instead of the default OpenSSL. And also use internal fast sha1 implementation (borrowed from GIT) Dependency (Debian): libgcrypt20-dev
- with-duma: Compile with DUMA support. DUMA is a library to detect buffer overruns and under-runs. Dependencies (debian): duma
- with-xcode: Set this flag to true to compile on OS X with Xcode 7+.
- disable-libnl: Set-up the project to be compiled without libnl (1 or 3). Linux option only.
"command not found" error message
After you do “make install” then try to use any of the Aircrack-ng suite commands, you get the error message “command not found” or similar. Your system will look for the Aircrack-ng commands in the directories defined by the PATH command.
Normally, the Aircrack-ng suite programs and man pages are placed in:
/usr/local/bin /usr/local/sbin /usr/local/man
On your system, to determine which directories have the Aircrack-ng programs enter the following. If using “locate” be sure to first run “updatedb”.
locate aircrack-ng locate airmon-ng
find / -name aircrack-ng find / -name airmon-ng
Once you know the directories (exclude the source directories) then determine which directories are in your PATH. To see which directories are included in PATH on your particular system enter:
It should show something like:
At this point compare the actual locations with the directories in your PATH. If the directories are missing from your PATH then you have a few options:
- Add the directories to your PATH. See the one or more of the following web sites for details of how to do this:
http://www.linuxheadquarters.com/howto/basic/path.shtml http://www.cyberciti.biz/faq/howto-print-path-variable/ http://www.troubleshooters.com/linux/prepostpath.htm http://linux.about.com/od/linux101/l/blnewbie3_1_4.htm
- Change to the particular directory with “cd” and then run the commands from within the directory. Don't forget to add “./” in front of each command.
- Specify the full path for each command. So if Aircrack-ng is located in the “/usr/local/bin” directory then run the command as “/usr/local/bin/aircrack-ng”.
- Specify the location prefix when installing. Lets say you have /usr/bin and /usr/sbin directories in your PATH, then do “make prefix=/usr install”. This will install the programs to /usr/bin and /usr/sbin.
"build" - No such file or directory
On Debian-based distros, if you get something similar to:
/bin/sh: line 0: cd: /lib/modules/2.6.15-28-amd64-generic/build: No such file or directory Makefile.inc:66: *** /lib/modules/2.6.15-28-amd64-generic/build is missing, please set KERNELPATH. Stop.
The build directory gets installed together with the kernel headers, so either you lack the correct headers or your KERNELPATH is wrong. Please check that `uname -r` returns “2.6.15-28-amd64-generic”.
Do a “sudo apt-get install linux-headers-`uname -r`” or just “sudo apt-get install linux-headers”.
If uname returns exactly that string and the current headers are installed, the remove the headers and install them again. Also check /usr/src for installed header files, maybe it got mixed up for whatever reason.
In the above examples, needless to say, change “2.6.15-28-amd64-generic” to whatever you are running.
"openssl/hmac.h" - No such file or directory
If you get something similar to:
crypto.h:12:26: error: openssl/hmac.h: No such file or directory crypto.h:13:25: error: openssl/sha.h: No such file or directory crypto.h:15:25: error: openssl/rc4.h: No such file or directory crypto.h:16:25: error: openssl/aes.h: No such file or directory
Solution: You are missing the OpenSSL development package. Depending on the distribution, download and install openssl-devel or libssl-devel (libssl-dev /Ubuntu/). Or worst case, install it from source: http://www.openssl.org.
"zlib.h" No such file or directory
If you get something similar to:
wesside-ng.c:54:18: error: zlib.h: No such file or directory
Solution: You are missing the zlib development package. Depending on the distribution, download and install zlib-devel. Or worst case, install it from source: http://www.zlib.net.
"__le64" error on 64 bit machines when compiling
You get something similar to:
radiotap-parser.h:29: error: conflicting types for ‘__le64’ /usr/include/linux/types.h:158: error: previous declaration of ‘__le64’ was here
See this thread for a solution.
Installing pre-compiled binaries
Open your package manager and install 'Aircrack-ng' package. Be sure to check that the version offered is up-to-date – you may see problems with older versions, especially if you have a card for which support was added recently, e.g. ACX, Broadcom or Intel. Ubuntu and Debian are particularly problematic in this matter.
The Windows version of the Aircrack-ng suite does not have an install program. You must manually install (unzipping archive) the software.
Here are the steps to follow for Windows XP:
- Download the latest version of the Aircrack-ng suite for Windows to your PC. The link for the zip file can be found on the Wiki home page.
- Unzip the contents of the Aircrack-ng zip file into “C:\”. This will create a directory called “aircrack-ng-0.9.3-win”. This directory name will vary based on the exact version that you downloaded. This main directory contains three subdirectories - “bin”, “src” and “test”.
Prior to using the software, make sure to install the drivers for your particular wireless card. See this link for the instructions.
To now use the Aircrack-ng suite, start Windows Explorer and double click on Aircrack-ng GUI.exe inside “bin” subdirectory. The GUI requires .NET Framework 2.0 to run (.NET Frameworks 1.0/1.1 are not able to run this executable, 2.0 or better MUST be installed).
Alternatively, open a command prompt (Start menu → Execute → cmd.exe) and change to the “C:\aircrack-ng-0.9-win\bin” directory and execute the individual commands.
- Remember that Windows only supports a limited subset of the commands.
- Some troubleshooting tips specific to XP and Vista can be found on this page.
Installing on Mac OSX
Important note: airodump-ng and aireplay-ng will not work under OSX natively. Which means, injection and capture will have to use other means. If you have an intel Mac (any recent-ish Mac is), check out the VMware Fusion option which is mentioned lower on this page.
The simplest and easiest way to install on Mac OS X is via Macports. You simply do “sudo port install aircrack-ng”.
Alternatively, use the following instructions:
- Make sure you have Xcode installed on your Mac, which can be found on the installer CD/DVD which came with your Mac (or downloaded).
- After getting the source you can do a simple “make && sudo make install” from the untarred directory.
- When you use the stable, you need to rename the Makefile.osx to Makefile and when you use the dev version it will autodetect you are using Darwin and compile fine.
Optional is openssl-dev and sqlite3 which can be installed through fink
Installing on OpenBSD
See this thread for instructions on installing and using the Aircrack-ng suite on OpenBSD.
Installing VMware Image - UNSUPPORTED
Important Note: Virtualization solutions (VMware/VirtualBox/Virtual PC/…) only work with USB cards. Card that are PCI/MiniPCI/PCMCIA/CardBus/Express Card/PCI Express/PCI-X/MiniPCI Express won't work at all.
- VMWare Workstation 6.02, VMWare Player 2.02 (freeware) or VMWare Fusion beta for intel based Mac's
- Wireless USB with one of the following chipsets:
- Approximately 2Gb of hard disk space
Important note: VMWare Workstation 6.5 (and maybe Player 2.5 too) is known not to work correctly with rtl8187 driver. It uses the whole CPU and it seems to be hanging (it is really slow) for an unknown reason.
- Install VMWare Workstation or Player
- Download this VMware image here or via BitTorrent and unpack it somewhere.
- Start VMware and select “open”. (Open the virtual machine)
- Attach your USB adapter.
- If the USB adapter is recognized automatically you'll find a small USB icon in the lower right corner of your VMWare window. If not you have to attach it manually.
- Uncompress the file on a filesystem that supports large files; NTFS, ext3, … (all FAT filesystems, including FAT32, do not support large files).
- Here are a few reasons why the download doesn't work:
- That sounds logical but make sure the URL is correct.
- Check your DNS, make sure it can resolve “download.aircrack-ng.org” (by the way, the server answers to ping). If it doesn't, use OpenDNS (Primary: 220.127.116.11 - Secondary: 18.104.22.168).
- You don't need any driver for wireless adapters (and other USB adapters) on the OS running VMware.
- The login credentials for the image are user id “root” with password “root”. On some versions the password is “toor”.
- The FAQ has some limited information about running the Aircrack-ng suite under VMWare.
Manually attaching USB device
On VMware Player, the device should be shown in the title bar, click on it to activate it. On VMware Workstation, use menu “VM –> Removable devices –> USB” and then select the device:
It will automatically unplug the device from Windows and attach it to the virtual machine.