So an Evil Twin Wifi hotspot is a hotspot with the same SSID and/or same MAC that when the victim auto-connect to this hotspot, all traffic go through this evil twin and thus the information transferred will not be secured. An evil twin requires the knowing of the password of the original hotspot. However, what if a person created one with the wrong password?

This is my theory. The victim might auto-connect to this evil hotspot, and the person logs every attempt. If the evil hotspot has a closer proximity than the original one, the victim is almost 100% will first attempt to connect to the fake one. Since the attempt is logged, the password of the original one could be acquired through this method.

I tried setting up two hotspot with two different MAC but same SSID. I first connect my device to the hotspot A, then I turn off the hotspot A, and turn on hotspot B. The device automatically connects to it. It seems the device does not care what the original MAC address is. Both Android and iOS behave the same.

This seems to post a security threat, however I only tested the auto-connect part. Will the device actually send the stored password to the fake hotspot if it has the same SSID and encryption method? Does this actually work? What can I do to prevent this from happening?

  • 1
    Passwords aren't sent in the clear. Otherwise, sniffing them would be elementary.
    – KnightOfNi
    Commented Sep 1, 2014 at 22:55
  • @KnightOfNi - I am curious how passwords are transferred. Does the device only send a hash of the password? Commented Sep 1, 2014 at 22:56
  • 2
    They have to have the same SSID and also the same password to connect automatically. It is not uncommon for a legitimate company to have multiple hotspots with same SSID and code at different locations so that users in different areas get access without having to be close to one single router. The question about how the password is transmitted would depend on the protocol being used. Weaker protocols would clearly be less safe. Commented Sep 1, 2014 at 23:49
  • @JeffClayton Assuming the most common protocol (WPA2-PSK) is used, is the password, or the hash, still able to be acquired? Commented Sep 2, 2014 at 0:07
  • @user54791 does a great job below in describing the WPA2 conversations. Commented Sep 3, 2014 at 3:11

2 Answers 2


For WPA, The authentication process is known as a four-way handshake. It's a bit complex to describe but in short, the access point will know that there was an unsuccessful attempt to connect, but it will not know what key was actually supplied. Fortunately, this would mean that the bogus wifi ap will not be able to figure out the key to the "real" ap.

Both WPA2-PSK and WPA2-EAP result in a Pairwise Master Key (PMK) known to both the supplicant (client) and the authenticator (AP). (In PSK the PMK is derived directly from the password, whereas in EAP it is a result of the authentication process.) The four-way WPA2 handshake essentially makes the supplicant and authenticator prove to each other that they both know the PMK, and creates the temporal keys used to actually secure network data.

Capturing the four-way handshake will not divulge the PMK or PSK (since capturing the handshake is trivial over wireless this would be a major vulnerability). The PMK isn't even sent during the handshake, instead it is used to calculate a Message Integrity Check (MIC). You basically need to perform a dictionary or bruteforce attack on the handshake until you find a password which results in the same MIC as in the packets.

Source: Four-way Handshake in WPA-Personal (WPA-PSK)

So you would be able to capture a "message integrity check," but you would have to perform a brute force on this MIC to figure out the password. So in a way, yes, you CAN capture something similar to a hash, but it's still not very useful. Plus, there is no need to set up an "evil twin" ap to capture a 4-way handshake; you can just sniff the packets out of the air.

  • Thanks for the detailed explanation. Is it true that the reason this method won't work is because of the third "step" of the four way handshake, which means the access point fails to "prove" that it has the same password as the device has? Commented Sep 2, 2014 at 0:45

The device won't send a password. Check this out what happens: http://en.wikipedia.org/wiki/IEEE_802.11i-2004

And wifi devices don't care about the MAC because the are designed a bit like mobile phones and GSM/3G etc networks. They could switch the tower/access point etc without any problem. And that's why you could cover a whole building with wireless access. You can add multiple access point with the same config and you wouldn't even notice the switch between them.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .