In this Tutorial I will explain how to install aircrack-ng suit, also it will cover the necessary steps to make aircracking work. This guide is for Linux only, since Linux has much better support than other operating systems. I am making this guide Ubuntu specific, for other distributions of Linux the required package names and installation might wary. General research on aircrack-ng is highly recommended.
Before we begin make sure your wireless card is supported by aircrack-ng.
Check here:
http://www.aircrack-ng.org/doku.php?id= ... 60eea14413Make sure you use the latest mac80211 stack drivers.
(Installation of Wifi cards is soon to come)
Introduction When the wireless card is fully compatible(raw monitoring mode), it must be able to inject packets back to AP. In order for this to happen, patching is required. Usually only one patch is required to be applied to the kernel source, this will depend on the wireless card.
Check here:
http://www.aircrack-ng.org/doku.php?id=mac80211To see if any other patches are needed. If other patches are needed, don't forget to also compile the module you have patched!
Basically what the patch does is increase the injection speed, and make the fragmentation work. The patches might not work on every kernel. At the time of writing this paper, kernel 2.6.31.5 is supported by the latest mac80211 patch. It is recommended that you use the latest kernel which the patch supports.
*Since Ubuntu is now shipped with the 2.6.31.x kernel (Ubuntu 9.10), we can simply install the kernel source package. After that we can apply the patches to the kernel source and then compile only the modules we modified. This process will be much quicker. If you would like to do this way, read
Method 2 of compiling.
Compiling - Method 1 (recommended)
We will have to compile the kernel from source.
The easy way of making this work is applying the patches to the modules before compiling the new kernel.
*Most of the work from here on will be done from the command-line, so open up a terminal (Applications > Accessories > Terminal)
1. Install the utilities needed to configure the kernel
Code:
sudo apt-get install build-essential bin86 kernel-package libqt3-headers libqt3-mt-dev wget libncurses5 libncurses5-dev
2. Move to the configuration directory
Code:
cd /usr/src
3. Make yourself the omnipotent root
Code:
sudo -s
4. Now we are going to download the kernel and unpack it
Code:
wget -c http://kernel.org/pub/linux/kernel/v2.6/linux-2.6.31.5.tar.bz2 && tar -xvjf linux-2.6.31.5.tar.bz2
5. Now move to the Linux directory:
Code:
cd /usr/src/linux-2.6.31.5
6. Now import your current kernel configuration and get your current kernel options:
Code:
cp /boot/config-$(uname -r) .config && yes "" | make oldconfig
7. Configure the kernel:
Code:
make xconfig
Or for a terminal-based version:
Code:
make menuconfig
8. Now we will download and apply the patches:
Code:
wget http://patches.aircrack-ng.org/mac80211_2.6.28-rc4-wl_frag+ack_v3.patch && patch -p1 < mac80211_2.6.28-rc4-wl_frag+ack_v3.patch
9. Finally, it's time to build the kernel: Make sure that you are in /usr/src/linux with full root access.
Start compiling to create a compressed kernel image, enter:
note: add -j4", for multi-core users to speed up compilation.
Code:
make
Install kernel modules:
Code:
make modules_install
10. Install kernel
So far we have compiled kernel and installed kernel modules. It is time to install kernel itself.
Code:
make install
It will install three files into /boot directory as well as modification to your kernel grub configuration file:
* System.map-2.6.3x.x
* config-2.6.3x.x
* vmlinuz-2.6.3x.x
11. Create an initrd image
Type the following command at a shell prompt:
Code:
update-initramfs -ck 2.6.31.5
initrd images contains device driver which needed to load rest of the operating system later on. (
note the Linux kernel version might change)
12. Update The Grub configuration file
Code:
update-grub
You can also manually modify and view the configuration file,
Code:
sudo gedit /boot/grub/menu.lst
13. Now reboot.
Compiling - Method 2 (fastest)
We will be using the latest 2.6.28.x mac80211 frag+ack patch.
*Most of the work from here on will be done from the command-line, so open up a terminal (Applications > Accessories > Terminal)
1. Install the utilities needed to configure the kernel
Code:
sudo apt-get install build-essential bin86 kernel-package libqt3-headers libqt3-mt-dev wget libncurses5 libncurses5-dev
2. Install linux-source
Code:
sudo apt-get install linux-source
3. Make yourself the omnipotent root
Code:
sudo -s
4. Move to the configuration directory
Code:
cd /usr/src
5. Extract the linux-source
Code:
tar -xvjf linux-source-2.6.31.tar.bz2
6. Now move to the Linux directory:
Code:
cd /usr/src/linux-source-2.6.31
7. Now import your current kernel configuration and get your current kernel options:
Code:
cp /boot/config-$(uname -r) .config && yes "" | make oldconfig
8. Now we will download and apply the patch:
Code:
wget http://patches.aircrack-ng.org/mac80211_2.6.28-rc4-wl_frag+ack_v3.patch && patch -p1 < mac80211_2.6.28-rc4-wl_frag+ack_v3.patch
9a. Now we compile the module we modified:
Code:
make net/mac80211/mac80211.ko
9b. Create modules.order
Code:
echo > modules.order
10. Install kernel modules:
Code:
make modules_install
11. Now reboot.
___________________________________________________________________
Installing Aircrack-ng*Before we install Aircrack-ng make sure you have libsqlite3-0 and libssl-dev installed!
To install from the Ubuntu Repository, you can run:
Code:
sudo apt-get install libsqlite3-0 libssl-dev
Install Aircrack-ng 1.0

for more info go to
http://www.aircrack-ng.org/doku.php?id=install_aircrackCode:
wget http://download.aircrack-ng.org/aircrack-ng-1.0.tar.gz
tar -zxvf aircrack-ng-1.0.tar.gz
cd aircrack-ng-1.0
make
make install
________________________________________________________________
Monitor Mode & TestingTo use your card for aircracking it must be placed in monitor mode.
This way, you can monitor on mon0 while still being associated on to you wireless card's interface.
Airmon-ng and a tool called Iw manages the interface. Iw is not part of the aircrack-ng suite and must be installed separately.
We will need to install a few dependencies first.
- libnl1 and libnl-dev is needed for iw,
To install from the Ubuntu Repository, you can run:
Code:
sudo apt-get install libnl-dev
- Install iw, for info go here
http://www.aircrack-ng.org/doku.php?id= ... talling_iwCode:
sudo wget http://wireless.kernel.org/download/iw/iw-0.9.17.tar.bz2
sudo tar -xvjf iw-0.9.17.tar.bz2
cd iw-0.9.17
sudo make
sudo make install
- Instead of setting monitor mode on you cards interface, create mon0 using
Code:
sudo airmon-ng start wlan0
"wlan0" should be replaced by your wireless cards interface name.
If you don't know the interface, run
Code:
ifconfig
for more information go to
http://www.aircrack-ng.org/doku.php?id=airmon-ng- Test
Code:
sudo aireplay-ng -9 mon0
and see if injection works.
After that, use "mon0' for all moninjection tasks.
________________________________________________________________________
Miscellaneous programs and infoafter that refer here on how to WEP crackhttp://www.aircrack-ng.org/doku.php?id=simple_wep_crackand here for WPA/WPA2http://www.aircrack-ng.org/doku.php?id=cracking_wpaI am injecting but the IVs don't increase!go here:
http://aircrack-ng.org/doku.php?id=i_am ... t_increaseFAQ http://www.aircrack-ng.org/doku.php?id=faq You can control the injection speed with aireplay-ng -x 'number'
1024 is the max, 500 is the default ppsUseful Commands - not relating to aircrackifconfig - lists IP address (similar to ipconfig in Windows)
iwlist scan - shows wireless networks that are available in the area along with basic encryption information
lshw -C network - Shows interface and driver associated with each networking device
lspci -nn - Shows hardware connected to the pci bus
lsusb - Shows USB connected hardware
lshw -C usb - Additional info on USB related hardware (good for USB dongles)
cat /etc/modprobe.d/blacklist - List modules that will not be loaded by the Operating System at boot time
lsmod - lists currently loaded kernel modules. (Example usage - lsmod | grep ndiswrapper)
route -n - Lists kernel IP routing table -- Good for troubleshooting problems with the gateway (netstat -rn = equivalent command)
sudo route add default gw 192.168.1.1 - Example of how to set the default gateway to 192.168.1.1
sudo route del default gw 192.168.1.1 - Example of how to delete the default gateway setting
sudo modprobe ***** - Loads the kernel module **** . (Example usage - sudo modprobe ndiswrapper, sudo modprobe r818x, sudo modprobe ath_pci)
sudo modprobe -r **** - Unloades the kernel module ****. (Example usage - sudo modprobe -r ndiswrapper)
sudo ifup/ifdown <interface> - Brings up/down the interface and clears the routing table for the specified interface
sudo ifconfig <interface> up/down - Brings up/down the interface for the specified interface
sudo dhclient <interface> - Request IP address from DNS server for specified interface
sudo dhclient -r <interface> - Release IP address associated with specified interface
sudo iptables -L - Lists firewall rules
dmesg | less - Lists boot log -- good for troubleshooting problems with modules/drivers not being loaded
uname -r - Displays kernel version
/etc/iftab (Feisty and pre-releases (Edgy, etc)) - /etc/udev/rules.d/70-persistent-net.rules (Gutsy) - File which assigns logical names (eth0, wlan0, etc) to MAC addresses
cat /etc/resolv.conf - Lists DNS servers associated with network connections (Network Manager)
/etc/dhcp3/dhclient.conf - File which sets or modifies dns (domain name servers) settings
Comments, Sugestions or Problems make a post!AND THATS IT
