![]() | |||||||||
|
|||||||||
|
|
WPA PSK Crackers: Loose Lips Sink ShipsThink Wi-Fi Protected Access makes your home or small business network impenetrable? Think again -- and learn how to protect yourself. By Lisa Phifer Wi-Fi Protected Access (WPA) protects wireless data by applying encryption, integrity checks, and sequencing. The first version of WPA patched around mistakes in the old, broken Wired Equivalent Privacy (WEP), while WPA2 started from a clean slate to deliver more robust, efficient security. Either version of WPA can stop wireless eavesdropping -- with one big caveat. The encryption keys upon which they depend must never be disclosed to outsiders. That's where PSK crackers come in. WPA and WPA2 are best when used with 802.1X Port Access Control for per-user authentication and per-session key delivery. Known as WPA-Enterprise or WPA2-Enterprise, this approach was designed for business networks with the staff and resources required to support RADIUS-based authentication. Every new session gets its own fresh random key, used for a relatively short time. While that doesn't make key cracking completely impossible, it substantially reduces that risk. Since home networks don't generally have RADIUS servers, a simpler option also exists: Pre-Shared Keys (PSKs). Known as WPA-PSK, WPA-Personal or WPA2 Personal, this approach authenticates everyone using the WLAN with the same secret passphrase, configured into the Access Point (AP). But, unlike those old WEP keys, PSKs are not encryption keys -- they are the starting point for deriving per-station (client) encryption keys. (For how to set up WPA at home, see WPA-PSK: Step-by-Step.) Unfortunately, the way in which WPA/WPA2 encryption keys are generated and delivered makes it easy for an attacker to try to guess your WLAN's PSK. Once an outsider has the PSK, he can steal service or decrypt data sent by legitimate users on your network. A PSK is a 256-bit value, known to every device in the WLAN. That PSK is usually generated by combining the WLAN's name (Service Set Identifier, SSID) (define) with a passphrase (an ASCII (define) string, 8-63 characters.) If you have ever used Windows XP to connect to a WPA-Personal WLAN, you have been prompted to enter a WPA passphrase. When using WPA or WPA2, every station is permitted to associate with the AP. The AP or station has the option to start 802.1X authentication, exchanging Extensible Authentication Protocol (EAP) (define) messages to verify user/server identities. After authentication (if any), the AP kicks off a four-way handshake (see figure below) to derive the keys for this session. The handshake must be completed before any encrypted data can actually be exchanged between this station and AP. What is actually happening during this handshake? This four-way handshake occurs whenever you connect to a WLAN using WPA or WPA2. It also occurs periodically thereafter, whenever the AP decides to refresh transient keys. End users may not be aware of this handshake -- and administrators may not really care about all of these gory details. But WPA PSK crackers do. In WLANs that use WPA-Enterprise or WPA2-Enterprise, every session starts from a different PMK, delivered during 802.1X authentication. However, in WLANs using WPA-Personal or WPA2-Personal, there's no 802.1X, so the station and AP must use a value they both already know. What value do they both know? The PSK, of course. WPA-PSK crackers like aircrack, KisMAC, and coWPAtty try to guess the PSK by capturing and analyzing the four-way handshake messages spelled out above. For example, the following output was generated by coWPAtty: Here, coWPAtty uses a supplied dictionary file to analyze a packet capture file containing (at least) the four-way handshake exchanged during someone else's successful connection to the "soho-psk" WLAN. Recording handshake messages from an active WLAN is easily accomplished with a wireless capture program like Wireshark or Kismet. Those who get impatient can use a frame injector like Airjack to force legitimate users to reconnect. CoWPAtty searches the capture file and extracts a four-way handshake for the named WLAN. It then extracts all of the values of interest from that handshake: AP and station MAC addresses, those SNonce and ANonce values, and message #4's payload and MIC.
Now, coWPAtty starts trudging through the supplied dictionary file, trying out words as possible passphrases, trying to come up with the right PSK. The right PSK will be one that, when used as a PMK with all of these observed values, ends up generating a matching MIC. This is shown in the following extra-verbose coWPAtty output: A bare minimum PSK (8 lowercase letters) has 26^8 possible combinations, so even just trying all 208,827,064,576 of those possible passphrases would take far too long. Working from a dictionary file cuts that effort by just trying all 8-characters words. Huge password dictionaries are readily available for use with conventional Windows/UNIX password crackers like John the Ripper, and they can be fed into PSK crackers. But multi-pass hashing for every word in those files still takes time -- depending on SSID and PSK length, a lot of time. In the above example, coWPAtty tested just 36 passphrases per second. Unfortunately, conventional password crackers know how to get around this problem using rainbow tables -- long lists of pre-computed password hashes. The latest version of coWPAtty can now use a variation on rainbow tables to speed PSK cracking by three orders of magnitude. For example, a 2006 Shmoocon demo showed coWPAtty testing 18,000 passphrases per second using a pre-hashed WPA PSK lookup table. Remember that WPA PSKs combine the passphrase with the WLAN's SSID. A pre-hashed PSK lookup table therefore depends on the target WLAN's name. Given enough time, storage and CPU, you can generate a table for any SSID using the "genpmk" program now included with coWPAtty. Although genpmk itself doesn't really take less time, the generated tables can be fed into coWPAtty to crack individual PSKs much, much faster. Or you could feed coWPAtty one of the pre-hashed WPA PSK lookup tables posted online, representing 170,000 words hashed against the top 1000 most common SSIDs. At this point, you have probably noticed several vulnerabilities that WPA PSK crackers exploit. There is nothing you can do about some of those vulnerabilities (like the values exchanged during the four-way handshake). But there are several steps you can take to mitigate other vulnerabilities and protect your WLAN against WPA PSK crackers.
Article appeared originally on Wi-Fi Planet.com
|
![]() |