Register    Login    Forum    FAQ

Board index » Hack The Planet » Wireless Hacking, Bluetooth & Security




Post new topic Reply to topic  [ 42 posts ]  Go to page 1, 2, 3, 4, 5  Next
Author Message
 Post subject: The NEW Guide for aircracking!
 Post Posted: 17 May 2009, 00:55 
Offline
5BB Member
5BB Member
User avatar

Joined: 11 Nov 2008, 12:30
Posts: 184
Location: NYC
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= ... 60eea14413
Make 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=mac80211
To 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_aircrack
Code:
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 & Testing

To 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_iw
Code:
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 info

after that refer here on how to WEP crack
http://www.aircrack-ng.org/doku.php?id=simple_wep_crack
and here for WPA/WPA2
http://www.aircrack-ng.org/doku.php?id=cracking_wpa

I am injecting but the IVs don't increase!
go here: http://aircrack-ng.org/doku.php?id=i_am ... t_increase

FAQ
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 pps



Useful Commands - not relating to aircrack

ifconfig - 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 ;)


Last edited by Joker on 08 Nov 2009, 17:51, edited 5 times in total.
Updates


Top 
 Profile  
 
 Post subject: Re: The NEW Guide for aircracking!
 Post Posted: 23 May 2009, 07:11 
Offline
Newbie

Joined: 21 May 2009, 11:34
Posts: 2
Hi, thanx for the guide!

If I understand right this is only the howto kernel upgrade and aircrack install.

I have ubuntu 9.04 with no upgrades so far... Also I didn't enable b43 or STA driver from restricted drivers.
If I select b43 driver will this automatically do all the driver installation with fwcutter and such? Or do I have also get mac80211 patch for my card: Network controller: Broadcom Corporation BCM4311 802.11b/g WLAN (rev 01) after installation of restricted b43 driver?

Thank you for your excellent work.


Top 
 Profile  
 
 Post subject: Re: The NEW Guide for aircracking!
 Post Posted: 25 May 2009, 23:44 
Offline
Newbie

Joined: 25 May 2009, 20:21
Posts: 1
AMAZING!
THANK YOU SO MUCH
You're work is very much appreciated! :)


Top 
 Profile  
 
 Post subject: Re: The NEW Guide for aircracking!
 Post Posted: 27 May 2009, 21:58 
Offline
5BB Member
5BB Member
User avatar

Joined: 11 Nov 2008, 12:30
Posts: 184
Location: NYC
frojnd wrote:
Hi, thanx for the guide!

If I understand right this is only the howto kernel upgrade and aircrack install.

I have ubuntu 9.04 with no upgrades so far... Also I didn't enable b43 or STA driver from restricted drivers.
If I select b43 driver will this automatically do all the driver installation with fwcutter and such? Or do I have also get mac80211 patch for my card: Network controller: Broadcom Corporation BCM4311 802.11b/g WLAN (rev 01) after installation of restricted b43 driver?

Thank you for your excellent work.



by enabling the b43 driver, you are just simply installing it. and yes it will use fwcutter and the correct firmware to install. after you get that done just read this guide and thats it, for b43 injection you only need the mac80211 patch


Top 
 Profile  
 
 Post subject: Re: The NEW Guide for aircracking!
 Post Posted: 28 May 2009, 12:11 
Offline
Newbie

Joined: 15 May 2009, 11:16
Posts: 4
thanks....this is the first complete guide i have come across for patching the mac80211 module, and i have scoured the net for a long time now. thanks.

i have successfully patched (i think!) my mac80211 module prior to this guide however but how do i check if it was successful?
How do I actually check which patch I am running? I can read the patches and understand what they are doing but I have no idea where they are actually going to on my system. I guess I will have to open up a file to take a read but which one?

thanks again.


Top 
 Profile  
 
 Post subject: Re: The NEW Guide for aircracking!
 Post Posted: 28 May 2009, 13:07 
Offline
Newbie

Joined: 25 May 2009, 12:59
Posts: 6
Hello. I have some problems at the end of the tutorial:

First: when i run "ifconfig" and "iwconfig" the following shows (im not connected to any wireless network):

Quote:

root@LAPTOP562:~# iwconfig
lo no wireless extensions.

eth0 no wireless extensions.

eth1 IEEE 802.11bg ESSID:"" Nickname:""
Mode:Managed Frequency:2.412 GHz Access Point: Not-Associated
Bit Rate:54 Mb/s Tx-Power:32 dBm
Retry min limit:7 RTS thr:off Fragment thr:off
Power Managementmode:All packets received
Link Quality=5/5 Signal level=0 dBm Noise level=-74 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0

pan0 no wireless extensions.


root@LAPTOP562:~# ifconfig
eth0 Link encap:Ethernet HWaddr 8-) 8-) : 8-) 8-) : 8-) 8-) : 8-) 8-) : 8-) 8-) : 8-) 8-)
inet addr:192.168.233.245 Bcast:192.168.233.255 Mask:255.255.255.0
inet6 addr: fe80::21a:4bff:fe15:2f20/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:45 errors:0 dropped:0 overruns:0 frame:0
TX packets:27 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:4940 (4.9 KB) TX bytes:4683 (4.6 KB)
Interrupt:20

eth1 Link encap:Ethernet HWaddr 8-) 8-) : 8-) 8-) : 8-) 8-) : 8-) 8-) : 8-) 8-) : 8-) 8-)
inet6 addr: fe80::21a:73ff:fe0c:e112/64 Scope:Link
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Interrupt:19

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:4 errors:0 dropped:0 overruns:0 frame:0
TX packets:4 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:240 (240.0 B) TX bytes:240 (240.0 B)



comparing the MAC adresses my WLAN connection is "ETH1", so... after that i run airmon:

Quote:


root@LAPTOP562:~# airmon-ng start eth1


Found 5 processes that could cause trouble.
If airodump-ng, aireplay-ng or airtun-ng stops working after
a short period of time, you may want to kill (some of) them!

PID Name
2890 NetworkManager
2908 wpa_supplicant
2914 avahi-daemon
2915 avahi-daemon
3852 dhclient


Interface Chipset Driver

eth1 Unknown wl (monitor mode enabled)



after this i do aireplay (if airmon didnt work this doesnt either):

Quote:


root@LAPTOP562:~# aireplay-ng -9 eth1
ioctl(SIOCSIWMODE) failed: Invalid argument

ARP linktype is set to 1 (Ethernet) - expected ARPHRD_IEEE80211,
ARPHRD_IEEE80211_FULL or ARPHRD_IEEE80211_PRISM instead. Make
sure RFMON is enabled: run 'airmon-ng start eth1 <#>'
Sysfs injection support was not found either.



as you can see.. i cant run airmon. How can i solve this? what is the problem here? why are there procesess that cause trouble?

Another question: i have to be disconnected from any wireless network when i do this, isnt it?

thanks a lot


Top 
 Profile  
 
 Post subject: Re: The NEW Guide for aircracking!
 Post Posted: 28 May 2009, 19:56 
Offline
5BB Member
5BB Member
User avatar

Joined: 11 Nov 2008, 12:30
Posts: 184
Location: NYC
gabriell85 wrote:
Hello. I have some problems at the end of the tutorial:

First: when i run "ifconfig" and "iwconfig" the following shows (im not connected to any wireless network):

Quote:

root@LAPTOP562:~# iwconfig
lo no wireless extensions.

eth0 no wireless extensions.

eth1 IEEE 802.11bg ESSID:"" Nickname:""
Mode:Managed Frequency:2.412 GHz Access Point: Not-Associated
Bit Rate:54 Mb/s Tx-Power:32 dBm
Retry min limit:7 RTS thr:off Fragment thr:off
Power Managementmode:All packets received
Link Quality=5/5 Signal level=0 dBm Noise level=-74 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0

pan0 no wireless extensions.


root@LAPTOP562:~# ifconfig
eth0 Link encap:Ethernet HWaddr 8-) 8-) : 8-) 8-) : 8-) 8-) : 8-) 8-) : 8-) 8-) : 8-) 8-)
inet addr:192.168.233.245 Bcast:192.168.233.255 Mask:255.255.255.0
inet6 addr: fe80::21a:4bff:fe15:2f20/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:45 errors:0 dropped:0 overruns:0 frame:0
TX packets:27 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:4940 (4.9 KB) TX bytes:4683 (4.6 KB)
Interrupt:20

eth1 Link encap:Ethernet HWaddr 8-) 8-) : 8-) 8-) : 8-) 8-) : 8-) 8-) : 8-) 8-) : 8-) 8-)
inet6 addr: fe80::21a:73ff:fe0c:e112/64 Scope:Link
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Interrupt:19

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:4 errors:0 dropped:0 overruns:0 frame:0
TX packets:4 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:240 (240.0 B) TX bytes:240 (240.0 B)



comparing the MAC adresses my WLAN connection is "ETH1", so... after that i run airmon:

Quote:


root@LAPTOP562:~# airmon-ng start eth1


Found 5 processes that could cause trouble.
If airodump-ng, aireplay-ng or airtun-ng stops working after
a short period of time, you may want to kill (some of) them!

PID Name
2890 NetworkManager
2908 wpa_supplicant
2914 avahi-daemon
2915 avahi-daemon
3852 dhclient


Interface Chipset Driver

eth1 Unknown wl (monitor mode enabled)



after this i do aireplay (if airmon didnt work this doesnt either):

Quote:


root@LAPTOP562:~# aireplay-ng -9 eth1
ioctl(SIOCSIWMODE) failed: Invalid argument

ARP linktype is set to 1 (Ethernet) - expected ARPHRD_IEEE80211,
ARPHRD_IEEE80211_FULL or ARPHRD_IEEE80211_PRISM instead. Make
sure RFMON is enabled: run 'airmon-ng start eth1 <#>'
Sysfs injection support was not found either.



as you can see.. i cant run airmon. How can i solve this? what is the problem here? why are there procesess that cause trouble?

Another question: i have to be disconnected from any wireless network when i do this, isnt it?

thanks a lot


what is your wlan card's chip-set?


Top 
 Profile  
 
 Post subject: Re: The NEW Guide for aircracking!
 Post Posted: 31 May 2009, 12:27 
Offline
Newbie

Joined: 25 May 2009, 12:59
Posts: 6
Hi. My card is:

Broadcom, chipser "BCM4311KFBG"

When i do "lspci -nn" on the console it says: "Network controller [0280]: Broadcom Corporation BCM4311 802.11b/g WLAN [14e4:4311] (rev 01)"

According to the aircrack tutorial, the 14e4:4311 chipset is supported, isn´t it?

thanks


Top 
 Profile  
 
 Post subject: Re: The NEW Guide for aircracking!
 Post Posted: 01 Jun 2009, 17:40 
Offline
Newbie

Joined: 31 May 2009, 04:43
Posts: 2
Great tutorial. One of the best I've seen, however, I'm having a little trouble.

When using this command:

Code:
make modules_install


I get this error message:

Code:
cp: cannot stat `/usr/src/linux-source-2.6.28/modules.order': No such file or directory
make: *** [_modinst_] Error 1


I followed all directions in Method 2. Everything else was successful except step 10. Any ideas :?: Thanks.


Top 
 Profile  
 
 Post subject: Re: The NEW Guide for aircracking!
 Post Posted: 02 Jun 2009, 08:38 
Offline
5BB Member
5BB Member
User avatar

Joined: 11 Nov 2008, 12:30
Posts: 184
Location: NYC
gabriell85 wrote:
Hi. My card is:

Broadcom, chipser "BCM4311KFBG"

When i do "lspci -nn" on the console it says: "Network controller [0280]: Broadcom Corporation BCM4311 802.11b/g WLAN [14e4:4311] (rev 01)"

According to the aircrack tutorial, the 14e4:4311 chipset is supported, isn´t it?

thanks



is the b43 driver installed?


Top 
 Profile  
 
Display posts from previous:  Sort by  
 
Post new topic Reply to topic  [ 42 posts ]  Go to page 1, 2, 3, 4, 5  Next

Board index » Hack The Planet » Wireless Hacking, Bluetooth & Security


Who is online

Users browsing this forum: Google [Bot] and 3 guests

 
 

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to: