Skip to content
Tutorials Center
My learning

Topics

Lesson 28 of 53 ยท Network, Wireless and Cloud Security

Wireless Security

Learn how Wi-Fi security evolved from WEP to WPA3, what rogue access points and enterprise authentication are, and how to harden home and office networks.

Wi-Fi removes the cable, and with it the physical barrier. Anyone within radio range, in the parking lot or the apartment next door, can hear the signal. That makes wireless security different from wired security: you cannot control who is near the network, so everything depends on encryption, authentication and sound configuration.

This lesson covers the generations of Wi-Fi protection, why some are broken, what a rogue access point is, how business networks authenticate users, and how to harden a home or office setup. The radio-level tools used in wireless testing need special hardware and must only be used on networks you own or are authorized to test, so they are not shown. The stand-ins here audit made-up access-point settings.

Wi-Fi security, oldest to newest

WEP Broken. Crackable in minutes.
WPA / TKIP Stop-gap, deprecated.
WPA2-AES Solid with a strong passphrase.
WPA3 Better handshake, stronger protection.

Choose the newest mode your devices support.

1 / 2

The generations of Wi-Fi protection

WEP (Wired Equivalent Privacy) was the original scheme. It has fundamental design flaws in how it uses its RC4 keystream, so an attacker who collects enough traffic can recover the key quickly. WEP should be treated as no protection at all. A device that supports only WEP is a candidate for replacement.

WPA was a rushed fix that reused old hardware with TKIP encryption. It is also deprecated. WPA2 introduced AES-based CCMP encryption and is still very common. WPA2 with a strong, random passphrase is sound for most uses, but its personal mode has a known weakness: an attacker who records the four-way handshake when a device joins can try passphrases offline at their own speed. A short or common passphrase falls to that guessing. The defense is length and randomness, not secrecy of the handshake, because the handshake cannot be hidden.

WPA3 improves on this:

  • SAE (Simultaneous Authentication of Equals) replaces the pre-shared-key handshake in personal mode. Capturing a handshake no longer lets an attacker test guesses offline; each guess requires interacting with the real network.
  • Forward secrecy: recorded traffic stays protected even if the passphrase leaks later.
  • Protected management frames (PMF) are required, which blocks forged "disconnect" frames used for disruption and some attack setups.
  • Enhanced Open (OWE) encrypts traffic on open networks, such as cafes, without a password. It does not authenticate the network, but it stops passive eavesdropping.

Many networks run a transition mode (WPA2 and WPA3 together) so older devices keep working. The cost is that the weakest mode sets the floor for attackers who can force a downgrade or simply use the WPA2 path.

Protocol name versus brand name. "WPA2-PSK" and "WPA3-SAE" are the technical names, and "Personal" and "Enterprise" describe who authenticates how. Router menus use different labels, so check what the option actually enables.

Rogue access points and evil twins

A rogue access point is an access point that connects to your network without authorization. It might be an employee plugging in a cheap wireless router "for convenience" (an accidental hole behind your firewall), or something planted deliberately.

An evil twin is a different problem: an access point that copies the name of a legitimate network, often with a stronger signal, hoping devices will join it. Devices remember network names and may reconnect automatically, which is why open, public networks are risky. Once a victim is connected, the operator of the fake network sits in the middle (see Network Attacks and How to Defend Against Them).

Defenses:

  • Wireless intrusion detection in managed systems, which lists every access point heard and flags unknown ones that use your network name or connect to your wired ports.
  • Wired port control (802.1X on switch ports, port security), so a rogue device plugged into the wall gets nowhere.
  • Enterprise authentication with certificate validation on clients: a fake network cannot present your server's certificate.
  • User habits: avoid auto-joining open networks, use a VPN on untrusted ones, and keep HTTPS everywhere. TLS protects you even on a hostile network, provided you do not click through certificate warnings.

Enterprise authentication

At home, everyone shares one passphrase. In an office that is a poor fit: when an employee leaves, the passphrase must change for everyone, and you cannot tell who did what. WPA2/WPA3-Enterprise uses 802.1X with a RADIUS server. Each user or device authenticates with its own credentials or certificate, and the access point is only a go-between.

The method used inside the tunnel matters:

  • EAP-TLS: both sides use certificates. The strongest choice, because there is no password to steal, but it needs a certificate infrastructure.
  • PEAP/MSCHAPv2 and similar: password-based inside a TLS tunnel. Very common, but only as safe as the client's check of the server certificate. If clients are set to "do not validate", a fake network can capture credentials. Make sure the devices are configured to trust only your RADIUS server's certificate.

Benefits of enterprise mode include per-user accounts that can be revoked instantly, logs that say who connected, and separate network segments for different groups through VLAN assignment.

Hardening a home network

Most of the following takes minutes and covers the vast majority of everyday risk:

  1. Use WPA3 or WPA2-AES, never WEP, WPA or TKIP.
  2. Use a long random passphrase, 15 or more characters, or a few unrelated words. Store it in a password manager.
  3. Change the router admin password from the default, and disable remote administration from the internet.
  4. Update firmware, or turn on automatic updates. Replace routers that no longer get updates.
  5. Turn off WPS (the push-button/PIN setup feature). Its PIN method has known weaknesses.
  6. Put guests and smart devices on a guest network that is isolated from your computers.
  7. Do not rely on hiding the network name (SSID). It is trivial to discover and does not add security.
  8. Do not rely on MAC filtering either: MAC addresses are visible over the air and can be copied.

Hardening an office network

  • Use WPA3-Enterprise or WPA2-Enterprise with certificate validation on clients.
  • Separate staff, guest, and device (IoT/printer) networks with VLANs and firewall rules between them. See segmentation.
  • Enable wireless intrusion detection, keep a list of authorized access points, and sweep periodically for unknown ones.
  • Require PMF, disable legacy rates and protocols where possible, and keep controller and AP firmware patched.
  • Send access-point and RADIUS logs to central logging (SIEM).

Stand-in: audit sample access-point settings

The real configuration lives in router or controller software that cannot run here. This stand-in takes a list of made-up settings and applies the checklist above, returning findings with a severity. Edit the data to see how the verdicts change.

JS Stand-in: Wi-Fi settings auditor

Press Run (or Ctrl + Enter) to see the console output here.

No output.

Each rule is a plain if. Real wireless audit tools check the same kinds of facts, gathered from controllers or from authorized scans.

Stand-in: how passphrase length changes guessing time

For WPA2-Personal, passphrase length is the main defense against offline guessing. This model only does the arithmetic. It assumes a made-up guessing speed and a random lowercase-plus-digit passphrase; real speeds depend on hardware and real passphrases are rarely random, so people choose from far smaller sets.

JS Stand-in: search space versus length

Press Run (or Ctrl + Enter) to see the console output here.

No output.

Each extra character multiplies the work by 36. That is why a 15-character random passphrase is far out of reach, and why WPA3's SAE (which forces each guess to be made online) helps even weaker passphrases.

Wi-Fi modes, the Aircrack-ng suite and the WPS weakness

Security modes at a glance

Mode Protection Verdict
Open None; traffic readable by anyone in range Use only with a VPN, or with enhanced open (OWE) which encrypts without a password
WEP RC4 with a weak key scheme Broken for many years; recoverable in minutes
WPA / WPA2-Personal Pre-shared passphrase; WPA2 uses AES-CCMP Safe if the passphrase is long and random
WPA2/WPA3-Enterprise Per-user credentials through a RADIUS server Best for organizations
WPA3-Personal Simultaneous Authentication of Equals (SAE) replaces the pre-shared-key handshake Resists offline guessing of captured handshakes; prefer it where devices support it

The Aircrack-ng suite, conceptually

Aircrack-ng is a collection of command-line tools for assessing Wi-Fi security on networks you own. It is a good way to understand what is exposed over the air. Its parts map to the steps of an assessment:

  • airmon-ng switches a compatible adapter into monitor mode, where it hears all frames on a channel, not only those addressed to it.
  • airodump-ng lists nearby access points and clients (names, channels, encryption) and can record traffic to a file.
  • aireplay-ng injects frames; for example, it can send deauthentication frames, which is why management-frame protection (802.11w, mandatory in WPA3) matters.
  • aircrack-ng tests captured data offline against a wordlist.

The conceptual flow against a WPA2-Personal network in your own lab is: the client and access point perform a four-way handshake when the client joins, a monitoring adapter records that handshake, and the passphrase can then be tested offline, without sending another packet to the network. This is why the defense is a long random passphrase: offline guessing is limited only by the attacker's hardware, not by any lockout. A 20-character random passphrase is beyond reach; "Summer2024!" is not. WPA3's SAE removes the offline guessing opportunity by design.

Capturing and testing other people's Wi-Fi traffic is illegal in many places. Use your own access point and your own devices, and treat the steps above as understanding, not a recipe.

WPS PIN weakness

Wi-Fi Protected Setup (WPS) was meant to simplify connecting devices with an eight-digit PIN. A design flaw makes the PIN much weaker than its length suggests: the router validates the first four digits and the last four separately, and the last digit is a checksum. That leaves roughly 11,000 possibilities instead of 100 million, which can be tried in hours if the router does not lock out attempts. Some routers have additional implementation flaws. Defense: turn WPS PIN off (push-button mode is less exposed), update router firmware, and prefer a strong passphrase typed once.

The stand-in below shows the arithmetic and a lockout model with invented numbers.

Node.js Why the WPS PIN is weak

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with node:readline or process.stdin), it gets the next line from this box.

With a sensible lockout the attack becomes impractical, but the safest setting is simply to disable the PIN feature. Use the access point audit stand-in earlier in this lesson as a checklist: WPS off, WPA3 or WPA2 with a long passphrase, management-frame protection on, firmware current.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. Why is a short WPA2-Personal passphrase risky?

    The handshake cannot be hidden, so a recorded handshake allows unlimited offline guessing. Long, random passphrases make that impractical.
  2. 2. What does WPA3's SAE handshake improve?

    With SAE every guess requires interacting with the real network, and forward secrecy protects earlier recorded traffic.
  3. 3. What is an evil twin?

    An evil twin imitates a real network. Certificate validation on clients and HTTPS make a connection to it much less useful to the attacker.
  4. 4. Which home setting adds little real security?

    Hidden names and MAC filters are easy to bypass because both are visible over the air. The other options address real weaknesses.

Summary

  • WEP is broken, WPA/TKIP is deprecated, WPA2-AES is sound with a long random passphrase, and WPA3 adds SAE, forward secrecy and protected management frames.
  • Rogue access points and evil twins put an attacker in the middle; use enterprise authentication with certificate validation, wired port control and wireless monitoring.
  • Enterprise mode (802.1X with RADIUS) gives per-user credentials that can be revoked.
  • At home: modern encryption, a long passphrase, a changed admin password, updates, WPS off, a guest network.
  • SSID hiding and MAC filtering are not security controls.
  • The stand-ins used made-up settings and arithmetic only; real radio testing needs equipment and authorization.

Next: Cloud and Container Security Testing.