What does WPA/WPA2 really encrypt?

14,964

Solution 1

WPA (and WPA2) encrypts traffic below the level that Wireshark or similar tools capture. Those tools capture at the operating system's socket interface, not at the level of the actual network media. When you send a packet over WPA-protected WiFi, the WPA encryption isn't added until the last moment before the data is broadcast.

There might still be other encryption - for example, I could apply PGP encryption to an email and send it to SMTP server over TLS, which would be two levels of encryption... but those levels would be visible to (and, indeed, created by) the application (such as my email client). Somebody sniffing that traffic would still be able to see things like what protocol it's using (TCP, on top of IP), what port it comes from and is routing to, the destination IP address, and so on.

However, once the packet reaches the WiFi interface driver, it gets encrypted with the AES key that my machine is using for WPA. At that point, about the only things visible are the network SSID that I'm using (I think the source and destination MAC addresses may also be visible) and a vague idea of the size. Somebody without the WiFi key sniffing the network traffic using software-defined radio or a WiFi card in promiscuous mode wouldn't be able to tell the difference between my email and me sending a network ping or chatting on Skype; they wouldn't even be able to tell where the packets were going beyond the WiFi access point.

Solution 2

What WPA-Personal (aka WPA-PSK) does is encrypt the packets that go on the air, so that people who aren't connected to this network can't read your messages (and WEP did the same in this respect, by the way, it just did it in a different way, which suffered from a serious hole). It additionally tries to make it difficult/impossible to connect to the network without knowing the secret password.

Without this encryption (e.g. on open networks), anyone can read all the packets that are being exchanged, without even being "connected" to the network: it just needs to be close enough to "hear" the signal.

If you think of a foreign language as a kind of encryption, WPA is a bit like the situation where all machines connected to this WPA network speak their very own language language which only the AP also understands. So, machines not connected to the network can't understand anything (other than witness that some communication is taking place between the machines and the AP) and those that are connected to this network can only talk to each other by communicating via the AP.

Solution 3

What is the key difference between WPA2-PSK (TKIP), WPA2-PSK (AES), and WPA2-PSK (TKIP/AES)

Source: Wi-Fi Security: Should You Use WPA2-AES, WPA2-TKIP, or Both?

TKIP and AES are two different types of encryption that can be used by a Wi-Fi network. TKIP stands for “Temporal Key Integrity Protocol.” It was a stopgap encryption protocol introduced with WPA to replace the very-insecure WEP encryption at the time. TKIP is actually quite similar to WEP encryption. TKIP is no longer considered secure, and is now deprecated. In other words, you shouldn’t be using it.

AES stands for “Advanced Encryption Standard.” This was a more secure encryption protocol introduced with WPA2, which replaced the interim WPA standard. AES isn’t some creaky standard developed specifically for Wi-Fi networks; it’s a serious worldwide encryption standard that’s even been adopted by the US government. For example, when you encrypt a hard drive with TrueCrypt, it can use AES encryption for that. AES is generally considered quite secure, and the main weaknesses would be brute-force attacks (prevented by using a strong passphrase) and security weaknesses in other aspects of WPA2.

In summary, TKIP is an older encryption standard used by the old WPA standard. AES is a newer Wi-Fi encryption solution used by the new-and-secure WPA2 standard. In theory, that’s the end of it. But, depending on your router, just choosing WPA2 may not be good enough.

While WPA2 is supposed to use AES for optimal security, it also has the option to use TKIP for backward compatibility with legacy devices. In such a state, devices that support WPA2 will connect with WPA2 and devices that support WPA will connect with WPA. So “WPA2” doesn’t always mean WPA2-AES. However, on devices without a visible “TKIP” or “AES” option, WPA2 is generally synonymous with WPA2-AES.

what's the best solution for home / work network? Thanks.

It's all covered in the rest of the above article:

On most routers we’ve seen, the options are generally WEP, WPA (TKIP), and WPA2 (AES) — with perhaps a WPA (TKIP) + WPA2 (AES) compatibility mode thrown in for good measure.

If you do have an odd sort of router that offers WPA2 in either TKIP or AES flavors, choose AES. Almost all your devices will certainly work with it, and it’s faster and more secure. It’s an easy choice, as long as you can remember AES is the good one.

Solution 4

As described here here the encryption is done on Layer 2 right after MAC address (frame payload) so to see the encrypted traffic you have to use a device with sniff capabilities at L2 and try to read on the packet you sniffed.

Share:
14,964

Related videos on Youtube

Josip Ivic
Author by

Josip Ivic

Updated on September 18, 2022

Comments

  • Josip Ivic
    Josip Ivic over 1 year

    I have WPA2-personal on my laptop and I'm connected wirelessly to my home AP. The traffic I capture from Wireshark is all unencrypted.

    Some days ago I had my router on WPA-personal and did a MITM attack on my smartphone and the traffic was unencrypted too.

    Isn't WPA supposed to encrypt the traffic and not just ask a password to enter the network?

    Bounty edit:

    I would like to know little bit more about this matter. What is the key difference between WPA2-PSK (TKIP), WPA2-PSK (AES), and WPA2-PSK (TKIP/AES) in this matter? I know that they are all different options and if I choose the wrong option and I’ll have a slower, less-secure network. What are the differences in encryptions for capturing the traffic and what's the best solution for home / work network? Thanks.

    • emirjonb
      emirjonb over 8 years
      Where did you exactly capture the traffic because the encrypted packets are for the man-in-the-middle scenario. to sniff the traffic you have to use a device with sniff capabilities
    • Ramhound
      Ramhound over 8 years
      WPA does indeed encrypt the data. But you performed an attack on it. I am not sure i understand your confusing why the traffic was decrypted, by performing the attack, you were able to do so.
    • Arjan
      Arjan over 8 years
      Please add some details on the MITM setup. It's weird that Wireshark could see that traffic, unless you actually gave Wireshark the secrets...
    • Arjan
      Arjan over 8 years
      Then please edit your question, if it doesn't invalidate the existing answers. (The bounty message will disappear in 7 days.)
    • Josip Ivic
      Josip Ivic over 8 years
      I've edited the question
    • Arjan
      Arjan over 8 years
      ...now it's too many questions. Please next time don't add a bounty for different questions to your question, that's not a good fit for a Q&A. Success!
    • Josip Ivic
      Josip Ivic over 8 years
      I rephrased the question.
    • qasdfdsaq
      qasdfdsaq over 8 years
    • oemb1905
      oemb1905 about 3 years
      I was pretty sure the point of WEP/WPA/WPA2 was to prohibit interception of packets by those not connected to the Access Point, not authenticated clients. Thus, conducting a MITM attack on your own LAN would be pointless, as every authenticated device - regardless of whether its MAC/IP was what it purported to be or not - would see layer 3 traffic. I could be wrong, but it seems the question is based on a faulty premise that WPA encrypts layer 3 traffic between authenticated users and the AP, which it does not if I am correct. Am I correct? ;) @CBHacking
    • oemb1905
      oemb1905 about 3 years
      I ask this so late ... because I teach Introductory CS, and not only do I want to confirm myself, but I think passers by might miss the point about WPA2 and this common misconception, but maybe I am wrong!
  • user1686
    user1686 over 8 years
    Note that Wireshark can capture the encrypted packets in monitor mode, if the driver supports it.
  • Arjan
    Arjan over 8 years
    Also note that Wireshark can capture encrypted packages for other clients when the network card is in promiscuous mode. But then Wireshark needs to be set up with the WEP or WPA/WPA2 pre-shared secrets to be able to snif the handshakes and decrypt the messages.
  • ganesh
    ganesh over 8 years
    Now that is written in a way I could even explain it to a total newbie. +1
  • qasdfdsaq
    qasdfdsaq over 8 years
    Except it's almost completely wrong.
  • Stefan
    Stefan over 8 years
    @qasdfdsaq: Please, do enlighten us.
  • qasdfdsaq
    qasdfdsaq over 8 years
    Well, let's see. Encryption has nothing to do with people who are "connected to this network". Being able to read your messages has nothing to do with people who are "connected to this network". Encryption has nothing to do with people who can or cannot "connect to this network". WPA does not make it like "all machines connected to this network speak the same language". Machines connected to this network cannot "attack each other and see all packets sent by others".
  • Stefan
    Stefan over 8 years
    @qasdfdsaq: I find your "explanation" disparaging more than enlightening. I'll focus on the first sentence to keep it short: in WPA, encryption is linked to the notion of "connected to this network", because the encryption key used is (hopefully) only known to those machines that are connected (i.e. that successfully associated and authenticated). At least, AFAIK.
  • qasdfdsaq
    qasdfdsaq over 8 years
    You didn't ask for an "explanation" of how WPA works, that's already answered correctly in other answers here and elsewhere. There is no "the encryption key". Every session has a different encryption key. Encryption keys are randomly changed for every machine every few minutes. Anyone can associate. Association has nothing to do with the encryption key. The PSK ("passcode") is not an encryption key.
  • Stefan
    Stefan over 8 years
    @qasdfdsaq: I thought that in WPA-PSK there is only one key used at a given time, shared by all connected machines. Do you have some URL that explains the details (I'm particularly interested in the impact on client-to-client communication performance).
  • qasdfdsaq
    qasdfdsaq over 8 years
    Every client that connects generates a random key derived from the PSK and randomly generated data. en.wikipedia.org/wiki/IEEE_802.11i-2004#The_four-way_handsha‌​ke Client-to-client communication does not exist in an Infrastructure network, it all must go via the AP.
  • W.M.
    W.M. almost 7 years
    My router makes it possible to allow only certain devices to be connected to the network by MAC address filtering. I have noticed that disabling encryption all together (WPA2 etc..) makes the speed and signal better. My question would MAC address filtering prevent others from hearing/seeing packets sent over my wifi network?
  • Conrad Meyer
    Conrad Meyer over 4 years
    Just the SSID / station MAC? Or also your transmitting device MAC?
  • oemb1905
    oemb1905 about 3 years
    @ user1686 @Arjan aren't you two referring to scenarios where the device using wireshark is not connected to the AP, therefore allowing it to capture packets that are encrypted ... if it were on the LAN, like in the posted question, this would not be needed right, since they would all have the decryption key as soon as it reached the NIC for that specific client, right?
  • oemb1905
    oemb1905 about 3 years
    Stop first sentence at the word "air", drop rest of paragraph 1, then add the middle paragraph to first sentence ending at air, then remove 3rd paragraph ... and then, @Hennes = most succinct answer in lay terms.
  • oemb1905
    oemb1905 about 3 years
    There needs to be discussion about where the packet sniffing device is, i.e., is it an authenticated client on the LAN/AP, or not. If is it not authenticated - which is not what the poster implies - then this would apply, right? But if it is on the LAN, it should just see layer 3 traffic by default, correct? @emirjonb