SECURITY / ADVANCED / +270 XP

RF signals do not authenticate themselves

Replay attacks work because wireless protocols assumed a trusted physical layer. They were wrong.

Replay attacks work because wireless protocols assumed a trusted physical layer. They were wrong. Your key fob, your garage door opener, your car's keyless entry — they all broadcast a signal that can be captured and replayed. The signal does not authenticate itself. The receiver does not verify freshness.

The fundamental problem is that RF signals are one-way broadcasts with no challenge-response mechanism. The transmitter sends a code. The receiver accepts it. There is no proof that the code was generated recently, that it was generated by the legitimate transmitter, or that it was not copied from a previous transmission.

THE DEEP DIVE

Rolling Codes

Rolling codes are the most common defense against replay attacks. The transmitter and receiver share a secret and a counter. Each transmission includes the counter value encrypted with the secret. The receiver decrypts the counter, checks that it is within the expected window, and accepts or rejects.

// Rolling code protocol
//
// Transmitter:
// counter++
// encrypted = AES(secret, counter)
// send(encrypted)
//
// Receiver:
// for i in expected_window:
//   if AES_decrypt(secret, received) == i:
//     accept()
//     expected_window = (i+1, i+window)
//     return
// reject()

// Vulnerability: the "window"
// The receiver accepts codes within a window (e.g., 256 codes ahead)
// If an attacker captures a code and blocks the legitimate transmission,
// the attacker's captured code is still valid within the window

The Relay Attack

The relay attack extends replay to proximity. An attacker places a relay device near the victim's key fob and another near the car. The car's challenge is relayed to the key fob, the key fob's response is relayed back. The car thinks the key fob is present. It is not — it is in the victim's pocket, fifty meters away.

PRINCIPLES

  1. RF signals do not authenticate themselves. Every wireless protocol must implement authentication at the application layer.
  2. Replay defense requires freshness. A challenge-response mechanism or a rolling code prevents replay.
  3. Rolling code windows are a security-convenience tradeoff. Wider windows are more convenient but more vulnerable.
  4. Relay attacks defeat proximity assumptions. If your security depends on 'the key is nearby,' it is not secure.
  5. Signal strength is not authentication. A relay can amplify signals in both directions.

IN PRACTICE

Garage Door Replay

Capture the RF signal from a garage door remote using a SDR. Replay the signal. The garage opens. The fix: rolling codes with a challenge-response mechanism. The fix is available in modern openers but rarely implemented in older systems.

Keyless Entry Relay

Two attackers, two relay devices. One stands near the victim's house, the other near the victim's car. The car's challenge is relayed to the key fob inside the house. The key fob's response is relayed back. The car unlocks. The victim never knew.

LIVE SIGNALS

These items surfaced from the intelligence pipeline at generation time.

  • CVE-1999-0095 — The debug command in Sendmail is enabled, allowing attackers to execute commands as root. (NVD / CVE)
  • CVE-1999-1471 — Buffer overflow in passwd in BSD based operating systems 4.3 and earlier allows local users to gain root privileges by specifying a long shell or GECOS field. (NVD / CVE)
  • CVE-1999-1122 — Vulnerability in restore in SunOS 4.0.3 and earlier allows local users to gain privileges. (NVD / CVE)
  • CVE-1999-1506 — Vulnerability in SMI Sendmail 4.0 and earlier, on SunOS up to 4.0.3, allows remote attackers to access user bin. (NVD / CVE)
  • CVE-1999-0084 — Certain NFS servers allow users to use mknod to gain privileges by creating a writable kmem device and setting the UID to 0. (NVD / CVE)

ANTIPATTERNS

  • Assuming that encrypted signals are authenticated signals. Encryption does not prevent replay.
  • Using fixed codes for wireless authentication. Every code must be used at most once.
  • Relying on signal strength as a proximity check. Relays defeat this.
  • Ignoring the physical layer. RF security starts at the antenna.

CHECKLIST

  • All wireless protocols use challenge-response or rolling codes
  • Rolling code windows are as small as usability allows
  • Relay attacks are considered in the threat model
  • Signal strength is not relied upon for security decisions
  • Legacy systems with fixed codes are replaced or disabled

YOUR MOVE

Identify every wireless device in your environment. Check if it uses rolling codes or fixed codes. If it uses fixed codes, it is vulnerable to replay attacks right now.