Courses3 levels
Level 1 · Foundations11 courses
Level 2 · Core5 courses
Level 3 · Advanced5 courses
Labs8 topics
Library Practice exams AI Range Pricing Start free

Practice library / Wireless attacks

Lab · Medium · 1.5 hoursFree account

WEP Wireless Attacks

IV collection and statistical WEP key recovery with aircrack-ng.

  • wep
  • wi-fi
  • aircrack-ng
  • iv-collection
On this page 10 sections
  1. ·Lab Setup
  2. ·Build the target
  3. 1Enter monitor mode
  4. 2Find the WEP target
  5. Locked: Capture IVs on the target channel
  6. Locked: Speed up IV collection with ARP replay
  7. Locked: Crack the key
  8. Locked: Verify by joining the network
  9. Locked: Defence and Detection
  10. Locked: Check Your Work

Before you start

WEP protects Wi-Fi traffic with a flawed stream cipher and a short initialisation vector. Public tooling recovers a WEP key in minutes because the IVs repeat and leak key bytes. Security engineers find WEP on legacy printers, cameras and warehouse scanners, and must retire it before attackers reach the same network segment. The work here is to capture IVs with airodump-ng and recover the key with aircrack-ng.

What You'll Learn

  • Identify WEP-protected access points with airodump-ng
  • Capture traffic and collect initialisation vectors (IVs)
  • Accelerate IV collection with ARP replay injection
  • Recover the WEP key with aircrack-ng
  • Explain the RC4 and IV-reuse flaws that make WEP fatal
  • Confirm network access with the recovered key

Lab Setup

Machine and card

  • Kali Linux, as a VM or a host.
  • A wireless adapter that supports monitor mode and packet injection (for example the Atheros AR9271).
  • USB pass-through the adapter if Kali runs in a VM.

Tools and versions

  • aircrack-ng suite (airmon-ng, airodump-ng, aireplay-ng, aircrack-ng).
  • wireshark or tshark for packet inspection.

Build the target

KaliRange hosts no targets, no networks and no wireless range. You run this lab against an access point that you build. KaliRange-WEP below is the example network name of this lab; set your own access point to broadcast any name you choose.

Your target needs these parts:

  • An access point, broadcasting on channel 11, configured for WEP with a 64-bit key. Use a second wireless adapter with a Linux host running hostapd (hostapd supports WEP for exactly this kind of testing), or an old consumer router that still offers a WEP option in its firmware.
  • One client device (a phone, a laptop, or a second virtual machine) associated to the access point, so that it generates the baseline data traffic that Step 3 captures.
  • A physical space, or a shielded room, where your access point's signal does not reach a network you do not own. A Wi-Fi signal cannot be confined to a lab network the way a wired or virtual one can.

Note the access point's real BSSID and your test client's real MAC address once you build them; the addresses below (AA:BB:CC:DD:EE:01, AA:BB:CC:DD:EE:02, 11:22:33:44:55:66) are this lab's examples.

Authorised targets only. Run every command in this lab only against an access point that you own or have written permission to test, and keep its signal off any network you do not own.

Step 1: Enter monitor mode

1

Monitor mode lets your card hear every frame on the channel, not just traffic addressed to you. Without it you cannot capture the IVs that break WEP.

sudo airmon-ng check kill
sudo airmon-ng start wlan0
Killing these processes:
    PID Name
   1302 NetworkManager
   1267 wpa_supplicant

PHY     Interface       Driver          Chipset
phy0    wlan0           ath9k_htc       Atheros Communications, Inc. AR9271 802.11n
                (mac80211 monitor mode vif enabled for [phy0]wlan0 on [phy0]wlan0mon)

Confirm with iwconfig wlan0mon. The mode must read Monitor. Use wlan0mon for every command from here on.

Step 2: Find the WEP target

2

You need the BSSID, the channel and the encryption type before you capture. A broad scan gives all three.

sudo airodump-ng wlan0mon
 CH  9 ][ Elapsed: 30 s

 BSSID              PWR  Beacons  #Data  CH  MB   ENC  CIPHER AUTH ESSID

 AA:BB:CC:DD:EE:01  -38      210     45  11  54   WEP  WEP         KaliRange-WEP
 AA:BB:CC:DD:EE:02  -52      180     12   6  130  WPA2 CCMP   PSK  Neighbour-WPA2

Look at the ENC column. WEP confirms the target. Note the BSSID AA:BB:CC:DD:EE:01 and the channel 11. Press Ctrl+C to stop the scan.

Sign in to continue

6 more sections are for signed-in members. It is free: sign in with Google.

Related