This paper was converted on www.awesomepapers.org from LaTeX by an anonymous user.
Want to know more? Visit the Converter page.

\setstackEOL

Model-based Randomness Monitor for Stealthy Sensor Attacks

Paul J Bonczek, Shijie Gao, and Nicola Bezzo Paul J Bonczek, Shijie Gao, and Nicola Bezzo are with the Charles L. Brown Department of Electrical and Computer Engineering, and Link Lab, University of Virginia, Charlottesville, VA 22904, USA. Email: {pjb4xn, sg9dn, nb6be}@virginia.edu
Abstract

Malicious attacks on modern autonomous cyber-physical systems (CPSs) can leverage information about the system dynamics and noise characteristics to hide while hijacking the system toward undesired states. Given attacks attempting to hide within the system noise profile to remain undetected, an attacker with the intent to hijack a system will alter sensor measurements, contradicting with what is expected by the system’s model. To deal with this problem, in this paper we present a framework to detect non-randomness in sensor measurements on CPSs under the effect of sensor attacks. Specifically, we propose a run-time monitor that leverages two statistical tests, the Wilcoxon Signed-Rank test and Serial Independence Runs test to detect inconsistent patterns in the measurement data. For the proposed statistical tests we provide formal guarantees and bounds for attack detection. We validate our approach through simulations and experiments on an unmanned ground vehicle (UGV) under stealthy attacks and compare our framework with other anomaly detectors.

I Introduction

Modern autonomous systems are fitted with multiple sensors, computers, and networking devices that make them capable of many applications with little/no human supervision. Autonomous navigation, transportation, surveillance, and task oriented jobs are becoming more common and ready for deployment in real world applications especially in the automotive, industrial, and military domains. These enhancements in autonomy are possible thanks to the tight interaction between computation, sensing, communications, and actuation that characterize cyber-physical systems (CPSs). These systems are however vulnerable and susceptible to cyber-attacks like sensor spoofing which can compromise their integrity and the safety of the surroundings. In the context of autonomous vehicle technologies, one of the most typical threats is hijacking in which an adversary is capable to administer malicious attacks with the intent of leading the system to an undesired state. An example of this problem was demonstrated by authors in [1] in which GPS data were spoofed to slowly drive a yacht off the intended route.

If we look at the specific architecture of these robotic systems, typical autonomous applications employ go-to-goal and trajectory tracking and if one or more on-board sensors are compromised, system behavior can become unreliable. These vehicles typically have well studied dynamics and their sensors have specific expected behaviors according to their characterized noise models. An attacker that wants to perform a malicious hijacking can create non-random patterns or add small biases in the measurements to slowly push the system towards undesired states, for example creating undesired deviations as depicted in Fig. 1, all while remaining hidden within the system’s and sensors noise profile. Hence, in order for an attacker to hijack the system with stealthy attack signals, a violation to the expected random behavior of the sensor measurements must occur.

Refer to caption
Figure 1: A pictorial representation of the problem discussed in this paper in which a cyber-attack is able to hijack a vehicle into unsafe states while remaining hidden within the noise profile of its sensors.

With these considerations and problem in mind, in this work, we leverage the known characteristics of the residual – the difference between sensor measurements and state prediction – to build a run-time monitor to detect non-random behaviors. To monitor randomness, the non-parametric statistical Wilcoxon Signed-Rank [2] and Serial Independence Runs [3] tests are applied to individual sensors to determine if their measurements are being received randomly. The Wilcoxon test is an indicator of whether the residual is symmetric over its expected value, whereas the Serial Independence runs test indicates whether the sequences of residuals are arriving in a random manner. Thus, the main objective of this work is to find hidden attacks exhibiting non-random behavior within the noise. Given the nature of the non-parametric statistical tests that we propose, only random behavior of the residual is considered here, leaving the magnitude bounds of the residual un-monitored. Several detectors providing magnitude bounds on attacks have been already researched in the literature, thus in this work we also present a framework to combine existing approaches for magnitude bound detection with the proposed randomness monitor. In doing so, our approach improves the state-of-the-art attack detection by adding an extra layer of checks.

I-A Related Work

This work builds on previous research considering deceptive cyber-attacks to hijack a system by injecting false data to sensor measurements while trying to remain undetected [4]. Many of the previous works use the residual for detection, which gives clues whether sensor measurements are healthy (uncompromised). Previous works characterizing the effects of stealthy sensor attacks on the Kalman filter can be found in [5, 6]. Similarly, authors in [4, 7] discuss how stealthy, undetectable attacks can compromise closed-loop systems, causing state and system dynamic degradation

Several procedures and techniques that analyze the residual for attack detection exist, one of which is the Sequential Probability Ratio Testing (SPRT) [8] that tests the sequence of incoming residuals one at a time by taking the log-likelihood function (LLF). The Cumulative Sum (CUSUM) procedure proposed in [9] and [10] leverages the known characteristics of the residual covariance and sequentially sums the residual error to find changes in mean of the distribution. Compound Scalar Testing (CST) in [7] is another technique which is computationally friendly by reducing the residual vector with the known residual covariance matrix into a scalar value with χ2\chi^{2} distribution. An improvement of CST in [11] is made by including a coding matrix to sensor outputs that is unknown to attackers, then an iterative optimization algorithm is used to solve for a transform matrix to detect stealthy attacks. Similar to our work where monitors are placed on individual sensors, the authors in [12] propose a Trust-based framework for sensor sets by “side-channel” monitors to provide a weight for trustworthiness to determine whether sensors have been compromised. Other works have proposed attack resiliency by leveraging information from redundant sensing. In [13], authors solve to reconstruct the state estimate of stochastic systems using an l0l_{0} optimization problem when less than half of the sensors are compromised. Different from these previous works, we build a framework to monitor sensor measurements to find previously undetectable attacks by searching for non-random behavior.

The remainder of this work is organized as follows. In Section II we begin with system, estimator models and problem formulation, followed by the description of our Random Monitor framework in Section III. In Section IV an analysis of worst-case stealthy attacks and characterization of the effects on system performance is presented. Finally, in Section V we demonstrate through simulations and experiments the performance of our framework augmented with boundary detectors before drawing conclusions in Section VI.

II Preliminaries & Problem Formulation

In this work we consider autonomous systems whose dynamics can be described by a discrete-time linear time-invariant (LTI) system in the following form:

𝒙k+1=𝑨𝒙k+𝑩𝒖k+𝝂k𝒚k=𝑪𝒙k+𝜼k,\begin{split}\bm{x}_{k+1}&=\bm{A}\bm{x}_{k}+\bm{B}\bm{u}_{k}+\bm{\nu}_{k}\\ \bm{y}_{k}&=\bm{C}\bm{x}_{k}+\bm{\eta}_{k},\end{split}\vspace{-4pt} (1)

with 𝑨n×n\bm{A}\in\mathbb{R}^{n\times n} the state matrix, 𝑩n×m\bm{B}\in\mathbb{R}^{n\times m} the input matrix, and 𝑪s×n\bm{C}\in\mathbb{R}^{s\times n} the output matrix with the state vector 𝒙kn\bm{x}_{k}\in\mathbb{R}^{n}, system input 𝒖km\bm{u}_{k}\in\mathbb{R}^{m}, output vector 𝒚ks\bm{y}_{k}\in\mathbb{R}^{s} providing measurements from ss sensors from the set 𝓢={1,2,,s}\mathcal{\bm{S}}=\{1,2,\dots,s\}, and sampling time-instants kk\in\mathbb{N}. Process and measurement noises are i.i.d. multivariate zero-mean Gaussian uncertainties 𝝂=𝒩(0,𝑸)n\bm{\nu}=\mathcal{N}(0,\bm{Q})\in\mathbb{R}^{n} and 𝜼=𝒩(0,𝑹)s\bm{\eta}=\mathcal{N}(0,\bm{R})\in\mathbb{R}^{s} with covariance matrices 𝑸n×n,𝑸0\bm{Q}\in\mathbb{R}^{n\times n},\bm{Q}\geq 0 and 𝑹s×s,𝑹0\bm{R}\in\mathbb{R}^{s\times s},\bm{R}\geq 0 and are assumed static.

During operations, a standard Kalman Filter (KF) is implemented to provide a state estimate 𝒙^kn\hat{\bm{x}}_{k}\in\mathbb{R}^{n} in the form

𝒙^k+1=𝑨𝒙^k+𝑩𝒖k+𝑳(𝒚k𝑪𝒙^k),\hat{\bm{x}}_{k+1}=\bm{A}\hat{\bm{x}}_{k}+\bm{B}\bm{u}_{k}+\bm{L}(\bm{y}_{k}-\bm{C}\hat{\bm{x}}_{k}),\vspace{-2pt} (2)

where the Kalman gain matrix 𝑳n×s\bm{L}\in\mathbb{R}^{n\times s} is

𝑳=𝑨𝑷𝑪T(𝑹+𝑪𝑷𝑪T)1,\bm{L}=\bm{A}\bm{P}\bm{C}^{T}(\bm{R}+\bm{C}\bm{P}\bm{C}^{T})^{-1},\vspace{-3pt} (3)

therefore, we assume that the KF is at steady state, i.e., limk𝑷k=𝑷\lim_{k\to\infty}\bm{P}_{k}~{}=~{}\bm{P}. The estimation error of the KF is defined as 𝒆k=𝒙k𝒙^k\bm{e}_{k}=\bm{x}_{k}-\hat{\bm{x}}_{k} while its residual 𝒓k\bm{r}_{k} is given by

𝒓k=𝒚k𝑪𝒙^k=𝑪𝒆k+𝜼k,\bm{r}_{k}=\bm{y}_{k}-\bm{C}\hat{\bm{x}}_{k}=\bm{C}\bm{e}_{k}+\bm{\eta}_{k},\vspace{-2pt} (4)

The covariance of the residual (4) is defined as

𝚺=E[𝒓k+1𝒓k+1T]=𝑹+𝑪𝑷𝑪Ts×s.\bm{\Sigma}=\mathrm{E}[\bm{r}_{k+1}\bm{r}_{k+1}^{T}]=\bm{R}+\bm{C}\bm{P}\bm{C}^{T}\in\mathbb{R}^{s\times s}.\vspace{-2pt} (5)

In the absence of sensor attacks, the residual for the ithi^{th} sensor rk,i,i𝒮r_{k,i},i\in\mathcal{S} follows a Gaussian distribution rk,i𝒩(0,σi2)r_{k,i}\sim\mathcal{N}(0,\sigma_{i}^{2}) where σi2\sigma_{i}^{2} is the ithi^{th} diagonal element of the residual covariance matrix 𝚺s×s\bm{\Sigma}\in\mathbb{R}^{s\times s} in (5) such that

E[rk,i]=0, Var[rk,i]=σi2.\mathrm{E}[r_{k,i}]=0,\text{ }\mathrm{Var}[r_{k,i}]=\sigma^{2}_{i}.\vspace{-2pt} (6)

We describe the system output considering sensor attacks as

𝒚k=𝑪𝒙k+𝜼k+𝝃k,\bm{y}_{k}=\bm{C}\bm{x}_{k}+\bm{\eta}_{k}+\bm{\xi}_{k},\vspace{-2pt} (7)

where 𝝃ks\bm{\xi}_{k}\in\mathbb{R}^{s} represents the sensor attack vector. Our proposed framework consists in adding a monitor on each sensor searching for non-random behavior of the sensor measurement residual, hence any sensor may be compromised.

Definition 1

A sensor measurement is random if:

  • a sequence of residuals over a time window occurs in an unpredictable, pattern-free manner.

  • residuals have proper distributions over E[𝒓k]\mathrm{E}[\bm{r}_{k}].

Since we are considering sensor spoofing, an attack signal 𝝃k\bm{\xi}_{k} containing malicious data can disrupt randomness, causing measurements to display non-random behavior. Formally, the problem that we are interested in solving is:

Problem 1

Randomness of Measurements: Given the residual 𝐫k\bm{r}_{k} between a measurement 𝐲k\bm{y}_{k} and the corresponding prediction 𝐂𝐱^k\bm{C}\hat{\bm{x}}_{k} as defined in (4), find a policy to determine at run-time whether a sensor measurement is random, i.e., if any condition in Definition 1 does not hold.

III Randomness Monitoring Framework

The overall cyber-physical system architecture including our Randomness Monitor framework is summarized in Fig. 2. The Randomness Monitor, augmented to any boundary detector providing magnitude bounds, is placed in the system feedback to monitor the residual sequence.

Refer to caption
Figure 2: The architecture of a CPS while experiencing sensor attacks augmented with our monitoring technique.

We introduce a framework to monitor randomness of the residual sequence through two tests and provide tuning bounds for each to result in desired false alarm rates. From (4), the residual should have a symmetric distribution centered at zero and the sequence of residuals should arrive in a random order, having an absence of structure or patterns. For example, a continuously alternating pattern of “negative” and “positive” values, or a pattern of only “negative” values would clearly not satisfy random sequences.

Both tests operate online providing an alarm when the residual does not satisfy the conditions of each test. A desired false alarm rate αides(0,1)\alpha_{i}^{\text{des}}\in(0,1) for each ithi^{th} sensor is tuned for each test, and in the absence of sensor attacks, the observed alarm rate αi[0,1]\alpha_{i}\in[0,1] for each test should match closely with the tuned desired value αiαides\alpha_{i}\sim\alpha_{i}^{\text{des}}.

III-A Residual Symmetry Monitor

To monitor whether the sequence of residuals are symmetrically distributed and zero-mean, we leverage the Wilcoxon Signed-Rank (WSR) test [2] as follows. A hypothesis test is formed by 0\mathcal{H}_{0} for no attacks and a\mathcal{H}_{a} with attacks:

{0:E[𝒓k]=0 and 𝒓k is symmetric,a:E[𝒓k]0 or 𝒓k is not symmetric.\begin{split}\bigg{\{}\begin{array}[]{l}\begin{aligned} &\mathcal{H}_{0}:\mathrm{E}[\bm{r}_{k}]=0\textbf{ and }\bm{r}_{k}\text{ is symmetric},\\ &\mathcal{H}_{a}:\mathrm{E}[\bm{r}_{k}]\neq 0\hskip 6.0pt\textbf{ or }\bm{r}_{k}\text{ is not symmetric}.\end{aligned}\end{array}\end{split}\vspace{-2pt} (8)

A monitor is built to check if the residual 𝒓k\bm{r}_{k} sequence over a sliding monitoring window T=(k+1,k)T=(k-\ell+1,k) for \ell previous steps is symmetric. We denote the vector of residual sequences over the sliding window TT as 𝒓T=(𝒓T,1,,𝒓T,i,,𝒓T,s)\bm{r}_{T}~{}=~{}(\bm{r}_{T,1},\dots,\bm{r}_{T,i},\dots,\bm{r}_{T,s}) where the residual sequence for an ithi^{th} sensor is 𝒓T,i=(rk+1,i,,rk,i)\bm{r}_{T,i}=(r_{k-\ell+1,i},\dots,r_{k,i}). Following 0\mathcal{H}_{0}, we would expect that the number of positive and negative values of 𝒓k\bm{r}_{k} over the monitoring window are equal. Additionally, a symmetric distribution indicates that the expected absolute magnitude of positive and negative residuals over a given window of length \ell are equal,

E[|𝒓T,i+|]=E[|𝒓T,i|], i𝒮,\mathrm{E}[|\bm{r}_{T,i}^{+}|]=\mathrm{E}[|\bm{r}_{T,i}^{-}|],\text{ }i\in\mathcal{S},\vspace{-1pt} (9)

where E[|𝒓T,i+|]\mathrm{E}[|\bm{r}_{T,i}^{+}|] and E[|𝒓T,i|]\mathrm{E}[|\bm{r}_{T,i}^{-}|] denote the expected absolute magnitude for positive and negative values of the residual rk,ir_{k,i} within the window TT for any given ithi^{th} sensor. In other words, we would expect the sum of absolute values from the residual to be equal for both the positive and negative values. The WSR test takes both the sign and magnitude of the residual into account to determine whether conditions satisfy 0\mathcal{H}_{0}. Large differences in the residual signs or signed magnitudes imply non-similar distributions, causing the test to reject the no attack assumption and triggering an alarm.

To perform the WSR test at each time step kk, we first look at the \ell number of residuals over the monitoring window TT of a given ithi^{th} sensor, ranking the absolute values of residuals rT,ir_{T,i}, starting with rank=1rank=1 for the smallest absolute value, rank=2rank=2 for the second smallest, and so on until reaching the largest absolute value with rank=rank=\ell. Ranks of absolute values for positive (i.e. |rT,i+||r_{T,i}^{+}|) and negative (i.e. |rT,i||r_{T,i}^{-}|) residuals over the window TT are placed into the sets k,i+\mathcal{R}_{k,i}^{+} and k,i\mathcal{R}_{k,i}^{-} at every time instance kk, respectively.

Remark 1

For residuals equal to each other and not equal to 0 (tied for the same rank), an average of the ranks that would have been assigned to these residuals is given to each of the tied values. Furthermore, residuals equal to 0 are removed and \ell is reduced accordingly.

Following, we compute the sum of ranks for both the positive and negative valued residuals,

Wk,i+=k,i+,Wk,i=k,i.W_{k,i}^{+}=\sum\mathcal{R}_{k,i}^{+},\hskip 10.0ptW_{k,i}^{-}=\sum\mathcal{R}_{k,i}^{-}.\vspace{-2pt} (10)

Residuals with symmetric distributions have similar valued sum of ranks, i.e. Wk,i+Wk,iW_{k,i}^{+}\sim W_{k,i}^{-}, whereas the sum of ranks in non-symmetric distributions are not similar Wk,i+Wk,iW_{k,i}^{+}\nsim W_{k,i}^{-} resulting in a rejection of 0\mathcal{H}_{0} in (8), which we will now discuss how to solve. Assuming a large window of size 20\ell\geq 20111For window length of smaller size, exact tables need to be used for probability distributions of the Wilcoxon Signed-Rank random variable [14]. [14], the Wilcoxon random variables Wk,i+W_{k,i}^{+}, Wk,iW_{k,i}^{-} converge to a Normal distribution (without attacks) as \ell\to\infty and can be approximated to a standard normal distribution. The approximated expected value and variance of the two sum of ranks Wk,i+W_{k,i}^{+} and Wk,iW_{k,i}^{-}, denoted as Wk,i±={Wk,i+,Wk,i}W_{k,i}^{\pm}=\{W_{k,i}^{+},W_{k,i}^{-}\} is

E[Wk,i±]=2+4,Var[Wk,i±]=(2+)(2+1)24.\begin{array}[]{ll}\vspace{1pt}\mathrm{E}[W_{k,i}^{\pm}]=\frac{\ell^{2}+\ell}{4},&\mathrm{Var}[W_{k,i}^{\pm}]=\frac{(\ell^{2}+\ell)(2\ell+1)}{24}.\end{array}\vspace{-2pt} (11)

The z-score of (10) for a given ithi^{th} sensor is computed by

Zk,iW=min(Wk,i±)E[Wk,i±]Var[Wk,i±]=min(Wk,i±)(2+)4(2+)(2+1)24,Z_{k,i}^{W}=\frac{\min(W_{k,i}^{\pm})-\mathrm{E}[W_{k,i}^{\pm}]}{\sqrt{\mathrm{Var}[W_{k,i}^{\pm}]}}=\frac{\min(W_{k,i}^{\pm})-\frac{(\ell^{2}+\ell)}{4}}{\sqrt{\frac{(\ell^{2}+\ell)(2\ell+1)}{24}}},\vspace{-3pt} (12)

and the p-value used to determine whether to reject the null hypothesis 0\mathcal{H}_{0} (i.e. no attacks) is computed from (12) as

pk,iW=Φ(|Zk,iW|)=212π|Zk,iW|exp{λ22}𝑑λ.p_{k,i}^{W}=\Phi(|Z_{k,i}^{W}|)=2\cdot\frac{1}{\sqrt{2\pi}}\int_{|Z_{k,i}^{W}|}^{\infty}\text{exp}\bigg{\{}\frac{-\lambda^{2}}{2}\bigg{\}}d\lambda.\vspace{-2pt} (13)

When pk,iWp_{k,i}^{W} falls below the threshold τiW=αides\tau_{i}^{W}=\alpha_{i}^{\text{des}}, i.e., pk,iW<τiWp_{k,i}^{W}<\tau_{i}^{W}, we reject 0\mathcal{H}_{0} from (8) and an alarm ψk,iW=1\psi_{k,i}^{W}=1 is triggered, otherwise ψk,iW=0\psi_{k,i}^{W}=0. In the absence of attacks, the alarm rate αiW\alpha_{i}^{W} for an ithi^{th} sensor should be approximately the same as the desired false alarm rate αiWαides\alpha_{i}^{W}\sim\alpha_{i}^{\text{des}}. Computation of αiW\alpha_{i}^{W} is over the sliding window Tα=(kα+1,k)T^{\alpha}=(k-\ell^{\alpha}+1,k) of length α\ell^{\alpha} by αiW=1αj=kα+1kψj,iW\alpha_{i}^{W}=\frac{1}{\ell^{\alpha}}\sum_{j=k-\ell^{\alpha}+1}^{k}\psi_{j,i}^{W}. Conversely, an attack that affects the residual distribution symmetry, triggering the alarm ψk,iW\psi_{k,i}^{W} more frequently, causing an elevation of alarm rate αiW\alpha_{i}^{W}. For alarm rates exceeding a user defined alarm rate threshold, i.e. αiW>αiτ\alpha_{i}^{W}>\alpha_{i}^{\tau}, the ithi^{th} sensor is deemed compromised. In the following lemma we provide a proof for bounds of the WSR test variables (10) to satisfy a desired false alarm rate αides\alpha_{i}^{\text{des}}.

Lemma 1

Given the residual rk,ir_{k,i} for an ithi^{th} sensor over a monitoring window TT consisting of \ell residuals and desired false alarm rate αides\alpha_{i}^{\text{des}}, an alarm is triggered by the WSR test when ΩW{Wk,i±}Ω+W\Omega^{W}_{-}\leq\{W_{k,i}^{\pm}\}\leq\Omega^{W}_{+} is not satisfied where

Ω±W=±|Φ1(αides/2)|(2+)(2+1)/24+(2+)/4.\Omega^{W}_{\pm}=\pm|\Phi^{-1}(\alpha_{i}^{\text{des}}/2)|\sqrt{(\ell^{2}+\ell)(2\ell+1)/24}+(\ell^{2}+\ell)/4. (14)
Proof:

From the Wilcoxon test statistic equaling the sum of ranks in (10), we can rearrange (12) such that min(Wk,i±)=Zk,iWcrit(2+)(2+1)/24+(2+)/4\min(W_{k,i}^{\pm})=Z_{k,i}^{W_{\text{crit}}}\sqrt{(\ell^{2}+\ell)(2\ell+1)/24}+(\ell^{2}+\ell)/4 where Zk,iWcrit=Φ1(αides/2)Z_{k,i}^{W_{\text{crit}}}=\Phi^{-1}(\alpha_{i}^{\text{des}}/2) is the critical value of Zk,iWZ_{k,i}^{W} for min(Wk,i±)\min(W_{k,i}^{\pm}) satisfying a desired alarm rate αides\alpha_{i}^{\text{des}} to not reject (8). The lower bound of {Wk,i,Wk,i+}\{W_{k,i}^{-},W_{k,i}^{+}\} must satisfy

ΩW=Φ1(αides/2)(2+)(2+1)/24+(2+)/4min(Wk,i,Wk,i+),\begin{split}\Omega^{W}_{-}=&\hskip 3.0pt\Phi^{-1}(\alpha_{i}^{\text{des}}/2)\sqrt{(\ell^{2}+\ell)(2\ell+1)/24}\\ &+(\ell^{2}+\ell)/4\leq\min(W_{k,i}^{-},W_{k,i}^{+}),\end{split}\vspace{-3pt} (15)

to not sound off an alarm ψk,iW\psi_{k,i}^{W}. Conversely, we want to show that if the lower bound ΩWmin(Wk,i±)\Omega^{W}_{-}\leq\min(W_{k,i}^{\pm}) in (15) holds then the upper bound Ω+W\Omega^{W}_{+} holds as well. By again manipulating (12) such that we take the maximum max(Wk,i±)=Zk,iWcrit(2+)(2+1)/24+(2+)/4\max(W_{k,i}^{\pm})=Z_{k,i}^{W_{\text{crit}}}\sqrt{(\ell^{2}+\ell)(2\ell+1)/24}+(\ell^{2}+\ell)/4 where this time Zk,iWcrit=Φ1(1αides/2)Z_{k,i}^{W_{\text{crit}}}=\Phi^{-1}(1-\alpha_{i}^{\text{des}}/2) is the critical value of Zk,iWZ_{k,i}^{W} for the upper bound max(Wk,i±)\max(W_{k,i}^{\pm}) satisfying a desired alarm rate αides\alpha_{i}^{\text{des}} to not reject (8), the upper bound is written as

Ω+W=Φ1(1αides/2)(2+)(2+1)/24+(2+)/4max(Wk,i,Wk,i+),\begin{split}\Omega^{W}_{+}=&\hskip 3.0pt\Phi^{-1}(1-\alpha_{i}^{\text{des}}/2)\sqrt{(\ell^{2}+\ell)(2\ell+1)/24}\\ &+(\ell^{2}+\ell)/4\geq\max(W_{k,i}^{-},W_{k,i}^{+}),\end{split}\vspace{-4pt} (16)

to not trigger the alarm ψk,iW\psi_{k,i}^{W}. In the calculation of the critical z-score value from the standard normal distribution 𝒩(0,1)\mathcal{N}(0,1) to satisfy a given desired alarm rate αides\alpha_{i}^{\text{des}}, it is easy to show that |Φ1(αides/2)|=Φ1(1αides/2)|\Phi^{-1}(\alpha_{i}^{\text{des}}/2)|=\Phi^{-1}(1-\alpha_{i}^{\text{des}}/2) and Φ1(αides/2)=|Φ1(αides/2)|\Phi^{-1}(\alpha_{i}^{\text{des}}/2)=-|\Phi^{-1}(\alpha_{i}^{\text{des}}/2)| giving the final bounds of ΩW(Wk,i±={Wk,i,Wk,i+})Ω+W\Omega^{W}_{-}\leq(W_{k,i}^{\pm}=\{W_{k,i}^{-},W_{k,i}^{+}\})\leq\Omega^{W}_{+} as

|Φ1(αides/2)|(2+)(2+1)/24+(2+)/4Wi±|Φ1(αides/2)|(2+)(2+1)/24+(2+)/4,\begin{split}-&|\Phi^{-1}(\alpha_{i}^{\text{des}}/2)|\sqrt{(\ell^{2}+\ell)(2\ell+1)/24}+(\ell^{2}+\ell)/4\leq\\ &W_{i}^{\pm}\leq|\Phi^{-1}(\alpha_{i}^{\text{des}}/2)|\sqrt{(\ell^{2}+\ell)(2\ell+1)/24}+(\ell^{2}+\ell)/4,\end{split}\vspace{-4pt}

satisfying the bounds of Ω±W\Omega^{W}_{\pm} in (14). With this we conclude that if min(Wk,i±)\min(W_{k,i}^{\pm}) does not satisfy (15) then ΩW{Wk,i,Wk,i+}Ω+W\Omega^{W}_{-}\leq\{W_{k,i}^{-},W_{k,i}^{+}\}\leq\Omega^{W}_{+} is not satisfied, triggering alarm ψk,iW\psi_{k,i}^{W} for a desired false alarm rate αides\alpha_{i}^{\text{des}}, ending the proof. ∎

III-B Serial Randomness Monitor

The WSR test alone is not sufficient to test for randomness, since an attacker could manipulate measurements by creating specific patterns to avoid detection on the WSR test. To test further, we need to determine if the sequence of residuals are being received randomly by leveraging the Serial Independence runs (SIR) test [3]. The SIR test examines the number of runs that occur over the sequence, where a “run” is defined as one or more consecutive residuals that are greater or less than the previous value. A random sequence of residuals over a given window length should exhibit a specific expected number of runs: too many or too few number of runs would not satisfy random sequential behavior. A hypothesis test is formed with 0\mathcal{H}_{0} for the absence of sensor attacks and a\mathcal{H}_{a} where attacks are present by

0NR=E[NR],aNRE[NR],\begin{array}[]{ll}\begin{aligned} \hskip 4.0pt\mathcal{H}_{0}\text{: }N_{R}=\mathrm{E}[N_{R}],\hskip 14.0pt&\mathcal{H}_{a}\text{: }N_{R}\neq\mathrm{E}[N_{R}],\end{aligned}\end{array}\vspace{-2pt} (17)

where NRN_{R} is the number of observed runs, to determine whether the number of runs satisfy a randomly behaving sequence. First, we take the difference of residuals at time instances kk and k1k-1 over a window TT^{\prime}

𝒓T,i:=rk,i=rk,irk1,i , kT,\bm{r}_{T^{\prime},i}^{\prime}:=r_{k,i}^{\prime}=r_{k,i}-r_{k-1,i}\text{ },\text{ }k\in T^{\prime},\vspace{-1pt} (18)

where T={k+2,,k}=T{k+1}T^{\prime}=\{k-\ell+2,\dots,k\}=T\setminus\{k-\ell+1\} is the monitor window TT shortened by one by removing the oldest time instance. This in turn gives us =1\ell^{\prime}=\ell-1 residual differences.

Remark 2

A residual difference rk,i=0r_{k,i}^{\prime}~{}=~{}0, kTk\in T^{\prime} from (18) is not considered in the test and the size of \ell^{\prime} is reduced accordingly, i.e., =1\ell^{\prime}=\ell^{\prime}-1.

From the sequence of residual differences (18), we take the sign of each residual within the window TT^{\prime},

sign(𝒓k,i), kT,\text{sign}(\bm{r}_{k,i}^{\prime}),\text{ }k\in T^{\prime},\vspace{-2pt} (19)

forming a sequence of \ell^{\prime} positive and negative signs. The number of runs NRN_{R} are observed over the sequence of \ell^{\prime} residual differences. The expected mean and variance of runs [3] are computed by

E[NR]=213,Var[NR]=162990.\begin{array}[]{ll}\begin{aligned} \hskip 4.0pt\mathrm{E}[N_{R}]=\frac{2\ell^{\prime}-1}{3},\hskip 14.0pt&\mathrm{Var}[N_{R}]=\frac{16\ell^{\prime}-29}{90}.\end{aligned}\end{array}\vspace{-1pt} (20)

Assuming large data sets (i.e. window length 25\ell\geq 25) [3], the distribution of NRN_{R} converges to a normal distribution as \ell^{\prime}\to\infty and can be approximated to a zero mean unit variance standard normal distribution NR𝒩(0,1)N_{R}\sim\mathcal{N}(0,1). From the number of observed runs NRN_{R} and number of residual differences \ell^{\prime}, we compute the z-score test statistic for Serial Independence from a standard normal distribution

Zk,iS=NRE[NR]Var[NR]=NR(21)/3(1629)/90.Z_{k,i}^{S}=\frac{N_{R}-\mathrm{E}[N_{R}]}{\sqrt{\mathrm{Var}[N_{R}]}}=\frac{N_{R}-\big{(}2\ell^{\prime}-1\big{)}/3}{\sqrt{\big{(}16\ell^{\prime}-29\big{)}/90}}.\vspace{-3pt} (21)

Using the z-score from (21) we compute the p-value of the observed signed residual differences by

pk,iS=Φ(|Zk,iS|)=212π|Zk,iS|exp{|λ|22}𝑑λ.p_{k,i}^{S}=\Phi(|Z_{k,i}^{S}|)=2\cdot\frac{1}{\sqrt{2\pi}}\int_{|Z_{k,i}^{S}|}^{\infty}\text{exp}\bigg{\{}\frac{-|\lambda|^{2}}{2}\bigg{\}}d\lambda.\vspace{-1pt} (22)

When pk,iS<τiSp_{k,i}^{S}<\tau_{i}^{S} is satisfied where τiS=αides\tau_{i}^{S}=\alpha_{i}^{\text{des}} denotes the threshold, we reject the null hypothesis 0\mathcal{H}_{0} from (17) and an alarm ψk,iS=1\psi_{k,i}^{S}=1 is triggered. In the absence of attacks, the alarm rate αiS\alpha_{i}^{S} is approximately the same as the desired false alarm rate αiSαides\alpha_{i}^{S}\sim\alpha_{i}^{\text{des}}. Alarm rate αiS\alpha_{i}^{S} over the sliding window TαT^{\alpha} is computed by αiS=1αj=kα+1kψj,iS\alpha_{i}^{S}=\frac{1}{\ell^{\alpha}}\sum_{j=k-\ell^{\alpha}+1}^{k}\psi_{j,i}^{S}. Alarm rates exceeding a user defined alarm rate threshold, i.e. αiS>αiτ\alpha_{i}^{S}>\alpha_{i}^{\tau}, signifies that the ithi^{th} sensor is compromised.

Remark 3

A special case of triggering alarm ψk,iS=1\psi_{k,i}^{S}=1 is when Remark 2 is satisfied, when two consecutive residuals are equal. Since rk,i𝒩(0,σi2)r_{k,i}\sim\mathcal{N}(0,\sigma^{2}_{i}), the probability of having two residuals of the same value is equal to 0.

The following lemma provides a proof for bounds of NRN_{R} in the SIR test to satisfy a desired false alarm rate αides\alpha_{i}^{\text{des}}.

Lemma 2

Given the residual differences rk,i=rk,irk1,ir_{k,i}^{\prime}=r_{k,i}-r_{k-1,i} for an ithi^{th} sensor over a window TT^{\prime} and desired false alarm rate αides\alpha_{i}^{\text{des}}, an alarm is triggered by the SIR test when ΩSNRΩ+S\Omega^{S}_{-}\leq N_{R}\leq\Omega^{S}_{+} is not satisfied where

Ω±S=±|Φ1(αides/2)|(1629)/90+(21)/3.\Omega^{S}_{\pm}=\pm|\Phi^{-1}(\alpha_{i}^{\text{des}}/2)|\sqrt{(16\ell^{\prime}-29)/90}+(2\ell^{\prime}-1)/3.\vspace{-2pt} (23)
Proof:

With an observed number of runs NRN_{R} within a window of \ell^{\prime} residual differences, we can rearrange (21) such that NR=|Zk,iS|(1629)/90+(21)/3N_{R}=|Z_{k,i}^{S}|\sqrt{(16\ell^{\prime}-29)/90}+(2\ell^{\prime}-1)/3 where |Zk,iS|=|Φ1(αides/2)||Z_{k,i}^{S}|=|\Phi^{-1}(\alpha_{i}^{\text{des}}/2)|, we find the bounds of NRN_{R} to not reject (17) for a desired false alarm rate αides\alpha_{i}^{\text{des}} are

|Φ1(αides/2)|(1629)/90+(21)/3NR|Φ1(αides/2)|(1629)/90+(21)/3.\begin{split}-&|\Phi^{-1}(\alpha_{i}^{\text{des}}/2)|\sqrt{(16\ell^{\prime}-29)/90}+(2\ell^{\prime}-1)/3\leq N_{R}\\ &\leq|\Phi^{-1}(\alpha_{i}^{\text{des}}/2)|\sqrt{(16\ell^{\prime}-29)/90}+(2\ell^{\prime}-1)/3.\end{split}\vspace{-2pt} (24)

From (24) we can finally obtain the bounds of Ω±S\Omega^{S}_{\pm} in (23) for alarm triggering at a desired false alarm rate αides\alpha_{i}^{\text{des}}. ∎

IV Stealthy Attack Analysis

This section analyzes the advantages of including the proposed randomness monitoring framework into well known boundary/bad-data attack detectors. To this end, we first introduce two well known anomaly (boundary) detectors – Bad-Data [4] and Cumulative Sum [9] detectors – and analyze the effects of stealthy attacks on a system with and without our Randomness Monitor.

IV-A Boundary Detectors

To show that our framework can easily be augmented with any detector that provides magnitude boundaries, we consider two different boundary detectors found in the CPS security literature. Both boundary detectors discussed in this section leverage the absolute value of the residual (4) for attack detection. Consequently, in the absence of attacks (i.e. 𝝃k=𝟎\bm{\xi}_{k}=\bm{0}), this leads to |rk,i||r_{k,i}| following a half-normal distribution [15] defined by

E[|rk,i|]=2/πσi, Var[|rk,i|]=σi2(12/π).\mathrm{E}[|r_{k,i}|]=\sqrt{2/\pi}\sigma_{i},\text{ }\mathrm{Var}[|r_{k,i}|]=\sigma^{2}_{i}(1-2/\pi).\vspace{-2pt} (25)

where σi2\sigma^{2}_{i} was defined as the ithi^{th} diagonal element in (5).

The first detector that we consider is the Bad-Data Detector (BDD) [4], a benchmark attack detector to find anomalies in sensor measurements, alarming when the residual error goes beyond a threshold. Similar to our detection framework in Section III, the BDD can also be tuned for a desired false alarm rate αides\alpha_{i}^{\text{des}}. Considering the residual rk,ir_{k,i} in (4), the BDD procedure for each ithi^{th} sensor is as follows:

Bad-Data Detector Procedure

 

If |rk,i|>τiB, then alarm ψk,iB=1, i𝒮,\textbf{If }|r_{k,i}|>\tau_{i}^{B},\text{ then alarm }\psi_{k,i}^{B}=1,\text{ }i\in\mathcal{S}, (26)

 

Assuming the system is without attacks, the tuned threshold τiB\tau_{i}^{B} for the BDD in (26) with rk,i𝒩(0,σi2)r_{k,i}\sim\mathcal{N}(0,\sigma_{i}^{2}) is solved by τiB=2σierf1(1αides)\tau_{i}^{B}=\sqrt{2}\sigma_{i}\mathrm{erf}^{-1}(1-\alpha_{i}^{\text{des}}) where erf1()\mathrm{erf}^{-1}(\cdot) is the inverse error function, resulting in αiBαides\alpha_{i}^{B}\sim\alpha_{i}^{\text{des}}.

The second well-known boundary detector that we consider is the CUmulative SUM (CUSUM), which has been shown to have tighter bounds on attack detection than the BDD [9]. The CUSUM leverages the absolute value of the residual in the detection procedure and is solved by

CUSUM Detector Procedure

 

Initialize S1,i=0, i𝒮,Sk,i=max(0,Sk1,i+|rk,i|bi),if Sk1,iτiC,Sk,i=0 and Alarm ψk,iC=1,if Sk1,i>τiC.\begin{array}[]{ll}\textbf{Initialize }S_{1,i}=0,\text{ }i\in\mathcal{S},&\\ S_{k,i}=\max(0,S_{k-1,i}+|r_{k,i}|-b_{i}),&\textbf{if }S_{k-1,i}\leq\tau^{C}_{i},\\ S_{k,i}=0\text{ and Alarm }\psi_{k,i}^{C}=1,&\textbf{if }S_{k-1,i}>\tau^{C}_{i}.\end{array} (27)

 

The working principle of of this detector is to accumulate the residual sequence in Sk,iS_{k,i}, triggering an alarm ψk,iC=1\psi_{k,i}^{C}=1 when the test variable surpasses the threshold τiC\tau^{C}_{i}. A detailed explanation of how to tune threshold τiC\tau^{C}_{i} given a bias bib_{i} for a desired false alarm rate αides\alpha_{i}^{\text{des}} can be found in [9].

IV-B State Deviation under Worst-case Stealthy Attacks

We consider the reference tracking feedback controller

𝒖k=𝑲𝒙^k+𝒌r𝒙kref,\bm{u}_{k}=\bm{K}\hat{\bm{x}}_{k}+\bm{k}_{r}\bm{x}_{k}^{\text{ref}},\vspace{-2pt} (28)

where 𝑲s×n\bm{K}\in\mathbb{R}^{s\times n} is the state feedback control gain matrix, 𝒌rm×m\bm{k}_{r}~{}\in~{}\mathbb{R}^{m\times m} is a reference gain for output tracking, 𝒙kref\bm{x}_{k}^{\text{ref}} is the reference state, and 𝒙^k\hat{\bm{x}}_{k} is the KF state estimate from (2)-(3). Choosing a suitable 𝑲\bm{K} such that (𝑨+𝑩𝑲)(\bm{A}+\bm{B}\bm{K}) is stable (i.e. ρ[𝑨+𝑩𝑲]<1\rho[\bm{A}+\bm{B}\bm{K}]<1, where ρ[]\rho[\cdot] is the spectral radius) and (𝑨,𝑪)(\bm{A},\bm{C}) is assumed stabilizable, the closed-loop system can be written within terms of the KF estimation error as

𝒙k+1=(𝑨+𝑩𝑲)𝒙k+𝑩𝒌r𝒙kref𝑩𝑲𝒆k+𝝂k,𝒆k+1=(𝑨𝑳𝑪)𝒆k𝑳(𝝃k+𝜼k)+𝝂k.\begin{array}[]{l}\bm{x}_{k+1}=(\bm{A}+\bm{B}\bm{K})\bm{x}_{k}+\bm{B}\bm{k}_{r}\bm{x}_{k}^{\text{ref}}-\bm{B}\bm{K}\bm{e}_{k}+\bm{\nu}_{k},\\ \bm{e}_{k+1}=(\bm{A}-\bm{L}\bm{C})\bm{e}_{k}-\bm{L}(\bm{\xi}_{k}+\bm{\eta}_{k})+\bm{\nu}_{k}.\end{array}\vspace{-2pt} (29)

As an attacker injects signals into the measurements (i.e. 𝝃𝟎\bm{\xi}\neq\bm{0}), system dynamics are indirectly affected via the interconnected term 𝑩𝑲𝒆k\bm{B}\bm{K}\bm{e}_{k} from the estimation error dynamics.

In the remaining of this section we describe the maximum damage that can occur due to worst-case scenario stealthy sensor attacks. We assume the attacker has perfect knowledge of system dynamics, detection procedures, and state estimation. The objective of an attacker is to cause maximum damage to the system state by injecting attack signals 𝝃k\bm{\xi}_{k} to measurements while also remaining undetected. With only the BDD implemented, the effects of a worst-case scenario attack while not triggering an alarm can be derived from (4) and (26) with a sustained attack signal

ξk,i=𝑪i𝒆kηk,i+τiB,\xi_{k,i}=-\bm{C}_{i}\bm{e}_{k}-\eta_{k,i}+\tau_{i}^{B},\vspace{-2pt} (30)

causing the residual |rk,i|=τiB|r_{k,i}|=\tau_{i}^{B} to not trigger the BDD alarm.

Now considering CUSUM as a stand-alone detector, an adversarial wants to avoid attack vectors such that the monitoring test variable exceeds threshold τiC\tau^{C}_{i}, thereby causing a reset Sk,i=0, if Sk1,i>τiCS_{k,i}=0,\text{ if }S_{k-1,i}>\tau^{C}_{i} in (27) by satisfying the CUSUM procedure sequence Sk,i=max(0,Sk1,i+|𝑪i𝒆k+ηk,i+ξk,i|bi)τiCS_{k,i}=\max(0,S_{k-1,i}+|\bm{C}_{i}\bm{e}_{k}+\eta_{k,i}+\xi_{k,i}|-b_{i})\leq\tau^{C}_{i} if Sk1,iτiCS_{k-1,i}\leq\tau^{C}_{i}. For maximum effect on state deviation, the attacker saturates the CUSUM test statistic such that Sk,i=τiCS_{k,i}=\tau^{C}_{i} to achieve no alarm sequences. Here we define a saturation as follows:

Definition 2

Saturation of a boundary detector is defined as the maximum allowable attack signal to force the residual to, but without exceeding, the detector threshold.

Beginning at a time kk, an attacker immediately saturates Sk,iS_{k,i} with the attack signal,

ξk,i=𝑪i𝒆kηk,i+biSk1,i+τiC,\xi_{k,i}=-\bm{C}_{i}\bm{e}_{k}-\eta_{k,i}+b_{i}-S_{k-1,i}+\tau^{C}_{i},\vspace{-3pt} (31)

followed by

ξk,i=𝑪i𝒆kηk,i+bi.\xi_{k,i}=-\bm{C}_{i}\bm{e}_{k}-\eta_{k,i}+b_{i}.\vspace{-3pt} (32)

for all future time instances to hold Sk,iS_{k,i} at threshold τiC\tau^{C}_{i}.

With the Randomness Monitor augmented with either BDD or CUSUM, an attacker can no longer hold an attack sequence to one side as described in attacks (30)-(32). Rather, an attacker is forced to create an attack sequence such that rk,ir_{k,i} alternates residual signs if it wants to avoid triggering alarms for both the WSR and SIR tests. The most effective attack for maximum state deviation with our augmented framework is to saturate the boundary detector as often as possible, while leaving the remaining attack signals with an opposite sign with respect to the saturating attacks to force the residual to be as close as possible to zero.

From the WSR test, given a monitoring window \ell, the minimum number of non-saturating attack signals ξk,i\xi_{k,i} to not trigger an alarm ψk,iW\psi_{k,i}^{W} is

γi=minj(rank=1jrank)|rank=1jrank>min(Wi±),\gamma_{i}^{\ell}=\min_{\ell^{j}}\bigg{(}\sum_{rank=1}^{\ell^{j}}rank\bigg{)}\bigg{|}\sum_{rank=1}^{\ell^{j}}rank>\min(W_{i}^{\pm}),\vspace{-2pt} (33)

in which j=(1,,)\ell^{j}\in\mathcal{L}=(1,\dots,\ell) and \mathcal{L} is the set of all ranksranks as introduced in Section III-A. From (33), we can then find the maximum number of saturating attack signals by βi=γi\beta_{i}^{\ell}=\ell-\gamma_{i}^{\ell}.

Proposition 1

The maximum allowable saturating attack signal converges to limβi=122.293\lim_{\ell\to\infty}\frac{\beta_{i}^{\ell}}{\ell}=1-\frac{\sqrt{2}}{2}\approx.293 for any αides\alpha_{i}^{\text{des}} as shown by the dashed black line in Fig 3.

Refer to caption
Figure 3: Allowable percentage of saturating attack signals of given windows lengths for different desired alarm rates αdes\alpha^{\text{des}}.

To this point, we have discussed worst-case scenario attack sequences causing saturation of the test variable (in this paper BDD and CUSUM) to maximize the effect of the attack. However, from Remark 3 in Section III-B, a special case to satisfy requirements of the SIR test is when two consecutive residuals of same value triggers an alarm ψk,iS=1\psi_{k,i}^{S}~{}=~{}1. To work around this issue, a stealthy attacker with perfect knowledge of the SIR test can include a small uniformly random number to the attack signal ξk,i\xi_{k,i} denoted by δk,i𝒰(0,ϵ)\delta_{k,i}\sim\mathcal{U}(0,\epsilon) where ϵ+\epsilon\in\mathbb{R}^{+} is infinitesimally small and E[δk,i]=ϵ20\mathrm{E}[\delta_{k,i}]=\frac{\epsilon}{2}\approx 0. Thus, the worst-case scenario with the Randomness Monitor augmented to the BDD follows

{ξk,i=𝑪i𝒆kηk,i+τiBδk,i,if saturating,ξk,i=𝑪i𝒆kηk,iδk,i,if non-saturating,\begin{split}\bigg{\{}\begin{array}[]{ll}\xi_{k,i}=-\bm{C}_{i}\bm{e}_{k}-\eta_{k,i}+\tau_{i}^{B}-\delta_{k,i},&\textbf{if }\text{saturating},\\ \xi_{k,i}=-\bm{C}_{i}\bm{e}_{k}-\eta_{k,i}-\delta_{k,i},&\textbf{if }\text{non-saturating},\end{array}\end{split}\vspace{-1pt} (34)

in order to not trigger an alarm. Similarly, but with the CUSUM detector, an undetectable attack sequence follows

{ξk,i=Sk1,i𝑪i𝒆kηk,i+bi+τiCδk,i,if saturating,ξk,i=𝑪i𝒆kηk,i+biδk,i,if non-saturating.\begin{split}\Bigg{\{}\begin{array}[]{ll}\begin{array}[]{l}\begin{split}\xi_{k,i}=&-S_{k-1,i}-\bm{C}_{i}\bm{e}_{k}\\ &-\eta_{k,i}+b_{i}+\tau^{C}_{i}-\delta_{k,i},\end{split}\end{array}&\textbf{if }\text{saturating},\\ \xi_{k,i}=-\bm{C}_{i}\bm{e}_{k}-\eta_{k,i}+b_{i}-\delta_{k,i},&\textbf{if }\text{non-saturating}.\end{array}\end{split}\vspace{-1pt} (35)

Given the alternating signed sequence of residuals over the monitoring window, the expected value of rk,ir_{k,i} under worst-case scenario stealthy attacks is denoted as

{E[rk,iB]=τiB(βiδk,i)τiBβi,for Bad-Data,E[rk,iC]=τiC(βiδk,i)τiCβi,for CUSUM.\begin{split}\bigg{\{}\begin{array}[]{ll}\mathrm{E}[r^{B}_{k,i}]=\tau_{i}^{B}(\frac{\beta_{i}^{\ell}}{\ell}-\delta_{k,i})\approx\tau_{i}^{B}\frac{\beta_{i}^{\ell}}{\ell},&\textbf{for }\text{Bad-Data},\\ \mathrm{E}[r^{C}_{k,i}]=\tau^{C}_{i}(\frac{\beta_{i}^{\ell}}{\ell}-\delta_{k,i})\approx\tau^{C}_{i}\frac{\beta_{i}^{\ell}}{\ell},&\textbf{for }\text{CUSUM}.\end{array}\end{split}\vspace{-1pt} (36)

With our framework augmented to the BDD, the expected value of the residual sequence is described as E[𝒓kB]=(E[rk,1B],,E[rk,sB])T\mathrm{E}[\bm{r}^{B}_{k}]=(\mathrm{E}[r^{B}_{k,1}],\dots,\mathrm{E}[r^{B}_{k,s}])^{T} and the expectation of the closed-loop system (29) under attack (34) results in

E[𝒙k+1]=(𝑨+𝑩𝑲)E[𝒙k]𝑩𝑲E[𝒆k],E[𝒆k+1]=𝑨E[𝒆k]𝑳E[𝒓kB].\begin{array}[]{l}\begin{aligned} \mathrm{E}[\bm{x}_{k+1}]&=(\bm{A}+\bm{B}\bm{K})\mathrm{E}[\bm{x}_{k}]-\bm{B}\bm{K}\mathrm{E}[\bm{e}_{k}],\\ \mathrm{E}[\bm{e}_{k+1}]&=\bm{A}\mathrm{E}[\bm{e}_{k}]-\bm{L}\mathrm{E}[\bm{r}^{B}_{k}].\end{aligned}\end{array}\vspace{-3pt} (37)

Note, in (37), the reference signal term 𝑩𝒌r𝒙kref\bm{B}\bm{k}_{r}\bm{x}_{k}^{\text{ref}} from (29) has been removed as we are interested in the expected state deviation under an attack. It is clear that if ρ[𝑨]>1\rho[\bm{A}]>1 and E[𝒓kB]𝟎\mathrm{E}[\bm{r}_{k}^{B}]\neq\bm{0} then the expectation of the estimation error E[𝒆k]\mathrm{E}[\bm{e}_{k}] for destabilized states diverge to infinity as kk\to\infty (depending on algebraic properties of 𝑨\bm{A}), indirectly causing these states within E[𝒙k]\mathrm{E}[\bm{x}_{k}] to also diverge unbounded.

Lemma 3

Considering a closed-loop system from (1) and (37), where ρ[𝐀]<1\rho[\bm{A}]<1 and attack sequence in (34), the limit for expected state divergence limkE[𝐱k]=ΔB\lim_{k\to\infty}\mathrm{E}[\bm{x}_{k}]=\Delta^{B} is

ΔB=(𝑰𝑨𝑩𝑲)1𝑩𝑲(𝑰𝑨)1𝑳E[𝒓kB].\Delta^{B}=(\bm{I}-\bm{A}-\bm{BK})^{-1}\bm{BK}(\bm{I}-\bm{A})^{-1}\bm{L}\mathrm{E}[\bm{r}^{B}_{k}].\vspace{2pt} (38)
Proof:

Assuming both ρ[𝑨]<1\rho[\bm{A}]<1 and ρ[𝑨+𝑩𝑲]<1\rho[\bm{A}+\bm{BK}]<1 are satisfied, signifying the invertibility of (𝑰𝑨)(\bm{I}-\bm{A}) and (𝑰𝑨𝑩𝑲)(\bm{I}-\bm{A}-\bm{BK}) in (38), an expected equilibrium is reached as kk\to\infty by E[𝒙]=(𝑰𝑨𝑩𝑲)1𝑩𝑲(𝑰𝑨)1𝑳E[𝒓kB]\mathrm{E}[\bm{x}_{\infty}]=(\bm{I}-\bm{A}-\bm{BK})^{-1}\bm{BK}(\bm{I}-\bm{A})^{-1}\bm{L}\mathrm{E}[\bm{r}_{k}^{B}] and E[𝒆]=(𝑰𝑨)1𝑳E[𝒓kB]\mathrm{E}[\bm{e}_{\infty}]=(\bm{I}-\bm{A})^{-1}\bm{L}\mathrm{E}[\bm{r}_{k}^{B}] such that the evolution of (37) with the expected differences E[𝒙k]E[𝒙]\mathrm{E}[\bm{x}_{k}]-\mathrm{E}[\bm{x}_{\infty}] and E[𝒆k]E[𝒆]\mathrm{E}[\bm{e}_{k}]-\mathrm{E}[\bm{e}_{\infty}] is described by

E[𝒙k+1]E[𝒙]=(𝑨+𝑩𝑲)(E[𝒙k]E[𝒙])𝑩𝑲(E[𝒆k]E[𝒆]),E[𝒆k+1]E[𝒆]=𝑨E[𝒆k]E[𝒆],\begin{split}\mathrm{E}[\bm{x}_{k+1}]-\mathrm{E}[\bm{x}_{\infty}]=&\hskip 3.0pt(\bm{A}+\bm{BK})(\mathrm{E}[\bm{x}_{k}]-\mathrm{E}[\bm{x}_{\infty}])\\ &-\bm{BK}(\mathrm{E}[\bm{e}_{k}]-\mathrm{E}[\bm{e}_{\infty}]),\\ \vspace{-1pt}\mathrm{E}[\bm{e}_{k+1}]-\mathrm{E}[\bm{e}_{\infty}]=&\hskip 3.0pt\bm{A}\mathrm{E}[\bm{e}_{k}]-\mathrm{E}[\bm{e}_{\infty}],\end{split}\vspace{-4pt} (39)

are asymptotically stable i.e., limk(E[𝒙k+1]E[𝒙])=𝟎\lim_{k\to\infty}(\mathrm{E}[\bm{x}_{k+1}]-\mathrm{E}[\bm{x}_{\infty}])=\bm{0} and limk(E[𝒆k+1]E[𝒆])=𝟎\lim_{k\to\infty}(\mathrm{E}[\bm{e}_{k+1}]-\mathrm{E}[\bm{e}_{\infty}])=\bm{0}, therefore concluding the proof. ∎

Similarly, with the Randomness Monitor augmented to CUSUM, the expected closed-loop system evolution under attack sequence (35) is described by

E[𝒙k+1]=(𝑨+𝑩𝑲)E[𝒙k]𝑩𝑲E[𝒆k],E[𝒆k+1]=𝑨E[𝒆k]𝑳E[𝒓kC].\begin{array}[]{l}\begin{aligned} \mathrm{E}[\bm{x}_{k+1}]&=(\bm{A}+\bm{B}\bm{K})\mathrm{E}[\bm{x}_{k}]-\bm{B}\bm{K}\mathrm{E}[\bm{e}_{k}],\\ \mathrm{E}[\bm{e}_{k+1}]&=\bm{A}\mathrm{E}[\bm{e}_{k}]-\bm{L}\mathrm{E}[\bm{r}^{C}_{k}].\end{aligned}\end{array}\vspace{-3pt} (40)

where E[𝒓kC]=(E[rk,1C],,E[rk,sC])T\mathrm{E}[\bm{r}^{C}_{k}]=(\mathrm{E}[r^{C}_{k,1}],\dots,\mathrm{E}[r^{C}_{k,s}])^{T} is the expected value of the residual sequence vector for CUSUM in (36).

Lemma 4

Considering a closed-loop system from (1) and (40), where ρ[𝐀]<1\rho[\bm{A}]~{}<~{}1 and attack sequence in (35), the limit for expected state divergence limkE[𝐱k]=ΔC\lim_{k\to\infty}\mathrm{E}[\bm{x}_{k}]=\Delta^{C} is

ΔC=(𝑰𝑨𝑩𝑲)1𝑩𝑲(𝑰𝑨)1𝑳E[𝒓kC].\Delta^{C}=(\bm{I}-\bm{A}-\bm{BK})^{-1}\bm{BK}(\bm{I}-\bm{A})^{-1}\bm{L}\mathrm{E}[\bm{r}^{C}_{k}]. (41)
Proof:

The proof is omitted here due to space constraints but follows the proof for Lemma 3. ∎

V Results

The proposed Randomness Monitor framework was validated in simulation and experiments and compared to state-of-the-art detection techniques introduced in Section IV-B. The case study presented in this paper is an autonomous waypoint navigation of a skid-steering differential-drive UGV with the following linearized model [16]

v˙=1m(Fl+FrBrv),ω˙=1Iz(w2(FlFr)Blω), θ˙=ω,\begin{split}\dot{v}&=\frac{1}{m}(F_{l}+F_{r}-B_{r}v),\\ \dot{\omega}&=\frac{1}{I_{z}}\Big{(}\frac{w}{2}(F_{l}-F_{r})-B_{l}\omega\Big{)},\text{ }\dot{\theta}=\omega,\end{split} (42)

where vv is the velocity, θ\theta is the vehicle’s heading angle, and ω\omega its angular velocity, forming the state vector 𝒙=[v,θ,ω]T\bm{x}=[v,\theta,\omega]^{T}. FlF_{l} and FrF_{r} describe the left and right input forces from the wheels, ww is the vehicle width, while BrB_{r} and BlB_{l} are resistances due to the wheels rolling and turning. The continuous-time model (42) is discretized with a sampling rate ts=0.05t_{s}=0.05 to satisfy the system model described in (1).

In both simulation and experiment we perform two different attack sequences: Attack #1 where a stealthy attack sequence concentrates the residual distribution with a non-zero mean and smaller variance whereas Attack #2 creates a signed pattern sequence {+, +, +, -} of residual differences rk,ir^{\prime}_{k,i}. Both attacks are chosen to not increase the boundary detector alarm rate.

V-A Simulations

Considering the UGV system model (42) in our case study, we show the effect of stealthy attacks on the velocity sensor on state x1x_{1} with a monitoring window length =100\ell=100. Table I gives the resulting alarm rates when our framework is augmented to boundary detectors (BDD and CUSUM) with all detectors tuned for desired false alarm rates αdes{.05,.20}\alpha^{\text{des}}\in\{.05,.20\} and in separate simulations we show the alarm rate for No Attack, Attack #1, and Attack #2. As expected, with no attacks present, all alarm rates converge approximately to the desired false alarm rate α1des\alpha_{1}^{\text{des}}. Under Attack #1, alarm rates for only the WSR increase to higher values and similarly the Attack #2 pattern gives an increased alarm rate to only the SIR test. We should note that the window length \ell results in different behaviors: short window lengths result in faster responses, while longer window lengths react slower but are able to detect more hidden attacks exhibiting non-random behavior than a monitor with a short window length. Fig. 4 demonstrates attacks on the velocity sensor where our detectors are tuned for α1des=0.10\alpha_{1}^{\text{des}}=0.10 and compared with the CUSUM boundary detector. Attack #1 occurs between (50,12550,125)s triggering the WSR test, Attack #2 between (175,250175,250)s triggering the SIR test, and from 300300s a third attack satisfying bounds for both randomness tests but violating the CUSUM test is presented. Velocity is reduced as expected according to (29) while experiencing the effects of each attack.

TABLE I: Simulated Alarm Rates
[Uncaptioned image]
Refer to caption
Figure 4: State deviation under various attacks and alarm rates over a moving window of the past 100100 time steps.

V-B Experiments

In this section we present a case study for a UGV performing way-point navigation under stealthy sensor attacks. For our case, the UGV travels to a series of goal positions while avoiding a restricted area with a desired cruise velocity vref=0.15v^{\text{ref}}=0.15m/s while experiencing the same class of attacks as in Section V-A. This time the IMU sensor that measures angle θ\theta is spoofed while our Randomness Monitor is augmented with the BDD. Fig. 5 shows the UGV position while traveling to the four goal points. For both attacks the vehicle enters the restricted area (marked by red tape) while the boundary detector (BDD) does not see the attack in each case. The alarm rate for the WSR test increases for the case under Attack #1 (solid line) and the SIR test alarm rate increases during the case for Attack  #2 (dashed line), as expected.

Refer to caption
Figure 5: UGV position under Attack #1 (solid line) and Attack #2 (dashed line). The bottom graph displays the resulting alarm rates.

VI Conclusions & Future Work

In this paper we have proposed a monitoring framework to find cyber-attacks that present non-random behavior with the intention to hijack a system from a desired state. Our framework leverages the Wilcoxon Signed-Rank test and Serial Independence Runs test over a sliding monitor window to detect stealthy attacks when augmented to state-of-the-art boundary detectors. Among the key results of this work we provide: bounds for desired false alarm rate for each test which are leveraged to detect attacks, bounds on state deviation under worst case attack scenario, demonstrating that the proposed framework outperform detectors that solely use boundary tests. The proposed approach was validated through simulations and experiments on UGV case studies.

In our future work we plan to extend the current work to remove this dependency from the monitoring window and plan to leverage our approach in systems with redundant sensors to remove the compromised sensors and build attack resilient controllers similar to our previous work in [6].

Acknowledgments

This work is based on research sponsored by ONR under agreement number N000141712012, and NSF under grant #1816591.

References

  • [1] J. Bhatti and T. E. Humphreys, “Hostile control of ships via false gps signals: Demonstration and detection,” Navigation, vol. 64, no. 1, pp. 51–66, 2017.
  • [2] F. Wilcoxon, “Individual comparisons by ranking methods,” Biometrics Bulletin, vol. 1, no. 6, pp. 80–83, 1945.
  • [3] C. Cammarota, “The difference-sign runs length distribution in testing for serial independence,” Journal of Applied Statistics, vol. 38, no. 5, pp. 1033–1043, 2011.
  • [4] Y. Mo, E. Garone, A. Casavola, and B. Sinopoli, “False data injection attacks against state estimation in wireless sensor networks,” in 2010 IEEE 49th Conference on Decision and Control, pp. 5967–5972.
  • [5] C. Bai and V. Gupta, “On kalman filtering in the presence of a compromised sensor: Fundamental performance bounds,” in 2014 American Control Conference, June 2014, pp. 3029–3034.
  • [6] N. Bezzo, J. Weimer, M. Pajic, O. Sokolsky, G. J. Pappas, and I. Lee, “Attack resilient state estimation for autonomous robotic systems,” in 2014 IEEE/RSJ International Conference on Intelligent Robots and Systems, Sept 2014, pp. 3692–3698.
  • [7] C. Kwon, W. Liu, and I. Hwang, “Security analysis for cyber-physical systems against stealthy deception attacks,” in 2013 American Control Conference, June 2013, pp. 3344–3349.
  • [8] C. Kwon, S. Yantek, and I. Hwang, “Real-time safety assessment of unmanned aircraft systems against stealthy cyber attacks,” Journal of Aerospace Information Systems, vol. 13, no. 1, pp. 27–45, 2016.
  • [9] C. Murguia and J. Ruths, “Characterization of a cusum model-based sensor attack detector,” in 2016 IEEE 55th Conference on Decision and Control (CDC), Dec 2016, pp. 1303–1309.
  • [10] C. Murguia and J. Ruths, “On model-based detectors for linear time-invariant stochastic systems under sensor attacks,” IET Control Theory Applications, vol. 13, no. 8, pp. 1051–1061, 2019.
  • [11] F. Miao, Q. Zhu, M. Pajic, and G. J. Pappas, “Coding sensor outputs for injection attacks detection,” in 53rd IEEE Conference on Decision and Control, Dec 2014, pp. 5776–5781.
  • [12] T. Severson, et al., “Trust-based framework for resilience to sensor-targeted attacks in cyber-physical systems,” in 2018 Annual American Control Conference (ACC), June 2018, pp. 6499–6505.
  • [13] M. Pajic, J. Weimer, N. Bezzo, O. Sokolsky, G. J. Pappas, and I. Lee, “Design and implementation of attack-resilient cyberphysical systems: With a focus on attack-resilient state estimators,” IEEE Control Systems Magazine, vol. 37, no. 2, pp. 66–81, April 2017.
  • [14] S. Siegel, Nonparametric statistics for the behavioral sciences.   McGraw-Hill New York, 1956.
  • [15] S. M. Ross, Introduction to Probability Models, Ninth Edition.   Orlando, FL, USA: Academic Press, Inc., 2006.
  • [16] J. J. Nutaro, Building software for simulation: theory and algorithms, with applications in C++.   John Wiley & Sons, 2011.