Installing Aircrack-ng on Ubuntu 12.04

One of the primary reasons I use Ubuntu is to crack wireless networks whenever I get the opportunity. I recently moved to Ubuntu 12.04 and found that aircrack-ng was NOT in the repository.

In the process of compiling aircrack-ng from source, I hit a lot of errors mostly to do with a variable called –Werror. This is what you need to do to compile aircrack-ng without the pesky errors.

sudo apt-get install build-essential
sudo apt-get install libssl-dev
wget http://download.aircrack-ng.org/aircrack-ng-1.1.tar.gz
tar -zxvf aircrack-ng-1.1.tar.gz
cd aircrack-ng-1.1

In the aircrack-ng-1.1 directory there is a file called common.mak, use your favorite editor to open the file and scroll down till you see the following line:
CFLAGS ?= -g -W -Wall -Werror -O3
Delete the -Werror variable, so that the line now looks like the following. Save and exit.
CFLAGS ?= -g -W -Wall -O3
Run make and make install to get aircrack-ng up and running.

114 thoughts on “Installing Aircrack-ng on Ubuntu 12.04”

  1. not working my friend, I try to use fern-wifi-cracker and Ubuntu keeps saying I don't have aircrack-ng installed. Followed your tutorial five times, no success, maybe you should try the software above and let me know if you were succesfull in installing it

  2. thank you much! this worked well for me, and your concise writing made it a breeze for me to get up and running.

  3. i've never heard of fern wifi cracker. the first comment mentioned it. i installed aircrack without a hitch, and tried fern. i typically don't like GUI cracking tools, but found it interesting so i gave it a shot. the error i got was: Dependency is not satifiable: aircrack-ng (>=1.0). looks like fern doesn't work with aircrack 1.1

  4. hey q ondas amigo… oye tengo el ubuntu 12.04 lts pero no puedo instalar.. sigo los pasos y me salen 2 errores en el make install.. me podrias ayudar gracas

  5. Installing Aircrack-ng on Ubuntu 12.04
    The recent ubuntu 12.04 cut out aircrack-ng from their repository. So here is an easy step by step guild to get it installed again

    Anyway, Riyaz Ahemed Walikar has written a post on gettin aircrack work in Precise Pangolin.

    apt-get install build-essential libssl-dev
    wget http://download.aircrack-ng.org/aircrack-ng-1.1.tar.gz
    tar -zxvf aircrack-ng-1.1.tar.gz
    cd aircrack-ng-1.1
    gedit common.mak

    Replace the line

    CFLAGS ?= -g -W -Wall -Werror -O3

    to:

    CFLAGS ?= -g -W -Wall -O3

    Then save it and close gedit

    make
    sudo make install

  6. sir u changed a line
    “CFLAGS ?= -g -W -Wall -Werror -O3”
    to “CFLAGS ?= -g -W -Wall -O3”
    u removed Werror that is just used to suppress the warnings at the time of installation
    i did the same and got my aircrack working but everytime i start to list up networks using airodump (updated it at the end of installation) my distro get hanged and then have to force close it
    can u advice what's the problem here?
    and can this be a matter of the card being not supported

  7. i found some error after “make install”

    gcc -g -W -Wall -O3 -D_FILE_OFFSET_BITS=64 -D_REVISION=0 -Iinclude -c -o aircrack-ng.o aircrack-ng.c
    In file included from aircrack-ng.c:65:0:
    crypto.h:12:26: fatal error: openssl/hmac.h: No such file or directory
    compilation terminated.
    make[1]: *** [aircrack-ng.o] Error 1
    make[1]: Leaving directory `/home/fwolve/aircrack-ng-1.1/src'
    make: *** [install] Error 2

  8. hi, thank you for information. i installed the program with this way. how can i uninstall it? i want to uninstall it but i can not. thanks for help.

  9. Thanks. The installation directions on Aircrack-ng's website are fairly vague as is, and also don't work. But after a last-resort Google search I found this, and now I have it running properly.

  10. I found this error!

    [email protected]:~$ tar -zxvf aircrack-ng-1.1.tar.gz
    tar (child): aircrack-ng-1.1.tar.gz: Cannot open: No such file or directory
    tar (child): Error is not recoverable: exiting now
    tar: Child returned status 2
    tar: Error is not recoverable: exiting now

  11. hello friend did everything step by passso only have a problem when editing text
    write CFLAGS? =-g-W-Wall-O3 more time to save does not save what I can do to de ja thanks and I await the answer.

  12. it seams that when i type in the command then try to enter in my password the password does not show coz when i press enter it says invalid password please take me though step by step

  13. WepCrackGUI working on Ubuntu 12.04.1 LTS

    sudo apt-get install libncurses5-dev
    sudo apt-get install monodevelop
    sudo apt-get install gtk-sharp2
    sudo apt-get install libqyoto4.5-cil (did not install)
    sudo apt-get install qyoto-dev (did not install)

    Get the software from

    sourceforge.net/projects/wepcrackgui/

    tar -xjf WepCrack0.9.2.tar.gz
    cd Wepcrack

    Start Wepcrackgui with

    sudo mono –runtime=v4.0 '/home/user/Apps/wepcrackgui/WepCrack/GWepCrackGui.exe' &

    sudo start network-manager (if problems with no network manager when you close wepcrackgui)

    MDK3

    http://mindfulloftrash.blogspot.co.uk/2011/11/tutorial-wireless-havoc-with-mdk3.html

    http://homepages.tu-darmstadt.de/~p_larbig/wlan/#mdk3

    Installation process:

    tar -xjf mdk3-v6.tar.bz2
    cd mdk3-v6
    make
    make install.

    * you may get whole pages of errors when you enter “make”, but ignore it and proceed to make install, it will install mdk3 fine. If it doesnt then please leave a comment, I will take a look at it again. 🙂

    Update: If it doesnt work, you may need to edit your Makefile. ( I had to do so in Ubuntu 12.04)

    Open Makefile
    change this line: LINKFLAGS = -lpthread to
    LINKFLAGS = -pthread
    make && make install

    final location for mdk3 file is /usr/local/sbin/mdk3

    Crunch
    wget http://sourceforge.net/projects/crunch-wordlist/files/crunch-wordlist/crunch-3.3.tgz
    tar xvf crunch-3.3.tgz
    cd crunch-3.3
    /usr/bin/gcc -Wall -lm -pthread -std=c99 -m64 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=32 crunch.c -o crunch -lm

    OUTPUT
    crunch.c: In function ‘PrintPercentage’:
    crunch.c:1387:20: warning: variable ‘finall’ set but not used [-Wunused-but-set-variable]
    crunch.c: In function ‘renamefile’:
    crunch.c:1430:12: warning: variable ‘pidret’ set but not used [-Wunused-but-set-variable]
    crunch.c: In function ‘main’:
    crunch.c:2348:8: warning: variable ‘loaded’ set but not used [-Wunused-but-set-variable]
    [email protected]:~/Apps/crunch/crunch-3.3$ ls -al
    total 235
    drwxrwxr-x 2 user user 1024 Aug 26 17:09 .
    drwxrwxr-x 3 user user 1024 Aug 26 17:09 ..
    -rw-rw-r– 1 user user 5616 Feb 2 2012 charset.lst
    -rwxrwxr-x 1 user user 70438 Aug 26 17:09 crunch
    -rw-rw-r– 1 user user 16553 Jul 15 22:13 crunch.1
    -rw-rw-r– 1 user user 118668 Jul 15 22:09 crunch.c
    -rw-r–r– 1 user user 18092 Jul 15 02:03 GPL.TXT
    -rw-rw-r– 1 user user 3299 Apr 29 01:42 Makefile
    -rw-rw-r– 1 user user 128 Jun 29 03:03 unicode_test.lst
    [email protected]:~/Apps/crunch/crunch-3.3$

    sudo make install

    Final location for crunch once installed is /pentest/passwords/crunch/crunch

  14. For those with the error messages, try doing this

    sudo apt-get install libssl-dev

    then

    make
    sudo make install.

    but make sure u do this before all the above

    gedit common.mak

    Replace the line

    CFLAGS ?= -g -W -Wall -Werror -O3

    to:

    CFLAGS ?= -g -W -Wall -O3

    Then save it and close gedit

  15. This is the error i get when i try to setup Crunch:

    crunch-3.3# /usr/bin/gcc -Wall -lm -pthread -std=c99 -m64 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=32 crunch.c -o crunch -lm

    In file included from /usr/include/assert.h:37:0,
    from crunch.c:234:
    /usr/include/features.h:324:26: fatal error: bits/predefs.h: No such file or directory
    compilation terminated.

    Everything else i got working but this 🙁 Im running ubuntu 12.04 32 bit.please help.thanks

  16. Cannot install on 8.04 ???
    install -d /usr/local/bin
    install -m 755 aircrack-ng airdecap-ng packetforge-ng ivstools kstats makeivs-ng airdecloak-ng /usr/local/bin
    install: cannot remove `/usr/local/bin/aircrack-ng': Permission denied
    install: cannot remove `/usr/local/bin/airdecap-ng': Permission denied
    install: cannot remove `/usr/local/bin/packetforge-ng': Permission denied
    install: cannot remove `/usr/local/bin/ivstools': Permission denied
    install: cannot remove `/usr/local/bin/kstats': Permission denied
    install: cannot remove `/usr/local/bin/makeivs-ng': Permission denied
    install: cannot remove `/usr/local/bin/airdecloak-ng': Permission denied
    make[1]: *** [install] Error 1
    make[1]: Leaving directory `/home/bobby/Desktop/aircrack-ng-1.1/aircrack-ng-1.1/src'
    make: *** [install] Error 2

  17. Just run it from terminal…

    I have a different question:

    So the wifi is Argonu,the wireless is wpa.How can i gain access to it?

    aircrack-ng -a wpa -e Argonu
    No file to crack specified.

  18. the basic info does work – nice one – you may still need to alter command to suit individual distro installs…good luck with that
    additionally several different steps to install flex (ftp, bison, M4 and one libpcap flavour up to date – combined with the above and some sudo you should be right to go…
    thanks for the effort and I now have a nice aircrack-ng working

  19. I think is no so necessary too much explain how to install that's tools like aircrack, if someone want use that’s procedure, then should known elementary what's is install and compile way. That IMO…

  20. It doesn't work. 🙁

    [email protected]:~# apt-get install build-essential libssl-dev
    Reading package lists… Done
    Building dependency tree
    Reading state information… Done
    Package build-essential is not available, but is referred to by another package.
    This may mean that the package is missing, has been obsoleted, or
    is only available from another source

    E: Package 'build-essential' has no installation candidate

  21. Hello

    please after: airodump-ng mon0
    i have this message :

    Interface mon0:
    ioctl(SIOCGIFINDEX) failed: No such device

    what i must do?

  22. Hi
    I did all the steps as you said, but Ubuntu is still not recognizing that aircrack-ng is installed. So the installation of fern-wifi-crack is aborted.

    any changes for Ubuntu 12.04.02?

  23. Sometimes it is difficult to manage airodump-ng output files. i mean once i generate those csv and xml files then after i start looking into it so for large amount of data i can't figure it out. so is there any tools or services available for analysis and visualization ? i have used this website and it is quite

    good, here i have shared my sample data have a look and also share any other sources if anyone knows. – http://bit.ly/1Nbfgm6

Leave a Reply

Your email address will not be published. Required fields are marked *