Wireless & Mobile Security · beginner · ~10 min
**What you will learn** - Explain how the main Wi-Fi security generations (WEP, WPA, WPA2-Personal, WPA2-Enterprise, WPA3) differ in authentication and encryption. - Describe why WPA2-PSK is vulnerable to *offline* passphrase cracking, and what makes WPA3-SAE resistant to it. - Read a wireless assessment and classify a network's protocol as secure, weak, or a critical finding. - State the authorization and legal boundaries that govern any wireless testing. - Recommend concrete hardening (protocol choice, passphrase strength, management-frame protection) as a defender.
Security objective: the asset you are protecting is the confidentiality and integrity of everything that travels over a Wi-Fi network — logins, browsing, files, IoT telemetry — plus control of who is allowed to join. The threat is a nearby attacker who can silently receive radio frames out of the air and, if the network is weak, recover the key or the passphrase. In this lesson you learn to detect which protection a network uses and to recommend the fix, without ever attacking a real network.
Wi-Fi signals travel through the air, and radio does not respect walls. Anyone within range — a neighbouring flat, a car in the car park, a lobby — can receive the raw frames using an ordinary wireless adapter in monitor mode. Wired Ethernet at least requires physical access to a cable; Wi-Fi does not. That single fact means the network's encryption and authentication are the only things standing between an eavesdropper and your traffic.
The protocol generation the access point (AP) uses decides how strong that protection is:
This lesson has no formal prereqs — it is the entry point of the Wireless & Mobile Security category. It sets up the next lesson, "Wireless attacks, evil twins, and hardening" (wireless-attacks-defenses), where the capture-and-crack workflow and defences like 802.11w are covered in depth. Everything here is conceptual: wireless testing is only ever done on networks you own or are explicitly authorized to test.
In authorized professional work — a Wi-Fi security assessment, a branch-office audit, an IoT deployment review — the protocol generation is the first thing you record, because it determines both the realistic attack and the correct remediation.
| Generation | Realistic risk | Professional recommendation |
|---|---|---|
| WEP | Key recovered in minutes with passive capture | Critical finding — decommission immediately |
| WPA2-PSK | Handshake captured, weak passphrase cracked offline at billions of guesses/second on a GPU | High risk if passphrase is weak or shared widely; move to WPA3 or Enterprise |
| WPA2-Enterprise | No shared secret; risk shifts to RADIUS/cert config and rogue APs | Strong baseline for organisations |
| WPA3-SAE | Offline cracking neutralised by design; implementation bugs (Dragonblood) patched over time | Current recommendation, ideally WPA3-Enterprise for large orgs |
Beyond the technical stakes, wireless testing sits under strict law. Capturing frames from, or attacking, a network you do not own or lack written authorization for can constitute wiretapping and unauthorized access — serious criminal offences in most jurisdictions. Professionals treat the scope document as a hard boundary: no scope, no touching the air. Understanding the generations lets you give accurate, defensible advice without ever needing to attack anything.
Each Wi-Fi security generation is a distinct concept. Learn them one at a time, then study the threat model that ties them together.
Definition. Wi-Fi (IEEE 802.11) is a shared broadcast medium: the AP and clients transmit radio frames that every device in range receives at the physical layer.
Plain explanation. On wired Ethernet a switch delivers your frames only down your cable. On Wi-Fi there is no cable — the frames are simply in the air, and any adapter in monitor mode can capture them. Nothing physically stops reception.
How it works. Because reception cannot be prevented, confidentiality must come from encryption (scrambling the payload) and access control must come from authentication (proving you know the credential before you are given a working key).
When / when-not. This applies to every wireless link. It is not true of the wired segment behind the AP, which has its own controls.
Pitfall. Assuming a hidden SSID or MAC filtering provides security. Neither encrypts traffic; both are trivially bypassed and are not access control.
Definition. Wired Equivalent Privacy, the original 802.11 encryption (RC4 with a 24-bit IV).
Plain explanation. WEP's initialisation vector is far too short and reused constantly, leaking key material. Passive tools recover the key in minutes regardless of how long the WEP password is.
How it works. IV collisions and weak key scheduling let an attacker statistically reconstruct the key from captured traffic alone.
When / when-not. Never. There is no safe configuration of WEP.
Pitfall. Treating WEP as "weak but better than nothing." In an assessment WEP is a critical finding — it offers essentially no protection.
Definition. WPA2 with a Pre-Shared Key: one passphrase (8–63 characters) shared by everyone on the network, using AES-CCMP encryption.
Plain explanation. "PSK" = pre-shared key: a single password everyone types in. When a device joins, a 4-way handshake proves it knows the passphrase and derives the session keys.
How it works. The handshake exchanges nonces and a Message Integrity Code (MIC) derived from the Pairwise Master Key (PMK), which comes from the passphrase + SSID. An observer who captures the handshake can, offline, guess passphrases, derive candidate keys, and check each against the captured MIC — no further contact with the network needed. Modern GPUs test enormous numbers of guesses per second, so weak or common passphrases fall quickly.
When / when-not. Acceptable only with a long, random, unique passphrase and where per-user accounting is not required. Not suitable when many people share the key or when the passphrase is guessable.
Pitfall. "Our Wi-Fi password is 10 characters, so it's fine." If those characters form a dictionary word or common pattern, offline cracking still succeeds. Length and randomness matter.
Definition. WPA2 where each user authenticates individually via 802.1X/EAP to a RADIUS server; there is no shared network passphrase.
Plain explanation. Instead of one password for everyone, each person (or device) has their own credential or certificate. The AP hands authentication off to a back-end RADIUS server.
How it works. After a successful EAP exchange the server delivers unique key material per session, so there is no single passphrase to capture and crack, and a departing user can be revoked without changing everyone's key.
When / when-not. The right choice for organisations with many users. Overkill for a typical home; requires RADIUS and certificate management.
Pitfall. Misconfigured EAP (e.g., clients that do not validate the server certificate) lets a rogue AP harvest credentials. Enterprise is only as strong as its certificate validation.
Definition. The current generation; Personal mode replaces PSK with SAE (Simultaneous Authentication of Equals, "Dragonfly"), a password-authenticated key exchange.
Plain explanation. SAE proves both sides know the password without letting a passive listener capture something they can crack offline. Each guess would require a fresh live interaction with the AP, which is slow and detectable.
How it works. SAE is an interactive exchange that also provides forward secrecy — recovering the password later does not decrypt previously captured traffic. WPA3 also mandates Protected Management Frames (802.11w).
When / when-not. The recommended default today. Note it has had implementation flaws (the Dragonblood side-channel/downgrade issues), largely fixed by patches — so keep firmware current. Use a transition mode only while old devices remain, since transition mode can allow downgrade to WPA2.
Pitfall. Assuming "WPA3 = unbreakable." Nothing is "completely secure"; WPA3 raises the bar dramatically but still depends on patched firmware and a decent password.
[ Radio range of the AP: the untrusted "air" ]
.........................................................
: ((( ))) Legitimate client :
: | :
: | encrypted 802.11 frames (also received by...) :
: v :
: ########## ENTRY POINT / trust boundary ######### :
: # Access Point (AP) # :
: # - advertises SSID + security (WEP/WPA2/WPA3) # :
: # - runs 4-way handshake (PSK) or SAE (WPA3) # :
: ################################################## :
: | :
: | <== TRUST BOUNDARY: air -> wired LAN :
:......|.................................................:
v
+----------------+ +------------------+
| Wired LAN |------->| RADIUS server | (Enterprise only)
| (trusted) | | per-user auth |
+----------------+ +------------------+
((( ))) ATTACKER: also inside radio range.
- Passively captures ALL frames out of the air.
- On WPA2-PSK: captures the 4-way handshake, then
cracks the passphrase OFFLINE (no more contact).
- Cannot decrypt WPA2-Enterprise/WPA3 the same way.
ASSETS PROTECTED: traffic confidentiality/integrity + join control.
INSECURE ASSUMPTION that fails on WPA2-PSK: "the passphrase is
secret enough that a captured handshake is useless."
Knowledge check.
Wireless work is command- and configuration-driven rather than a programming language. The key artefacts you will read in an assessment are the AP's advertised security and (in a lab) the tools that display it. The commands below are read-only, lab-safe — they observe your own environment; none attack anything.
# Read-only: list the security your OWN adapter sees advertised.
# 'RSN' in the output = WPA2/WPA3; 'WEP' = critical; no privacy bit = open.
nmcli -f SSID,SECURITY device wifi list # Linux, your own machine
# macOS equivalent (read-only): shows the security column for nearby SSIDs
# /System/Library/PrivateFrameworks/Apple80211.framework/Versions/\
# Current/Resources/airport -s
How to read a result — the security label maps to generation:
| Advertised label | Generation | Verdict |
|---|---|---|
Open / -- / no privacy |
None | Traffic in clear — critical for sensitive use |
WEP |
WEP | Critical finding |
WPA2 / RSN + PSK |
WPA2-Personal | Only as strong as the passphrase |
WPA2 + 802.1X / EAP |
WPA2-Enterprise | Strong |
WPA3 / SAE |
WPA3-Personal | Recommended |
Interpretation note: reading the label tells you the protocol, not that the network is safe — a WPA2-PSK label with a weak passphrase is still weak. The label is a starting point, not a verdict.
Wireless networks broadcast over the air. Anyone in range can receive the frames, so security comes entirely from encryption and authentication.
The 4-way handshake is the exchange that proves a device knows the passphrase when it joins the network.
WPA2-Personal's offline-crackable handshake is the single most common weakness in home and small-business Wi-Fi. WEP is an instant finding.
Knowing the generation tells you two things: the likely attack, and the recommendation (WPA2-Enterprise, or WPA3 with a strong passphrase).
Capturing or attacking Wi-Fi you do not own — or are not authorized to test — is illegal in most jurisdictions. It can count as wiretapping or unauthorized access.
Wireless testing requires explicit written scope. This course teaches the concepts only. It does not attack real networks.
Wireless security is a configuration topic, so the "code" here is the AP configuration and the verification of a fix, following the insecure → secure → verify shape. All commands are lab-safe and act only on hardware you own.
WARNING: intentionally vulnerable — use only in a local, isolated, authorized lab. Do not deploy.
# hostapd.conf on YOUR OWN test AP, isolated lab network.
# INSECURE: WPA2-PSK with a weak, dictionary-based passphrase.
interface=wlan0
ssid=LAB-TEST-AP
hw_mode=g
channel=6
wpa=2 # WPA2 only
wpa_key_mgmt=WPA-PSK # Pre-Shared Key mode (one shared password)
rsn_pairwise=CCMP # AES-CCMP encryption
wpa_passphrase=password123 # <-- WEAK: dictionary word + digits, crackable offline
ieee80211w=0 # management frames NOT protected
Why it is vulnerable: password123 is in every wordlist, so a captured handshake is cracked in seconds offline; ieee80211w=0 leaves management frames unprotected (relevant to next lesson's deauth attacks).
# hostapd.conf on YOUR OWN test AP. SECURE baseline.
interface=wlan0
ssid=LAB-TEST-AP
hw_mode=g
channel=6
# Prefer WPA3-SAE; allow WPA2 transition ONLY while legacy devices remain.
wpa=2
wpa_key_mgmt=SAE WPA-PSK # SAE = WPA3; WPA-PSK kept only for transition
rsn_pairwise=CCMP
ieee80211w=2 # Protected Management Frames REQUIRED (802.11w)
sae_require_mfp=1 # SAE clients must use PMF
# Long, random, UNIQUE passphrase (generate it, do not type a word):
# generated with: openssl rand -base64 18
wpa_passphrase=<20+char-random-passphrase-placeholder>
Once all clients support WPA3, drop WPA-PSK, leaving wpa_key_mgmt=SAE (WPA3-only, no downgrade path).
The test proves the secure config rejects a weak/wrong credential and accepts the correct strong one — run against your own lab AP.
# ACCEPT case: connect your own client with the CORRECT passphrase.
# Expected: association succeeds, 'wpa_state=COMPLETED'.
wpa_cli -i wlan0 status | grep wpa_state
# REJECT case: attempt with a WRONG passphrase (still your own AP).
# Expected: association fails; no COMPLETED state; AP logs a rejected auth.
# (Do this only on hardware you own; you are testing your OWN fix.)
# CONFIRM WPA3/PMF is actually negotiated, not silently downgraded:
# Expected key_mgmt=SAE and pmf=1 for a WPA3-capable client.
wpa_cli -i wlan0 status | grep -E 'key_mgmt|pmf'
Expected output (illustrative shape): for the accept case wpa_state=COMPLETED; the confirm step shows key_mgmt=SAE and pmf=1, proving the client negotiated WPA3 with protected management frames rather than falling back to WPA2-PSK. If it shows key_mgmt=WPA-PSK, the client downgraded and you should investigate the transition-mode risk.
Walking through the three-part configuration example:
Insecure config
wpa=2 selects WPA2. On its own this is a reasonable protocol choice.wpa_key_mgmt=WPA-PSK puts it in Personal (shared-passphrase) mode — the mode whose handshake is offline-crackable.rsn_pairwise=CCMP sets AES encryption (good), but encryption strength does not save a weak passphrase.wpa_passphrase=password123 is the fatal flaw: a dictionary word plus digits, present in common wordlists, so a captured handshake is cracked almost instantly.ieee80211w=0 leaves management frames unprotected.Secure config — what changed and why
wpa_key_mgmt=SAE WPA-PSK adds SAE (WPA3). SAE removes the offline-crackable step; WPA-PSK stays only so legacy devices can still join during transition.ieee80211w=2 makes Protected Management Frames required, and sae_require_mfp=1 forces SAE clients to use them.wpa_passphrase=<20+char-random-placeholder> replaces the dictionary word with a generated random string, so even the WPA2 fallback path resists cracking.Verify — how the values prove the fix
| Step | Input | Expected result | What it proves |
|---|---|---|---|
| Accept | correct passphrase | wpa_state=COMPLETED |
good credential is accepted |
| Reject | wrong passphrase | no COMPLETED; AP logs rejected auth |
bad credential is refused |
| Confirm | WPA3-capable client | key_mgmt=SAE, pmf=1 |
WPA3+PMF negotiated, not downgraded |
The key insight: fixing WPA2-PSK weakness is not one change but three complementary ones — stronger protocol (SAE), management-frame protection (PMF), and a strong random passphrase — and the verify step distinguishes a real WPA3 negotiation from a silent downgrade back to the weak path.
Real mistakes, why they are wrong, and how to correct and recognise them.
Mistake 1 — "A long password makes WPA2-PSK safe."
SummerHoliday2024!.openssl rand -base64 18) and prefer WPA3-SAE which removes the offline attack entirely.Mistake 2 — Treating a hidden SSID or MAC filter as security.
Mistake 3 — Deploying WPA3 in permanent transition mode.
wpa_key_mgmt=SAE WPA-PSK forever "for compatibility."SAE-only as soon as possible.WPA-PSK.Mistake 4 — Assuming WPA2-Enterprise is automatically safe.
Mistake 5 — Confusing "scanner passed" with "secure."
When wireless behaviour surprises you in a lab, work through these.
Common issues and steps
wpa_cli -i wlan0 status | grep key_mgmt. If it shows WPA-PSK, the client downgraded via transition mode — confirm the client actually supports SAE and firmware is current.rsn_pairwise=CCMP matches client capability and that ieee80211w is not set to required (2) for a legacy client that cannot do PMF. Temporarily set ieee80211w=1 (optional) in the lab to isolate the cause.iw list shows AP under supported interface modes).nmcli/airport shows the wrong security label. Re-scan; cached results can be stale. Compare against the AP's own config file.Questions to ask when it fails
key_mgmt/pmf.)Reading logs. On the AP, hostapd logs association attempts, EAP/SAE exchanges, and rejections. Grep the log for the client MAC to trace a single join from authentication through the 4-way handshake to COMPLETED (or the point it failed).
Security & safety — detection and logging for wireless.
Wireless attacks are best caught at the AP/controller and on the wired side, because the radio itself is uncontrolled. As a defender, log and monitor:
What to log (per event):
What to NEVER log:
Events that signal abuse:
How false positives arise:
Authorized real-world use case. A consultancy is engaged (with signed scope) to assess a retail chain's branch Wi-Fi. The tester walks each site, records the advertised security per SSID, flags any WEP or open networks as critical, checks whether guest and corporate SSIDs are properly separated, and confirms the corporate SSID uses WPA2-Enterprise or WPA3 with PMF. The deliverable is a prioritised report with remediation and retest steps — no traffic from customers or third parties is captured beyond the agreed scope.
Professional best-practice habits
| Habit | Beginner application | Advanced application |
|---|---|---|
| Validation | Confirm the advertised generation and passphrase policy | Verify negotiated key_mgmt/PMF, firmware patch level, transition-mode exposure |
| Least privilege | Separate guest SSID from corporate | Per-user 802.1X with device certs; segment VLANs behind the AP |
| Secure defaults | Prefer WPA3; never WEP | WPA3-Enterprise, PMF required, disable WPS |
| Logging | Record auth successes/failures | Correlate deauth floods, rogue-BSSID detection via a WIDS |
| Error handling | Fail closed on wrong credentials | Rate-limit auth, alert on downgrade/rogue-AP signals |
Beginner focus: correctly classify a network's generation and give the right recommendation (kill WEP, strengthen or replace WPA2-PSK, prefer WPA3).
Advanced focus: design WPA3-Enterprise with certificate validation, PMF, VLAN segmentation, and a wireless intrusion detection system (WIDS) that flags evil twins and downgrade attempts — all within an authorized scope.
All tasks are conceptual or lab-only on hardware and networks you own or are explicitly authorized to test. No task involves touching a third-party network.
Authorization checklist (complete before any lab task):
Beginner 1 — Classify from labels.
Open, WEP, WPA2 (PSK), WPA2 (802.1X), WPA3 (SAE)), rank them worst→best and give a one-line recommendation for each.Beginner 2 — Explain the offline attack in words.
Intermediate 1 — Harden a config (lab).
hostapd.conf in this lesson, produce a hardened version.ieee80211w=2), and replace the passphrase with a generated random one; document each change and why.openssl rand -base64 18 for the passphrase.Intermediate 2 — Verify no downgrade (lab).
key_mgmt and pmf from wpa_cli status; show the accept (correct passphrase → COMPLETED) and reject (wrong passphrase → no COMPLETED) cases.key_mgmt=WPA-PSK, transition mode allowed a downgrade.Challenge — Assessment mini-report.
Main concepts. Wi-Fi is a broadcast medium — anyone in range receives the frames — so encryption and authentication are the only protection. The protocol generation decides strength: WEP is broken (critical finding); WPA2-Personal (PSK) shares one passphrase and its 4-way handshake can be captured and cracked offline when the passphrase is weak; WPA2-Enterprise (802.1X) authenticates each user with no shared secret; WPA3 (SAE) is designed to resist offline cracking and adds forward secrecy plus mandatory PMF.
Key configuration/commands. wpa_key_mgmt=SAE enables WPA3; ieee80211w=2 requires Protected Management Frames; read the negotiated result with wpa_cli status (key_mgmt, pmf); generate strong passphrases with openssl rand. Read advertised security with read-only tools like nmcli device wifi list on your own machine.
Common mistakes. Trusting passphrase length over randomness; treating hidden SSIDs/MAC filters as security; leaving WPA3 in permanent transition mode (downgrade risk); skipping RADIUS certificate validation in Enterprise; equating a scanner label with "secure."
What to remember. Kill WEP; treat WPA2-PSK as only as strong as its passphrase; prefer WPA3 or WPA2-Enterprise; verify the client actually negotiated WPA3+PMF rather than downgrading; log auth results, deauth floods, and rogue BSSIDs while never logging passphrases or keys; and never touch wireless you do not own or are not explicitly authorized to test. Nothing is ever "completely secure" — recommend defence in depth and keep firmware patched.