This is a quick how-to compile and install Reaver under Ubuntu 12.04
Steps:
- download source
- install required libraries and tools
- download and build aircrack-ng
- compile and install
- run =)
Download Source
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.4.tar.gz
Extract the tarball
tar -xzvf reaver-1.4.tar.gz
Install Required Libraries and Tools
Before you can build Reaver you need pcaplib and later on aircrack-ng (iw) to run Reaver
sudo apt-get install libpcap-dev sqlite3 libsqlite3-dev libpcap0.8-dev
Compile and Install
Build Reaver
cd reaver-1.4
cd src
./configure
make
Install Reaver
sudo make install
Download aircrack-ng source and build it
Since Ubuntu 12.04 aircrack-ng is not longer in the repository but you can still download it from source and compile it. It’s only one little tweak that need to be done since it will not build without the following errors.
johan@ubuntu-lab:~/aircrack-ng-1.1$ make
make -C src all
make[1]: Entering directory/home/johan/aircrack-ng-1.1/src'
/home/johan/aircrack-ng-1.1/src/osdep’
make -C osdep
make[2]: Entering directory
Building for Linux
make[3]: Entering directory/home/johan/aircrack-ng-1.1/src/osdep'
/home/johan/aircrack-ng-1.1/src/osdep’
gcc -g -W -Wall -Werror -O3 -D_FILE_OFFSET_BITS=64 -D_REVISION=0 -fPIC -I.. -c -o osdep.o osdep.c
gcc -g -W -Wall -Werror -O3 -D_FILE_OFFSET_BITS=64 -D_REVISION=0 -fPIC -I.. -c -o network.o network.c
gcc -g -W -Wall -Werror -O3 -D_FILE_OFFSET_BITS=64 -D_REVISION=0 -fPIC -I.. -c -o linux.o linux.c
linux.c: In function ‘is_ndiswrapper’:
linux.c:165:17: error: variable ‘unused’ set but not used [-Werror=unused-but-set-variable]
linux.c: In function ‘linux_set_rate’:
linux.c:334:22: error: variable ‘unused’ set but not used [-Werror=unused-but-set-variable]
linux.c: In function ‘linux_set_channel’:
linux.c:807:22: error: variable ‘unused’ set but not used [-Werror=unused-but-set-variable]
linux.c: In function ‘linux_set_freq’:
linux.c:896:22: error: variable ‘unused’ set but not used [-Werror=unused-but-set-variable]
linux.c: In function ‘set_monitor’:
linux.c:1022:22: error: variable ‘unused’ set but not used [-Werror=unused-but-set-variable]
linux.c: In function ‘do_linux_open’:
linux.c:1366:12: error: variable ‘unused_str’ set but not used [-Werror=unused-but-set-variable]
linux.c:1352:15: error: variable ‘unused’ set but not used [-Werror=unused-but-set-variable]
linux.c: In function ‘get_battery_state’:
linux.c:1982:35: error: variable ‘current’ set but not used [-Werror=unused-but-set-variable]
cc1: all warnings being treated as errors
make[3]: *** [linux.o] Error 1
make[3]: Leaving directory
make[2]: *** [all] Error 2
make[2]: Leaving directory/home/johan/aircrack-ng-1.1/src/osdep'
/home/johan/aircrack-ng-1.1/src’
make[1]: *** [osd] Error 2
make[1]: Leaving directory
make: *** [all] Error 2
This is how to build aircrack-ng under Ubuntu 12.04
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
Edit common.mak with vi as example
vi common.mak
Find the following row
CFLAGS ?= -g -W -Wall -Werror -O3
Remove “-Werror” so that it looks like this
CFLAGS ?= -g -W -Wall -O3
Save the file, build and install
make
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
— Johan Ryberg
Om det skiter sej så innan du installerar reaver kör:
sudo apt-get install libsqlite3-dev
så går installationen av reaver fint i ubuntu 12.04..
/Robban 🙂
Finns ett trevligt litet GUI till reaver..
http://sourceforge.net/projects/wpscrackgui/
/Robban 🙂
Hi…
m getting error after deleting -werror.
While “make” it show error something like this:
make -C src all
make[1]: Entering directory
/home/mr_wrong/aircrack-ng-1.1/src'
/home/mr_wrong/aircrack-ng-1.1/src/osdep’make -C osdep
make[2]: Entering directory
Building for Linux
make[3]: Entering directory
/home/mr_wrong/aircrack-ng-1.1/src/osdep'
/home/mr_wrong/aircrack-ng-1.1/src/osdep’gcc -g -W -Wall-O3 -D_FILE_OFFSET_BITS=64 -D_REVISION=0 -fPIC -I.. -c -o linux.o linux.c
cc1: error: unrecognized command line option ‘-Wall-O3’
make[3]: *** [linux.o] Error 1
make[3]: Leaving directory
make[2]: *** [all] Error 2
make[2]: Leaving directory
/home/mr_wrong/aircrack-ng-1.1/src/osdep'
/home/mr_wrong/aircrack-ng-1.1/src’make[1]: *** [osd] Error 2
make[1]: Leaving directory
make: *** [all] Error 2
sorry about the pasting all above there but its showing like this only…
please Help me to solve it..
Thank u.. 🙂
Did you follow the guide?
Remove “-Werror” so that it looks like this:
—
CFLAGS ?= -g -W -Wall -O3
—
// Johan
Befor you start be sure to
sudo ifconfig eth0 down
sudo ifconfig wlan0 down
sudo macchanger -r wlan0
sudo macchanger -r eth0
sudo ifconfig eth0 up
sudo ifconfig wlan0 up
just to be sure you don’t get caught
after following everything and the install working fine the command line is telling me it cant find a mon0?
how to save
Save the file, build and install
make
sudo make install
New build available? =) I not checked since I wrote the howto
the -Werror deleting also is for Debian Wheezy distro 🙂
excuse me sir i dont get do i just type the
vi common.mak
What if I dont have the MAC address of the device?
I am getting this error what to do???
Plz help…..
root@localhost:~# cd /home/aircrack-ng-1.1
root@localhost:/home/aircrack-ng-1.1# make
make -C src all
make[1]: Entering directory
/home/aircrack-ng-1.1/src'
/home/aircrack-ng-1.1/src/osdep’make -C osdep
make[2]: Entering directory
Building for Linux
make[3]: Entering directory
/home/aircrack-ng-1.1/src/osdep'
.os.Linux’ is up to date.make[3]:
make[3]: Leaving directory
/home/aircrack-ng-1.1/src/osdep'
/home/aircrack-ng-1.1/src/osdep’make[2]: Leaving directory
gcc -g -W -Wall -O3 -D_FILE_OFFSET_BITS=64 -D_REVISION=0 -Iinclude aircrack-ng.o crypto.o common.o uniqueiv.o aircrack-ptw-lib.o sha1-sse2.S -o aircrack-ng -lpthread -lssl -lcrypto
/usr/local/lib/libcrypto.a(dso_dlfcn.o): In function
dlfcn_globallookup':
dlopen’dso_dlfcn.c:(.text+0x14): undefined reference to
dso_dlfcn.c:(.text+0x1e): undefined reference to
dlsym'
dlclose’dso_dlfcn.c:(.text+0x26): undefined reference to
/usr/local/lib/libcrypto.a(dso_dlfcn.o): In function
dlfcn_pathbyaddr':
dladdr’dso_dlfcn.c:(.text+0x46): undefined reference to
dso_dlfcn.c:(.text+0x78): undefined reference to
dlerror'
dlfcn_bind_func’:/usr/local/lib/libcrypto.a(dso_dlfcn.o): In function
dso_dlfcn.c:(.text+0x27e): undefined reference to
dlsym'
dlerror’dso_dlfcn.c:(.text+0x2e8): undefined reference to
/usr/local/lib/libcrypto.a(dso_dlfcn.o): In function
dlfcn_bind_var':
dlsym’dso_dlfcn.c:(.text+0x34a): undefined reference to
dso_dlfcn.c:(.text+0x3b0): undefined reference to
dlerror'
dlfcn_unload’:/usr/local/lib/libcrypto.a(dso_dlfcn.o): In function
dso_dlfcn.c:(.text+0x3ec): undefined reference to
dlclose'
dlfcn_load’:/usr/local/lib/libcrypto.a(dso_dlfcn.o): In function
dso_dlfcn.c:(.text+0x454): undefined reference to
dlopen'
dlclose’dso_dlfcn.c:(.text+0x488): undefined reference to
dso_dlfcn.c:(.text+0x4a4): undefined reference to
dlerror'
/home/aircrack-ng-1.1/src’collect2: ld returned 1 exit status
make[1]: *** [aircrack-ng] Error 1
make[1]: Leaving directory
make: *** [all] Error 2
root@localhost:/home/aircrack-ng-1.1#
What OS are you using?
Hi Yohan,
Tkx for this blog really I appreciate it.
So I’ve tried all those steps and it was a succes until the last when. Indeed, I got stuck with this message “[+] Waiting for beacon from xx… without any reseults. So what shall I do next ?
Thank you in advance.
sir step 2 is not working for me i’m getting error”e:unable to locate package libpcap-dev e:unable to locate package sqlite3 e:unable to locate package libsqlite3-dev e: package libpcap0.8-dev has no installation candidate
I’m using Ubuntu 14.04. The compile process works fine, but when I launch the “wash” program it exits immediately with no output! Of course my wireless card is setted in monitor mode and works fine with the aircrack suite. Thanks for your help.