Wireless security: WPA2, WPA3 & 802.1X
Choose the right wireless security mode and explain common wireless attacks.
By Invicly Tech, , in Computer Networking. About 12 minutes to read.
In short
Wireless traffic can be received by anyone nearby, so encryption and authentication are essential. WPA2 and WPA3 encrypt frames with keys derived during a four-way handshake. Home networks use a shared passphrase, while enterprises use 802.1X so each user authenticates individually against a RADIUS server.
Explained simply
On a wired network, an attacker has to plug into a cable. On Wi-Fi, anyone in the car park can receive your traffic. So wireless security has two jobs: decide who may join (authentication), and scramble every frame so outsiders cannot read it (encryption).
Home networks usually use one shared password, called a pre-shared key or PSK. Everyone who knows it can join. Companies use 802.1X instead, where each person logs in with their own account or certificate, checked by a central server. When someone leaves the company, you disable one account instead of changing the password for everyone.
The protection has improved over the years. WEP, from the 1990s, is completely broken. WPA2 is still common and safe with a long password. WPA3 is the current standard and resists the password-guessing attacks that work against WPA2.
Attackers also try tricks that do not break the encryption at all, such as setting up a fake network with your company's name. Good settings on the devices, especially checking the server's certificate, are what stop these.
Press Play on a diagram to walk through it one step at a time.
- Broken
- Crackable in minutes
- Never use
- AES-CCMP encryption
- PSK open to offline dictionary attacks
- Still widely deployed
- SAE resists offline guessing
- Forward secrecy
- Protected management frames required
- 1Policy and VLAN
RADIUS assigns the user's network
- 2802.1X with EAP-TLS
User and server prove identity with certificates
- 3Four-way handshake
Fresh keys for this session
- 4Protected Management Frames
Forged deauth frames are rejected
- 5Encrypted data frames
CCMP or GCMP with AES
In depth
From WEP to WPA3
WEP used the RC4 cipher with a 24-bit initialisation vector, which repeats quickly on a busy network; tools can recover the key in minutes. WPA (2003) was a stop-gap called TKIP that ran on old hardware; it is deprecated too. WPA2 (2004) brought CCMP, based on AES, which is still strong. Its weak point is the PSK mode: anyone who records a handshake can test password guesses offline at high speed.
WPA3 (2018) replaces the PSK exchange with SAE (Simultaneous Authentication of Equals), a password-authenticated key exchange. Each guess requires a live exchange with the AP, so offline cracking does not work, and each session gets forward secrecy. WPA3 also requires Protected Management Frames (802.11w), which stop attackers forging deauthentication frames. WPA3-Enterprise offers a 192-bit mode for high-security sites, and Wi-Fi Enhanced Open (OWE) encrypts open guest networks without a password.
The 6 GHz band allows only WPA3 or OWE.
- Step 1WEP (1999)
RC4, short IVs: broken in minutes
- Step 2WPA with TKIP (2003)
Interim fix, now deprecated
- Step 3WPA2 with CCMP (2004)
AES; PSK open to offline guessing
- Step 4WPA3 with SAE (2018)
No offline guessing, PMF required
The four-way handshake, step by step
Both the AP and the client start with a shared PMK (pairwise master key). In PSK mode it is computed from the passphrase and the SSID with PBKDF2 (4096 rounds of HMAC-SHA1). In WPA3 it comes from SAE, and in enterprise mode from the 802.1X login. The PMK is never sent over the air.
In message 1 the AP sends a random number, the ANonce. The client creates its own SNonce and now computes the PTK (pairwise transient key) from the PMK, both nonces and both MAC addresses. Message 2 carries the SNonce and a MIC (message integrity code) that proves the client knows the PMK. The AP computes the same PTK and checks the MIC. Message 3 carries the group key (GTK) for broadcast traffic, encrypted, with its own MIC. Message 4 confirms, and both sides install the keys.
In WPA2-PSK, messages 1 and 2 are enough for an attacker to test password guesses offline, which is why short passphrases fall quickly.
- Access point to Client (supplicant): Message 1: ANonce1Message 1: ANonce
- Client (supplicant) to Access point: Message 2: SNonce + MIC2Message 2: SNonce + MIC
- Access point to Client (supplicant): Message 3: encrypted GTK + MIC3Message 3: encrypted GTK + MIC
- Client (supplicant) to Access point: Message 4: confirm4Message 4: confirm
- Client (supplicant) to Access point: Both install keys, data is encrypted5Both install keys, data is encrypted
802.1X: one login per person
802.1X has three roles. The supplicant is the client device. The authenticator is the AP (or switch), which blocks everything except authentication traffic until the user is approved. The authentication server is usually RADIUS, reached on UDP port 1812 (and 1813 for accounting). Between the client and the AP, authentication runs as EAP over LAN (EAPOL); the AP relays it inside RADIUS.
The EAP method decides how users prove who they are. EAP-TLS uses certificates on both sides and is the strongest, with no passwords to phish. PEAP with MSCHAPv2 wraps a username and password inside a TLS tunnel; it is easy to roll out but only safe if clients verify the server certificate. When the login succeeds, the RADIUS server sends the PMK material to the AP, and the four-way handshake follows.
RADIUS can also return a VLAN for each user, so staff, contractors and devices land in different networks on the same SSID.
Rogue APs, evil twins and other attacks
A rogue AP is an unauthorised AP connected to your wired network, often plugged in by an employee for convenience, which creates a back door. An evil twin is an attacker's AP that copies your SSID, sometimes with a stronger signal, to lure clients and capture their traffic or logins. Some attackers answer any probe request with the name the client asks for.
Deauthentication attacks send forged deauth frames to kick clients off, either for disruption or to force them to reconnect to an evil twin or redo a handshake the attacker can capture. Protected Management Frames block forged deauth frames, which is one reason WPA3 makes them mandatory.
WPS, the push-button setup feature, has a PIN mode that can be brute-forced in hours because the 8-digit PIN is checked in two halves. Disable WPS on every router.
Defences: 802.1X with strict server-certificate validation, wireless intrusion detection that reports unknown BSSIDs, 802.1X or NAC on wired ports, and PMF.
- Rogue AP: unauthorised AP on your wired LAN
- Evil twin: fake AP outside, same SSID
- Deauth flood: kicks clients off; PMF blocks it
- WPS PIN: brute-forceable, turn it off
Choosing a mode in practice
For a home or very small office, use WPA3-Personal if all devices support it; otherwise use WPA2/WPA3 transition mode, which offers both on one SSID. Transition mode lets an attacker push capable clients down to WPA2, so move to WPA3-only when old devices are gone. Whichever you use, choose a long random passphrase of at least 16 characters.
For a business, use WPA2- or WPA3-Enterprise with 802.1X, preferably EAP-TLS with certificates pushed by your device management system. Put guests on a separate SSID and VLAN that can reach only the internet, ideally using OWE so their traffic is still encrypted. IoT devices that only support PSK get their own SSID and VLAN with tight firewall rules.
Things that do not help: MAC filtering (MAC addresses are visible and easy to copy) and hiding the SSID.
- One passphrase for all
- Changing it affects everyone
- No per-user logs
- Fine for homes and IoT
- Each user or device logs in
- Revoke one account at a time
- RADIUS logs and per-user VLANs
- Needs a RADIUS server and certificates
Learn it in 4 short steps
About 30m each. Track them with a timer in your plan.
- 1Compare WEP, WPA2 and WPA3~30m
- 2Explain the four-way handshake~30m
- 3Compare PSK and 802.1X enterprise~30m
- 4Describe rogue APs and evil twins~30m
Key points
- Use WPA3, or WPA2/WPA3 transition mode for older clients.
- 802.1X enterprise mode gives per-user credentials and easy revocation.
- Disable WPS, which weakens PSK networks.
- Hiding the SSID and MAC filtering are not security controls.
Key terms
Tap a card to flip it. 0/4 known
Examples
Configuring WPA2/WPA3 transition mode with hostapd
A Linux-based AP must support new laptops on WPA3 and an old printer that only knows WPA2. Step 1: list both key management types, SAE and WPA-PSK. Step 2: make PMF optional (ieee80211w=1), because WPA2 clients may not support it; SAE clients will still use it. Step 3: use CCMP only, no TKIP. Step 4: once the printer is replaced, change wpa_key_mgmt to SAE and ieee80211w to 2 for WPA3-only.
# /etc/hostapd/hostapd.conf (excerpt)
interface=wlan0
ssid=Office
hw_mode=a
channel=36
wpa=2
wpa_key_mgmt=WPA-PSK SAE
rsn_pairwise=CCMP
ieee80211w=1
wpa_passphrase=use-a-long-random-passphrase-here
# WPA3-only later:
# wpa_key_mgmt=SAE
# ieee80211w=2Investigating a suspected evil twin
Several users report a certificate warning when joining Corp-WiFi in the lobby. Step 1: scan and list every BSSID advertising Corp-WiFi. Step 2: compare them with your AP inventory; here one BSSID has an unknown vendor prefix and shows open or PSK security instead of 802.1X. Step 3: locate it by walking with the signal reading. Step 4: tell users never to accept unknown certificates, and push a Wi-Fi profile that pins your RADIUS server name and CA so devices refuse impostors automatically.
nmcli -f SSID,BSSID,CHAN,SIGNAL,SECURITY dev wifi list | grep Corp-WiFi
# Corp-WiFi 3C:84:6A:11:22:31 36 70 WPA2 802.1X
# Corp-WiFi 3C:84:6A:44:55:61 44 62 WPA2 802.1X
# Corp-WiFi 02:1A:2B:3C:4D:5E 6 85 WPA2 <- not ours
# Locally administered MAC and no 802.1X: likely an evil twinQuick reference
- Never use WEP or WPA/TKIP; use WPA3, or WPA2/WPA3 transition mode for old devices
- WPA2-PSK handshakes can be cracked offline; use 16+ random characters
- WPA3-SAE resists offline guessing and gives forward secrecy
- 802.1X roles: supplicant, authenticator (AP), authentication server (RADIUS 1812/1813)
- EAP-TLS is strongest; PEAP is only safe if clients validate the server certificate
- Protected Management Frames (802.11w) stop forged deauth frames
- Disable WPS; MAC filtering and hidden SSIDs are not security
- 6 GHz allows only WPA3 or OWE
Common mistakes
- Short or guessable WPA2 passphrases.
- Guest Wi-Fi on the same VLAN as internal systems.
Quick quiz
Pick an answer to see if you're right and why.
Practice exercises
Try each one yourself first. Use the hint if you get stuck, then compare with the solution.
- Exercise 1easy
Check which security mode your home network and your phone hotspot use, and whether WPS is enabled on your router.
- Exercise 2medium
Capture a four-way handshake on your own lab network and identify all four EAPOL messages in Wireshark.
- Exercise 3hard
Design wireless access for a company with staff laptops, guests, and IoT sensors that only support WPA2-PSK. Specify SSIDs, security modes, VLANs and the key firewall rules.
Check yourself
Answer in your head, reveal, then be honest with yourself.
Feel confident about this topic?
Frequently asked questions
- Is WPA2 still safe to use?
- With a long random passphrase or with 802.1X, WPA2 with AES is still considered safe. WPA3 is better because it removes offline password guessing and makes management frame protection mandatory.
- Can someone on the same Wi-Fi see my traffic?
- With WPA2 or WPA3, each client has its own keys, but anyone who knows a PSK and captures your handshake can derive yours on WPA2. HTTPS and a VPN protect you regardless.
- What is WPA2/WPA3 transition mode?
- It lets one SSID accept both WPA2 and WPA3 clients during a migration. It is less secure than WPA3-only because attackers can push clients down to WPA2.
- What is the difference between a rogue AP and an evil twin?
- A rogue AP is an unauthorised device plugged into your wired network. An evil twin is an attacker's AP that imitates your network name to trick clients into joining it.