sábado, 16 de junho de 2012

Aircrack on Ubuntu 12.04

System - Sistema

  • Ubuntu 12.04 LTS ($ cat /etc/lsb-release)
    • Kernel 3.2.0-25-generic ($ uname -r)
  • Wireless device TL-WN822N v1.1 ($ nm-tool)
    • Chipset: Atheros ($ lsusb)
    • Driver (for aircrack ): carl9170
 

Installing Aircrack-ng on Ubuntu 12.04

Aircrack-ng was NOT in the Ubuntu 12.04 repository so we have to compile by the source.
 $ sudo 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  

In the aircrack-ng-1.1 directory:
 $ vi common.mak  

Find the line:
 CFLAGS ?= -g -W -Wall -Werror -O3  
and delete the -Werror variable:
 CFLAGS ?= -g -W -Wall -O3  
save and exit.

Run:
 $ make
 $ sudo make install

Installing compat-wireless drivers

Download the last stable release compat wireless driver

I'm using compat-wireless-3.5-rc2-1:
 $ wget http://www.orbit-lab.org/kernel/compat-wireless-3-stable/v3.5/compat-wireless-3.5-rc2-1.tar.bz2 
 $ tar jxvf compat-wireless-3.5-rc2-1.tar.bz2; cd compat-wireless-3.5-rc2-1

NOTE: my driver for aircrack is carl9170 to TL-WN822N v1.1 chipset Atheros. You have to find your own driver. See how I found my aircrack compat wireless driver post.

Compiling the driver:
 $ ./scripts/driver-select carl9170
 $ make
 $ sudo make install
Restart.

Testing

Optional:
  • Install macchanger
  • $ sudo apt-get install macchanger
 $ iwconfig  
Find your wireless device:
 wlan1   IEEE 802.11bgn ESSID:off/any   
          Mode:Managed Access Point: Not-Associated  Tx-Power=20 dBm   
          Retry long limit:7  RTS thr:off  Fragment thr:off  
          Power Management:off  
As you can see interface is wlan1 and mode is managed

Enable monitor mode:
 $ sudo airmon-ng stop wlan1  
 $ sudo ifconfig wlan1 down  
 $ sudo macchanger --mac 00:11:22:33:44:55 wlan1  
 $ sudo airmon-ng start wlan1  
or shortly:
 $ sudo airmon-ng stop wlan1;sudo ifconfig wlan1 down;sudo macchanger --mac 00:11:22:33:44:55 wlan1;sudo airmon-ng start wlan1  
Result:
 ...
 Interface  Chipset    Driver  
 wlan1    Unknown   carl9170 - [phy0]  
         (monitor mode enabled on mon0)  

Checking again:
 $ iwconfig  

 mon0   IEEE 802.11bgn  
          Mode:Monitor Frequency:2.462 GHz Tx-Power=20 dBm   
          Retry long limit:7  RTS thr:off  Fragment thr:off  
          Power Management:off  
As you can see interface now is mon0 and mode is monitor

Nenhum comentário:

Postar um comentário