Hello, welcome back to this course, in this lesson, I will talk about replay attacks and relative countermeasures.
Replay attacks consist in the passive interception of data traffic by an attacker between a source and a
destination and a subsequent retransmission of this data traffic from the attacker to the destination.
The graphics show a possible typical scenario of replay attack to a remote car opening system.
A rolling code, or sometimes called a hopping code, is used in modern remote keyless entry (RKE) systems
to prevent replay attacks.
The principle is to transmit, in addition to a fixed part of the code, a variable component that
changes at each transmission on the basis of a known algorithm between source and transmitter and on
the basis of a counter that keeps track of the number of generations of the variable part.
For example, of the car opening system, the key fob has a counter built-in that increments by one,
every time the button is pressed, and this counter value is encrypted and transmitted to the car. The
car remembers what the count was last time the doors were successfully unlocked, for example (i)
and next time it receives a signal, decrypts the counter value and it checks that the count is somewhere
between i+1 and i+n, where n could be any manufacturer-defined number between approximately
16 and 256.
This just in case the fob has been pressed away from the car.
Both the fob and the car store the secret encryption key that enabled this process to take place. To
anybody sniffing
the data sent from the FOB, it appears to send a chunk of statistically random data. In the UK and Europe
RKE key fobs typically transmit on four hundred thirty three megahertz, while in the United States
and Japan they transmit on three hundred fifty megahertz.
One popular RKE system that several manufacturers use, is the Keeloq system, developed by Microchip.
Looking at it simply, all the manufacturer needs to do is feed the current counter value into the Keeloq
chip, which then handles the encryption. At the other hand in the car,
similar chip handles the decryption. The hopping code portion on the right, in the figure,
is the encrypted section of the message.
This encrypted section contains the synchronization counter, as discussed above, a discrimination section ('DISC'
typically the lower 10 bits of the serial number) and details of the button pressed on the
remote ('BUT').
The discrimination section is used by the decryptor in the car to check that the message was decoded
successfully.
As can be seen, the serial number of the key fob is transmitted without encryption.
The car can be sure it has decrypted the counter correctly
if the descripted DISC section matches the unencrypted serial number.
Even if a car key fob doesn't use the exact Keeloq algorithm as discussed above, it will almost
certainly always follow a similar format.
The serial number of the fob will be transmitted unencrypted, alongside an encrypted section that contains
the counter.
A possible attack on a rolling code systems (called Rolljam Reply Attack) has been reported,
which consists in the attacker's use of a device that intercepts and stores the release messages and at
the same time with a jamming attack, prevents the receiver from receiving them, forcing the transmitter
to retransmit the message.
Then the attacker retransmits to the destination
the first rolling code message sent by the source, but not arrive due to the disturbing action,
then keeping the second intercepted message memorized for future use.
Remote control locks have to meet price-point, reliability, convenience, size, power and performance
concernes. A pair of radios could perform a very secure TLS 1.2 key exchange, but transmitting
too many
bytes over 433 megahertz using current protocols and electronics would take thousand
of milliseconds.
Such a lengthy message would likely trigger dozens of packet resends due to interference,
and typical cell battery in typical remote wouldn't have enough power to last for a long time.
So this is a problem.
OK, thank you for your kind attention, bye.