RollBack & RollJam Attack
Table of contents
As the automotive industry continues to innovate, the security of vehicles has become a critical concern. Among the threats faced by modern vehicles, RollBack and RollJam attacks have garnered significant attention for their ability to exploit vulnerabilities in keyless entry systems. In this blog, we will explore these attacks, how they work, and strategies to mitigate them.
RF Signals & Rolling Code
RF signals are used widely in modern automobile RKE systems to make opening vehicle doors from a distance convenient. The smart key transmits an RF signal when the keyholder presses the close or open button. The vehicle’s body control module (BCM) then authenticates the signal. Based on this process it either unlocks the door, locks the door or rejects the signal. The frequency of RF signals used in automobiles operates at or around 433 MHz. There are different types of modulations used in vehicle RKE systems of which the most commonly utilized techniques in RF key fobs are Amplitude Shift Keying (ASK) and Frequency Shift Keying (FSK). RKE systems most commonly use Manchester encoding and Differential Manchester encoding.
Rolling Code
‘Rolling code’ or ‘Code hopping’ schemes are cryptographic schemes used to secure RKE systems against replay attacks, where the attacker simply records and replays the unlock signal from a car key to gain access to the car.
Rolling code schemes help prevent hacking by using a secret, changing code every time you press a button.
The code sent to the car is based on either a counter (a number that increases each time you press the button) or a random number. It also includes some extra info like your unique key ID (UID) and the button press. If a counter is used, the car checks the new number against the last one it received. It accepts it if the new number is within a certain range of the previous one (to allow for missed presses). If a random number is used, both the car and the key use the same method (a shared algorithm) to generate the next number. The car compares the received number to its prediction.
The comparison is usually done up to the next 256 numbers, to ensure missed values. So when the car received code n, the car will compare between code n and the last code the car received k (it will compare n with k+1, k+2, k+3, ... , k+256) If there is a large difference between n and k (n not in range(k, k+256)), the car waits to see if the subsequent code received also next in the sequence (the car will check if the next code received is n+1) If so, the car resets its counter in sync with the last code received. The bank code resets and starts again from n+1.
RollJam Attack
RollJam is an advanced “selective jamming and replaying” method; with a careful sequence of jamming, capturing, and replaying signals, it allows an attacker to capture an unused signal from the key fob that can be replayed later to unlock the target vehicle without the victim noticing it.
Each time you push the unlock button, the key fob uses an algorithm to generate a new code. The car knows the same algorithm, and the old codes are discarded each time a new one is generated.
The roll-jam attack works by recording and blocking the radio signal from the key fob. Because the signal n was blocked, the car doesn’t unlock, and the owner will naturally try again.
That creates a second signal n+1 that is also recorded and blocked, but this time the attacker replays the first code n to unlock the door.
The owner is none the wiser, but now the attacker knows the next code in the sequence — which hasn’t yet been expired — and can use it to unlock the car at their leisure.
RollBack Attack
RollBack is a time-agnostic replay attack that exploits the re-syncing system in cars with rolling code encryption. Even though a one-time code becomes invalid in rolling code–based systems, replaying a few previously captured (consecutive) signals can trigger a rollback-like mechanism in certain RKE systems, making all former captured (unlock) signals valid again, hence, the name RollBack.
(i): Captured the first unlock signal n and jammed to hinder the car to receive it.
(ii): Captured the second unlock signal n+1 only and let the vehicle receive it. The car can’t receive signal n so signal n still exists in the bank code.
(iii): Owner uses the vehicle/key fob as usual. The number of using pair unlock and lock must be more than 400.
(iv): After used signal n+k, the next value must be n+k+1. But the attacker trigger signal n again. So base on theory of Rolling Code, when the car receives signal n then check signal n with n+k(the last signal the car received). If n not in range(n+k, n+k+256), the car waits the next signal receive and check if it is n+1. If so, the car resets, counters roll back to previous state with signal value n+1. (v): Attacker sends unlock signal n+1, successfully unlock, gain access to the car.