You already know that if you want to lock down your Wi-Fi network, you should opt for WPA encryption because WEP is easy to crack. But did you know how easy? Take a look.
Originally published last year, we wanted to revisit Gina's awesome guide to cracking Wi-Fi WEP passwords for Evil Week. Alternatively, if you're not in a reading mood, check out
the video version.
Today we're going to run down, step-by-step, how to crack a Wi-Fi network with WEP security turned on. But first, a word: Knowledge is power, but power doesn't mean you should be a jerk, or do anything illegal. Knowing how to pick a lock doesn't make you a thief. Consider this post educational, or a proof-of-concept intellectual exercise.
Dozens of tutorials on how to crack WEP are already all over the internet using this method. Seriously—Google it. This ain't what you'd call "news." But what is surprising is that someone like me, with minimal networking experience, can get this done with free software and a cheap Wi-Fi adapter. Here's how it goes.
What You'll Need
Unless you're a computer security and networking ninja, chances are you don't have all the tools on hand to get this job done. Here's what you'll need:
- A compatible wireless adapter—This is the biggest requirement. You'll need a wireless adapter that's capable of packet injection, and chances are the one in your computer is not. After consulting with my friendly neighborhood security expert, I purchased an Alfa AWUS050NH USB adapter, pictured here, and it set me back about $50 on Amazon. Update: Don't do what I did. Get the Alfa AWUS036H, not the US050NH, instead. The guy in this video below is using a $12 model he bought on Ebay (and is even selling his router of choice). There are plenty of resources on getting aircrack-compatible adapters out there.
- A BackTrack 3 Live CD. We already took you on a full screenshot tour of how to install and use BackTrack 3, the Linux Live CD that lets you do all sorts of security testing and tasks. Download yourself a copy of the CD and burn it, or load it up in VMware to get started. (I tried the BackTrack 4 pre-release, and it didn't work as well as BT3. Do yourself a favor and stick with BackTrack 3 for now.)
- A nearby WEP-enabled Wi-Fi network. The signal should be strong and ideally people are using it, connecting and disconnecting their devices from it. The more use it gets while you collect the data you need to run your crack, the better your chances of success.
- Patience with the command line. This is an ten-step process that requires typing in long, arcane commands and waiting around for your Wi-Fi card to collect data in order to crack the password. Like the doctor said to the short person, be a little patient.
Crack That WEP
To crack WEP, you'll need to launch Konsole, BackTrack's built-in command line. It's right there on the taskbar in the lower left corner, second button to the right. Now, the commands.
First run the following to get a list of your network interfaces:
airmon-ng
The only one I've got there is labeled ra0
. Yours may be different; take note of the label and write it down. From here on in, substitute it in everywhere a command includes (interface).
Now, run the following four commands. See the output that I got for them in the screenshot below.
airmon-ng stop (interface)
ifconfig (interface) down
macchanger --mac 00:11:22:33:44:55 (interface)
airmon-ng start (interface)
If you don't get the same results from these commands as pictured here, most likely your network adapter won't work with this particular crack. If you do, you've successfully "faked" a new MAC address on your network interface, 00:11:22:33:44:55.
Now it's time to pick your network. Run:
airodump-ng (interface)
To see a list of wireless networks around you. When you see the one you want, hit Ctrl+C to stop the list. Highlight the row pertaining to the network of interest, and take note of two things: its BSSID and its channel (in the column labeled CH), as pictured below. Obviously the network you want to crack should have WEP encryption (in the ENC) column, not WPA or anything else.
Like I said, hit Ctrl+C to stop this listing. (I had to do this once or twice to find the network I was looking for.) Once you've got it, highlight the BSSID and copy it to your clipboard for reuse in the upcoming commands.
Now we're going to watch what's going on with that network you chose and capture that information to a file. Run:
airodump-ng -c (channel) -w (file name) --bssid (bssid) (interface)
Where (channel) is your network's channel, and (bssid) is the BSSID you just copied to clipboard. You can use the Shift+Insert key combination to paste it into the command. Enter anything descriptive for (file name). I chose "yoyo," which is the network's name I'm cracking.
You'll get output like what's in the window in the background pictured below. Leave that one be. Open a new Konsole window in the foreground, and enter this command:
aireplay-ng -1 0 -a (bssid) -h 00:11:22:33:44:55 -e (essid) (interface)
Here the ESSID is the access point's SSID name, which in my case is yoyo
. What you want to get after this command is the reassuring "Association successful" message with that smiley face.
You're almost there. Now it's time for:
aireplay-ng -3 -b (bssid) -h 00:11:22:33:44:55 (interface)
Here we're creating router traffic to capture more throughput faster to speed up our crack. After a few minutes, that front window will start going crazy with read/write packets. (Also, I was unable to surf the web with the yoyo
network on a separate computer while this was going on.) Here's the part where you might have to grab yourself a cup of coffee or take a walk. Basically you want to wait until enough data has been collected to run your crack. Watch the number in the "#Data" column—you want it to go above 10,000. (Pictured below it's only at 854.)
Depending on the power of your network (mine is inexplicably low at -32 in that screenshot, even though the yoyo
AP was in the same room as my adapter), this process could take some time. Wait until that #Data goes over 10k, though—because the crack won't work if it doesn't. In fact, you may need more than 10k, though that seems to be a working threshold for many.
Once you've collected enough data, it's the moment of truth. Launch a third Konsole window and run the following to crack that data you've collected:
aircrack-ng -b (bssid) (file name-01.cap)
Here the filename should be whatever you entered above for (file name). You can browse to your Home directory to see it; it's the one with .cap as the extension.
If you didn't get enough data, aircrack will fail and tell you to try again with more. If it succeeds, it will look like this:
The WEP key appears next to "KEY FOUND." Drop the colons and enter it to log onto the network.
Problems Along the Way
With this article I set out to prove that cracking WEP is a relatively "easy" process for someone determined and willing to get the hardware and software going. I still think that's true, but unlike the guy in the video below, I had several difficulties along the way. In fact, you'll notice that the last screenshot up there doesn't look like the others—it's because it's not mine. Even though the AP which I was cracking was my own and in the same room as my Alfa, the power reading on the signal was always around -30, and so the data collection was very slow, and BackTrack would consistently crash before it was complete. After about half a dozen attempts (and trying BackTrack on both my Mac and PC, as a live CD and a virtual machine), I still haven't captured enough data for aircrack to decrypt the key.
So while this process is easy in theory, your mileage may vary depending on your hardware, proximity to the AP point, and the way the planets are aligned. Oh yeah, and if you're on deadline—Murphy's Law almost guarantees it won't work if you're on deadline.
To see the video version of these exact instructions, check out this dude's YouTube video.
Got any experience with the WEP cracking courtesy of BackTrack? What do you have to say about it? Give it up in the comments.
Gina Trapani, Lifehacker's founding editor, is tired of typing commands that start with "air." Her weekly feature, Smarterware, appears every Wednesday on Lifehacker. Subscribe to the Smarterware tag feed to get new installments in your newsreader.
Contact information for this author is not available.
Oct 25, 2010 01:00 PM
1,612,431
User action
Thread action
Not illegal or morally wrong, just questionable. Reply
However, I think they should exercise professionalism. By publishing these, you *are* encouraging people to try them out. You *are* encouraging illegal activity. "Cracking" into someone's wireless is illegal, and people have been busted for illegally using another's WiFi.
Let's acknowledge all of that and ask, "Is this article something a professional website should be publishing?"
Leave this stuff to the shadier sites. Reply
It is a well written, easy to understand explaination on how to crack a WEP network. It also points out that there is a fine line between education and a felony.
I think it is a great article in it's genre, and I also don't think the genre misfits Lifehacker.
Just my opinion feel free to discuss. Reply
Unless you have someone create one that you have the authority to try to break into. But then, what's the point? It's just an exercise in possibility.
If you actually put this technique into practice, there is no fine line at all -- it's illegal. Reply
There is no stronger way to prove that something is vulnarable then to break into it right?
In any case I think that with great power comes great responsibility, and this is a way for me to excersise and gain more knowledge about WiFi networks and how their security works. I would never break into someones network and I'm quite sure that the majority of frequent readers also wouldn't.
This information is also publicly available elsewhere on the internet, and like the editor said this is by no means new. Also as this fits into evil week I think it is no problem at all to post it.
Also of all methods to break into a WEP secured network this is one that takes a lot of time, there are a lot of easier methods of getting the job done, and I think this is more for the people that want to brush up on their terminal abilities rather then void someones privacy. Reply
"Today we're going to run down, step-by-step, how to crack a Wi-Fi network with WEP security turned on. But first, a word: Knowledge is power, but power doesn't mean you should be a jerk, or do anything illegal. Knowing how to pick a lock doesn't make you a thief. Consider this post educational, or a proof-of-concept intellectual exercise." Reply
However we should all use wpa-psk, ideally with even more encryption on top of that also. Reply
Router manufacturers know it's useless but it makes people feel better to have it so it keeps being included. Sort of like making medicine taste bad because people think good-tasting medicine isn't going to be as effective. Reply
Glad my neighbor with the open router left the default passwords, too, so I could blacklist my daughter's machine. Reply
Of course, if your neighbour had configured it correctly to begin with you wouldn't have even needed it. Still, that's hilarious. Reply
Linksys routers default the network to unsecured and not password-protected, with the router login info "linksys" for username and "admin" for the password.
Both Netgear and Cisco routers default to unencrypted unsecured networks too, with the router password left blank.
Yes, that means that anyone who sees a wireless network named Linksys, Netgear, or similar, can hijack it by logging into the router and password-protecting it and the network.
I have never come across a situation where I've needed to crack WEP, if I have to cheese off of someone else I'd rather do so on a network where I know I can log into the router and clear its cache and/or event log afterwards.
Just a few days ago I changed the name of my friend's wireless network from my iPhone just to prove a point.
The lesson is: Password-protect and encrypt your network and password-protect your router! Reply
Why would they use the SSID?! Reply
I have no idea why it was done that way, but we have to live with it. Best thing we can do is avoid common SSIDs to mitigate the risk.
For reference, the thousand most common SSIDs: [www.wigle.net] (note the prevalence of default router SSIDs) Reply
[www.appbrain.com] Reply
6 Reasons Why You Should Secure your Wi-Fi Network (and how to do it)
[hubpages.com] Reply
Strangely, the one that works as it should is a Microsoft-branded PCMCIA adapter that I've only been able to get working with ndiswrapper. Reply
My home network is still WEP because I canNOT get WPA to work. Reply
There's a new Ubuntu help forum at www.askubuntu.com. Post your issue there with all the detail you can and you should get some informed replies. Reply
Perhaps its with the network manager. I do remember searching specifically about the network manager. (I'm not at home right now.)
In any case, apparently it's NOT as big a problem as I had thought, so it's not big enough for a lifehacker article! But I will check the forums. thanks! Reply
I can't believe we're still having this conversation 7 yrs after WEP was first cracked. In the last few years, it has become easier AND faster to hack a WEP key than to look up and type it in. It isn't even a challenge for 10% of the population anymore.
OTOH, It isn't very hard to use a strong AES key with WPA2 either - the if the key is 30 characters and not in a dictionary, that makes it 99.9% uncrackable. Anytime you use radio connections, you can be cracked if someone wants to do the work. At least with WPA+AES, it will take many months with hundreds (or more) of CPUs. Reply
I think you can go overboard with security, but I still throw the deadbolt when I'm away or asleep. It doesn't mean I don't trust my neighbors. It does mean I am willing to believe there might be people out there who care more about their wants/needs than about my safety/property rights.
Just secure the network. Or be prepared to live with the consequences, should they bite you. Reply
See it at [vimeo.com] Reply
Better: get a modern router that allows you to run the DD-WRT firmware (or similar). These routers are very cheap. Create a virtual device and set its security to WEP and have it seperated from your regular network (there are lots of guides for this).
This way you have two access points showing up. Your regular WPA(1/2) access point with full internet and local network access and a second one with WEP on the same channel, that only allows WAN access (internet). Another benefit is, that you can deactivate it, when you don't use it. Reply
Plus, it's sad to see that Gina is now just a script kiddie.
Oh well. Reply
If you intentionally passed traffic over my network w/o consent, then yes, you did break the law.
If I leave my door open and you walk into my house without my having invited you, you are still trespassing. That's how I'd argue it in court. Who knows, you might get lucky.
Don't take my word for it:
[en.wikipedia.org]
[answers.yahoo.com] Reply
He doesn't need to get lucky, most likely the judge is just going to roll their eyes at you and ask why you're wasting the courts time with this trivial nonsense. Even your own sources downplay any liability, and you cited yahoo answers for frogs sake... and even it doesn't agree:
"However, theory aside, in effect, in most cases it would be difficult to prove and quantify the damage caused due to the usage of the wireless network. It would also difficult to prove the mens rea, purpose, required in the said offenses. This is because in many cases the connection to the wireless network is carried out automatically by the computer and the user only discovers this after a while, if at all." Reply
He doesn't need to get lucky, most likely the judge is just going to roll their eyes at you and ask why you're wasting the courts time with this trivial nonsense. Not if I quantify damages. Not if the FBI is looking for kiddie porn or the RIAA is after 1Tb of intellectual property being shared.
Again, if you want to break the law, go ahead. I've been to jail, so I don't take it quite so lightly. Reply
1. Actively cracking someone else's encryption is a felony in the US. If you're injecting packets, and they are logging, that could be enough to prosecute, assuming other evidence could prove the source. At businesses where I've worked, that logging existed at several levels and was connected to monitoring systems. Connecting to someone else's unprotected network without explicit consent is also a felony. Enjoy.
2. "WEP isn't safe" is bullshit. Used in conjunction with other methods, it's a simple way of deterring the casual break-in. WPA is relatively easy to crack under certain conditions also. Using RADIUS and a short key duration (say, 20 minutes) is a simple (and free) way of augmenting WEP. Using authentication is a start. Segmenting your network is another way - multiple ACLs, and avoiding the laziness of using defaults can go a long way. Unless someone is pretty skilled, they will look suspicious early in their attack - because they do not know the "lay of the land."
3. At most people's homes / businesses / out in the world - it's the CLIENT that's leaking the information most easily used to crack a connection. Turn on Wireshark and watch the plaintext output. Windows is very chatty and candid by default. It wants to tell everyone around it who it is and what it is. Shut off file and print sharing when you are use public wifi. Delete wifi profiles from your client, after you have exported them to a file. Import them and only use them as needed.
DON'T EVER RELY ON A SINGLE SECURITY MEASURE. IT WILL FAIL. Reply
1: "Connecting to someone else's unprotected network without explicit consent is also a felony." - nope
2: "WPA is relatively easy to crack under certain conditions also. " - nope, for any reasonable setup
2: ""WEP isn't safe" is bullshit. Used in conjunction with other methods, it's a simple way of deterring the casual break-in." - nope, it's not the 'casual' intrusions you need to worry about, and it only takes one 'non-casual' to have your bank account drained.
3: ok, you got something right Reply
2. What's reasonable? Using a common, English dictionary word as your PSK? STFU. You fail at discussion.
3. Casual crimes are far more statistically likely. My point is that any encryption needs to be a layered approach, which you've completely ignored.
It's clear to me that you have no basic reading comprehension, no technical or legal understanding of the subject. Reply
The neat thing in Amsterdam is the intention is never malicious. I've seen them hack credit card accounts, bank accounts, DOD servers--millions of dollars of money and information could be compromised. It isn't.
But . . . with posts like this, the intention may become malicious by the renegade minority. Reply
Use WPA/WPA2, you Verizon Installing morons!!! Reply
Start a new discussion