DEV Community

Timothy Imanuel
Timothy Imanuel

Posted on

Network Forensics: Wireless Network Forensics – Investigating Evidence in the Air (Week 7)

This week, we focus on wireless network forensics: how 802.11 networks work at Layer 2, what evidence wireless access points hold, how investigators passively capture and analyse Wi-Fi traffic, and how they physically locate wireless devices.

Wireless in Investigations

Wireless technology is everywhere, from AM/FM radios, cordless phones, cell phones, Bluetooth headsets, and infrared TV remotes to Zigbee devices (HVAC, thermostats, lighting), Wi-Fi (802.11) for LAN networking over RF, and WiMAX (802.16) for "last-mile" broadband. Common cases involving wireless networks include:

  • Recovering Stolen Devices: Tracking a stolen laptop by its presence on the wireless network.
  • Rogue Access Points: Identifying unauthorized WAPs installed by insiders for convenience or to bypass enterprise security.
  • Malicious Activity: Investigating malicious or inappropriate activity carried out over a wireless network.
  • Attacks on the Network Itself: Including denial-of-service, encryption cracking, and authentication bypass attacks.

The 802.11 Protocol

802.11 (Wi-Fi) is part of the IEEE 802 series of Layer 2 protocols, alongside 802.3 (Ethernet), 802.1Q (trunking), and 802.1X (LAN-based authentication). Because RF has very different characteristics from copper, it requires its own protocol. 802.11 defines three frame types:

  • Management Frames (Type 0): Coordinate communication between stations. They are especially valuable forensically because they are not encrypted and expose MAC addresses, BSSIDs (Basic Service Set Identifiers), and SSIDs (Service Set Identifiers). They are also a common point of attack, such as in WEP cracking and Evil Twin attacks. Key subtypes include Association Request/Response (0x0/0x1), Reassociation Request/Response (0x2/0x3), Probe Request/Response (0x4/0x5), Beacon (0x8), Disassociation (0xA), Authentication (0xB), Deauthentication (0xC), and Action (0xD).
  • Control Frames (Type 1): Manage the flow of traffic over the shared RF medium and address the "hidden node" problem through Request-to-Send (RTS), Clear-to-Send (CTS), and Acknowledgment (ACK) frames.
  • Data Frames (Type 2): Carry the actual data, including encapsulated higher-layer (Layer 3+) protocols. For example, subtype 0 is regular data, while subtype 4 is a "null function" frame that carries no data.
  • Mixed-Endian Ordering: 802.11 is mixed-endian: the bit order within each individual field is big-endian, but the fields themselves are little-endian. This means the order written in the protocol specification differs from the order actually transmitted. For example, a data frame's first byte is written as 00 10 0000 (version 0, type 2, subtype 0) but sent as 0000 10 00, which appears as 0x08 in the raw data. Wireshark interprets this correctly, but it matters when writing your own filters.

Wireless Encryption and Authentication

  • WEP (Wired Equivalent Privacy): Relies on a shared secret key with the access point. WEP is broken: unprotected key material allows the shared key to be brute-forced, and at "Layer 8" (humans) the shared key is rarely kept secret anyway. It is still worth learning because legacy equipment, and modern equipment that supports it, still exists. Encrypted frames have the Protected bit set to 1.
  • WPA and TKIP: Wi-Fi Protected Access (WPA) introduced key rotation using the Temporal Key Integrity Protocol (TKIP), but it has also been broken.
  • WPA2 and AES-CCMP: WPA2 uses the Counter Mode with CBC-MAC Protocol (CCMP) mode of AES and was considered unbroken at the time of the course material (later research such as the 2017 KRACK attack has since targeted WPA2's handshake, and WPA3 is now its successor).
  • Robust Security Networks (RSN): Both WPA and WPA2 are RSNs, and their security information is advertised in management frames including Beacons, Association Requests, Reassociation Requests, and Probe Requests.
  • 802.1X and EAP: 802.1X is a modular, extensible authentication framework that works regardless of physical medium. It uses the Extensible Authentication Protocol (EAP), an improvement on PPP (which is still common in PPPoE, EV-DO, CHAP, and PAP). Because it relies on a central authentication store, using variants such as EAP-TLS, PEAP, and LEAP, it is much more likely to leave an audit trail.

Wireless Access Points (WAPs)

WAPs are Layer 2 devices, but they are a special case in investigations: every station can receive their signals, so interception is easy, almost like a hub. Many also include Layer 3 routing, Layer 4 NAT, logging, MAC address filtering, DHCP, and SNMP.

  • Why Investigate WAPs? They may store logs of connection attempts and authentication successes and failures, help track a client's physical movements through a building or campus, reveal how an attacker gained access, show unauthorized configuration changes, or be compromised themselves.
  • Enterprise APs: Typically offer routing, DHCP, NAT, packet filtering, centralized authentication, auditable access logs (local and central), station location tracking, performance monitoring, and PoE. They can be managed via console CLI, SSH/Telnet, SNMP, web, proprietary, or central management interfaces.
  • Consumer APs: Often include limited routing, DHCP, NAT, limited filtering, and local (sometimes remote) logging.
  • Volatile Evidence: Connection history by MAC address, IP-to-MAC associations, logs of wireless events (access requests, key rotation), client signal strength history (useful for geolocation), routing tables, stored packets, packet counts and statistics, ARP tables, DHCP leases, access control lists, I/O and processor memory, running configuration, and flow data.
  • Persistent Evidence: Operating system image, boot loader, and startup configuration files.
  • Off-System Evidence: Logs that have been aggregated and stored on other systems.

Spectrum Analysis

The IEEE supports three frequency ranges for 802.11:

  • 2.4 GHz (802.11b/g/n): The US only allows channels 1–11, while Japan allows channels up to 14.
  • 3.6 GHz (802.11y)
  • 5 GHz (802.11a/h/j/n)
  • Greenfield (GF) Mode: 802.11n devices operating in Greenfield mode are not visible to 802.11a/b/g devices, which makes them easy to miss.
  • Encoding Schemes: Information is encoded using FHSS (Frequency Hopping Spread Spectrum), DSSS (Direct Sequence Spread Spectrum), or OFDM (Orthogonal Frequency-Division Multiplexing).
  • Tools: Spectrum analysers such as MetaGeek's Wi-Spy and AirMagnet help investigators see what is happening across these frequencies.

Passive Evidence Acquisition and Analysis

To capture wireless traffic, the wireless card must support monitor mode, and ideally a separate card is dedicated to monitoring. AirPcap is a Windows-based USB option (around $300) that can also decrypt WEP, while cheaper USB NICs that support monitor mode cost around $35. Passive capture can reveal broadcast SSIDs, WAP MAC addresses, supported encryption and authentication algorithms, and associated client MAC addresses.

  • Questions to Ask: Are there beacons or probe responses in the traffic? Can you find all BSSIDs/SSIDs from authenticated or associated traffic? Is there malicious traffic? Is the traffic encrypted with WEP/WPA, and is anyone trying to break it?
  • Finding WAPs with BPF: Beacon frames identify access points, and can be isolated with tcpdump or tshark using 'wlan[0] = 0x80'.
  • Finding Encrypted Data Frames: Data frames have a first byte of 0x08, and the Protected bit appears as 0x40 in the second byte (as sent), so 'wlan[0] = 0x08 and wlan[1] & 0x40 = 0x40' matches encrypted data frames.
  • Wireshark Filters: Wireshark and tshark also provide dedicated wlan_mgt display filters for management frame fields.

Common Wireless Attacks

  • Sniffing: An attacker eavesdrops on wireless traffic.
  • Rogue Wireless Access Points: Unauthorized devices that extend the local network, often installed for an end user's convenience. Attackers may hide them by changing channels (e.g., illegally using channel 14), using Greenfield mode, using powerful Class 1 Bluetooth access points, or using wireless port knocking.
  • Evil Twin Attack: An attacker sets up a WAP with the same SSID as a legitimate WLAN to perform a man-in-the-middle attack.
  • WEP Cracking: An attacker forces the generation of large numbers of initialization vectors (IVs) until enough are collected to recover the WEP key and gain unauthorized access.

Locating Wireless Devices

  • Gather Station Descriptors: The first part of a MAC address is the OUI (Organizationally Unique Identifier) assigned to the manufacturer, which allows an educated guess about the device's make so you know what to look for. Wireshark resolves this automatically.
  • Identify Nearby APs: Devices generally connect to the closest AP since its signal is usually strongest. WAP logs, association requests and responses, and passive monitoring can show which AP a station is associated with.
  • Poll Signal Strength: RSSI (Received Signal Strength Indication) and Tx rate are only available if the capture tool supplies them, and Wireshark can be configured to display them in its preferences.
  • NetStumbler & Vistumbler: Windows tools used by both attackers and defenders. They support GPS integration for wardriving and warwalking, but their presence can be detected.
  • Kismet: A libpcap-based Linux tool offering Wireshark/tcpdump-compatible logging, IP range detection, hidden SSID decloaking, graphical network mapping, manufacturer and model identification, detection of default AP configurations, runtime WEP decoding for known networks, named pipe output for tools like Snort, distributed remote drone sniffing, XML output, and support for over 20 card types.
  • Other Tools: KisMAC, enterprise tools from Aruba and Cisco, and Skyhook's Wireless Positioning System (used in features such as Apple's "Locate Me" and Eye-Fi SD cards).
  • Triangulate: Combining signal strength readings from multiple points allows investigators to triangulate the device's physical location.

Reference: Davidoff, S., & Ham, J. (2012). Network Forensics: Tracking Hackers Through Cyberspace. Boston: Prentice Hall.

Top comments (0)