In the world of wireless communications, security vulnerabilities in implemented protocols can
remain hidden behind layers of complexity. What appears secure due to the intricate nature of
RF communications may harbor fundamental weaknesses. Let’s dive into a fascinating case
that reveals how a seemingly minor cryptographic weakness in frequency hopping algorithms
can compromise an entire wireless communication stream.
Before we dive into the vulnerability, let’s understand what frequency hopping is and why it’s
important.
Frequency hopping spread spectrum (FHSS) is a method of transmitting radio signals by rapidly
switching between different frequency channels according to a predetermined or calculated
sequence known to both the transmitter and receiver. Think of it like two people having a
conversation where they constantly switch between different languages, but both know
precisely when to switch and which language to use next.
The technique was famously co-invented by actress Hedy Lamarr and composer George
Antheil during World War II. They utilized a piano roll as a mechanism to switch between 88
frequencies as a way to prevent radio-guided torpedoes from being jammed. Today, frequency
hopping serves several crucial purposes:
Praetorian discovered this vulnerability in a device that used Nordic Semiconductor’s Enhanced
ShockBurst protocol for communication in the 2.4 GHz frequency band. The device also
implemented a custom packet protocol, which is encapsulated and transmitted over RF using
Enhanced ShockBurst. The custom packet protocol, not the Enhanced ShockBurst protocol,
implements frequency hopping, led by the transmitting device and followed by the receiving
device.
An example of the payload structure is shown below:
PACKET_HEADER | DATA | CHECKSUM | PRNG | PACKET_END |
The frequency hopping process, designed and implemented by the device manufacturer,
follows a simple sequence. The process steps, with modified or redacted functions, are as follows:
PRNG = next(PRNG)
Channel = PRNG[1] & 0xAB | PRNG[0] & 0xCD
With a test program, we can follow this process to simulate the frequency hopping channels
selected:
The core issues lie in how these devices generated their frequency hopping patterns and the
receiving device’s inherent trust of packets received. This system has several weaknesses:
To explain simply, an attacker could map all 512 possible combinations (2^9 bits) of initial
PRNG values and their repeating patterns. After capturing a subset of RF data, the attacker
could then determine the complete frequency hopping sequence to predict and track the
transmitter.
After collecting sufficient samples of the frequency hopping pattern, an attacker gains the ability
to predict the exact sequence of channels that devices used for communication. This
predictability removed the primary benefit of frequency hopping by converting a complex,
random pattern into a deterministic sequence.
Armed with this knowledge, a malicious actor could systematically track transmissions across
different frequencies and intercept sensitive data protected by the frequency hopping
mechanism. Even more concerning is the potential for active attacks: an attacker could inject
false data packets into the communication stream to redirect receiving devices to attacker-
controlled frequencies, effectively hijacking the communication channel.
This vulnerability transformed a seemingly secure frequency hopping communication system
into something akin to a simple, fixed-frequency transmission that an attacker could track and
manipulate. The system’s reliance on a predictable PRNG sequence created a fundamental
weakness that undermines its security model, regardless of any other security measures that
might be in place.
Modern security practices recommend a more robust approach to frequency hopping that combines temporal elements with proper cryptographic principles. At its core, the ideal solution uses both a shared secret key and synchronized time to determine channel selection. Developers can implement this by passing current time and a pre-shared key through a cryptographic hash function to generate the next channel in the sequence.
While this approach significantly improves security, it does introduce additional complexity. Time synchronization between devices becomes critical – both transmitter and receiver must maintain closely aligned time references to calculate the same channel sequence. This requires careful consideration of:
Additional security measures should also be implemented to create a comprehensive security solution:
The added complexity of time synchronization is a worthwhile trade-off for the security benefits gained. This approach transforms the frequency hopping sequence from a predictable pattern into one that requires knowledge of the secret key and the current time to determine the next channel.
This case study highlights several important security principles:
This vulnerability serves as a reminder that security through obscurity is not security at all. When implementing wireless protocols, even seemingly complex mechanisms like frequency hopping must be built on solid cryptographic foundations. The case demonstrates how a slight weakness in random number generation can cascade into a complete communication stream compromise.
For manufacturers and developers of wireless devices, this underscores the critical importance of security reviews, proper cryptographic implementations, and the need to treat every aspect of the communication chain as a potential attack surface. As our world becomes increasingly wireless, the lessons learned from such vulnerabilities become ever more valuable. When implementing wireless security features, remember: cryptographic randomness matters, trust must be earned through verification, and simple patterns will eventually be broken.
The post RF Fortune Telling: Frequency Hopping Predictability appeared first on Praetorian.
*** This is a Security Bloggers Network syndicated blog from Security Blog | Praetorian authored by Harry Hayward. Read the original post at: https://www.praetorian.com/blog/rf-fortune-telling-frequency-hopping-predictability/