Sunday, April 15, 2012

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.

106 comments:

  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

    ReplyDelete
    Replies
    1. try :
      sudo make

      and then :
      sudo make install

      Delete
    2. 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

      Delete
    3. great tutorial.. worked like a charm.. thank you.

      Delete
    4. Works like a charm on kubunto 12.04 too. Thanks

      Delete
    5. Runs perfect on Xubuntu too :P
      Thanks man!

      Delete
    6. 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

      Delete
    7. i have problem to
      Delete the -Werror variable could you please help me
      withe my best regards

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

    ReplyDelete
  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

    ReplyDelete
  4. great! works as before ;)

    how did that change in the common.mak file came up to you?

    ReplyDelete
  5. Thanks for your help my friend,
    Saludos desde Guadalajara Mexico
    manny Navarro

    ReplyDelete
    Replies
    1. 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

      Delete
    2. Ami me ocurre lo mismo 2 errores aqui te dejemo mi correo por si te intereza ayudarme un saludo. Mariozamora75@gmail.com

      Delete
    3. I'm new to ubuntu. Can you tell me how to crack after installing them.

      Delete
  6. Worked like charm! Thanks!!

    ReplyDelete
  7. Getting a channel error in airodump.. Everything is either channel 1 or 11.. Woo..

    ReplyDelete
  8. i did all these steps but fails when i launch "sudo airmon-ng" it syas command not found!

    ReplyDelete
    Replies
    1. maybe you should try:
      "sudo aircrack-ng"

      Delete
    2. sudo /usr/local/sbin/airmon-ng

      Delete
  9. For the fern-wifi-cracker issue, did the first guy upgrade to fern-wifi-cracker 1.5? I was getting ready to try this out with that. Otherwise it installed fine!

    ReplyDelete
  10. Thank you for a very concrete and to the point tutorial.

    ReplyDelete
  11. Thank you for this solution, it works like a charm :)

    After a while I missed besside-ng so installed the latest development sources with subversion, turns out you don't have to change the common.mak file anymore: it just compiles

    svn co http://trac.aircrack-ng.org/svn/trunk/ aircrack-ng

    ReplyDelete
  12. great!!! thanx

    ReplyDelete
  13. thank you soo much... it worked! I do not know you, but I feel you are my friend...

    ReplyDelete
  14. Merci beaucoup ça marche à merveille

    ReplyDelete
  15. Merci beaucoup. Très efficace. Cela fonctionne vraiment.

    ReplyDelete
  16. What does run make mean ?

    ReplyDelete
    Replies
    1. Means you need to learn something about ubuntu before you try to do illegal things.

      Delete
  17. Excellent article. Much thanks

    ReplyDelete
  18. works as a charm..thanks buddy for this nice article..faldeen

    ReplyDelete
  19. wow, thanks bro, it's working, terima kasih......

    ReplyDelete
  20. Thanks..it worked just perfect..without a flaw

    ReplyDelete
  21. I just downloaded the .deb from https://launchpad.net/ubuntu/precise/amd64/aircrack-ng/1:1.1-1.1build1 and that installed it all for me.

    https://launchpad.net/ubuntu/precise/+package/aircrack-ng if you don't have a 64bit processor.

    roges

    ReplyDelete
    Replies
    1. This worked for me.
      Thanks from Bilbao!

      Delete
  22. Thanks for these directions. They worked great!

    ReplyDelete
  23. where is the aircrack directory or folder in ubuntu 12. I cant find it please help.

    ReplyDelete
  24. thank you verry much !!!
    worked like a charm.

    ReplyDelete
  25. 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

    ReplyDelete
  26. 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

    ReplyDelete
    Replies
    1. Im having the same problem

      Delete
    2. Having the same problem. HALP!!

      Delete
    3. Me too. Same issue.

      Delete
  27. No working. Nothing, a lot of errors. Thanks everywhere.

    ReplyDelete
  28. Thanks so very much! Worked like a charm!

    ReplyDelete
  29. worked great. thank you sir

    ReplyDelete
  30. Flawless. Much thanks.

    ReplyDelete
  31. 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.

    ReplyDelete
  32. great :) it works... thanks a lot

    ReplyDelete
  33. thanx, it works fine))

    ReplyDelete
    Replies
    1. Thanks man really works! Hapi Hackin'

      Delete
  34. 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.

    ReplyDelete
  35. Thanks, this worked for me on a fresh install of Ubuntu 12.04.

    ReplyDelete
  36. Thanks. Teraz działa znakomicie :)

    ReplyDelete
  37. thanks dude,it works fine

    ReplyDelete
  38. Worked mint ;)

    Cheers for that man!

    ReplyDelete
  39. I found this error!

    xxxxx@ubuntu:~$ 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

    ReplyDelete
    Replies
    1. I have the same problem please help me!

      Delete
  40. Excellent... worked great (just don't forget to be root or do sudo) :D

    ReplyDelete
  41. 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.

    ReplyDelete
  42. thanks alot dear
    sangrez khan

    ReplyDelete
  43. please take me thought step by step am still new on ubuntu

    ReplyDelete
  44. 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

    ReplyDelete
  45. 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]
    user@ubuntu:~/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
    user@ubuntu:~/Apps/crunch/crunch-3.3$

    sudo make install

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

    ReplyDelete
  46. 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

    ReplyDelete
  47. 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

    ReplyDelete
  48. I just changed the m64 to m32 and it installed fine :)

    ReplyDelete
  49. "use your favorite editor to open the file"..how that is suppose to happen..? teach me please

    ReplyDelete
  50. Great thanks!!
    Joana

    ReplyDelete
  51. Working for me thanks ;)

    ReplyDelete
  52. works well on crunchbang slater too, thanks (:

    ReplyDelete
  53. arigatou gosaimasu

    ReplyDelete
  54. riyaz bhai i am install aircrac but it error osd what can i do

    ReplyDelete
  55. gcc -g -W -Wall-O3 -D_FILE_OFFSET_BITS=64 -D_REVISION=0 -fPIC -I.. -c -o linux.o linux.c

    ReplyDelete
  56. NO ONE uses WEP anymore so whats the point, at least in developed countries like the UK. Just sayin

    ReplyDelete
  57. Step by step installation.
    http://answertohow.blogspot.in/2012/10/how-to-install-aircrack-ng-on-ubuntu.html

    ReplyDelete
  58. 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

    ReplyDelete
    Replies
    1. run it using sudo in front my boy....

      Delete
  59. 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.

    ReplyDelete
    Replies
    1. to specify,i need the password to that wifi...

      Delete
  60. Thx, its working.

    ReplyDelete
  61. works great on xubuntu 12.04.
    Thanks.

    ReplyDelete
  62. work great on Ubuntu thank you, just need to use sudo make and sudo make install! thank you again :)

    ReplyDelete
  63. 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...

    ReplyDelete
  64. Thanks all those warnings gave me a bit of a fright :). I used aircrack on windwos but Ive moved to Ubuntu permanent :)

    ReplyDelete
  65. Worked great. Many thanks! Now I can go back to not pulling my hair out.

    ReplyDelete
  66. That worked perfectly for me. Thanks for putting that together. You ROCK dude!!!

    ReplyDelete
  67. Can anyone put a WORKING tutorial(with snaps) to crack a Wifi-Password in UBUNTU?

    ReplyDelete
  68. i can't sudo airodump-ng wlan0, why..?

    ioctl(SIOCSIFFLAGS) failed: Operation not possible due to RF-kill

    ReplyDelete
  69. help me
    it's give me error
    Run 'airodump-ng-oui-update' as root (or with sudo) to install or update Airodump-ng OUI file (Internet connection required).

    ReplyDelete
  70. kheti patel.. use this after the error.. sudo airodump-ng-oui-update

    ReplyDelete
  71. It doesn't work. :(

    root@tut-PC:~# 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

    ReplyDelete
    Replies
    1. you need sudo just before the cmd
      sudo apt-get install build-essential libssl-dev

      Delete
  72. it works just fine on 12.04 lte . Thanks

    ReplyDelete
  73. thank you its working now (^^)

    ReplyDelete
  74. Thank You!
    It's working perfectly

    ReplyDelete
  75. This worked Great!!!
    Thanks from all the NOOBS!! LOL

    ReplyDelete
  76. Hello

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

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

    what i must do?

    ReplyDelete
  77. 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?

    ReplyDelete
  78. no work for me
    :( error when i do "make and make install"

    ReplyDelete