Detection of EMI Attacks
Detection of EMI Attacks
on Sensor Systems
Youqian Zhang Kasper Rasmussen
University of Oxford University of Oxford
[email protected] [email protected]
Abstract—Sensor systems are used every time a micro- our infrastructure and modern life in general, and hence it is
controller needs to interact with the physical world. They are essential to be concerned with the security and correctness of
abundant in home automation, factory control systems, critical sensor measurements.
infrastructure, transport systems and many, many other things.
In a sensor system, a sensor transforms a physical quantity into
In a sensor system, a sensor transforms a physical quantity
an analog signal which is sent to an ADC and a microcontroller into an analog signal which is sent to a microcontroller. Without
for digitization and further processing. Once the measurement is an authentication scheme, the microcontroller has no choice
in digital form, the microcontroller can execute tasks according but to trust the measurement. The wire that connects the
to the measurement. Electromagnetic interference (EMI) can sensor to the microcontroller is subject to electromagnetic
affect a measurement as it is transferred to the microcontroller.
An attacker can manipulate the sensor output by intentionally
interference (EMI). An attacker can use EMI to remotely,
inducing EMI in the wire between the sensor and the micro- using easily available radio equipment, inject an attacking
controller. The nature of the analog channel between the sensor signal into the sensor system and change the sensor output,
and the microcontroller means that the microcontroller cannot regardless of the sensor type. We cover this process in detail
authenticate whether the measurement is from the sensor or the in Section II. As a result, the attacker can manipulate the
attacker. If the microcontroller includes incorrect measurements
in its control decisions, it could have disastrous consequences.
microcontroller into believing that a measurement was obtained
We present a novel detection system for these low-level by the legitimate sensor. For example, an air conditioner
electromagnetic interference attacks. Our system is based on can adjust the temperature of the air according to the room
the idea that if the sensor is turned off, the signal read by the temperature. Suppose an attacker remotely sends an attacking
microcontroller should be 0V (or some other known value). We signal to hold the sensor output at a level that corresponds
use this idea to modulate the sensor output in a way that is
unpredictable to the adversary. If the microcontroller detects
to a low temperature, the air conditioner is deceived into
fluctuations in the sensor output, the attacking signal can be continuously expelling hot air. As a result, the room becomes
detected. Our proposal works with a minimal amount of extra warmer and warmer. This might seem rather harmless, but a
components and is thus cheap and easy to implement. similar attack can be done to the cooling system of a nuclear
We present the working mechanism of our detection method power plant, or the pitch control of a fly-by-wire helicopter.
and prove the detection guarantee in the context of a strong
To protect a sensor system from attacks, existing defense
attacker model. We implement our approach in order to detect
adversarial EMI signals, both in a microphone system and a strategies such as shielding and EMI filters have been well
temperature sensor system, and we show that our detection studied. Although shielding and EMI filters can significantly
mechanism is both effective and robust. attenuate EMI, they do not fully block interference, nor do they
provide the system with an ability to detect an attacking signal.
I. I NTRODUCTION In this paper we propose a novel defense method to detect an
A sensor is an interface between the physical world and an attack. Our method is based on the idea that when the sensor
electronic circuit, and it is the device that can convert physical has its power switched off, the output of the sensor should be
quantities such as temperature, gravity, and sound into electrical “quiet”. If an attacking signal is maliciously induced into the
signals in the form of analog voltages. Sensors are widely sensor system during the “quiet” period, the microcontroller
applied in our daily lives. For example, in our smartphones, can detect this.
an ambient light sensor measures light so that the brightness We summarize our contributions as follows:
of the screen can be adjusted accordingly; an accelerometer • We propose a novel method to detect EMI attacks by
can monitor motion of the smartphone, and thus the phone can modulating the sensor power, and monitoring the output.
track user’s steps. A microphone is also a sensor that collects • We analyze the security of the detection method and prove
audio signals such as voice commands. Sensors can also be that our method can be bypassed only with a negligible
found in critical applications such as automobiles and nuclear probability.
plants. For example, a light detecting and ranging (LiDAR) • We deploy the detection method on an off-the-shelf
sensor helps the automobile to see the surroundings, and a microphone module as well as a thermistor, to demonstrate
temperature sensor can monitor a temperature of a cooling the feasibility and robustness of discovering an attacking
system of a nuclear reactor. Sensors are highly integrated into signal for both constant and non-constant signals.
In this paper, we focus on low-power EMI attacks, in which
the attacker manipulates the sensors of a victim to report the
values that the attacker wishes. Examples of low-power EMI
attacks can be found in prior work [10], [14], [16], [24].
To change sensor readings successfully, the attacker relies on
Fig. 1: A sensor system consists of a sensor and a micro- two features of a sensor system: one is that the wire connecting
controller. the sensor and the microcontroller acts as an unintentional
antenna; the other one is nonlinearity of electronic components
or undersampling of an ADC. The attacker’s objective is adding
In the following sections, we first briefly present some a malicious signal to the sensor output. The attacker generates
background on EMI attacks and explain how to remotely an attacking signal by modulating a high-frequency carrier
inject a malicious signal into a sensor system in Section II. In signal. This signal is picked up by the wire connecting the
Section III, we present an overview of our detection scheme and sensor to the microcontroller and will cause the microcontroller
introduce the system and adversarial model. In Section IV, we to read a false value [9], [11], [16], [24]. Many researchers,
present in detail how our defence method works and we analyze including [7], [8], [10], [14], [16], [21], [27], [29], [30], exploit
the security of the method. Then, in Section V, we show how the nonlinearity of electronic components to inject arbitrary data
to still maintain some security guarantee even if the measured into sensors. This data can be amplitude, frequency or phase
quantity becomes non-constant (in the measuring period). modulated (AM, FM, or PM) onto the carrier. By injecting
Implementations of the detection method in a microphone a signal with a frequency that exceeds the sampling rate of
system and a temperature sensor system are described in the ADC, the ADC will undersample the attacking signal at
Section VI. We discuss a few additional points in Section VII a specified interval and skip high-frequency oscillations [16],
and summarize related work in Section VIII. Finally, the whole [17]. This means that the ADC can be abused to work as a
work is concluded in Section IX. demodulator for the attacking signal. As a result, the malicious
II. BACKGROUND ON E LECTROMAGNETIC I NTERFERENCE signal is superimposed with the legitimate sensor output.
ATTACK AGAINST SENSOR SYSTEM
III. O UR A PPROACH
In recent years, sensor systems have been widely deployed
In this section, we briefly introduce three classes of sensors
in different applications such as smart devices and automobiles.
on which our method is effective before explaining the core
Attackers can exploit electromagnetic interference (EMI) to
idea of our approach. The details of our defence scheme, and
modify sensor readings, and such attacks may threaten users’
a careful security analysis are presented in Section IV. In this
privacy and safety. In this section, we show a general model
section we also, present the system- and adversarial models.
of sensor systems, and we explain how to inject a malicious
We classify sensors into three main types: active sensors,
signal into the sensor system remotely.
powered passive sensors, and non-powered passive sensors.
A. A Model of Sensor Systems An active sensor consists of an emitter and a receiver. The
As shown in Figure 1, a sensor system consists of two emitter sends out a signal to be reflected by a measured
essential modules: a sensor and a microcontroller. The sensor entity, and the receiver gathers information from the reflected
outputs a measurement to the microcontroller through a signal. Examples of active sensors are ultrasonic sensors and
wire. An attacker can interfere with the sensor output by infrared sensors. A powered passive sensor or a non-powered
injecting an attacking signal into the sensor system (see passive sensor has no emitter, and the sensor directly senses
details in Section II-B). When the attacking signal enters the the physical phenomenon such as vibration or radiation of the
sensor system, it is superimposed with the sensor output. The measured entity. A powered passive sensor needs an external
malicious sensor output is digitized by an analog-to-digital excitation signal or a power signal when it works. Examples
converter (ADC) in the microcontroller, and finally, an incorrect of such sensors are microphones, light dependent resistors, and
digitized sensor output is processed by the microcontroller. thermistors. A non-powered passive sensor does not need any
external power signal. When the non-powered passive sensor is
B. Injecting Malicious Signals into Sensor Systems exposed to an entity that is expected to be measured, the sensor
EMI attacks can be categorized into two types: high-power generates an output, which can be a voltage signal or a current
EMI attacks and low-power EMI attacks. The high-power EMI signal. Sensors such as piezoelectric sensors, photodiodes, and
attacks refer to disruption, jamming and burning to the victim thermocouples are non-powered passive sensors. Our approach
system. Sabath [22] summarizes a series of criminal uses of modifies the way that the powered/non-powered passive sensor
high-power EMI tools that result in degradation or loss of works; since the receiver of an active sensor is a powered/non-
the main function of the victim’s system, where technical powered passive sensor, our approach also works for the active
defects, economic losses, and disasters occur. Various defense sensor. To simplify our exposition, in the rest of the paper, we
methods against the high-power EMI attacks have been studied use the powered passive sensor as an example to explain our
thoroughly in previous studies [1], [2], [4], [12], [15], [18], approach. In Section VII-C, we will further illustrate how to
[19], [28]. suit our approach to the non-powered passive sensor. Unless
clock cycle (see Figure 2). In our approach, the Manchester
encoded code is encoded from an n-bit randomized secret
sequence of zeros and ones. Because the secret sequence is
randomized, the sensor is switched on and off randomly, and
hence the sensor output has a randomized on-and-off pattern. In
our approach, we assume that the physical quantity is constant
(see details in Section III-B). Since the physical quantity is
constant, as shown in Figure 2, the waveform of the sensor
output is similar to the Manchester encoded code.
A built-in ADC digitizes the sensor output, and the micro-
controller decides whether an attack occurs by checking the
digitized sensor output. As shown in Figure 2, the secret
Fig. 2: An n-bit (n = 4) secret sequence of zeros and ones sequence has n bits, and thus the Manchester encoded code
is converted to a Manchester encoded code, which is toggled has n clock cycles. Accordingly, the sensor output has n clock
between a high voltage level and a low voltage level (0 V). The cycles. We define each clock cycle of the sensor output as a sub-
sensor output carries the information of the physical quantity measurement, and all n sub-measurements form a measurement.
and the noise. After digitization, a digitized signal is obtained. Further, each sub-measurement is digitized into two samples by
the ADC: one is sampled when the sensor is biased at the high
voltage, and the value of the sample is non-zero volt; the other
otherwise stated, sensor/sensors represent powered passive sample is digitized when the sensor is biased at 0 V, and the
sensor/sensors hereafter. value of the sample is 0 V. The microcontroller can align the
digitized signal with the secret sequence precisely, and hence,
A. Randomized Sensor Output given any sample, the microcontroller knows whether it should
Before introducing our approach, we briefly recap how an be zero or non-zero. Hereafter, based on the microcontroller’s
attacker can change a sensor output of a sensor system. A knowledge of the secret sequence, a sample that should be
sensor system consists of two essential modules: a sensor and non-zero is called as a “non-zero sample”, and a sample that
a microcontroller (see details in Section II-A). The sensor should be zero is called as a “zero sample”.
readings are transmitted to the microcontroller through a Under an attack, either a zero or a non-zero sample in a
wire connecting the output of the sensor and the input of sub-measurement can be influenced by the attacking signal.
the microcontroller. Unfortunately, the wire is sensitive to If the attacker alters a zero sample, the microcontroller can
electromagnetic interference (EMI), and EMI can affect the spot the attack immediately, as the voltage level of the zero
sensor system by inducing voltages on the wire. An attacker sample is not 0 V. Conversely, if the attacker alters a non-zero
can utilize the wire to inject an attacking signal into the sensor sample, she will also be detected quickly. This is because
output to change the sensor readings. that the physical quantity should remain unchanged during
We turn the sensor on and off. Turning on means that the a measurement, and all non-zero samples should be equal;
sensor is biased at a high voltage; turning off means that the however, the changed non-zero sample has a different voltage
sensor is biased at 0 V (or other known voltage levels). When level from the other non-zero samples, and hence the attack is
the sensor is on, the sensor measures the physical quantity detected. Our detection approach are detailed in Section IV.
and the sensor output carries the information of the physical If the sensor system does not detect any attacking signal, the
quantity. As the sensor is off, the sensor output becomes a quantification of the physical quantity is the value of a non-zero
constant signal at a specific voltage level. Suppose that the sample. In practice, noise must be considered. As shown in
attacker injects an attacking signal to the sensor system when Figure 2, since the sensor output is noisy, the non-zero samples
the sensor is off, a disturbance will appear in the flat sensor vary slightly in a small range. Thus, the quantification is an
output. The microcontroller can easily detect such disturbances, average of all non-zero samples. To simplify the exposition,
and hence the attacking signal is discovered. If the sensor noise is ignored in Section IV and Section V. How to handle
system can randomly turn off the sensor, the attacker has to noise will be detailed in Section VI.
guess when the sensor is off so that she can avoid sending an Note that researchers [26] have proposed a defense strategy
attacking signal to the sensor system; otherwise, a mistake of named PyCRA, which detects sensor spoofing attacks by
causing an uneven sensor output when the sensor is off will turning off the emitter in an active sensor. Details of the working
directly unveil the attacker herself to the sensor system. principle of PyCRA and a comparison between our approach
We require that the microcontroller can measure the physical and PyCRA are presented in Section VII-D.
quantity and monitor the attacking signal by turns, and hence
the sensor should be switched between the on and the off states. B. System Model
We use a Manchester encoded code [3] as the bias voltage Figure 3 presents a system model of the sensor system that
for the sensor, because the Manchester encoded code toggles is equipped with our detection method. The system model
between a high voltage level and 0 V at the midpoint of each consists of a sensor and a microcontroller. The sensor is driven
Fig. 3: A sensor system that is equipped with the detection method consists of a sensor and a microcontroller. The bias voltage
of the sensor is controlled by the microcontroller. In the attack signal detector, unequal non-zero samples imply an attack. Also,
a changed zero sample indicates an attack.
by a bias voltage that is controlled by the microcontroller. our detection method, it is essential to ensure that the physical
An output of the sensor is used to send a measurement to the quantity is unchanged within the n clock cycles.
microcontroller, which checks the existence of attacking signals
and recovers the physical quantity from the measurement. C. Adversarial Model
The objective of the attacker is manipulating the waveform
The microcontroller has three blocks including a bias voltage
of the sensor output without being detected by the sensor
generator, an ADC, and an attack signal detector. The bias
system. We suppose that the attacker cannot access the sensor
voltage generator encodes an n-bit secret sequence into a
system physically. Also, we assume that the attacker has no
Manchester encoded code, which is the bias voltage for the
information about the n-bit secret sequence. Given any sub-
sensor. The ADC digitizes the sensor output and transmits the
measurement, we assume that the attacker knows voltage levels,
digitized data to the attack signal detector to check whether
but she does not know whether the voltage level transitions
an attacking signal exists. The attack signal detector has
from the high voltage to 0 V or from 0 V to the high voltage
two outputs: value represents a measurement of the physical
in the midpoint of the sub-measurement (see Figure 2). Thus,
quantity; valid indicates whether value is ready to be read. If
the attacker has to guess the direction of the voltage level
no attacking signal is detected, the measurement is assigned to
transition in each sub-measurement. Moreover, the attacker
value, and then valid is set to true. Hence the sensor system
can deliberately inject a crafted signal into the sensor system,
knows that value is valid to be further processed. However, if
and hence the attacker can change the waveform of the sensor
an attacking signal is detected in a measurement, valid is set
output as she wishes. Also, the attacker knows when the sensor
to false throughout that measurement, which means that value
module starts and stops transmitting the measurement, and she
is invalid to be read. Also, the microcontroller will be alerted
can align the crafted signal with the sensor output precisely.
that the sensor system is under an attack.
In our system model, we assume that the physical quantity IV. ATTACK D ETECTION
remains unchanged in a measurement. Even though the physical After receiving the digitized sensor output, the attack signal
quantity varies, if the duration of a measurement is short detector aligns it with the corresponding secret sequence. As
enough, we can also regard the physical quantity as constant. shown in Figure 2, each digit in the secret sequence corresponds
An example of a constant physical quantity is room temperature. to two samples in the digitized sensor output. A digit 1 means
The temperature changes slowly over a long period; however, that the corresponding two samples are zero and non-zero in a
in a short time such as 0.01 s, the temperature is unchanged. consecutive order; a digit 0 indicates a non-zero sample and a
For each measurement, the microcontroller generates n-bit zero sample in a consecutive order. Thus, the microcontroller
secret sequence, and accordingly, the Manchester encoded code knows the order of all samples. When no attacking signal
has n clock cycles. Two samples are digitized from each clock exists, the digitized sensor output satisfies two requirements:
cycle or sub-measurement, and hence the sampling rate of the 1) All non-zero samples are equal.
ADC is two times larger than the clock rate of the Manchester 2) All zero samples are zero.
encoded code. In practice, the sampling rate of the ADC has Once an attack occurs, either sample in a sub-measurement
an upper limit, and thus the clock rate of the Manchester can be altered. The attack signal detector first checks non-
encoded code also has a maximal value, which is a half of the zero samples. As shown in Figure 4, if the attacker only
fastest sampling rate. The shortest duration of n clock cycles is changes several non-zero samples in the measurement, the
determined by the fastest sampling rate of the ADC. To apply signal formed by all non-zero samples become non-constant.
Fig. 4: A sensor output of a constant physical quantity. An (a) A sensor output of a non-constant physical quantity.
attacker shifts one non-zero sample, and the signal formed by
all non-zero samples becomes non-constant.
Fig. 9: When detection method is applied, (a) the speaker plays a 1 kHz tone; (b) the attacker transmits an attacking signal,
which is generated by modulating 1 kHz signal on a 144 MHz carrier signal at the power of −5 dBm; (c) the attacker transmits
an attacking that is generated by modulating a 5 kHz signal on a 144 MHz carrier signal at a transmission power of 0 dBm,
and the speaker plays 1 kHz tone at the same time.
Fig. 13: Our detection method is deployed to the temperature sensor system, and the outputs of the thermistor circuit are
presented. In (a), no attacking signal exists, and the non-zero samples are approximately equal, which indicates a temperature
of 25.5 ◦C. In (b), a dumb attacking signal is radiated, and the non-zero samples indicate a room temperature of 38.3 ◦C, and
the zero samples corresponds to a temperature of 27.4 ◦C. In (c), a smart attack is simulated, and a wrong guess is made in the
third clock cycle.