A Wi-Fi deauthentication attack doesn’t actually "hack" anything; it simply tricks your device into thinking the Wi-Fi network it’s connected to has told it to disconnect.

Imagine you’re at a coffee shop with free Wi-Fi. Your laptop, your phone, your smart watch – they all have a "conversation" with the Wi-Fi access point (AP) to stay connected. This conversation involves periodic "keep-alive" messages. A deauthentication attack hijacks this conversation. The attacker, using a special tool and a bit of network trickery, spoofs messages that look like they’re coming from the AP, telling your devices, "Nope, you’re no longer welcome here. Disconnect." Your device, trusting the AP, obediently disconnects. The attacker can then set up their own fake Wi-Fi network (a "rogue AP") with a similar name, hoping you’ll connect to it instead.

{
  "attack_scenario": {
    "attacker_setup": "Using a Kali Linux machine with a compatible Wi-Fi adapter (e.g., Alfa AWUS036NH) and software like `aircrack-ng`.",
    "target_network": "A Wi-Fi network with SSID 'CoffeeShopFreeWiFi' on channel 6.",
    "target_client": "A laptop with MAC address 00:1A:2B:3C:4D:5E, currently connected to 'CoffeeShopFreeWiFi'."
  },
  "attack_execution": [
    {
      "step": 1,
      "action": "Put the Wi-Fi adapter into monitor mode.",
      "command": "sudo airmon-ng start wlan0",
      "output_snippet": "Interface wlan0mon added on wlan0"
    },
    {
      "step": 2,
      "action": "Scan for target networks to identify the AP's MAC address and channel.",
      "command": "sudo airodump-ng wlan0mon",
      "output_snippet": "BSSID             CH  ESSID\n00:11:22:33:44:55 6   CoffeeShopFreeWiFi\n..."
    },
    {
      "step": 3,
      "action": "Initiate deauthentication attack against the target client.",
      "command": "sudo aireplay-ng --deauth 100 -a 00:11:22:33:44:55 -c 00:1A:2B:3C:4D:5E wlan0mon",
      "explanation": "This command sends 100 deauthentication packets (`--deauth 100`). The `-a` flag specifies the AP's MAC address, and `-c` specifies the client's MAC address. The attack is broadcast on `wlan0mon`."
    }
  ],
  "client_reaction": {
    "observed_behavior": "The target laptop (00:1A:2B:3C:4D:5E) immediately loses its Wi-Fi connection to 'CoffeeShopFreeWiFi'. The Wi-Fi icon on the laptop shows disconnected.",
    "system_log_entry_example": "[WLAN disconnect event received from AP 00:11:22:33:44:55]"
  },
  "attacker_follow_up": {
    "action": "Optionally, create a rogue AP named 'CoffeeShopFreeWiFi_Guest' to lure the disconnected client.",
    "tool_example": "Hostapd and dnsmasq for creating a captive portal."
  }
}

The core of this attack lies in the 802.11 Wi-Fi standard itself. Unlike more modern, secure protocols, the original deauthentication frames were not encrypted or authenticated. This means any device on the network can craft and send these frames, impersonating either the access point or the client. The Wi-Fi protocol is designed for speed and simplicity, and this lack of inherent security in certain management frames is the vulnerability exploited. The attacker doesn’t need to know the Wi-Fi password; they only need to be within radio range of the target network and client.

The attack works by sending a deauthentication frame from the attacker’s device, spoofing the MAC address of the access point. This frame is directed at the client’s MAC address. The client receives this frame, which appears to be a legitimate instruction from its AP to disconnect. Because the frame is unauthenticated, the client has no way to verify that it truly came from the legitimate AP. It simply trusts the sender’s (spoofed) identity and severs the connection. The attacker can also spoof the client’s MAC address and send a deauthentication frame to the AP, telling the AP that the client wants to disconnect. Either method achieves the same result: the client is disconnected.

The attacker can then choose to either simply keep sending deauthentication packets to continuously disconnect the victim, or, more insidiously, set up their own malicious access point with the same SSID as the legitimate network. When the victim attempts to reconnect, they might see the attacker’s rogue AP and, thinking it’s the real network, connect to it. This allows the attacker to intercept all traffic flowing to and from the victim’s device.

This attack is often a precursor to other, more serious attacks like man-in-the-middle (MITM) attacks, where the attacker intercepts and potentially alters communications between two parties. By forcing a disconnection and then presenting a rogue access point, the attacker positions themselves directly in the data path.

The most surprising thing about deauthentication attacks is that they are so trivially easy to execute, requiring no sophisticated hacking skills or knowledge of network security keys, and exploit a fundamental design choice in the original Wi-Fi standard.

When you see a deauthentication attack in action, it’s not a loud, obvious event. It’s silent and insidious. A user might simply notice their Wi-Fi icon disappear, or an application that relies on a constant connection might suddenly fail. They often attribute it to a flaky Wi-Fi connection, unaware that it’s an active, malicious intervention. The attacker’s goal is to make the disconnection seem like a normal network glitch, leading the user to take actions that benefit the attacker, like reconnecting to a fake network.

The attacker’s primary tool is a Wi-Fi adapter capable of monitor mode and packet injection, and software that can craft and send these specific 802.11 management frames. The aircrack-ng suite, particularly aireplay-ng, is the de facto standard for this. The attacker needs to be within radio range of the target network and client. They’ll typically first use a tool like airodump-ng to scan the airwaves, identify the target network’s BSSID (the AP’s MAC address) and channel, and discover connected clients’ MAC addresses. Once this information is gathered, aireplay-ng can be instructed to send deauthentication frames. The command structure is straightforward: aireplay-ng --deauth <number_of_packets> -a <AP_MAC> -c <Client_MAC> <interface_in_monitor_mode>. The <number_of_packets> can be set to 0 for a continuous stream of deauthentication frames, effectively keeping the client disconnected as long as the attack runs.

The underlying vulnerability is that deauthentication frames are not protected by encryption or authentication in the 802.11 standard. This means that any device that can send a packet on the correct channel, spoofing the AP’s MAC address, can trick a client into disconnecting. There is no built-in mechanism for the client to verify the authenticity of the deauthentication request.

The next thing you’ll likely encounter is setting up a captive portal on a rogue access point to harvest credentials.

Want structured learning?

Take the full Computer Networking course →