9

I am now researching RF security on IoT devices such as doors, cars, etc. I have a HackRF device for performing RF-signal manipulations such as replay attacks. It is very easy to record the signals emitted from a door key using the HackRF device and to send them back whenever you want to open the door.

Is there any practical way to protect our doors against such replay attacks (except for using classical doors)? I have such an electronic home door, and I believe someone who has a HackRF can easily open my door if they record my key signals.

I want to research solutions to the problem; what are your thoughts?

Note: Yes, there are some prevention measures in the IT area against replay attacks, but I don't know any for radio signals.

3
  • 3
    I doubt there’s a magical fix for all RF-related replay attacks. This will probably have to be addressed in the upper-layer protocols. For example, a common way to detect and prevent replay attacks is to include a nonce in each message. Of course this has to be implemented in the individual protocol.
    – Ja1024
    Commented Aug 2 at 19:56
  • For IoT, you can normally expect two-way communication. But this question seems to be about replaying one-way transmissions - are you sure you have the right tags? Commented Aug 3 at 9:24
  • @TobySpeight then what are the right tags ? Commented Aug 3 at 9:35

3 Answers 3

29

there are some preventions in IT area against replay attack, but I don't know for radio signals

Radio signal is just the medium, like lasers on a fiber or electrical current on an Ethernet cable. The information does not depend on the medium.

To protect a radio signal from replay, there are some ways:

  • You send the information, plus a nonce, plus a signature. The receiver stores the last received nonce, and rejects any message with a nonce equal or less than that. If the nonce is bigger than the stored one, the receiver calculates the signature, and rejects the message if the signature fails.

  • You use a Rolling Code. Both the receiver and transmitter shares a synchronization number, and a secret code used to calculate the next ones. When a new message arrives, the receiver calculates if the code is valid using the last received code and the secret code.

  • You can use time-based authentication: the code is only valid for a brief time moment (usually in range of seconds or tens of seconds), so the attacker will not have time to capture the code and use it later. This requires both the transmitter and receiver to share a time source. It's used on TOTP second factor authentication.

7
  • 1
    I'll note that as-written, the nonce approach described above may be vulnerable to signal disruption replay attacks: 1) MITM intercepts and disrupts the signal. 2) MITM intercepts and disrupts the signal (e.g.,, the user saw the garage door didn't open and pushed the button again). 3) MITM replays the original signal, causing the door to open. From the user's perspective, they pushed the button twice and the second attempt succeeded. From the garage's perspective, they pushed the button once and it succeeded (but the MITM has stored a signal that can be used later).
    – Brian
    Commented Aug 5 at 15:50
  • To be clear, I didn't come up with the attack above. I've seen it demoed on a video discussing different approaches to garage door security.
    – Brian
    Commented Aug 5 at 15:52
  • Many kind of media can only be compromised by someone who gains a level of physical access not available to the general public. In that sense, radio is different from cable-based communications media.
    – supercat
    Commented Aug 5 at 21:36
  • @Brian I don't think it does. The use of a increasing counter causes the second code to invalidate the first captured code, so an attacker would have to capture a code transmitted after the door opens. There's three ways to use a cryptographic algorithm with a counter: symmetric-key encryption with a shared key (most commonly used in garage doors as it avoids 2-way communication to provision, but is subject to the key being compromised), a hash function (basically HOTP, may avoid encryption laws), or public-key (requires slow computations).
    – user71659
    Commented Aug 6 at 3:13
  • @ThoriumBR The more impactful attack is: 1. capture radio signal from control device 2. block signal from reaching the controlled device 3. user sends multiple signals frustrated that it's not working 4. user goes to the store to fix their control device 5. attacker replays the blocked codes in order to control the device when no one is around. Timed codes would help prevent this attack. Stronger, for more sophisticated devices, would be an authenticated random challenge and response protocol between the control and controlled device.
    – aiootp
    Commented Aug 6 at 11:05
9

Note: yes , there are some preventions in IT area againts replay attack, but i dont know for radio signals

Basically same mechanisms can be employed: a shared secret, and some kind of signature, such as HMAC, and unique data (Nonce). As communication in many radio systems are one way, it has to be predictable, for instance a counter or time based. One example of a secure protocol with only one-way communication is time based one time passwords known for securing access to human user accounts using a shared secret; in principle the same protocol can be employed over radio to transmit a code that is resistant to replay attacks.

Radio is after all just a communication channel. These days it commonly transmits digital data, and the only special characteristic compared to many other communication forms is that key fobs are typically low power and one way.

2
  • How are signatures or message authentication codes supposed to prevent replay attacks? I can see how cryptography in combination with nonces or sequence numbers can fix the problem, but an authenticated/signed message by itself can still be replayed.
    – Ja1024
    Commented Aug 2 at 20:01
  • True, you need some variable data. I assumed that was implicit from the mentioning TOTP, but perhaps not.
    – vidarlo
    Commented Aug 2 at 20:11
-5

I have known of some folks adding a second signal (like a tone-sort of like "squelch" with ham radio) - the mechanism still gives out the same data but would stay locked as most people aren't looking for a secondary (usually a lower wavelength (the suggestion is/was passive RFID) and triggered to your keys The notion is that programming-wise, the rf signal to unlock the door won't even be allowed to enact/run without that initial tone- so it's an if/then/permit/prevent type of construct....

But I have been under a rock for a while so perhaps folks are more savvy to wavelength frequency than when I was discussing it.

I will say the original artific keys were actually a key and a lock that were set under the same wavelength frequency so much like Bluetooth headphones sync up with your phones etc using a frequency matching... These kids and the locks work the same way and the ability to really choose a very specific frequencies and I mean I'm talking like 2.1965 versus 2.2 as far as being precisely specific to each other and truly did seem to be like something that would really work but I will say it's not something I've seen recently and maybe 5 years ago there was still a company that was making these keys but having looked more currently I see nothing of them... So either they really didn't work which in my knowledge they were quite good when I use them but perhaps are now something that is military and not available to the common public anymore.

1
  • 7
    That's just obscurity, and does not provide real security.
    – vidarlo
    Commented Aug 4 at 12:13

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .