{"id":13,"date":"2009-05-28T22:26:32","date_gmt":"2009-05-29T04:26:32","guid":{"rendered":"http:\/\/blog.escarra.org\/?p=13"},"modified":"2016-07-20T08:23:10","modified_gmt":"2016-07-20T14:23:10","slug":"messing-with-wep-part-ii","status":"publish","type":"post","link":"https:\/\/blog.escarra.org\/?p=13","title":{"rendered":"Messing with WEP &#8211; Part II"},"content":{"rendered":"<p>This is where it gets fun. In this part, we&#8217;ll set our wireless interface to monitor mode, and we&#8217;ll start sniffing some packets and dumping the captures into a file for further analysis.<\/p>\n<p>To start, we have to list the available wireless interfaces to the system. Hopefully your card is compatible and has a driver already loaded. Let&#8217;s fire up Konsole (a terminal application), which is the third icon from the bottom-left, and we&#8217;ll type:<\/p>\n<p><strong>iwconfig<\/strong><br \/>\n<img data-attachment-id=\"15\" data-permalink=\"https:\/\/blog.escarra.org\/?attachment_id=15\" data-orig-file=\"https:\/\/blog.escarra.org\/wp-content\/uploads\/2009\/05\/picture-21.png\" data-orig-size=\"589,277\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}\" data-image-title=\"picture-21\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/blog.escarra.org\/wp-content\/uploads\/2009\/05\/picture-21.png\" data-large-file=\"https:\/\/blog.escarra.org\/wp-content\/uploads\/2009\/05\/picture-21.png\" decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-15\" title=\"picture-21\" src=\"http:\/\/blog.escarra.org\/wp-content\/uploads\/2009\/05\/picture-21.png\" alt=\"picture-21\" width=\"353\" height=\"166\" \/><\/p>\n<p>This will throw us back the list of wireless interfaces. iwconfig is similar to ifconfig, and easy to remember because of the single letter change.<br \/>\nOnce we determined that our wireless card is there, and what it&#8217;s name is, we&#8217;ll set it into monitor mode by running:<\/p>\n<p><strong>airmon-ng start wlan0<\/strong><\/p>\n<p>Obviously, replace wlan0 for whatever your interface name is.<br \/>\nAfter we set the card in monitor mode, we&#8217;ll be given an alternate interface name usually in the form of mon[x]. We&#8217;ll be using that interface to sniff packets.<br \/>\nNext, let&#8217;s do a short site survey to see what&#8217;s really around us. We&#8217;ll run airodump-ng to do this as follows:<\/p>\n<p><strong>airodump-ng mon0<\/strong><\/p>\n<p><img data-attachment-id=\"16\" data-permalink=\"https:\/\/blog.escarra.org\/?attachment_id=16\" data-orig-file=\"https:\/\/blog.escarra.org\/wp-content\/uploads\/2009\/05\/picture-4.png\" data-orig-size=\"654,245\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}\" data-image-title=\"picture-4\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/blog.escarra.org\/wp-content\/uploads\/2009\/05\/picture-4.png\" data-large-file=\"https:\/\/blog.escarra.org\/wp-content\/uploads\/2009\/05\/picture-4.png\" decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-16\" title=\"picture-4\" src=\"http:\/\/blog.escarra.org\/wp-content\/uploads\/2009\/05\/picture-4.png\" alt=\"picture-4\" width=\"392\" height=\"147\" \/><\/p>\n<p>This will give us the list of AP&#8217;s and stations close to us, and if your card supports it, a signal strength and receive quality indicator. It&#8217;s best that your receive quality is close to 100, as this will help when injecting packets later on&#8230;<br \/>\nIf you see, the Channel keeps varying, this is because we&#8217;re surveying the entire spectrum for available networks. Once we find the one we&#8217;d like to peek into, it&#8217;s very important to lock the card in that channel so we can listen to the maximum number of packets.<br \/>\nLet&#8217;s lock the card into channel 1 so we can hear that AP better&#8230; we do that by using iwconfig again:<\/p>\n<p><strong>iwconfig wlan0 channel 1<\/strong><\/p>\n<p>And then let&#8217;s see the results:<\/p>\n<p><strong>airodump-ng &#8211;channel 1 mon0<\/strong><\/p>\n<p>Hopefully now there will be beacons more often (which are useless, but good indicator that we have signal, the faster they flow the better).<br \/>\nWe&#8217;ll set the proper airodump-ng parameters so we lock to a specific Channel, specific AP (or BSSID), and we write the captured IV&#8217;s into a file that we can use&#8230;<\/p>\n<p><strong>airodump-ng &#8211;ivs &#8211;write \/root\/capture &#8211;bssid 00:12:17:05:92:5D &#8211;channel 1 mon0<\/strong><\/p>\n<p>By doing this, we&#8217;ll start listening to ALL network traffic going and coming out of that specific AP. If the network is pretty active, we should see the &#8220;#Data&#8221; counter go up, which is exactly what we want. The more &#8220;Data&#8221; the faster we can get that WEP key.<br \/>\nJust to give you an idea, it&#8217;s very unlikely you&#8217;ll get far with anything less than 50000 IV&#8217;s (&#8220;Data&#8221;). This is why on the next section I&#8217;ll go over how to inject packets to generate fake traffic and get that Data counter up to something usable in minutes.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This is where it gets fun. In this part, we&#8217;ll set our wireless interface to monitor mode, and we&#8217;ll start sniffing some packets and dumping the captures into a file for further analysis. To start, we have to list the available wireless interfaces to the system. Hopefully your card is compatible and has a driver [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"footnotes":"","_jetpack_memberships_contains_paid_content":false,"jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false}}},"categories":[11],"tags":[5,6,7],"jetpack_publicize_connections":[],"aioseo_notices":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/blog.escarra.org\/index.php?rest_route=\/wp\/v2\/posts\/13"}],"collection":[{"href":"https:\/\/blog.escarra.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.escarra.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.escarra.org\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.escarra.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=13"}],"version-history":[{"count":5,"href":"https:\/\/blog.escarra.org\/index.php?rest_route=\/wp\/v2\/posts\/13\/revisions"}],"predecessor-version":[{"id":664,"href":"https:\/\/blog.escarra.org\/index.php?rest_route=\/wp\/v2\/posts\/13\/revisions\/664"}],"wp:attachment":[{"href":"https:\/\/blog.escarra.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=13"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.escarra.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=13"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.escarra.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=13"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}