Network Security: Link Layer Security
3.1 ARP Cache Poisoning
Link Layer Addressing Fundamentals
- IP Address (32-bit): Network-layer address used for routing packets to destination networks across the internet
- MAC Address (48-bit): Link-layer (physical/Ethernet) address used to identify source and destination on the same local network
- Most LANs use globally unique 48-bit addresses
- Some LANs use configurable addresses (function of IP address)
- Special broadcast address exists for sending to all nodes on the network
Address Resolution Protocol (ARP)
Every IP node (host or router) on a LAN maintains an ARP table containing:
- IP address: The network layer address
- MAC address: The corresponding link layer address
- TTL (Time To Live): Expiration time for the mapping (typically 20 minutes)
ARP Protocol Mechanism (RFC 826)
- ARP Request (Broadcast):
- A broadcasts an ARP query packet to all machines on the subnet
- Contains: Sender IP (A’s IP), Sender MAC (A’s MAC), Target IP (C’s IP)
- All machines on the subnet receive this broadcast
- ARP Response (Unicast):
- C recognizes its IP address in the request
- C replies directly to A with its MAC address
- Response is sent as unicast to A’s MAC address
- Learning and Caching:
- A caches the <IP, MAC> pair in its ARP table
- C learns A’s IP-MAC mapping from the request
- Other hosts (B, D) typically ignore the exchange but could learn from it
- Entries are “soft state” – discarded after period of inactivity
Sniffing on Shared Media
Sniffing is trivially easy on shared media networks:
- Shared Media Examples:
- Hub-based Ethernet networks (all traffic visible to all ports)
- Wireless networks (WiFi – radio signals broadcast to all nearby devices)
- Same collision domain on Ethernet cable
- Attack Method:
- Promiscuous Mode: Network adapters can be configured to capture ALL packets, not just those addressed to them
- No special hardware required – available on most network adapters
- Wireless makes this even easier – “war driving” with long-range WiFi antennas
- Access Requirements:
- Physical access to shared media (same cable/hub)
- Within range of wireless access point
- Located in same collision domain as sender/recipient
ARP Poisoning Attack (ARP Spoofing)
Attackers on isolated (switched) network segments can use ARP poisoning to intercept traffic between two hosts, positioning themselves as a Man-in-the-Middle (MITM).
Attack Scenario:
- Initial State: Alice wants to communicate with Bob on a switched network. Eve (attacker) is also on the network but on an isolated segment (switch prevents direct sniffing).
- ARP Request: Alice broadcasts an ARP request asking “Who has Bob’s IP? Tell me your MAC address.”
- Malicious Response: Eve responds to Alice’s ARP request claiming to have Bob’s IP address, but provides Eve’s MAC address instead of Bob’s actual MAC address.
- MITM Position:
- Alice’s ARP table now maps Bob’s IP to Eve’s MAC address
- All traffic Alice sends to Bob actually goes to Eve first
- Eve can inspect, modify, or log the traffic
- Eve forwards packets to Bob to avoid detection (becoming a transparent MITM)
ARP Poisoning Methods
| Method | Description | Effectiveness |
|---|---|---|
| Spoofed ARP Request | Send ARP request with false sender IP/MAC mapping. Some hosts will update their tables based on ARP requests even without querying. | Works on hosts that cache from requests |
| Spoofed ARP Response (Racing) | Monitor network for legitimate ARP requests, then race to respond with attacker’s MAC address before legitimate host responds. | Improved by loading destination’s segment/host to slow legitimate response |
| Unsolicited ARP Response | Send ARP responses without any corresponding request. Some hosts will update their ARP tables even without making a request (gratuitous ARP). | Works on hosts that accept gratuitous ARP |
Defenses Against ARP Poisoning
| Defense Mechanism | Description | Limitations |
|---|---|---|
| Static ARP Tables | Manually configure and maintain IP-to-MAC mappings, preventing dynamic updates from ARP messages |
|
| Ignore Unsolicited Mappings | Configure systems to only accept ARP responses they specifically requested, ignoring gratuitous ARP and request-based updates | Reduces attack surface but doesn’t eliminate racing attacks |
| Network Monitoring | Deploy monitoring systems to detect ARP poisoning packets and suspicious port activity (multiple MAC addresses claiming same IP) | Reactive rather than preventive; requires constant monitoring and rapid response |
| Network Segmentation with Routers | Use routers instead of switches to separate network segments, limiting ARP broadcast domains | More expensive; may impact performance; attacker could shift to DNS poisoning |
- Principle of Complete Mediation: ARP accepts responses without verifying the sender’s authority
- Principle of Least Privilege: Any host can claim any IP-MAC mapping
- Principle of Fail-Safe Defaults: ARP trusts by default rather than verifying
3.2 Wireless Security Basics
Wireless Networking Overview
Network Architecture Models
| Architecture | Description | Use Cases |
|---|---|---|
| Infrastructure Mode (Base Station Approach) |
|
|
| Ad Hoc Mode |
|
|
Joining a Wireless Network (BSS)
Method 1: Passive Scanning (Beacon Frames)
- APs broadcast beacon frames every ~100ms (configurable)
- Beacon Contents (~50 bytes):
- Timestamp (for network synchronization)
- Beacon Interval
- Capability Information
- SSID (Service Set Identifier – network name)
- Supported data rates
- Parameter sets (channel info, etc.)
- Clients listen passively for beacons to discover networks
Method 2: Active Scanning (Probe Request/Response)
- Client broadcasts Probe Request frames
- APs respond with Probe Response containing network information
- Faster than passive scanning
Authentication and Association:
- Node selects network based on beacon/probe information
- Node authenticates itself to the AP using:
- Open System: No actual authentication, just SSID verification
- Shared Key: WEP/WPA/WPA2 keys for cryptographic authentication
- Upon successful authentication, node associates with AP and can begin communication
The Fundamental Security Problem
The fundamental challenge with wireless networking security:
- Broadcast Nature: Radio signals propagate in all directions within range
- No Physical Boundary: Unlike wired networks with defined physical access points
- Anyone with a Radio Can:
- Eavesdrop: Passively intercept all wireless transmissions within range
- Inject Traffic: Actively transmit packets on the wireless network
- Jam Communications: Interfere with legitimate transmissions
Attacker Advantages:
- Long-range directional antennas can intercept from significant distances
- No physical intrusion required – attacks possible from parking lots, adjacent buildings, etc.
- “War driving” – mobile attackers scanning for vulnerable networks
Basic Wireless Attacks
| Attack | Description | Difficulty |
|---|---|---|
| Passive Sniffing | Capturing and analyzing wireless traffic within range. Trivial with appropriate wireless adapter and software. | Very Easy |
| Active Jamming | Transmitting radio interference to disrupt legitimate communications. Denial-of-service at physical layer. | Hard to Defend |
| Rogue Access Points | Attacker sets up fake AP with stronger signal or same SSID. Victims connect to attacker’s AP, giving complete MITM position. | Moderate |
Basic Security Measures (Pre-WPA)
Inadequate Security Mechanisms
| Mechanism | Implementation | Security Level | Bypass Method |
|---|---|---|---|
| Open System | Requires correct SSID to associate with AP | Minimal | SSIDs transmitted in clear text, easily observable |
| MAC Whitelisting | AP maintains list of allowed MAC addresses; only those MACs can associate | Low |
|
| SSID Hiding (Network Cloaking) | Disable SSID broadcast in beacon frames | Very Low |
|
| WEP (Wired Equivalent Privacy) | Link-layer encryption with shared cryptographic key | Broken | Multiple cryptographic weaknesses (see Section 3.3) |
WEP (Wired Equivalent Privacy) – Initial Design
Industry solution designed to provide security equivalent to wired networks:
- Access Control: Prevent unauthorized network access via authentication
- Confidentiality: Encrypt data to prevent eavesdropping
- Data Integrity: Detect and prevent injection of spoofed packets
- Simplicity: Use shared key among all devices on the network
Design Philosophy (from WEP specification):
“Security relies on the difficulty of discovering the secret key through a brute-force attack”
Note: This assumption proved to be fundamentally flawed – security should not rely solely on key secrecy.
WEP Components
| Component | Purpose | Implementation |
|---|---|---|
| Shared Key | Symmetric encryption key known to all authorized devices | 40-bit or 104-bit key (plus 24-bit IV = 64-bit or 128-bit total) |
| WEP Authentication | Verify that connecting device knows the shared key | Challenge-response protocol using RC4 encryption |
| WEP Data Encapsulation | Encrypt data packets and provide integrity checking | RC4 stream cipher with CRC-32 integrity check |
3.3 WEP Weeps (WEP Vulnerabilities)
WEP Shared Key Authentication
- Authentication Request: Client (station) sends authentication request to AP
- Challenge: AP responds with 128-byte challenge text (nonce) sent in plaintext
- Response: Client encrypts the challenge using RC4 with shared WEP key and sends encrypted challenge back to AP
- Verification: AP decrypts response using shared key:
- If decrypted nonce matches original challenge → Authentication succeeds
- If decrypted nonce doesn’t match → Authentication fails
Shared Secret Distribution: The WEP key must be distributed out-of-band (manually configured on all devices) – no key exchange protocol defined in WEP.
WEP Data Encryption Mechanism
- Integrity Checksum: Compute CRC-32 checksum c(M) of original message M
- Plaintext Construction: Create plaintext P = <M, c(M)> (message concatenated with checksum)
- Keystream Generation:
- Concatenate 24-bit Initialization Vector (IV) with WEP key K
- Generate keystream using RC4: RC4(IV, K)
- IV is chosen for each packet (method varies by implementation)
- Encryption: XOR plaintext with keystream:
C = P ⊕ RC4(IV, K) - Transmission: Transmit both IV (in clear) and ciphertext C
Decryption Process:
- Extract IV: Read IV from packet header (transmitted in plaintext)
- Regenerate Keystream: Use extracted IV and shared key K to regenerate keystream: RC4(IV, K)
- Decrypt: XOR ciphertext with keystream:
P’ = C ⊕ RC4(IV, K) = (P ⊕ RC4(IV,K)) ⊕ RC4(IV,K) = P - Integrity Check:
- Split P’ into message M’ and checksum c’
- Recompute checksum c(M’) and compare with c’
- If c(M’) = c’ → Integrity check passes
- If c(M’) ≠ c’ → Packet rejected
WEP Key Structure
| Key Type | IV Size | Key Size | Total | Notes |
|---|---|---|---|---|
| Original WEP (40-bit) | 24 bits | 40 bits | 64 bits |
|
| Extended WEP (104-bit) | 24 bits | 104 bits | 128 bits |
|
WEP Attack 1: Keystream Reuse
WEP allows Initialization Vectors (IVs) to be reused across different frames, and many implementations handle IVs poorly:
- Fixed IV: Some cards set IV=0 for all packets (802.11 compliant!)
- Reset on Reboot: Some cards reinitialize IV to 0 each time device powers up
- IV Wraparound: 24-bit IV space = only 2^24 = 16,777,216 possible values
- At 5 Mbps with 1500-byte packets: IV wraps in less than 12 hours
- Birthday paradox: expect IV collision within ~5000 packets (minutes of traffic)
Attack Mechanism:
When two packets use the same IV with the same key:
| C₁ = P₁ ⊕ RC4(IV, K) |
| C₂ = P₂ ⊕ RC4(IV, K) |
| Then: C₁ ⊕ C₂ = P₁ ⊕ P₂ |
Exploitation:
- XOR Ciphertexts: C₁ ⊕ C₂ = P₁ ⊕ P₂ (XOR of two plaintexts)
- Known Plaintext Attack: If attacker knows or can guess P₁, can solve for P₂
- Cryptanalysis: Even without known plaintext, statistical analysis of P₁ ⊕ P₂ can reveal both plaintexts using known techniques
WEP Attack 2: Decryption Dictionary
Goal: Pre-compute keystreams for all possible IVs to enable instant decryption of any intercepted packet.
Method:
- Obtain Known Plaintext-Ciphertext Pairs:
- Wait for predictable traffic (DHCP, ARP, DNS queries with known structure)
- Inject known packets from outside the network
- Observe broadcast traffic encrypted and sent in clear
- Extract Keystream: For known pair (P, C) with IV:
- RC4(IV, K) = P ⊕ C
- Now have the keystream for this specific IV
- Store in Dictionary: Save <IV, RC4(IV, K)> pair in database
- Decrypt Future Packets: When intercepting new packet with known IV:
- Look up keystream for that IV in dictionary
- P = C ⊕ RC4(IV, K)
- Instant decryption without key recovery
Storage Requirements:
- 2^24 possible IVs = ~16.7 million entries
- Each entry: IV (3 bytes) + keystream (1500 bytes for max Ethernet frame) ≈ 1503 bytes
- Total storage: ~24 GB for complete dictionary
- Practical for modern storage capacity
Comparison to Brute Force:
- Brute forcing 40-bit key: 2^40 = ~1 trillion attempts (feasible but time-consuming)
- Brute forcing 104-bit key: 2^104 operations (computationally infeasible)
- Dictionary attack: Works equally well against both key sizes!
WEP Attack 3: Message Modification
WEP uses CRC-32 for integrity checking, but CRC is a linear function over the Galois Field GF(2), where addition is XOR:
CRC Homomorphic Property:
c(x ⊕ y) = c(x) ⊕ c(y)
This mathematical property allows attackers to modify ciphertext in predictable ways without knowing the key or plaintext!
Attack Mechanism:
- Intercepted Ciphertext:
C = RC4(IV, K) ⊕ (M, c(M)) - Desired Modification:
Attacker wants to change message from M to M’ = M ⊕ Δ - Compute Modified Ciphertext:
C’ = C ⊕ (Δ, c(Δ)) - Verification (this is why it works):
C’ = C ⊕ (Δ, c(Δ))
= RC4(IV, K) ⊕ (M, c(M)) ⊕ (Δ, c(Δ))
= RC4(IV, K) ⊕ (M ⊕ Δ, c(M) ⊕ c(Δ))
= RC4(IV, K) ⊕ (M’, c(M ⊕ Δ)) ← CRC linearity
= RC4(IV, K) ⊕ (M’, c(M’)) ← CRC linearity again - Result: Modified ciphertext C’ will decrypt to M’ and pass the integrity check!
Attack Power:
- No key required – attacker doesn’t need to know K
- No plaintext required – attacker doesn’t need to know M
- Blind modification – can modify encrypted messages in predictable ways
- No detection – modified packets pass WEP integrity check
Example Attack: Modify encrypted IP packet to change destination address without knowing packet contents or key.
WEP Attack 4: Traffic Injection
If attacker knows one plaintext-ciphertext pair, can inject arbitrary traffic:
Given:
- Known plaintext M
- Corresponding ciphertext C
- IV value v used for that packet
- Relationship: C = RC4(v, k) ⊕ (M, c(M))
Attack Steps:
- Extract Keystream:
RC4(v, k) = C ⊕ (M, c(M))
Attacker now knows the keystream for IV=v - Create New Message: Craft arbitrary message M’ with checksum c(M’)
- Encrypt New Message:
C’ = RC4(v, k) ⊕ (M’, c(M’)) - Inject Packet: Send packet with IV=v and ciphertext C’
- AP will decrypt successfully
- Integrity check will pass
- Attacker’s message accepted as legitimate traffic
Note on IV Reuse: Attacker is reusing the same IV (v) for injection, but WEP specification allows this! The standard doesn’t prohibit IV reuse across different packets.
Impact: Complete bypass of WEP access control – attacker can inject arbitrary frames without knowing WEP key.
WEP Attack 5: Authentication Spoofing
WEP’s shared key authentication is vulnerable to replay attacks:
- Attacker Observes Legitimate Authentication:
- Challenge (nonce in plaintext): N
- Response (nonce encrypted): RC4(IV, K) ⊕ N
- Extract Keystream:
RC4(IV, K) = (RC4(IV, K) ⊕ N) ⊕ N
Attacker knows both challenge and response, can compute keystream - Authenticate as Legitimate User:
- Send authentication request to AP
- Receive new challenge N’
- Encrypt N’ using captured keystream: RC4(IV, K) ⊕ N’
- Send response with same IV as captured exchange
- Result: Authentication succeeds without knowing WEP key!
Fundamental Flaw: Authentication should prove knowledge of secret key, but due to keystream reuse, observing one successful authentication allows unlimited future authentications.
WEP Attack 6: IP Redirection
Attacker can trick the AP into decrypting arbitrary ciphertext:
- Intercept Encrypted Packet: Capture packet with ciphertext C containing unknown message M
- Modify Destination Address: Use message modification attack (CRC linearity) to change encrypted IP destination to attacker’s IP address:
- Compute Δ such that original_dest ⊕ Δ = attacker_IP
- Modify C to C’ = C ⊕ (Δ, c(Δ))
- C’ now decrypts to M’ with destination = attacker_IP
- Inject Modified Packet: Send C’ back into network
- AP Decrypts and Forwards: AP decrypts packet, passes integrity check, and forwards to attacker’s IP
- Attacker Receives Plaintext: Packet arrives at attacker’s machine in plaintext form
Result: Attacker obtains decryption of any intercepted packet without knowing the WEP key.
WEP Attack 7: Ultimate Break – Key Recovery
The most devastating attack: recovers the actual WEP key from intercepted traffic.
Attack Characteristics:
- Type: Passive cryptanalytic attack on RC4 key scheduling algorithm
- Target: Exploits relationship between RC4 output and key
- Requirement: Specific “weak IVs” that leak key information
- Success Rate: ~15% of all IVs are “weak”
Attack Process:
- Capture Packets: Collect large number of encrypted packets (4-6 million packets typically required)
- Identify Weak IVs: Filter packets to find those using weak IVs (specific patterns in first few bytes)
- Statistical Analysis: Use weak IV packets to derive key bytes:
- Each weak IV packet votes for most likely value of specific key byte
- Statistical analysis resolves key one byte at a time
- First byte recovered first, then second byte, etc.
- Key Reconstruction: After sufficient packets, recover complete WEP key with high probability
Practical Implementation (AT&T Labs Tech Report):
| Metric | Value |
|---|---|
| Development Time | < 2 hours of coding |
| Packets Required | ~4-6 million packets (~40-bit key) ~5-7 million packets (~104-bit key) |
| Attack Duration | Few hours of passive packet capture on busy network |
| Hardware Required | Off-the-shelf wireless adapter and laptop |
| Success Rate | 256 probable cases resolved to single key |
| Key Recovery | Full WEP key recovered (40-bit or 104-bit) |
Attack Acceleration:
- Active Injection: Inject packets to force AP to generate more traffic with weak IVs
- Packet Replay: Replay captured ARP requests to stimulate responses
- Tools Available: Aircrack-ng suite automates entire attack
- Modern Implementation: Can crack WEP in minutes on moderately busy network
WEP Security Failure Timeline
| Date | Event |
|---|---|
| 1997 | 802.11 WEP standard released – marketed as “Wired Equivalent Privacy” |
| Mar 2000 | Simon, Aboba, Moore publish early warnings about WEP weaknesses |
| Oct 2000 | Jesse Walker: “Unsafe at any key size” – identifies fundamental design flaws |
| Jan 2001 | Borisov, Goldberg, Wagner: Seven serious attacks on WEP Comprehensive breakdown of WEP security published |
| Mar 2001 | Arbaugh: “Your 802.11 network has no clothes” – confirms WEP is fundamentally broken |
| May 2001 | Arbaugh: Additional attacks discovered |
| Jun 2001 | Newsham: Dictionary attacks on WEP keys demonstrated |
| Aug 2001 | Fluhrer, Mantin, Shamir: Efficient passive attack on RC4 in WEP Complete key recovery from passive traffic capture |
| Feb 2002 | Arbaugh, Mishra: Additional attack vectors documented |
| 2003 | WPA introduced as interim replacement for WEP |
| 2004 | WPA2 (802.11i) ratified as long-term solution |
Lesson Learned: WEP’s failures resulted from:
- Relying on security through obscurity (key secrecy alone)
- Using inappropriate cryptographic primitives (CRC for integrity)
- Poor implementation choices (small IV space, IV reuse allowed)
- Lack of cryptographic review before standardization
- Export restrictions limiting key space during design phase
3.4 WPA & WPA2
Wi-Fi Protected Access (WPA) – 2003
After WEP was comprehensively broken, the Wi-Fi Alliance needed an immediate solution that could:
- Deploy Quickly: Work with existing WEP hardware (firmware upgrades only)
- Fix Critical Flaws: Address WEP’s most serious vulnerabilities
- Maintain Compatibility: Allow gradual migration from WEP
- Bridge to Future: Serve as interim solution until WPA2 (802.11i) completed
Design Philosophy: “Good enough now” rather than “perfect later” – prioritized rapid deployment over ideal solution.
WPA Security Enhancements
TKIP (Temporal Key Integrity Protocol)
| Feature | WEP | WPA/TKIP | Improvement |
|---|---|---|---|
| IV Size | 24 bits | 48 bits | Extended IV prevents wraparound: 2^48 = 281 trillion values |
| Key Size | 40 or 104 bits | 128 bits | Larger key space resists brute force |
| Key Management | Static shared key | Dynamic per-packet keys |
|
| Integrity Check | CRC-32 (linear, unkeyed) | MIC (Message Integrity Check) |
|
| Replay Protection | None | Sequence counter | Prevents packet replay attacks |
Per-Packet Key Construction
- Pair-wise Master Key (PMK): Derived from authentication (PSK or 802.1X)
- Pair-wise Transient Key (PTK): Session key derived from PMK, client MAC, AP MAC, and nonces
- Per-Packet Key: Unique encryption key for each packet generated by mixing:
- PTK
- Transmitter MAC address
- 48-bit packet sequence number (TKIP Sequence Counter)
- Result: Even if attacker captures keystream for one packet, it’s useless for other packets
Key Rotation:
- Temporal keys automatically updated periodically
- Prevents long-term key compromise from revealing all traffic
- Rotation frequency configurable (typical: 10,000 packets or 1 hour)
Authentication and Key Management
WPA introduces proper authentication framework based on EAP:
- Flexibility: Framework supports multiple authentication methods
- Credential Types:
- Digital certificates (most secure)
- Username and password (most common)
- Secure ID tokens
- Biometric credentials
- Pre-shared keys (WPA-Personal)
- Mutual Authentication: Both client and authentication server verify each other’s identity
- Key Distribution: Integrates with existing key distribution methods:
- Kerberos
- RADIUS
- Key Distribution Centers (KDC)
- Diameter
WPA Authentication Process
- Association: Client associates with AP (link-layer connection established)
- EAP Identity Request: AP requests client identity
- EAP Identity Response: Client provides identity (e.g., username@domain.xyz)
- RADIUS Access Request: AP forwards identity to Authentication Server (often RADIUS server)
- EAP Method Negotiation:
- Server proposes authentication method (EAP-TLS, EAP-TTLS, PEAP, etc.)
- Client and server exchange authentication data
- Multiple request-response exchanges possible depending on method
- Authentication Server Decision:
- If successful: Generate encryption keys (PMK) and session parameters
- If failed: Reject access
- EAP-Success: AP notifies client of successful authentication
- Key Distribution: Encryption keys distributed securely to client and AP
- Data Communication: Encrypted communication begins using derived keys
Session Key Distribution (Simplified)
Participants:
- Client (C): Has long-term key K_c shared with Authentication Server
- Access Point (AP): Has long-term key K_s shared with Authentication Server
- Authentication Server (AS): Knows both K_c and K_s
Goal: Establish session key K_cs shared between Client and AP
Protocol:
- Client Request:
C → AS: {C, AP, nonce}
Client requests session with AP, includes fresh nonce for replay protection - Server Response to Client:
AS → C: {K_cs, AP, nonce}_{K_c}
Server encrypts session key K_cs and request info using client’s long-term key - Server Response to AP:
AS → AP: {K_cs, C, nonce}_{K_s}
Server encrypts session key K_cs and client info using AP’s long-term key - Secure Communication:
C ↔ AP: {data}_{K_cs}
Client and AP communicate using session key K_cs
Security Properties:
- Confidentiality: Long-term keys K_c and K_s never transmitted (used only once per session)
- Key Freshness: New session key K_cs generated for each session
- Forward Secrecy: Compromise of long-term key doesn’t reveal past session keys
- Mutual Authentication: Both parties can decrypt messages only if they know correct long-term keys
WPA vs WPA2
| Feature | WPA (2003) | WPA2 (2004) |
|---|---|---|
| Standard | Wi-Fi Alliance interim solution | IEEE 802.11i (full standard) |
| Encryption | TKIP with RC4 stream cipher | CCMP with AES block cipher |
| Encryption Mode | RC4 stream cipher (improved from WEP) | AES-CTR (Counter Mode) for encryption |
| Integrity | Michael algorithm (MIC) | CBC-MAC (Cipher Block Chaining Message Authentication Code) |
| Combined Mode | Separate encryption and integrity | CCMP (Counter Mode with CBC-MAC Protocol) – combined AES mode |
| Key Size | 128-bit | 128-bit AES |
| Hardware Requirement | WEP hardware compatible (firmware upgrade) | Requires new hardware (AES acceleration) |
| Security Level | Significant improvement over WEP, but still some vulnerabilities | Strong security (no practical attacks when properly configured) |
| Status | Deprecated (legacy support only) | Current standard – mandatory for Wi-Fi Alliance certification since 2006 |
WPA2 Technical Details
WPA2 uses AES-CCMP, which provides both confidentiality and authenticity in a single cryptographic operation:
- AES-CTR (Counter Mode):
- Block cipher operated as stream cipher
- Counter value incremented for each block
- Provides confidentiality (encryption)
- Each packet has unique counter value preventing reuse attacks
- CBC-MAC (Cipher Block Chaining Message Authentication Code):
- Cryptographically secure integrity check
- Keyed hash function using AES
- Prevents message modification attacks
- Not vulnerable to CRC linearity like WEP
- Combined Operation:
- Single pass through data (efficient)
- Authenticated encryption (encryption + integrity in one)
- Strong security proofs in cryptographic literature
WPA/WPA2 Deployment Modes
| Mode | Authentication | Use Case | Security Level |
|---|---|---|---|
| WPA2-Personal (WPA2-PSK) |
|
|
Good – if strong passphrase used
|
| WPA2-Enterprise (WPA2-802.1X) |
|
|
Excellent
|
WPA2 Vulnerabilities
1. Password-Based Attacks (WPA2-Personal)
PBKDF2 Key Derivation:
- Function: PBKDF2-SHA1 with 4096 iterations
- Inputs: Passphrase + SSID (as salt) → 256-bit PMK
- Purpose: Slow down brute force attacks
Attack Methods:
- Offline Dictionary Attack:
- Capture 4-way handshake during client authentication
- Handshake contains encrypted data verifiable with correct password
- Test passwords offline without network access
- Tools: Aircrack-ng, Hashcat, John the Ripper
- Acceleration:
- GPU acceleration: Millions of passwords per second
- Rainbow tables: Pre-computed hashes for common SSIDs
- Cloud computing: Massive parallel cracking
- Mitigation: Use strong, random passphrases (20+ characters)
2. KRACK Attack (2017)
Key Reinstallation Attack:
- Exploits vulnerability in 4-way handshake implementation
- Forces reuse of encryption keys (nonce reuse)
- Allows packet decryption and injection
- Fix: Patched in all modern devices (software update)
3. Weak Passphrases
Common Weaknesses:
- Short passwords (< 8 characters – actually prohibited, but barely)
- Dictionary words
- Common patterns (Password123, Admin2024)
- Default passwords (manufacturer-provided)
4. Rogue AP / Evil Twin
Despite encryption, WPA2 doesn’t prevent:
- Attacker creating fake AP with same SSID
- Stronger signal attracts victims
- User connects, provides credentials to attacker
- Mitigation: Certificate validation (WPA2-Enterprise)
Enterprise Wireless: eduroam Example
International wireless roaming service for education and research community demonstrating WPA2-Enterprise at scale.
Architecture:
- Client Device: User’s laptop/phone with eduroam credentials
- Local Access Point: Campus AP user connects to
- Local RADIUS Server: University’s authentication server
- Hierarchy of RADIUS Servers:
- US RADIUS federation servers
- Global RADIUS infrastructure
- Home RADIUS Server: User’s home institution authentication server
Authentication Flow:
- Association: Client associates with local campus AP
- 802.1X/EAP Start: AP initiates EAP authentication
- Identity Request/Response: Client provides identity (username@institution.edu)
- RADIUS Proxy Chain:
- Local RADIUS forwards to US RADIUS
- US RADIUS forwards to Global RADIUS
- Global RADIUS routes to home institution’s RADIUS
- TLS Tunnel Establishment: Encrypted tunnel created between client and home RADIUS for credential verification
- Credential Exchange: Username/password or certificate verification occurs in encrypted tunnel
- Success/Failure Propagated: Result travels back through RADIUS hierarchy
- Key Distribution: Session keys distributed to client and local AP
- Encrypted Communication: User accesses network with full encryption
Security Features:
- Individual Authentication: Each user has unique credentials
- Mutual Authentication: Both user and network verified via certificates
- Encrypted Credentials: Passwords never sent in clear (TLS tunnel)
- Per-User Keys: Each session gets unique encryption keys
- Roaming Security: Strong security maintained across institutions
Beyond WPA2: Current and Future Standards
| Standard | Year | Key Features |
|---|---|---|
| WPA3-Personal | 2018 |
|
| WPA3-Enterprise | 2018 |
|
| Wi-Fi 6/6E (802.11ax) | 2019/2021 |
|
Other Wireless Technologies
Many other wireless technologies require security considerations:
- Cellular Networks:
- GSM (Global System for Mobile Communications) – 2G
- LTE (Long-Term Evolution) – 4G
- 5G NR (New Radio)
- Proprietary protocols with own security mechanisms
- Satellite Communications:
- Satellite telephony (Iridium, Globalstar)
- Satellite internet (Starlink, OneWeb)
- Different security models than terrestrial wireless
- Internet of Things (IoT):
- Zigbee, Z-Wave (home automation)
- LoRaWAN (long-range low-power)
- Bluetooth / BLE
- Often proprietary with varying security levels
- Emerging Technologies:
- Drones and UAV communication
- Vehicle-to-vehicle (V2V) networks
- Cyber-Physical Systems (CPS)
Note: Most commercial wireless protocols are proprietary, making security analysis challenging. Academic and industry research continues to discover vulnerabilities in these systems.
Summary and Key Takeaways
Link Layer Security Principles
- ARP is Fundamentally Insecure: No authentication or integrity – trust-based protocol vulnerable to poisoning attacks
- Wireless Requires Strong Encryption: Broadcast nature of radio makes eavesdropping trivial without cryptographic protection
- WEP Was Catastrophically Broken: Multiple fundamental flaws – never use WEP under any circumstances
- WPA2 is Current Standard: Strong security when properly configured with strong passphrases
- Defense in Depth: Link layer security must be combined with higher-layer protections (TLS, VPNs, application encryption)
Practical Recommendations
| Context | Recommendation |
|---|---|
| Home Networks |
|
| Enterprise Networks |
|
| Public WiFi |
|