liveBook · Manning

FMS attack

As explained in Hacking Cryptography

The FMS attack is a statistical attack that exploits RC4 key-scheduling biases in WEP weak-IV traffic to recover bytes of the preshared key.

The FMS attack recovers a WEP preshared key by exploiting statistical biases in RC4’s key-scheduling algorithm. It targets traffic using weak initialization vectors of the form IV = [L, 255, X], where L identifies the key byte under attack and X is arbitrary. section 4.3.2

The attack proceeds by:

  • Collecting WEP packets whose visible IV begins with [L, 255]. section 4.3.2
  • Recovering the first keystream byte from known eight-byte SNAP plaintext and ciphertext. section 4.3.2
  • Replaying the KSA with the IV and already recovered key prefix, then tallying candidate values for the next key byte. section 4.3.2
  • Repeating byte by byte; statistical noise makes larger traffic samples important. section 4.3.2

Go simulation

A packet generator constructs RC4 keys by concatenating a weak IV with a fixed PSK. An exploit processes 50,000 packets per byte and successfully recovers keys such as "helloworld123"; with only 500 packets, several bytes are incorrect. section 4.3.2

Equation 4.8
\[\label{equation:wep-weak-iv} IV = [L, 255, X]\]

Use the weak-IV equation to identify which packets contribute evidence for a particular key index. section 4.3.2

How Hacking Cryptography covers it

How deep it goes
Traces weak IVs, KSA state updates, PRGA output, recovery equations, Go code, tests, and message-volume failure.
Examples
Uses weak-IV packet generation, SNAP headers, KSA equations, Go exploit code, and tests with two sample keys.
What you can do after
Apply it via a Go simulation to collect weak-IV evidence and recover a WEP PSK byte by byte.
How it connects
Connects WEP with RC4, initialization vectors, known-plaintext recovery, KSA, and PRGA.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Hacking Cryptography. The section links point to the parts of the book it draws on.