Wireless Security
π Concept Note β CSF & NS Unit III Deep Dive | Source: MCA Sem III Syllabus
The Problem It Solves
Wired networks have a physical security property: to attack them you must plug something in. Wi-Fi broadcasts in every direction through walls and out into the car park. Anyone within radio range can passively capture every frame β no compromise required.
So wireless security cannot rely on physical access control. It must assume the attacker is already listening and solve everything with cryptography and authentication.
The Evolution β and why each generation broke
| WEP (1997) | WPA (2003) | WPA2 (2004) | WPA3 (2018) | |
|---|---|---|---|---|
| Cipher | RC4 | RC4 + TKIP | AES-CCMP | AES-GCMP |
| Key exchange | Static key | 4-way handshake | 4-way handshake | SAE (Dragonfly) |
| Forward secrecy | β | β | β | β |
| Status | Broken | Deprecated | Vulnerable (KRACK) but patchable | Current |
- WEP failed because its 24-bit initialisation vector (IV) was far too short. On a busy network IVs repeat within hours, and reused keystream lets an attacker recover the key. WEP is crackable in minutes β never acceptable.
- WPA was a stopgap on the same hardware: TKIP rotated keys per packet, but kept RC4 and is now broken too.
- WPA2 moved to AES-CCMP β the cipher itself remains sound. Its weakness is the handshake (KRACK) and offline cracking of weak passphrases.
- WPA3 fixes the handshake itself.
βοΈ How It Actually Works β the WPA2 4-Way Handshake
This is the heart of Unit IIIβs wireless section. The goal: both sides prove they know the password and derive fresh session keys β without ever sending the password over the air.
Starting point: both the client and AP already know the PMK (Pairwise Master Key), derived from the passphrase + SSID via PBKDF2. The PMK itself is never transmitted.
CLIENT (supplicant) ACCESS POINT (authenticator)
β β
β ββββ (1) ANonce βββββββββββββββββββββββββββ β AP sends random number
β β
Now client has: PMK + ANonce + SNonce + both MACs β
β derives the PTK (session key) β
β β
β βββ (2) SNonce + MIC βββββββββββββββββββββββΊβ client's random + proof
β β
β AP now derives the same PTK,
β verifies MIC β client knew the PMK β
β β
β ββββ (3) GTK (encrypted) + MIC ββββββββββββ β group key for broadcast
β β
β βββ (4) ACK ββββββββββββββββββββββββββββββββΊβ
β β
βββββββββββ encrypted session begins βββββββββββ
The pieces:
- ANonce / SNonce β random βnumbers used onceβ from AP and client. They guarantee every session derives different keys, even with the same password.
- PTK (Pairwise Transient Key) β the actual session key encrypting your unicast traffic. Derived as
PTK = f(PMK, ANonce, SNonce, AP MAC, client MAC). Because both sides have all five inputs, both compute the same PTK independently β it is never transmitted. - MIC (Message Integrity Code) β proves the sender knows the PTK (and therefore the PMK/password) without revealing it.
- GTK (Group Temporal Key) β shared by all clients, used for broadcast/multicast; re-keyed when a device leaves.
Why this handshake is attackable
The handshake is sent in the clear (it must be β no keys are established yet). An attacker who captures all four messages gets the ANonce, SNonce, MACs, and MIC. They cannot reverse the MIC, but they can guess offline:
for each candidate password:
PMK = PBKDF2(password, SSID)
PTK = f(PMK, ANonce, SNonce, MACs)
if computed MIC == captured MIC: β password found
This is offline brute force β unlimited attempts, no interaction with the network, no lockout. The only defence is a long, high-entropy passphrase. A dictionary word falls in seconds; a 20-character random passphrase is infeasible.
π‘ This is why attackers send deauth frames: to force a reconnection so they can capture a fresh handshake. (Also why PMKID attacks matter β on some APs a single frame yields crackable material without waiting for any client.)
WPA2-Personal vs WPA2-Enterprise
| Personal (PSK) | Enterprise (802.1X) | |
|---|---|---|
| Credential | One shared passphrase for everyone | Per-user credentials/certificates |
| Auth backend | None | RADIUS server + EAP |
| Revoking one user | Change password for everyone | Disable that one account |
| Attacker who knows the password | Can decrypt othersβ traffic (with handshake) | Cannot β keys are per-user |
| Use | Home, small office | Any real organisation |
802.1X flow: the client (supplicant) authenticates through the AP (authenticator) to a RADIUS server (authentication server). The AP passes traffic only after the server approves, and a unique PMK per user per session is issued. EAP variants: EAP-TLS (certificates both sides β strongest), PEAP/EAP-TTLS (server cert + user password).
WPA3 β how it fixes things
SAE (Simultaneous Authentication of Equals), a.k.a. Dragonfly, replaces the PSK handshake:
- It is a password-authenticated key exchange. The captured exchange contains no material that can be brute-forced offline β each password guess requires a fresh live interaction with the AP, which can be rate-limited and logged.
- Forward secrecy: each session uses fresh ephemeral keys. Capturing traffic today and learning the password later still doesnβt decrypt it. (Under WPA2 it does β a critical difference.)
- Protected Management Frames (802.11w) are mandatory, which kills classic deauth attacks.
- OWE (Opportunistic Wireless Encryption) for open networks: encrypts cafΓ©/airport Wi-Fi individually per client even with no password. Not authentication β but it stops trivial passive sniffing.
Common Wi-Fi Attacks
Evil Twin
Attacker runs a rogue AP broadcasting the same SSID as a legitimate one, often with a stronger signal. Devices prefer the stronger signal and auto-connect (especially to remembered networks). All victim traffic then flows through the attacker.
Usually paired with a captive portal that phishes credentials. Defences: always use HTTPS/VPN, disable auto-connect to open networks, use 802.1X (the client validates the server certificate, so a fake AP fails), and WIPS to detect rogue APs.
Deauthentication attack
In WPA2, management frames are unauthenticated. Anyone can forge a βdeauthenticateβ frame claiming to be the AP, and the client obeys and disconnects.
Used to (a) deny service, or (b) β more importantly β force a reconnection to capture the 4-way handshake for offline cracking, or push victims onto an evil twin.
Defence: 802.11w Protected Management Frames (PMF), which authenticates management frames. Optional in WPA2, mandatory in WPA3.
KRACK (Key Reinstallation Attack, 2017)
Targets the handshake protocol logic, not the AES cipher.
Mechanism: message 3 of the handshake may be retransmitted if the AP doesnβt receive an ACK. An attacker in a MitM position replays message 3. The client reinstalls the already-in-use PTK, which resets the nonce/packet-number counter to zero. Reusing a nonce with the same key means the same keystream encrypts different plaintexts β enabling decryption and, in some cases, packet forgery.
Key points: it did not break AES and does not reveal the Wi-Fi password. It was fixed in software β patch clients and APs. Android/Linux (wpa_supplicant) were worst hit because they reinstalled an all-zero key.
Others worth knowing
- WPS PIN β the 8-digit PIN is validated in two halves, reducing brute force to ~11,000 attempts. Always disable WPS.
- Rogue AP β an employee plugging in an unauthorised AP, bypassing all perimeter controls.
- Karma/probe attacks β devices broadcast probes for remembered SSIDs; an attacker answers βyes, thatβs meβ.
Securing a Wireless Network
- Use WPA3 where supported; otherwise WPA2-AES (never WEP/TKIP).
- Long random passphrase (20+ chars) β the only defence against offline cracking on PSK.
- WPA2/WPA3-Enterprise (802.1X) for any organisation β per-user credentials and revocation.
- Disable WPS.
- Enable 802.11w (PMF) to stop deauth.
- Change default admin credentials and SSID; keep firmware patched (KRACK et al.).
- Separate guest and IoT SSIDs onto isolated VLANs (DMZ & Network Segmentation).
- Deploy WIDS/WIPS to detect rogue and evil-twin APs.
- Reduce transmit power / place APs so coverage doesnβt flood the car park.
β οΈ Not real security: hiding the SSID (itβs still in probe/beacon traffic) and MAC filtering (MACs are sent in cleartext and trivially spoofed). Know these as classic exam distractors.
β οΈ Gotchas / Exam Traps
- The PMK/password is never transmitted in the 4-way handshake β the MIC proves knowledge of it.
- Capturing a handshake enables offline brute force; passphrase strength is the whole defence.
- KRACK broke the handshake logic (nonce reuse), not AES, and does not disclose the password.
- Deauth works because WPA2 management frames are unauthenticated β fixed by 802.11w/WPA3.
- WPA3βs SAE gives forward secrecy; WPA2 does not β learning the password later decrypts old WPA2 captures.
- SSID hiding and MAC filtering are not security controls.
πΊ Learn by Video
Supplementary only β these help you visualise. The technical content above is written independently and stands on its own.
- βΆοΈ βWiFi (Wireless) Password Security β WEP, WPA, WPA2, WPA3, WPS Explainedβ β https://www.youtube.com/watch?v=WZaIfyvERcA
- βΆοΈ βNext-Gen Wi-Fi Security β WPA3 Explainedβ β https://www.youtube.com/watch?v=aPoe4WtX2mU
- π KRACK attack (Computerphile) β search
- π 4-way handshake / Wi-Fi cracking β search
Related Concepts
- Network Defence Mechanisms β Unit III hub
- Hash & Encryption Reference β PBKDF2, AES, MIC primitives β‘
- DMZ & Network Segmentation β isolating guest/IoT SSIDs
- VPN β protects you on untrusted/open Wi-Fi
- OSI Model & TCP-IP Security β Layer 2 attacks