Rss

  • linkedin

Archives for : Ubuntu 12.04

How to compile Reaver under Ubuntu 12.04 (and aircrack-ng)

This is a quick how-to compile and install Reaver under Ubuntu 12.04

Steps:

  1. download source
  2. install required libraries and tools
  3. download and build aircrack-ng
  4. compile and install
  5. 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'
make -C osdep
make[2]: Entering directory
/home/johan/aircrack-ng-1.1/src/osdep’
Building for Linux
make[3]: Entering directory /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
/home/johan/aircrack-ng-1.1/src/osdep’
make[2]: *** [all] Error 2
make[2]: Leaving directory /home/johan/aircrack-ng-1.1/src/osdep'
make[1]: *** [osd] Error 2
make[1]: Leaving directory
/home/johan/aircrack-ng-1.1/src’
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

Guide: How to make Gobi 2000 Wirless modem work under Ubuntu 12.04

Install 3G-modemet Sierra Wireless, Inc. Gobi 2000 Wireless Modem

This is a how-to install the 3G modem “Sierra Wireless, Inc. Gobi 2000 Wireless Modem” under Ubuntu 12.04 LTS (Precise Pangolin) with basic support for GPS

This guide should work with the following models:

  • Fujitsu CELSIUS H700
  • Fujitsu LIFEBOOK A530 / AH530
  • Fujitsu LIFEBOOK A550 / AH550 (Intel Gfx)
  • Fujitsu LIFEBOOK AH550 (NVidia Gfx)
  • Fujitsu LIFEBOOK E780 (Intel Gfx)
  • Fujitsu LIFEBOOK E780 (NVidia Gfx)
  • Fujitsu LIFEBOOK P3110
  • Fujitsu LIFEBOOK P770
  • Fujitsu LIFEBOOK P8110
  • Fujitsu LIFEBOOK PH530
  • Fujitsu LIFEBOOK S710
  • Fujitsu LIFEBOOK S760
  • Fujitsu LIFEBOOK T4410/ T4310
  • Fujitsu LIFEBOOK T580
  • Fujitsu LIFEBOOK T730
  • Fujitsu LIFEBOOK T900
  • Fujitsu LIFEBOOK TH700
  • Fujitsu LIFEBOOK UH900
  • and other models from HP, Lenovo and others with Sierra Wireless, Inc. Gobi 2000 Wireless Modem

First, control so that you really have the integrated modem in you computer with lsusb

johan@ubuntu-lab:~$ lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 003: ID 1199:9000 Sierra Wireless, Inc. Gobi 2000 Wireless Modem (QDL mode)
Bus 001 Device 004: ID 04f2:b186 Chicony Electronics Co., Ltd
Bus 002 Device 003: ID 08ff:2550 AuthenTec, Inc.
Bus 002 Device 004: ID 1b96:0008 N-Trig
Bus 002 Device 005: ID 1690:0741 Askey Computer Corp. [hex]
Bus 001 Device 005: ID 1234:ffff Unknown

Install the wrapper for Gobi that is needed to load the 3G modem firmware and wine that you need to extract the firmware from the driver for the Microsoft Windows XP/Windows 7 installation packet.

johan@ubuntu-lab:~$ sudo apt-get install gobi-loader wine

Download the drivers from http://support.ts.fujitsu.com/Download/Download.asp?SoftwareGUID=BE060271-9410-4E34-B732-D7D016F9EC27&Filename=FTS_SierraWirelessGobi2000HSUSBMobileBroadband_11180_1053221.zip

Start a terminal and navigate to the path where you saved the download. In my case it’s in ~/Downloads.

johan@ubuntu-lab:~$ cd Downloads/

Extract the archive with command unzip FTS_SierraWirelessGobi2000HSUSBMobileBroadband_11180_1053221.zip

johan@ubuntu-lab:~/Downloads$ unzip FTS_SierraWirelessGobi2000HSUSBMobileBroadband_11180_1053221.zip

Navigate to the folder that just been created

johan@ubuntu-lab:~/Downloads$ cd 72-VR322-15_1.1.180

Use wine and the command msiexec to extract the drivers from the MSI-file. The files will be saved in the “virtual” c: for wine that’s really saved under ~/.wine/drive_c

johan@ubuntu-lab:~/Downloads/72-VR322-15_1.1.180$ wine msiexec /a GobiInstaller.msi /qb TARGETDIR="c:temp"

Create the folder /lib/firmware/gobi and copy the driver to that path

johan@ubuntu-lab:~/Downloads/72-VR322-15_1.1.180$ sudo mkdir /lib/firmware/gobi
johan@ubuntu-lab:~/Downloads/72-VR322-15_1.1.180$ sudo cp ~/.wine/drive_c/temp/Images/Sierra/UMTS/* /lib/firmware/gobi/
johan@ubuntu-lab:~/Downloads/72-VR322-15_1.1.180$ sudo cp ~/.wine/drive_c/temp/Images/Sierra/0/UQCN.mbn /lib/firmware/gobi/

It’s now time to restart the computer to make the 3G modem to load it’s firmware and after that it will be visible in network-manager for example.

GPS

Some models of Gobi 2000 has internal GPS and it’s also possible to use but in my case the 3G modem is disappearing every time I communicate with the GPS and I have not solved that problem yet. If you have any tips that may solve this problem I would be happy.

Install any GPS client of your choice. I have chosen gpsd

johan@ubuntu-lab:~$ sudo apt-get install gpsd gpsd-clients

Configure gpsd

johan@ubuntu-lab:~$ sudo /lib/udev/gpsd.hotplug add /dev/ttyUSB2
johan@ubuntu-lab:~$ sudo dpkg-reconfigure gpsd

Enter /dev/ttyUSB2 as the path to the GPS

Start gpsd

johan@ubuntu-lab:~$ sudo service gpsd start

The GPS wont work until you tell it to do so and you need to manually start it with the following command. Please notice that the 3G modem will stop working as fast as you start to communicate with /dev/ttyUSB2

johan@ubuntu-lab:~$ sudo su -
root@ubuntu-lab:~$ echo "$GPS_START" > /dev/ttyUSB2

To stop the GPS enter the following command

johan@ubuntu-lab:~$ sudo su -
root@ubuntu-lab:~$ echo "$GPS_STOP" > /dev/ttyUSB2

— Johan Ryberg