>
CyberShellsServicesPricingBlogBook a scoping call →
◆ OSWP · Module 05

802.11 Frames

The grammar of Wi-Fi. What a frame is made of, the three frame families, and the exact handshake dance a client runs to join every kind of network.

Where this falls

What you should actually learn here

This is the longest module in the course, but the exam-and-engagement payload is small. If you remember nothing else, remember these six things. Everything below is detail hanging off them.

1 · Type & Subtype
the two fields that matter

Every frame's job is set by Type (0/1/2/3) and Subtype. Filter on these constantly.

2 · The dance
probe → auth → assoc

Every client joins the same way. WPA/OWE add a 4-way handshake after.

3 · Beacon
subtype 8

Advertises the network. Privacy bit + RSN/WPA tags tell you the encryption.

4 · Deauth
subtype 12

One is normal. A flood is an attack. This is your whole attack signal.

5 · EAPoL ×4
the handshake you crack

The 4-way handshake you capture (then crack offline) rides on EAPoL frames.

6 · ToDS/FromDS
reads the addresses

These two bits decide what the 3-4 MAC address fields actually mean.

How to study this module Open each reference pcap in Wireshark as you read. The numbers (subtype 8 = beacon, 12 = deauth) only stick when you've seen them light up in the Info column. Reading alone won't cement them; the recall quiz at the end will tell you if they stuck.

01 · Vocabulary

Packet vs frame

Not interchangeable. They live on different floors of the OSI model. A frame is layer 2 (Data Link); a packet is layer 3 (Network). In Wi-Fi we work almost entirely at layer 2, so we capture frames, even though everyone says "packet capture".

L2 · FRAME MAC header + ... + FCS (what we capture) L3 · PACKET (IP) → L4 TCP/UDP → data The frame is the envelope. The packet is the letter inside it. Wi-Fi attacks start at layer 2, so frames are home base.

Table 1 idea — frame (L2) carries packet (L3) carries the data.

MEMORY ANCHOR

Frame = envelope, Packet = letter. You grab envelopes off the air (layer 2). Inside each is a letter (the IP packet, layer 3). "Packet capture" is a nickname; you're really catching frames.

02 · Structure

Frame anatomy

Every 802.11 MAC frame has three parts. In a capture, the driver often bolts a radiotap header on the front with radio metadata (signal, rate, channel).

Radiotapdriver metadata · varies
MAC Headeraddresses, control · mostly fixed
Frame Bodypayload · optional
FCSCRC check · 4 bytes
Radiotap header
added by receiver's driver

Not part of the real frame. Signal level, data rate, channel. Size varies per driver, even per frame.

MAC Header
the important part

Frame Control, Duration, addresses, sequence. The first fields are always present.

Frame Body
optional

Carries data or extra info. Some frames (ACK, RTS) have none at all.

FCS
CRC32, 4 bytes

Integrity check. Recomputed at the receiver; mismatch = corrupt frame. Sometimes stripped from captures.

MEMORY ANCHOR

"Radio, Head, Body, Check" = the frame front to back. Radiotap (fake, added by your card) · MAC Header (who/what) · Body (payload, maybe empty) · FCS (did it arrive clean).

03 · The brain of the header

Frame Control field

The most important field in the header. It holds the Type and Subtype that define what the frame is, plus a row of 1-bit flags that tell a story about the sender's state.

Frame Control subfields worth knowing
FieldTells you
TypeThe frame family: Management (0), Control (1), Data (2), Extension (3). Most important field in the frame.
SubtypeThe exact function within the family (beacon, deauth, ACK, etc).
To DS / From DSIs the frame entering or leaving the distribution system. Decodes the addresses (next section).
RetryThis frame is a retransmission (an earlier copy went unacknowledged). Shows as R in the Info column.
Power MgmtSender going to power-save (1) or active (0). Null frames use this.
Protected FrameEncryption/authentication is in use on this frame.
More Frag / More DataMore fragments follow / AP has buffered data for a sleeping client.
Protocol VersionAlways 0 today.
Why this is 80% of the module Type + Subtype is the key you filter on all day: wlan.fc.type == 0 for management, wlan.fc.type_subtype == 8 for beacons. Learn the subtype numbers and you can read any capture.

Sequence Control (bonus field)

Two subfields used to spot duplicate frames: a Sequence Number (0-4095, wraps) and a Fragment Number (0-15). Fragments of one frame share the sequence number.

04 · The part everyone finds confusing

The address puzzle

802.11 frames carry up to four MAC address fields, and what each one means depends entirely on the To DS and From DS bits. This table is worth memorizing; it's the one people get asked about.

Table 2 — what the address fields mean, by To/From DS
FromToScenarioAddr 1Addr 2Addr 3Addr 4
00Ad-hoc / mgmt / controlDestSourceBSSID-
01Client → AP (e.g. your ping out)BSSIDSourceDest-
10AP → client (the ping reply)DestBSSIDSource-
11WDS (AP ↔ AP bridge)RXTXDestSource
MEMORY ANCHOR

Both bits 0 = nobody's using an AP (ad-hoc or pure control/mgmt). ToDS=1 = heading into the network (client talking up to the AP). FromDS=1 = coming out of the network (AP talking down to the client). Both 1 = two APs bridging, which is the only time the 4th address appears.

Picture a post office (the DS/AP). To it, from it, or two post offices passing a bag between them.

05 · The map

Three frame families

Type 3 (Extension) is rare, skip it. The three that matter each have a clear job.

TYPE 0 Management negotiates the relationship beacon, probe, auth, assoc, deauth TYPE 1 Control coordinates delivery ACK, RTS, CTS, Block ACK, PS-Poll TYPE 2 Data carries the actual payload Data, Null, QoS Data, QoS Null

Figure — the three families and their common members.

MEMORY ANCHOR

0-1-2 = "Manage, Control, Carry". Management (0) sets up the relationship, Control (1) keeps delivery orderly, Data (2) carries your traffic. Same order as a project: manage it, control it, do the work.

06 · Type 0

Management frames

These run the AP-client relationship. Learn the starred subtypes cold; they appear in every attack.

Table 3 — management subtypes (★ = memorize)
#FrameWhat it does
0Association Request ★Client asks to join
1Association Response ★AP accepts/rejects
2Reassociation RequestRoaming to a new AP
3Reassociation Response 
4Probe Request ★Client scans "anyone there?"
5Probe Response ★AP answers with its details
8Beacon ★AP broadcasts itself ~10×/sec
10DisassociationGraceful "we're done"
11Authentication ★Same frame both ways (no req/resp)
12Deauthentication ★Kills the auth. Attack weapon.
13ActionMisc (e.g. SA Query, block-ACK setup)
MEMORY ANCHOR

The five numbers to tattoo: 8, 4/5, 11, 0/1, 12. Beacon 8 (always on), Probe 4/5 (scan), Auth 11, Assoc 0/1, Deauth 12. That's the entire join sequence plus the attack frame, in five numbers.

Beacon: the network's business card

Sent ~10 times/second at the lowest rate so far clients hear it. Carries SSID, channel, supported rates, encryption, country/regulatory info, and capability flags (HT/VHT/HE = 802.11n/ac/ax). Payload splits into fixed parameters (timestamp, beacon interval, capabilities) and Information Elements (IEs): variable tags, each [ID][length][data].

Reading encryption from a beacon The Privacy bit in Capabilities = encrypted or not. No WPA/RSN tag but Privacy set = WEP. An RSN IE = WPA2/WPA3. A WPA IE = WPA1. This is how you fingerprint a target's security from a single frame.

Authentication: one frame, both directions

There's no separate auth request/response. The same frame type flows both ways, tracked by a Transaction Sequence Number (1-4) and a Status Code (0 = success). The Authentication Algorithm field tells you the method: Open (common), SAE (WPA3), or Shared (WEP, rare).

Deauthentication: the attacker's crowbar

A 2-byte Reason Code frame that invalidates the auth. Legit uses exist (disconnect, forced reauth), but a flood of deauths = an attack in progress (classic aireplay-ng, reason code 7). You send these to knock a client off so it reconnects and you catch the handshake.

07 · Type 1

Control frames & RTS/CTS

Short, sent at low rates so they're heard reliably. They keep data delivery orderly and collision-free.

Table 4 — control subtypes (★ = memorize)
#FrameRole
8Block ACK RequestAsk to acknowledge a batch
9Block ACKAcknowledge many frames at once (throughput)
10PS-PollSleepy client asks AP for buffered data
11RTS ★"Request to Send" — may I talk?
12CTS ★"Clear to Send" — go ahead, everyone else wait
13ACK ★"Got it" — sent for every unicast frame

The RTS/CTS collision dance

An optional supplement to CSMA/CA that cuts collisions when two nodes can't hear each other. Costs overhead, so it's used selectively.

Node 1 Node 2 RTS (sub 11) → may I send? ← CTS (sub 12) go, others wait DATA → ← ACK (sub 13) got it

Figure — RTS/CTS/Data/ACK. Everyone who hears the CTS stays quiet for the duration. CTS has the same shape as ACK.

MEMORY ANCHOR

11-12-13 = "Ask, Allow, Acknowledge". RTS asks (11), CTS allows (12), ACK acknowledges (13). Three consecutive numbers for the three polite steps of talking on a shared channel.

08 · Type 2

Data frames

Sixteen subtypes exist, but four carry the load. The key split is plain vs QoS (prioritized voice/video, which adds a QoS Control field).

Table 5 — the data subtypes that matter
#FrameUse
0DataOrdinary payload
4Null FunctionNo payload — carries the power-save bit only
8QoS DataPrioritized payload (voice/video)
12QoS NullQoS version of null

Null frames: the sleep signal

Just a MAC header + FCS, no data. A client sends one with the Power Management bit set to tell the AP "I'm napping, buffer my traffic." It sends another with the bit cleared on waking, and the AP releases the buffered frames.

MEMORY ANCHOR

Null = "going to sleep" note. No payload, just the Power-Mgmt bit flipped. The client slips the AP a note that says "hold my calls," then another that says "I'm back."

09 · The core sequence

The connection dance

Every client joins every network the same three-step way. Encryption only adds a step on the end.

PROBE
1 · Find an APClient sends probe requests (sub 4) across channels. In-range APs answer with probe responses (sub 5). The client usually also just hears beacons (sub 8).
AUTH
2 · AuthenticateClient picks the strongest matching AP and exchanges authentication frames (sub 11). For open networks this is a trivial 2-frame formality.
ASSOC
3 · AssociateClient sends association request (sub 0) with its SSID + rates + chosen ciphers; AP replies with association response (sub 1). Now it can talk.
+KEYS
4 · Key exchange (encrypted networks only)WPA/WPA2/WPA3/OWE add a 4-way handshake (EAPoL) after association, before real traffic flows. This is the part you capture and crack.
MEMORY ANCHOR

"PAA(K)" = Probe, Auth, Assoc, (Keys). Scan, prove, join, (lock). The first three are universal. The K only shows up when there's encryption. On an open network you're online after step 3; on WPA you need step 4.

10 · The whole point of the module

How the dance changes per encryption

This single table replaces most of the module's second half. Same PAA skeleton, different auth method and key step.

Connection flow by encryption type
TypeBeacon saysAuth methodKey exchangeAttack hook
OpenPrivacy offOpen (2 frames)noneeverything is plaintext
WEPPrivacy on, no RSN/WPAOpen or Shared (challenge)none (WEP key)IV crack
WPA1WPA IE, TKIPOpen4-way (EAPoL)capture handshake, crack PSK
WPA2RSN IE, CCMPOpen4-way (EAPoL), PMKID in msg 1handshake or PMKID
WPA3RSN IE, SAE, PMFSAE in auth (commit/confirm)4-way after SAEno offline crack; transition mode
OWERSN IE, OWE, PMFOpenDH in association → 4-wayrogue AP (active only)
MEMORY ANCHOR

WPA3 moves the magic into AUTH; OWE moves it into ASSOC. WEP/WPA/WPA2 all use plain Open auth and do their crypto in (or after) association. WPA3's SAE "Dragonfly" happens during the authentication frames. OWE's Diffie-Hellman happens inside the association frames. That's the one distinction people trip on.

The filter you'll reuse constantly When studying any of these captures, OffSec uses !(wlan.fc.type == 1) to hide the noisy control frames (ACK/RTS/CTS) so the probe/auth/assoc/handshake story is readable top to bottom.

11 · The frames you crack

EAPoL & the 4-way handshake

EAPoL-Key frames carry the 4-way handshake for WPA/WPA2/WPA3/OWE (and show up in WPS and 802.11w). These four frames are the single most valuable thing you capture.

Supplicant (client) Authenticator (AP) M1 · ANonce (AP's random) Replay counter = 1. Client can now build the PTK. M2 · SNonce + MIC The proof. M1+M2 is all you need to crack offline. M3 · GTK + "install keys" Replay counter = 2. Secure bit set. M4 · ACK → encryption starts

Figure — the 4-way handshake. Capture M1+M2 and you have the material to crack the PSK offline (module 02).

What to recognise in an EAPoL-Key frame

Descriptor Type
2 = RSN / 254 = WPA

2 means WPA2 (RSN), 254 means WPA1. Instant version tell.

Replay Counter
1, then 2

1 for messages 1-2, 2 for messages 3-4. Higher = retries (bad key or weak signal).

Key Nonce
32 bytes

ANonce (M1) then SNonce (M2). The two randoms that seed the PTK.

Key MIC
the proof

Message integrity check. This is what an offline cracker recomputes per password guess.

Key Info flags
Install / ACK / Secure / MIC

Install (bit 6) tells the client to install keys; Secure (bit 9) set in M3/M4.

Key Data
RSNE 0x30 / KDE 0xdd

Carries the GTK (M3) and cipher info. RSNE starts 0x30, KDE starts 0xdd.

MEMORY ANCHOR

Replay counter: "1,1,2,2". M1 and M2 share counter 1; M3 and M4 share counter 2. If you see counters climbing past 2, the handshake is struggling (wrong key, bad signal), which is a clue in itself.

12 · The 8-message exchange

WPS: M1 to M8

A WPS PIN exchange runs eight EAP messages (M1-M8) back and forth to confirm the PIN and hand over the passphrase in M8. The milestone to remember: the PIN is checked in two halves, which is the whole weakness.

WPS message milestones
MsgCarriesMilestone
M1Enrollee nonce, public key, device infowho wants in
M2Registrar nonce + public key (AP info)who grants access
M3E-Hash1 / E-Hash2 
M4R-S1first half of PIN validated
M5E-S1 
M6R-S2second half validated
M7E-S2 
M8Encrypted network settingspassphrase delivered
MEMORY ANCHOR

M4 = first half, M6 = second half, M8 = the prize. Because the PIN validates in two separate chunks (confirmed around M4 and M6), brute force drops from 10⁸ to ~11,000 guesses. M8 is where the actual Wi-Fi passphrase arrives. (Attack details in module 02.)

13 · Why deauth stops working

802.11w & the SA Query

802.11w (PMF) protects management frames so a spoofed deauth is ignored. The capture shows the defence in action: an attacker's deauth arrives, but the client and AP run an SA Query to confirm each other and simply carry on.

Client AP Attacker spoofed deauth → protected SA Query → "AP, is that really you?" ← SA Query response (valid) Connection survives. The forged deauth is ignored.

Figure — with PMF, a deauth attack fails because only the real, keyed peer can answer the SA Query.

What this means for you On a PMF/802.11w network (mandatory under WPA3), the deauth-to-grab-handshake trick dies. Fall back to waiting for a natural handshake, the PMKID attack, or WPS. In the capture, an attacker deauth followed by SA Query action frames is the fingerprint of this defence working.

14 · Test yourself

Recall quiz

Answer out loud before tapping. Clear all ten and the frame numbers are yours.

Frame vs packet: which layer is each, and which do we capture?
Frame = layer 2 (Data Link), packet = layer 3 (Network). Wi-Fi capture is at layer 2, so we grab frames. "Packet capture" is just a nickname.
What are the four parts of a captured 802.11 frame, front to back?
Radiotap (driver metadata, not real), MAC Header, Frame Body (optional), FCS (CRC32 check). "Radio, Head, Body, Check."
Which two Frame Control fields define what a frame is?
Type (0 mgmt, 1 control, 2 data, 3 extension) and Subtype. You filter on these all day.
ToDS=0, FromDS=1: who's talking to whom, and what's Addr1?
AP → client (traffic coming out of the network, e.g. a ping reply). Addr1 = Destination.
Give the subtype numbers for beacon, probe req/resp, auth, assoc req/resp, deauth.
Beacon 8, probe 4/5, auth 11, assoc 0/1, deauth 12.
What are RTS, CTS, ACK subtype numbers and what do they do?
RTS 11 (ask to send), CTS 12 (clear to send, others wait), ACK 13 (got it). "Ask, Allow, Acknowledge."
What are the universal steps to join any network, and when is there a 4th?
Probe → Auth → Assoc (PAA). A 4th step, the 4-way handshake, is added for WPA/WPA2/WPA3/OWE.
Where does WPA3 do its special crypto vs where OWE does its?
WPA3's SAE (Dragonfly) runs during the authentication frames. OWE's Diffie-Hellman runs inside the association frames.
What's in M1 and M2 of the 4-way handshake, and why do they matter?
M1 = ANonce (AP's random), M2 = SNonce + MIC. Together they're all you need to crack the PSK offline. Replay counter pattern is 1,1,2,2.
Why does a deauth attack fail against 802.11w, and what's the giveaway in a capture?
PMF protects management frames; the client runs a keyed SA Query the attacker can't answer, so the real AP responds and the link survives. Giveaway: a deauth followed by SA Query action frames.