Wednesday 27 June 2018

WPA3: A Missed Opportunity

Almost half a year ago, the Wi-Fi Alliance made a press release announcing they were working on WPA3. In a previous blog post, I discussed the four main features that were mentioned in this press release. Today, the WPA3 certification program is finally released publicly. Unfortunately, only one of the four initially announced features are a mandatory part of WPA3.

The WPA3 Certification Program

First, it's important to know WPA3 is a so-called certification program. It's not a new standard or protocol. Instead, the Wi-Fi CERTIFIED WPA3 program specifies which existing standards (e.g. protocols) a product must support. If a product correctly implements these standards, it can use the "Wi-Fi CERTIFIED WPA3" label. In other words, this label indicates that the device passed a whole bunch of tests, meaning it will be interoperable with other devices that obtained the WPA3 certified label.

So what are the features that a WPA3 certified device must support? Initially, the press release at the beginning of this year suggested that WPA3 would require support of four major features. Summarized, these features consisted of a new handshake called dragonfly (which is resistant against dictionary attacks), an easy method to securely add new devices to a network, some basic protection when using open hotspots, and finally increased key sizes. Unfortunately, the WPA3 certification program only mandates support of the new dragonfly handshake. That's it. The other features are either optional, or a part of other certification programs. I fear that in practice this means manufacturers will just implement the new handshake, slap a "WPA3 certified" label on it, and be done with it.

But what happened exactly to the other three promised features? First, the technology to easily and securely add new devices to a network will be certified under the Wi-Fi CERTIFIED Easy Connect program. Second, improved security features for open hotspots (based on unauthenticated encryption) will be tested for interoperability under the Wi-Fi CERTIFIED Enhanced Open program. This means that if you buy a device that is WPA3 capable, there is no guarantee whatsoever that it supports these two features. Third, the increased key sizes are an optional part of the WPA3 certification. More precisely, only when using WPA3-Enterprise are the increased key sizes mandatory. Note that WPA3-Enterprise refers to enterprise authentication, where the login credentials are for example a username and password (instead of a simple pre-shared key in home networks). Finally, the key sizes that are used to encrypt traffic after connecting to a network aren't required to be increased at all.

It's also worth mentioning that WPA3 will mandate support of Protected Management Frames (PMF). But that's not surprising: WPA2 also mandates support of PMF since the beginning of this year. Note that PMF prevents deauthentication attacks, and also offers other benefits. That said, I'm quite sure people will find new ways to bypass PMF and still forcibly disconnect clients from a network.

To summarize, here's an overview of new features that are and aren't part of WPA3:
  1. The dragonfly handshake (also called Simultaneous Authentication of Equals) is a mandatory part of WPA3. So if in the future you select "WPA3-Personal" in your home router, you will be using this handshake. This means dictionary attacks against the handshake will be longer be possible.
  2. The replacement of Wi-Fi Protected Setup (WPS) will be called Wi-Fi Easy Connect. It is based on the Device Provisioning Protocol (DPP). It is not part of WPA3.
  3. To provide unauthenticated encryption when connecting to an open hotspot, the Wi-Fi Alliance introduced Wi-Fi Enhanced Open. The standard behind this marketing term is Opportunistic Wireless Encryption. It is not part of WPA3. Note that even if opportunistic encryption is being used, it is trivial for an attacker to set up a rogue AP and intercept all traffic.
  4. WPA3-Enterprise networks will support key sizes that offer the equivalent of 192-bit security. But the increased key sizes are only required during the authentication stage. Moreover, the WPA3-Enterprise mode is an optional part of WPA3.
All combined, this means that the only required part of WPA3 is the new dragonfly handshake. While this handshake is an improvement over the old 4-way handshake of WPA2, the Wi-Fi Alliance could have improved security a lot more, by also making the other features a mandatory part of WPA3. It seems the Wi-Fi Alliance focused on keeping WPA3 easy to implement for vendors, but not on improving the security of users.


The Wi-Fi Alliance missed an opportunity to truly improve the security of Wi-Fi networks. Instead, due to the vague press release earlier this year, and the closed discussions afterwards, most users were left confused and unsure about what will and won't be part of WPA3. In particular, even though the press release promised several good enhancements, only one of them is mandatory under WPA3. Indeed, only the dragonfly handshake is mandatory. While this handshake is an improvement over the old 4-way handshake of WPA2, they could have done a lot more. As a result, the WPA3 certification program is a missed opportunity that could have truly improved Wi-Fi security.

Minor update: it is worth noting that vendors may step up and still implement all the other security features. In particular, I hope most vendors will nevertheless implement Wi-Fi Enhanced Open and/or Wi-Fi Easy Connect.

Thursday 7 June 2018

unKRACK: Mitigating Future WPA2 Vulnerabilities

In the past few months, I've been working on new results regarding the KRACK attack against WPA2. This includes improved (and more practical) exploitation techniques, and a method to mitigate future attacks against WPA2. I hope to present both topics in more detail at either my HITB Singapore talk if accepted (so please for vote it), or in a more detailed future blog post. In the meantime this post briefly introduces both topics.

Improved Exploitation Techniques

A few implementation-specific improvements of the KRACK attack have already been discussed in my OPCDE presentation. Other new research on improved attack techniques is being finalized, and I hope to release these new attack techniques in the near future. The implementation-specific attack improvements that were already discussed in my OPCDE talk are:
  1. Attacking Access Points (APs). In the original attack against the 4-way handshake, we generated retransmitted message 3's to attack the client. This affected nearly all clients, because the WiFi standard mandates that retransmitted message 3's must be processed. In contrast, the standard says that retransmitted message 4's should be ignored. But of course APs may be buggy, and process retransmitted message 4's anyway. And indeed, we discovered one driver that accepts retransmitted message 4's, and reinstalls the session key while processing them. This means the 100+ different routers and APs using this chipset/driver are all likely vulnerable.
  2. SNonce and ANonce reuse. We also discovered that macOS reused the (normally random) SNonce during a rekey handshake. Similarly, hostapd was reusing the ANonce during a rekey. This means that if an unpatched macOS was connected to an unpatched hostapd AP, rekeys caused the reinstallation of the current session key! As a result, it becomes possible to decrypt old captured traffic captured between a macOS and hostapd AP.
  3. Group key installation issues. We also noticed that many devices accept replayed broadcast traffic. To attack these devices, there is no need to trigger a reinstallation of the group key, the adversary can simply replay broadcast packets. Additionally, some devices improperly initialize the receive replay counter when installing the group key, which can again be abused to replay broadcast frames.
Note that the above are all implementation-specific new vulnerabilities, these are not new weaknesses in the WiFi standard.

Preventing Multi-Channel Man-in-the-Middle Attacks

Traditional attacks against protected WiFi networks only require an attacker to sniff and (optionally) inject packets. For example, WEP can be broken by passively sniffing packets, and dictionary attacks against WPA2 merely require a passive capture of the 4-way handshake. In other words, these attacks don't require a man-in-the-middle (MitM) position between the client and AP. In contrast, most recent attacks against WPA2 require a MitM position. For example, several KRACK attacks against WPA2 handshakes require the ability to block packets. Similarly, certain attacks against (WPA-)TKIP require a MitM position, as do other attacks against the 4-way handshake and encryption algorithms of WPA2.

In all these attacks, the MitM position is established using a multi-channel technique. In this technique, the adversary clones the AP on a different channel, and tricks the client (victim) into connecting to the AP on this rogue channel. The adversary then forward frames between both channels so the client and AP can communicate. This enables the adversary to reliably delay, block, or modify (encrypted) frames sent between the client and AP.

Together with Broadcom and Intel, we designed an extension to the WiFi standard to prevent such multi-channel MitM attacks. This makes exploiting future weaknesses in protected WiFi networks harder, to practically infeasible. The idea behind our defense is to cryptographically authenticate the parameters that define the operating channel. This enables two communicating WiFi devices to detect when they are operating on different channels, and hence to detect when they are under attack.

We're doing a lot of work to get this extension deployed in practice. First, we have an academic paper discussing the high-level design of our extension. Second, we are submitting our proposal for inclusion in the official WiFi standard. So far the general WiFi industry appears receptive of our mechanism, so I have good hopes that this will be included in the standard. Third, we have a working proof-of-concept where the 4-way handshake validates the current operating channel using our extension. We plan to improve this code so it will be included in wpa_supplicant and hostapd, meaning all Linux and Android devices will support this in the near future (and hopefully other vendors will implement this soon too).

To summarize, our technique to prevent multi-channel MitM attacks is a bit like stack canaries: it makes attacks harder, though not impossible. And we hope that just like with stack canaries, it will soon become a common method to harden and protect WiFi networks.