Skip to content
BoKSA

15: Wireless Security: from WEP to WPA3

15: Wireless Security: from WEP to WPA3

Course: Networking - Security Advanced · Updated: October 2026 Literature: K&R chapter 8: securing wireless LANs and 4G/5G cellular networks Related labs: Wireshark lab: 802.11, Lab: Network security Prerequisites: Article 10: Wireless networks, Article 11: Cryptography

Learning objectives

After studying this article you can:

  • explain what WEP is, the four steps of WEP authentication, and why WEP is insecure
  • explain how WPA2 works: the 4-way handshake, PSK vs Enterprise (802.1X/EAP), AES-CCMP
  • explain the attacks on WPA2 (offline dictionary attacks, KRACK)
  • explain what WPA3 improves: SAE, forward secrecy, Protected Management Frames, OWE
  • explain how authentication works in 4G/5G networks

1. The challenge

Wireless traffic goes through the air. Anyone within range can listen and send. Wireless security therefore needs:

  • Authentication: only authorised devices may join the network, and devices should know they are talking to the real network (mutual authentication).
  • Encryption: frames can't be read by outsiders.
  • Integrity: frames can't be changed or injected.

2. WEP: Wired Equivalent Privacy (1997–2004)

WEP was part of the original 802.11 standard. Its goal was "privacy equivalent to a wired network".

2.1 WEP authentication (4 steps)

1
2
3
4
5
6
7
8
9
Client (station)                         Access point
   | 1. authentication request ────────►   |
   |                                       |
   | ◄──────── 2. nonce (128 bytes) ─────  |   (challenge in plain text)
   |                                       |
   | 3. nonce encrypted with the shared ─► |
   |    symmetric key (40 or 104 bits)     |
   |                                       |
   | ◄──── 4. AP decrypts: OK? → success ─ |

This is the ap4.0 principle from article 12: challenge-response with a shared key. But:

  • There is no key distribution: all users share the same static key, which is typed in by hand.
  • Authentication is one-way: the AP doesn't prove its identity, so a rogue AP is possible.
  • An eavesdropper sees both the nonce (plaintext) and the encrypted answer (ciphertext). That gives a known-plaintext pair from which the keystream can be derived.

2.2 WEP encryption (for context)

  • RC4 stream cipher, with a key made of the 40/104-bit shared key + a 24-bit Initialisation Vector (IV) that changes per frame
  • The IV is sent in plain text in each frame
  • Integrity with a CRC-32 checksum (the ICV)

2.3 Why WEP is insecure

  1. The IV is too short (24 bits): there are only ~16.7 million IVs. On a busy network, IVs are reused within hours (or minutes). Two frames with the same IV use the same RC4 keystream. XOR the two ciphertexts and you get the XOR of the two plaintexts.
  2. Weak RC4 keys: certain IVs reveal information about the key (Fluhrer, Mantin & Shamir, 2001). With enough captured frames, the key can be calculated. Modern tools (aircrack-ng, PTW attack) need only ~40,000–85,000 frames, so the key is cracked in under a minute.
  3. CRC-32 is not a cryptographic integrity check: CRC is linear, so an attacker can flip bits in the ciphertext and correct the CRC without knowing the key.
  4. No replay protection: old frames can be sent again (e.g. ARP replay to generate more IVs quickly).
  5. Static shared keys: no per-user keys, and changing the key means reconfiguring everyone.

Conclusion: WEP offers no real security. The Wi-Fi Alliance dropped WEP in 2004 and it is not allowed in modern devices (it was removed from Wi-Fi 6 certification).

3. WPA and WPA2 (802.11i)

3.1 WPA (2003)

WPA was an emergency fix that ran on WEP hardware. It used TKIP (still RC4, but with a key per packet and a better integrity check, Michael). TKIP is now also deprecated.

3.2 WPA2 (2004, IEEE 802.11i)

  • Encryption: AES-CCMP (AES in Counter mode with CBC-MAC), which gives strong encryption and integrity
  • Two modes:
WPA2-Personal (PSK) WPA2-Enterprise (802.1X)
Authentication Everyone shares one passphrase Each user logs in with their own credentials or certificate, checked by a RADIUS server
Used At home, in small offices Companies, universities (eduroam)
Key per user Derived from the shared passphrase Unique keys per user/session

3.3 The 802.11i phases

1
2
3
4
5
6
7
8
Mobile device ─── Access Point ─── Authentication Server (RADIUS)
      1. Discovery of security capabilities (beacons / probes)
      2. Mutual authentication + generation of the Master Key (MK):
         - Enterprise: EAP (e.g. EAP-TLS, PEAP) between device and RADIUS server, the AP just relays
         - Personal: the Pairwise Master Key (PMK) is derived from the passphrase + SSID
      3. PMK delivered to the AP (Enterprise)
      4. 4-way handshake: device and AP derive the session key (PTK)
      5. Encrypted data transfer (AES-CCMP)

3.4 The 4-way handshake

1
2
3
4
5
6
7
8
Client                               AP
   | ◄────────── 1. ANonce ───────────   |
   |  client computes PTK = f(PMK, ANonce, SNonce, MAC addresses)
   | ──── 2. SNonce + MIC ───────────►   |
   |                     AP computes the PTK and checks the MIC
   | ◄──── 3. GTK (group key) + MIC ──   |
   | ──── 4. ACK ────────────────────►   |
   |        both install the keys        |
  • Nonces from both sides make every session key unique.
  • The MIC (Message Integrity Code) proves that both sides know the PMK, without sending it.
  • The GTK is used for broadcast and multicast frames.

3.5 Attacks on WPA2

Attack Description
Offline dictionary attack (PSK) An attacker captures the 4-way handshake (possibly forcing it with a deauthentication attack) and then tries passphrases offline at high speed on GPUs (hashcat). Weak passphrases fall quickly. The PMKID attack (2018) doesn't even need a connected client.
KRACK (Key Reinstallation Attack, Mathy Vanhoef, KU Leuven, 2017) Message 3 of the handshake is replayed, which makes the client reinstall a key that is already in use and reset its nonce. Encrypted frames can then be decrypted. Fixed with software patches.
FragAttacks (Vanhoef, 2021) Design and implementation flaws in fragmentation and aggregation. They affect all Wi-Fi security protocols, back to WEP.
Evil twin with Enterprise If clients don't check the RADIUS server certificate, a fake AP can capture usernames and (hashed) passwords (PEAP-MSCHAPv2)
Deauthentication Management frames are not protected without 802.11w, so they can be used for DoS or to force a handshake

4. WPA3 (2018 onwards)

WPA3 is mandatory for Wi-Fi 6 certification (since 2020) and is required for the 6 GHz band.

Feature Improvement
SAE (Simultaneous Authentication of Equals, "Dragonfly") in WPA3-Personal A password-authenticated key exchange in place of PSK. Offline dictionary attacks are no longer possible: every guess requires an interaction with the AP. It also gives forward secrecy.
Protected Management Frames (802.11w) Mandatory. Deauthentication and disassociation frames are protected.
WPA3-Enterprise 192-bit mode Suite B / CNSA crypto (GCMP-256, SHA-384) for governments and high-security environments
OWE (Opportunistic Wireless Encryption, "Enhanced Open") Encryption on open networks (coffee shops, airports) without a password, using Diffie-Hellman. It protects against passive eavesdropping (but not against evil twins).
Transition mode WPA2 and WPA3 at the same time, for compatibility. Vulnerable to downgrade attacks.

Dragonblood (Vanhoef & Ronen, 2019) found side-channel and downgrade weaknesses in early SAE implementations. They were fixed with hash-to-element (H2E), which is mandatory on 6 GHz.

5. Security in 4G/5G networks

4G LTE 5G
Authentication AKA (Authentication and Key Agreement): the SIM and the home network share a secret key K. Mutual authentication (unlike 2G, where the network is not authenticated). 5G-AKA or EAP-AKA'. The home network makes the final decision (more control).
Subscriber identity The IMSI is sometimes sent in plain text, so IMSI catchers can capture it The permanent identity (SUPI) is encrypted with the home network's public key (SUCI)
Encryption AES, SNOW 3G, ZUC between the device and the base station Same, plus integrity protection for user data (optional)
Core network Diameter (with known weaknesses at roaming interconnects) HTTP/2 + TLS APIs, SEPP (Security Edge Protection Proxy) between operators

6. Summary

  • WEP is completely broken: a short IV, RC4 weaknesses, CRC-32 integrity and static shared keys.
  • WPA2 with AES-CCMP is secure only with strong passphrases or 802.1X Enterprise, and it is patched against KRACK.
  • WPA3 adds SAE (no offline cracking, forward secrecy), mandatory PMF and OWE for open networks.
  • 4G/5G use mutual SIM-based authentication. 5G hides the subscriber identity.

References

Videos

Articles

Standards

  • IEEE 802.11i (WPA2, part of 802.11-2020), IEEE 802.11w (PMF)
  • RFC 8110: Opportunistic Wireless Encryption
  • 3GPP TS 33.501: Security architecture for 5G

Tools (use only on your own networks or with permission)


Cyber Security

Why it matters

Wireless networks are often the easiest entrance to an organisation's network. An attacker doesn't need to get into the building. Common problems in practice:

  • Weak or shared PSKs: the passphrase is on a whiteboard, never changed, and known to former employees. Weak passwords can be cracked in minutes with GPUs.
  • WPA2-Enterprise without certificate validation on clients: evil twins collect user credentials. This is a common penetration-test finding.
  • Legacy devices (printers, scanners, medical and industrial equipment) that support only WEP/WPA/TKIP, so the network is kept insecure for them.
  • Rogue access points: employees plug in their own AP, or attackers leave a small device behind (e.g. hidden in a meeting room).
  • Guest Wi-Fi without isolation gives access to the internal network.
  • Wi-Fi as an attack vector for IoT: smart TVs, cameras and coffee machines on the business network.
  • Wi-Fi attacks from a distance: directional antennas or drones, and the "Nearest Neighbor Attack" (2024), where attackers (APT28) broke into a target's Wi-Fi through a compromised organisation in the building next door.

How to make it safe

  1. Use WPA3 (SAE for Personal, WPA3-Enterprise for organisations). Use WPA2/WPA3 transition mode only where necessary, and plan to phase it out. Never WEP, WPA or TKIP.
  2. Organisations: 802.1X with EAP-TLS (certificates on managed devices). With PEAP/TTLS, always configure server-certificate validation (CA + server name) on all clients, pushed through MDM/Group Policy.
  3. Strong passphrases for PSK networks (≥ 20 random characters). Change them when employees leave, or use Identity PSK / per-device PSKs.
  4. Enable PMF (802.11w), which is mandatory in WPA3 and available as an option in WPA2.
  5. Separate SSIDs and VLANs for staff, guests and IoT, with client isolation and firewall rules (see article 09). Use OWE for guest networks.
  6. Use WIDS/WIPS to detect rogue APs, evil twins, deauthentication floods and unknown devices.
  7. Keep AP and controller firmware updated, and disable WPS (Wi-Fi Protected Setup, the PIN can be brute-forced).
  8. Replace or isolate legacy devices that can't use WPA2-AES or WPA3.
  9. Teach users not to connect to unknown networks and to report unexpected certificate warnings.
  10. Test: include wireless in penetration tests and red-team exercises.

Extra references