Network Hacking - Gaining Access

Understanding Wireless Encryption Vulnerabilities

Introduction to WEP (Wired Equivalent Privacy)

Important: This content is provided for educational purposes only. Always obtain proper authorization before testing security on any network.

Understanding WEP Encryption

Basic WEP Communication Process

Client Access Point Internet Data to send Encrypted Data
  1. Client encrypts data using a key (password)
  2. Encrypted packet is transmitted over the air
  3. Access Point receives and decrypts the packet using the same key

Detailed WEP Encryption Process

Each packet in WEP is encrypted using a unique key stream that is generated through these steps:

24-bit IV (Random) Network Key (Password) Key Stream Plain Data Encrypted Data + +
1
A random Initialization Vector (IV) is generated (only 24 bits in length)
2
The IV is combined with the network key (password) to create a key stream
3
The key stream is used to encrypt the data using RC4 algorithm
4
The IV is attached to the encrypted packet in plain text and sent over the air
Formula: IV + Network Key = Key Stream
Encryption: Key Stream + Plain Data = Encrypted Data

WEP Vulnerabilities

Critical Weaknesses

Security Issue: When IVs repeat, an attacker can analyze the traffic patterns to eventually determine the key stream and break the encryption.

WEP Cracking Methodology

To crack WEP encryption, we need to:

  1. Capture a large number of packets/IVs using airodump-ng
  2. Analyze the captured IVs and crack the key using aircrack-ng

Challenges and Solutions

Challenge Solution
Low network traffic = slow IV collection Force the AP to generate new IVs using techniques like ARP request replay
Can't communicate with AP (not associated) Use fake authentication to associate with the AP before launching attacks

ARP Request Replay Attack

  1. Wait for an ARP packet on the network
  2. Capture and replay (retransmit) the packet
  3. This causes the AP to generate a new packet with a new IV
  4. Continue this process until enough IVs are collected to crack the key

WPA/WPA2 Encryption

WPA and WPA2 were developed to address the weaknesses in WEP encryption.

Key Improvements

WPA/WPA2 Vulnerabilities

1. WPS (Wi-Fi Protected Setup) Vulnerability

Note: This attack only works if the router is not configured to use PBC (Push Button Authentication).

2. Handshake Capture and Dictionary Attack

The only packets that can aid with cracking WPA/WPA2 are the handshake packets:

Client Access Point 4-way Handshake Wordlist 123456789 qwerty password123 Compare

WPA/WPA2 Cracking Requirements

To attempt cracking WPA/WPA2, you need:

  1. Capture the 4-way handshake when a client connects to the network
  2. Use a wordlist to try possible passwords against the captured handshake

Creating a Wordlist

The crunch tool can be used to create a custom wordlist:

crunch [min] [max] [characters] -t [pattern] -o [FileName]

Example:

crunch 6 8 123abc$ -t a@@@@b -o wordlist

This would generate passwords like:

Summary

WEP

WPA/WPA2

Ethical Reminder: This knowledge should only be used for authorized security testing, educational purposes, or to secure your own networks. Unauthorized access to networks is illegal in most jurisdictions.