Monday, October 15, 2012

How to install Aircrack-ng on Ubuntu 12.04

Many of the uses of  Ubuntu is that  you can crack wireless networks. I recently moved to Ubuntu 12.04 and found that aircrack-ng was NOT in the repository. So here's a simple How To install Aircrack-ng on Ubuntu 12.04.

So we will be compiling aircrack-ng from the source.But there are errors, mostly to do with a variable called -Werror in the source. This is what you need to do to compile aircrack-ng without the pesky errors.

Run the following commands(in "Bold") in the terminal.
Step 1: "sudo -s"
Type your password.

Step 2: "apt-get install build-essential"

Step 3: "sudo apt-get install libssl-dev"

Now we have installed the dependencies, we move to our next step that is downloading the source of Aircrack-ng.

Step 4: "wget http://download.aircrack-ng.org/aircrack-ng-1.1.tar.gz"

Step 5: "tar -zxvf aircrack-ng-1.1.tar.gz"

Step 6: After the download, there will be a file called common.mak in the dirctory downloads/aircrack-ng-1.1 .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.

CFLAGS ?= -g -W -Wall -O3
Save and Exit.

Step 7: Copy the whole aircrack-ng-1.1 folder and paste it in the Home Directory.
Step 8: "cd aircrack-ng-1.1"

Step 9: "make"

Step 10: "make install"

You Aircrack-ng is up and running. Now you may want to install reaver to get things crackin' .

45 comments:

  1. @step 2: "apt-get install build-essential"

    you may have to write "sudo apt-get install build-essential"

    leaving out sudo at the start did not work for me (Ubunutu 13.04)

    ReplyDelete
    Replies
    1. That's why step 1 is for, to get the root access in first place so you don't have to type sudo again.

      Delete
    2. hello
      my common.mak is in read only can't edit neither
      help

      Delete
    3. Answer To How: How To Install Aircrack-Ng On Ubuntu 12.04 >>>>> Download Now

      >>>>> Download Full

      Answer To How: How To Install Aircrack-Ng On Ubuntu 12.04 >>>>> Download LINK

      >>>>> Download Now

      Answer To How: How To Install Aircrack-Ng On Ubuntu 12.04 >>>>> Download Full

      >>>>> Download LINK x7

      Delete
  2. Depues de los make me aparece lo siguiente:


    root@caballerojaguar:~/aircrack/aircrack-ng-1.1# make
    make -C src all
    make[1]: se ingresa al directorio «/home/caballerojaguar/aircrack/aircrack-ng-1.1/src»
    make -C osdep
    make[2]: se ingresa al directorio «/home/caballerojaguar/aircrack/aircrack-ng-1.1/src/osdep»
    Building for Linux
    make[3]: se ingresa al directorio «/home/caballerojaguar/aircrack/aircrack-ng-1.1/src/osdep»
    make[3]: «.os.Linux» está actualizado.
    make[3]: se sale del directorio «/home/caballerojaguar/aircrack/aircrack-ng-1.1/src/osdep»
    make[2]: se sale del directorio «/home/caballerojaguar/aircrack/aircrack-ng-1.1/src/osdep»
    make[1]: se sale del directorio «/home/caballerojaguar/aircrack/aircrack-ng-1.1/src»
    root@caballerojaguar:~/aircrack/aircrack-ng-1.1# make install
    make -C src install
    make[1]: se ingresa al directorio «/home/caballerojaguar/aircrack/aircrack-ng-1.1/src»
    make -C osdep
    make[2]: se ingresa al directorio «/home/caballerojaguar/aircrack/aircrack-ng-1.1/src/osdep»
    Building for Linux
    make[3]: se ingresa al directorio «/home/caballerojaguar/aircrack/aircrack-ng-1.1/src/osdep»
    make[3]: «.os.Linux» está actualizado.
    make[3]: se sale del directorio «/home/caballerojaguar/aircrack/aircrack-ng-1.1/src/osdep»
    make[2]: se sale del directorio «/home/caballerojaguar/aircrack/aircrack-ng-1.1/src/osdep»
    make -C osdep install
    make[2]: se ingresa al directorio «/home/caballerojaguar/aircrack/aircrack-ng-1.1/src/osdep»
    Building for Linux
    make[3]: se ingresa al directorio «/home/caballerojaguar/aircrack/aircrack-ng-1.1/src/osdep»
    make[3]: «.os.Linux» está actualizado.
    make[3]: se sale del directorio «/home/caballerojaguar/aircrack/aircrack-ng-1.1/src/osdep»
    make[2]: se sale del directorio «/home/caballerojaguar/aircrack/aircrack-ng-1.1/src/osdep»
    install -d /usr/local/bin
    install -m 755 aircrack-ng airdecap-ng packetforge-ng ivstools kstats makeivs-ng airdecloak-ng /usr/local/bin
    install -d /usr/local/sbin
    install -m 755 aireplay-ng airodump-ng airserv-ng airtun-ng airbase-ng /usr/local/sbin
    make[1]: se sale del directorio «/home/caballerojaguar/aircrack/aircrack-ng-1.1/src»
    make -C scripts install
    make[1]: se ingresa al directorio «/home/caballerojaguar/aircrack/aircrack-ng-1.1/scripts»
    install -m 755 airmon-ng airdriver-ng airodump-ng-oui-update /usr/local/sbin
    make[1]: se sale del directorio «/home/caballerojaguar/aircrack/aircrack-ng-1.1/scripts»
    make -C manpages install
    make[1]: se ingresa al directorio «/home/caballerojaguar/aircrack/aircrack-ng-1.1/manpages»
    rm -f /usr/local/man/man1/aircrack-ng.1
    rm -f /usr/local/man/man1/airdecap-ng.1
    rm -f /usr/local/man/man1/airdriver-ng.1
    rm -f /usr/local/man/man1/aireplay-ng.1
    rm -f /usr/local/man/man1/airmon-ng.1
    rm -f /usr/local/man/man1/airodump-ng.1
    rm -f /usr/local/man/man1/airserv-ng.1
    rm -f /usr/local/man/man1/airtun-ng.1
    rm -f /usr/local/man/man1/ivstools.1
    rm -f /usr/local/man/man1/kstats.1
    rm -f /usr/local/man/man1/makeivs-ng.1
    rm -f /usr/local/man/man1/airbase-ng.1
    rm -f /usr/local/man/man1/packetforge-ng.1
    rm -f /usr/local/man/man1/airdecloak-ng.1
    rm -f /usr/local/man/man1/airolib-ng.1
    rm -f /usr/local/man/man1/wesside-ng.1
    rm -f /usr/local/man/man1/tkiptun-ng.1
    rm -f /usr/local/man/man1/buddy-ng.1
    rm -f /usr/local/man/man1/easside-ng.1
    install -d /usr/local/man/man1
    install -m 644 aircrack-ng.1 airdecap-ng.1 airdriver-ng.1 aireplay-ng.1 airmon-ng.1 airodump-ng.1 airserv-ng.1 airtun-ng.1 ivstools.1 kstats.1 makeivs-ng.1 airbase-ng.1 packetforge-ng.1 airdecloak-ng.1 /usr/local/man/man1
    make[1]: se sale del directorio «/home/caballerojaguar/aircrack/aircrack-ng-1.1/manpages»

    [*] Run 'airodump-ng-oui-update' as root (or with sudo) to install or update Airodump-ng OUI file (Internet connection required).
    root@caballerojaguar:~/aircrack/aircrack-ng-1.1# airodump-ng-oui-update
    [*] Downloading IEEE OUI file...
    [*] Parsing OUI file...
    [*] Airodump-ng OUI file successfully updated

    que hago???, saludos

    ReplyDelete
  3. Sorry, the previous comment, i writted in spanish :S.

    After of the command "make" i have the next message:

    root@caballerojaguar:~/aircrack/aircrack-ng-1.1# make
    make -C src all
    make[1]: se ingresa al directorio «/home/caballerojaguar/aircrack/aircrack-ng-1.1/src»
    make -C osdep
    make[2]: se ingresa al directorio «/home/caballerojaguar/aircrack/aircrack-ng-1.1/src/osdep»
    Building for Linux
    make[3]: se ingresa al directorio «/home/caballerojaguar/aircrack/aircrack-ng-1.1/src/osdep»
    make[3]: «.os.Linux» está actualizado.
    make[3]: se sale del directorio «/home/caballerojaguar/aircrack/aircrack-ng-1.1/src/osdep»
    make[2]: se sale del directorio «/home/caballerojaguar/aircrack/aircrack-ng-1.1/src/osdep»
    make[1]: se sale del directorio «/home/caballerojaguar/aircrack/aircrack-ng-1.1/src»
    root@caballerojaguar:~/aircrack/aircrack-ng-1.1# make install
    make -C src install
    make[1]: se ingresa al directorio «/home/caballerojaguar/aircrack/aircrack-ng-1.1/src»
    make -C osdep
    make[2]: se ingresa al directorio «/home/caballerojaguar/aircrack/aircrack-ng-1.1/src/osdep»
    Building for Linux
    make[3]: se ingresa al directorio «/home/caballerojaguar/aircrack/aircrack-ng-1.1/src/osdep»
    make[3]: «.os.Linux» está actualizado.
    make[3]: se sale del directorio «/home/caballerojaguar/aircrack/aircrack-ng-1.1/src/osdep»
    make[2]: se sale del directorio «/home/caballerojaguar/aircrack/aircrack-ng-1.1/src/osdep»
    make -C osdep install
    make[2]: se ingresa al directorio «/home/caballerojaguar/aircrack/aircrack-ng-1.1/src/osdep»
    Building for Linux
    make[3]: se ingresa al directorio «/home/caballerojaguar/aircrack/aircrack-ng-1.1/src/osdep»
    make[3]: «.os.Linux» está actualizado.
    make[3]: se sale del directorio «/home/caballerojaguar/aircrack/aircrack-ng-1.1/src/osdep»
    make[2]: se sale del directorio «/home/caballerojaguar/aircrack/aircrack-ng-1.1/src/osdep»
    install -d /usr/local/bin
    install -m 755 aircrack-ng airdecap-ng packetforge-ng ivstools kstats makeivs-ng airdecloak-ng /usr/local/bin
    install -d /usr/local/sbin
    install -m 755 aireplay-ng airodump-ng airserv-ng airtun-ng airbase-ng /usr/local/sbin
    make[1]: se sale del directorio «/home/caballerojaguar/aircrack/aircrack-ng-1.1/src»
    make -C scripts install
    make[1]: se ingresa al directorio «/home/caballerojaguar/aircrack/aircrack-ng-1.1/scripts»
    install -m 755 airmon-ng airdriver-ng airodump-ng-oui-update /usr/local/sbin
    make[1]: se sale del directorio «/home/caballerojaguar/aircrack/aircrack-ng-1.1/scripts»
    make -C manpages install
    make[1]: se ingresa al directorio «/home/caballerojaguar/aircrack/aircrack-ng-1.1/manpages»
    rm -f /usr/local/man/man1/aircrack-ng.1
    rm -f /usr/local/man/man1/airdecap-ng.1
    rm -f /usr/local/man/man1/airdriver-ng.1
    rm -f /usr/local/man/man1/aireplay-ng.1
    rm -f /usr/local/man/man1/airmon-ng.1
    rm -f /usr/local/man/man1/airodump-ng.1
    rm -f /usr/local/man/man1/airserv-ng.1
    rm -f /usr/local/man/man1/airtun-ng.1
    rm -f /usr/local/man/man1/ivstools.1
    rm -f /usr/local/man/man1/kstats.1
    rm -f /usr/local/man/man1/makeivs-ng.1
    rm -f /usr/local/man/man1/airbase-ng.1
    rm -f /usr/local/man/man1/packetforge-ng.1
    rm -f /usr/local/man/man1/airdecloak-ng.1
    rm -f /usr/local/man/man1/airolib-ng.1
    rm -f /usr/local/man/man1/wesside-ng.1
    rm -f /usr/local/man/man1/tkiptun-ng.1
    rm -f /usr/local/man/man1/buddy-ng.1
    rm -f /usr/local/man/man1/easside-ng.1
    install -d /usr/local/man/man1
    install -m 644 aircrack-ng.1 airdecap-ng.1 airdriver-ng.1 aireplay-ng.1 airmon-ng.1 airodump-ng.1 airserv-ng.1 airtun-ng.1 ivstools.1 kstats.1 makeivs-ng.1 airbase-ng.1 packetforge-ng.1 airdecloak-ng.1 /usr/local/man/man1
    make[1]: se sale del directorio «/home/caballerojaguar/aircrack/aircrack-ng-1.1/manpages»

    [*] Run 'airodump-ng-oui-update' as root (or with sudo) to install or update Airodump-ng OUI file (Internet connection required).
    root@caballerojaguar:~/aircrack/aircrack-ng-1.1# airodump-ng-oui-update
    [*] Downloading IEEE OUI file...
    [*] Parsing OUI file...
    [*] Airodump-ng OUI file successfully updated


    what i do??

    ReplyDelete
    Replies
    1. Nothing..you have successfully installed Aircrack!!!

      Delete
  4. can't make changes to common.mak because after opening with text editor says it's read-only

    ReplyDelete
    Replies
    1. Same here. How do I change this?

      Delete
    2. I figured it out. sudo chmod 757 "file"

      Delete
    3. open with nano editor through terminal

      Delete
    4. In command prompt go to the directory where the file is then execute the following command:
      sudo gedit common.mak

      Delete
  5. use sudo to edit to avoid read only problem

    ReplyDelete
  6. in my download folder there is no directory:(

    ReplyDelete
    Replies
    1. same case as mine but then i found that it is already in my home directory ;)

      Delete
  7. just extract it to the home

    ReplyDelete
  8. when i type "make" the following commands are shown,
    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/abdul/aircrack-ng-1.1/src'
    make: *** [all] Error 2
    abdul@ubuntu:~/aircrack-ng-1.1$ make
    make -C src all
    make[1]: Entering directory `/home/abdul/aircrack-ng-1.1/src'
    make -C osdep
    make[2]: Entering directory `/home/abdul/aircrack-ng-1.1/src/osdep'
    Building for Linux
    make[3]: Entering directory `/home/abdul/aircrack-ng-1.1/src/osdep'
    make[3]: `.os.Linux' is up to date.
    make[3]: Leaving directory `/home/abdul/aircrack-ng-1.1/src/osdep'
    make[2]: Leaving directory `/home/abdul/aircrack-ng-1.1/src/osdep'
    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/abdul/aircrack-ng-1.1/src'
    make: *** [all] Error 2

    and when i type sudo make install again i get some error commands displayed as below,
    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/abdul/aircrack-ng-1.1/src'
    make: *** [all] Error 2
    abdul@ubuntu:~/aircrack-ng-1.1$ sudo make install
    make -C src install
    make[1]: Entering directory `/home/abdul/aircrack-ng-1.1/src'
    make -C osdep
    make[2]: Entering directory `/home/abdul/aircrack-ng-1.1/src/osdep'
    Building for Linux
    make[3]: Entering directory `/home/abdul/aircrack-ng-1.1/src/osdep'
    make[3]: `.os.Linux' is up to date.
    make[3]: Leaving directory `/home/abdul/aircrack-ng-1.1/src/osdep'
    make[2]: Leaving directory `/home/abdul/aircrack-ng-1.1/src/osdep'
    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/abdul/aircrack-ng-1.1/src'
    make: *** [install] Error 2

    ReplyDelete
  9. Could you please explain how we're supposed to edit this "common.mak" file. Typing "sudo" doesn't do it.

    ReplyDelete
  10. Type sudo nautilus in terminal. Use that to navigate to common.mak and edit.

    ReplyDelete
  11. Open Console
    > sudo -s
    > cd Downloads/aircrack-ng-1.1
    > gedit common.mak
    > save

    ReplyDelete
  12. Can you please help in saving the common.mak file as i'm not a root. It is opening in read only mode. How to do that as a root

    ReplyDelete
    Replies
    1. open your terminal and type
      'sudo gedit'
      enter your password
      now you can navigate to the file and save it as a root

      Delete
  13. i didn't find any file called common.mak...i only found the files common.c and common.h
    i tried to jump to the next point and it gave me errors..what should i do?

    ReplyDelete
  14. I keep getting an error when i try and do the command "make"
    I have done this twice already and keep coming up with the same errors.

    ReplyDelete
  15. No targets specified and no makefile found. Stop.
    is what i got, can somebody help meh?

    ReplyDelete
  16. Hi, thanka for this fine tutorial. This may be a stupid question, but once you have it installed, how do you start the program? Like, shouldn't there be an icon somewhere? Or an executable that you can double click on?

    ReplyDelete
  17. open terminal
    type sudo su
    enter your password
    run airmon-ng or any other module of the suite

    ReplyDelete
  18. This comment has been removed by the author.

    ReplyDelete
  19. Hey,
    when I type make, it comes a long text and at last line saying "Error 2"
    what should I do?

    ReplyDelete
  20. Error 2 keeps showing for me, anyone resolved this?

    ReplyDelete
  21. The error means openssl is not installed. use the command "sudo apt-get install libssl-dev" to install openssl. worked for me :)

    ReplyDelete
    Replies
    1. unrecognized command line option ‘-Wall-O3’; did you mean ‘-Wall’?
      : recipe for target 'linux.o' failed
      that's what i get after running "sudo apt-get install libssl-dev"
      then "make"

      Delete
  22. when i write :

    Step 5: "tar -zxvf aircrack-ng-1.1.tar.gz"

    it says

    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


    what i do ????

    ReplyDelete
    Replies
    1. The author screwed up. It should be "tar -xzvf aircrack-ng-1.1.tar.gz". This extracts "x" through the gzip "z" filter verbosely "v" a file "f". "tar -xzvf".
      Type "tar --help" to learn more about this powerful tool.

      Delete
  23. I still get the error 2 and I have saved the common.mak fil. What am I doing wrong? I'm new to ubuntu so need all the help I can get :-)

    ReplyDelete
  24. after step 6 I can't understand more to the next steps.. can you give me solution..please

    ReplyDelete
  25. error 2;
    although i installed libssl-dev...

    ReplyDelete
  26. when i run make. this is what i get as main error
    "unrecognized command line option ‘-Wall-O3’; did you mean ‘-Wall’?
    : recipe for target 'linux.o' failed"

    ReplyDelete
  27. Answer To How: How To Install Aircrack-Ng On Ubuntu 12.04 >>>>> Download Now

    >>>>> Download Full

    Answer To How: How To Install Aircrack-Ng On Ubuntu 12.04 >>>>> Download LINK

    >>>>> Download Now

    Answer To How: How To Install Aircrack-Ng On Ubuntu 12.04 >>>>> Download Full

    >>>>> Download LINK

    ReplyDelete