Take the 2-minute tour ×
Information Security Stack Exchange is a question and answer site for Information security professionals. It's 100% free, no registration required.

Say someone drives up and parks in front of my house. They get a list of all SSIDs they can pick up. My phone is configured to save the WPA2 password and automatically login when the SSID is in range.

Is it possible for someone to follow me when I leave my house next, and then once we are away from the vicinity of my house, they start up a wireless network with each SSID name they picked up when near my house, and then wait to see what WPA2 passwords I send to them when my phone tries to log in?

Or, is there something in WPA2 or Android that won't try to login automatically to an SSID if it knows it is not the same piece of hardware at my house?

I think this same scenario could occur with a laptop, although my laptop is usually off until I get settled in a building somewhere, so it would be less convenient and more obvious for someone to do it to a laptop.

share|improve this question
1  
How would your phone know it is not the same piece of hardware? –  Hennes Sep 8 '13 at 20:15
    
"Trojan AP" cecs.wright.edu/~pmateti/InternetSecurity/Lectures/… –  Logman Sep 8 '13 at 20:24
    
If it is a major concern I would suggest turning off SSID broadcast from your wireless router –  Cory M Sep 8 '13 at 20:30
2  
Turning off SSID broadcast on the router won't really help when the client just ends up broadcasting it anyway. –  jjlin Sep 8 '13 at 21:04
add comment

migrated from superuser.com Sep 9 '13 at 3:25

This question came from our site for computer enthusiasts and power users.

3 Answers

up vote 6 down vote accepted

The situation you describe isn't really a concern. The WPA2 handshake never actually sends your password across; both the access point and the client send derived messages that demonstrate that they know the same password. So, spoofing a WPA2 access point won't help recover the password. However, it is possible to record the messages involved in a successful authentication between your client and the access point, and then attempt to brute force it offline, so it's important to have a strong password (or really, passphrase).

share|improve this answer
1  
well, that is really reassuring then, because i do keep my passphrase at least 25 random characters long, which i think is fairly strong. do you have any technical reference that describes how the derived messages are compared that demonstrate that they know the same password? –  user1748155 Sep 9 '13 at 2:56
1  
You can just refer to en.wikipedia.org/wiki/IEEE_802.11i-2004#Protocol_operation. Note that for WPA2-PSK (i.e., where you use a passphrase), PMK = PSK. And cwnp.com/wp-content/uploads/pdf/802.11i_Key_Management.pdf gives a good overview of how the PSK is generated. –  jjlin Sep 9 '13 at 7:19
add comment

With WPA2 PSK (as "pre-shared key"), what the client (your phone) and the access point send to each other is sufficient to run an offline dictionary attack: the attacker, observing these messages, can then "try passwords at home" on his own computers. However, he will not get, immediately, the password itself. Your phone does not "send the password" to the access point; instead, the AP sends a "challenge" (a random value) and the client responds with a value computed from the challenge and the password. The computation is one-way. Assuming that all the involved cryptographic algorithms are secure (right now they seem to be), the best the attacker can do is password guessing: try a potential password by running the same computations, and see if that yields the same values as the ones he observed.

The computations include PBKDF2 with 4096 iterations, which is not bad. Each "guess" will cost the attacker about 16 thousands of invocations of the SHA-1 hash function. If he has a few good GPU, he may still try about one million passwords per second, so you'd better have a good, strong, random password. If your WiFi password consists in, say, 20 random letters (each letter chosen randomly, uniformly, and independently of the other letters), then dictionary attacks won't work. A very long and random password is not that big a hardship: all clients record the password; you don't have to type it often.

Note that none of the above requires the attacker to do anything actively, like setting up a fake access point. He just needs to observe a normal connection between your phone and your access point.

share|improve this answer
add comment

Sure, if someone were to put up a rogue AP in that situation, your phone would handshake with it. People do that all the time.

However, that doesn't give away your password, because with WPA2-PSK there is a challenge response portion to the handshake using the authentication frame. At that point, the WPA2 PSK or Pre-Shared Key (also known as the PMK/Pairwise Master Key) would need to be brute force attacked. In fact, it is essentially identical to an attacker if they observe your device's handshake with your actual AP as it is to get you to handshake with them; it will still take them the same amount of effort to crack your key or get access to your wireless network.

In a functional WPA2-PSK handshake, the PMK would then be used to derive a PTK (Pairwise Temporal Key), which is what is actually used to encrypt your session.

I noticed that above somebody comment and suggested not to broadcast your SSID, which is typically a setting available on your AP/wireless router. This will not do anything against even the most basic attacker because of a couple of reasons. First, when you tell an AP not to broadcast your SSID, that doesn't mean it stops broadcasting (or "beaconing"). Instead, it just sets the SSID field of the beacon frame to null (\x00), so if you just listen to the airwaves for a couple of seconds or minutes, you will find out that there is an AP in range of your antenna.

Secondly, even if the AP/wireless router was completely turned off, or you somehow were able to get it to stop beaconing (Bad idea by the way...) clients will send out what are called "probe requests." These essentially say "I have an AP saved with SSID abc123, are you out there?" The attacker could then derive an SSID from those probe requests and build a rogue AP with that SSID to get your handshake. The best way to prevent an attacker from handshaking with you would be to either use 802.11w (Which almost nobody does at this point because not all hardware supports it), or to 'forget' or not save previously connected to wireless connections.

In short: Don't worry about this sort of attack vector unless you have a weak password.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.