aircrack-ng

Aircrack-ng

WiFi security auditing tools suite
Under Other
By aircrack-ng

security wifi audit wifi-security suite hostapd freeradius

Aircrack-ng


Aircrack-ng is a complete suite of tools to assess WiFi network security.


It focuses on different areas of WiFi security:
* Monitoring: Packet capture and export of data to text files for further processing by third party tools.
* Attacking: Replay attacks, deauthentication, fake access points and others via packet injection.
* Testing: Checking WiFi cards and driver capabilities (capture and injection).
* Cracking: WEP and WPA PSK (WPA 1 and 2).


All tools are command line which allows for heavy scripting. A lot of GUIs have taken advantage of this feature. It works primarily on Linux but also Windows, macOS, FreeBSD, OpenBSD, NetBSD, as well as Solaris and even eComStation 2.


Building
Requirements

Note: Airmon-ng only requires pciutils if the system has a PCI/PCIe bus and it is populated.
Such bus can be present even if not physically visible. For example, it is present,
and populated on the Raspberry Pi 4, therefore pciutils is required on that device.


Optional stuff

Installing required and optional dependencies

Below are instructions for installing the basic requirements to build
aircrack-ng for a number of operating systems.


Note: CMocka, tcpdump, screen, HostAPd and WPA Supplicant should not be dependencies when packaging Aircrack-ng.


Linux
Arch Linux
sudo pacman -Sy base-devel libnl openssl ethtool util-linux zlib libpcap sqlite pcre hwloc cmocka hostapd wpa_supplicant tcpdump screen iw usbutils pciutils`

Debian/Ubuntu
sudo apt-get install build-essential autoconf automake libtool pkg-config libnl-3-dev libnl-genl-3-dev libssl-dev ethtool shtool rfkill zlib1g-dev libpcap-dev libsqlite3-dev libpcre3-dev libhwloc-dev libcmocka-dev hostapd wpasupplicant tcpdump screen iw usbutils

Fedora
sudo yum install libtool pkgconfig sqlite-devel autoconf automake openssl-devel libpcap-devel pcre-devel rfkill libnl3-devel gcc gcc-c++ ethtool hwloc-devel libcmocka-devel make file expect hostapd wpa_supplicant iw usbutils tcpdump screen zlib-devel

CentOS/RHEL 7
sudo yum install epel-release
sudo ./centos_autotools.sh
# Remove older installation of automake/autoconf
sudo yum remove autoconf automake
sudo yum install sqlite-devel openssl-devel libpcap-devel pcre-devel rfkill libnl3-devel ethtool hwloc-devel libcmocka-devel make file expect hostapd wpa_supplicant iw usbutils tcpdump screen zlib-devel

Note: autoconf, automake, libtool, and pkgconfig in the repositories are too old. The script centos_autotools.sh automatically installs dependencies to compile then install the tools.


CentOS/RHEL 8
sudo yum config-manager --set-enabled powertools
sudo yum install epel-release
sudo yum install libtool pkgconfig sqlite-devel autoconf automake openssl-devel libpcap-devel pcre-devel rfkill libnl3-devel gcc gcc-c++ ethtool hwloc-devel libcmocka-devel make file expect hostapd wpa_supplicant iw usbutils tcpdump screen zlib-devel

openSUSE
sudo zypper install autoconf automake libtool pkg-config libnl3-devel libopenssl-1_1-devel zlib-devel libpcap-devel sqlite3-devel pcre-devel hwloc-devel libcmocka-devel hostapd wpa_supplicant tcpdump screen iw gcc-c++ gcc ethtool pciutils usbutils

Mageia
sudo urpmi autoconf automake libtool pkgconfig libnl3-devel libopenssl-devel zlib-devel libpcap-devel sqlite3-devel pcre-devel hwloc-devel libcmocka-devel hostapd wpa_supplicant tcpdump screen iw gcc-c++ gcc make

Alpine
sudo apk add gcc g++ make autoconf automake libtool libnl3-dev openssl-dev ethtool libpcap-dev cmocka-dev hostapd wpa_supplicant tcpdump screen iw pkgconf util-linux sqlite-dev pcre-dev linux-headers zlib-dev pciutils usbutils

Note: Community repository needs to be enabled for iw


Clear Linux
sudo swupd bundle-add c-basic devpkg-openssl devpkg-libgcrypt devpkg-libnl devpkg-hwloc devpkg-libpcap devpkg-pcre devpkg-sqlite-autoconf ethtool wget network-basic software-testing sysadmin-basic wpa_supplicant

Note: hostapd must be compiled manually, it is not present in the repository


BSD
FreeBSD
pkg install pkgconf shtool libtool gcc9 automake autoconf pcre sqlite3 openssl gmake hwloc cmocka

DragonflyBSD
pkg install pkgconf shtool libtool gcc8 automake autoconf pcre sqlite3 libgcrypt gmake cmocka

OpenBSD
pkg_add pkgconf shtool libtool gcc automake autoconf pcre sqlite3 openssl gmake cmocka

macOS

XCode, Xcode command line tools and HomeBrew are required.


brew install autoconf automake libtool openssl shtool pkg-config hwloc pcre sqlite3 libpcap cmocka

Windows
Cygwin

Cygwin requires the full path to the setup.exe utility, in order to
automate the installation of the necessary packages. In addition, it
requires the location of your installation, a path to the cached
packages download location, and a mirror URL.


An example of automatically installing all the dependencies
is as follows:


c:\cygwin\setup-x86.exe -qnNdO -R C:/cygwin -s http://cygwin.mirror.constant.com -l C:/cygwin/var/cache/setup -P autoconf -P automake -P bison -P gcc-core -P gcc-g++ -P mingw-runtime -P mingw-binutils -P mingw-gcc-core -P mingw-gcc-g++ -P mingw-pthreads -P mingw-w32api -P libtool -P make -P python -P gettext-devel -P gettext -P intltool -P libiconv -P pkg-config -P git -P wget -P curl -P libpcre-devel -P libssl-devel -P libsqlite3-devel

MSYS2
pacman -Sy autoconf automake-wrapper libtool msys2-w32api-headers msys2-w32api-runtime gcc pkg-config git python openssl-devel openssl libopenssl msys2-runtime-devel gcc binutils make pcre-devel libsqlite-devel

Compiling

To build aircrack-ng, the Autotools build system is utilized. Autotools replaces
the older method of compilation.


NOTE: If utilizing a developer version, eg: one checked out from source control,
you will need to run a pre-configure script. The script to use is one of the
following: autoreconf -i or env NOCONFIGURE=1 ./autogen.sh.


First, ./configure the project for building with the appropriate options specified
for your environment:


./configure <options>

TIP: If the above fails, please see above about developer source control versions.


Next, compile the project (respecting if make or gmake is needed):



Finally, the additional targets listed below may be of use in your environment:



./configure flags

When configuring, the following flags can be used and combined to adjust the suite
to your choosing:



Examples:

autoreconf -i
env CC=gcc8 CXX=g++8 MAKE=gmake ./configure --with-experimental --with-gcrypt
gmake



export AUTOCONF_VERSION=2.69
export AUTOMAKE_VERSION=1.16
autoreconf -i
env MAKE=gmake CC=cc CXX=c++ ./configure
gmake



export CFLAGS='-O0 -g'
export CXXFLAGS='-O0 -g'
./configure --with-experimental --enable-maintainer-mode --without-opt
make
LD_LIBRARY_PATH=.libs gdb --args ./aircrack-ng [PARAMETERS]


IDE development
VS Code - devcontainers

A VS Code development environment is provided, as is, for rapid setup of a development environment. This additionally adds support for GitHub Codespaces.


Requirements

The first requirement is a working Docker Engine environment.


Next, an installation of VS Code with the following extension(s):




The "Remote - Containers" extension will refuse to work with OSS Code.



Usage

  1. Clone this repository to your working folder:
    $ git clone --recursive https://github.com/aircrack-ng/aircrack-ng.git
    $ cd aircrack-ng


  2. After cloning this repository, open the folder inside VS Code.
    $ code .



    IMPORTANT: You should answer "Yes", if it asks if the folder should be opened inside a remote container. If it does not ask, then press Ctrl+Shift+P and type open in container. This should bring up the correct command, for which pressing enter will run said command.





  3. A number of warnings might appear about a missing compile_commands.json file. These are safe to ignore for a moment, as this file is automatically generated after the initial compilation.



  4. Now build the entire project by pressing Ctrl+R and selecting Build Full from the pop-up menu that appears.

  5. VS Code should detect the compile_commands.json file and ask if it should be used; selecting "Yes, always" will complete the initial setup of a fully working IDE.

    IMPORTANT: If it doesn't detect the file, pressing Ctrl+Shift+P and typing reload window will bring up the selection to fully reload the environment.




  6. At this point, nearly all features of VS Code will function; from Intellisense, auto-completion, live documentation, to code formatting. Additionally, there are pre-configured tasks for builds and tests, as well as an example GDB/LLDB configuration for debugging aircrack-ng.


Packaging

Automatic detection of CPU optimization is done at run time. This behavior
is desirable when packaging Aircrack-ng (for a Linux or other distribution.)


Also, in some cases it may be desired to provide your own flags completely and
not having the suite auto-detect a number of optimizations. To do this, add
the additional flag --without-opt to the ./configure line:


./configure --without-opt


Using pre-compiled binaries
Linux/BSD

Aircrack-ng is available in most distributions repositories. However, it is not always up to date.


We provide up to date versions via PackageCloud for a number of Linux distributions:



Windows

Continuous integration

Buildbots

URL: https://buildbot.aircrack-ng.org/


Linux buildbots:
- CentOS
- AArch64
- Kali Linux
- Armel Kali Linux
- Armhf Kali Linux
- Alpine Linux


BSD buildbots:
- OpenBSD
- FreeBSD
- NetBSD
- DragonflyBSD


Documentation

Some more information is present in the README file.


Documentation, tutorials, ... can be found on https://aircrack-ng.org


Support is available in the forum and on IRC (in #aircrack-ng on Libera Chat).


Every tool has its own manpage. For aircrack-ng, man aircrack-ng


Infrastructure sponsors