12
VirtualDrone: Virtual Sensing, Actuation, and Communication for Aack-Resilient Unmanned Aerial Systems Man-Ki Yoon University of Illinois at Urbana-Champaign [email protected] Bo Liu University of Illinois at Urbana-Champaign [email protected] Naira Hovakimyan University of Illinois at Urbana-Champaign [email protected] Lui Sha University of Illinois at Urbana-Champaign [email protected] ABSTRACT As modern unmanned aerial systems (UAS) continue to expand the frontiers of automation, new challenges to security and thus its safety are emerging. It is now dicult to completely secure modern UAS platforms due to their openness and increasing complexity. We present the VirtualDrone Framework, a soware architecture that enables an aack-resilient control of modern UAS. It allows the system to operate with potentially untrustworthy soware environment by virtualizing the sensors, actuators, and communi- cation channels. e framework provides mechanisms to monitor physical and logical system behaviors and to detect security and safety violations. Upon detection of such an event, the framework switches to a trusted control mode in order to override malicious system state and to prevent potential safety violations. We built a prototype quadcoper running an embedded multicore processor that features a hardware-assisted virtualization technology. We present extensive experimental study and implementation details, and demonstrate how the framework can ensure the robustness of the UAS in the presence of security breaches. CCS CONCEPTS Security and privacy Systems security; Computer sys- tems organization Embedded and cyber-physical systems; Robotics; KEYWORDS Unmanned Aerial Systems, Security, Virtualization ACM Reference format: Man-Ki Yoon, Bo Liu, Naira Hovakimyan, and Lui Sha. 2017. VirtualDrone: Virtual Sensing, Actuation, and Communication for Aack-Resilient Un- manned Aerial Systems. In Proceedings of the 8th ACM/IEEE International Conference on Cyber-Physical Systems, Pisburgh, PA USA, April 2017 (ICCPS), 12 pages. DOI: hp://dx.doi.org/10.1145/3055004.3055010 is work was carried out in part in the Intelligent Robotics Laboratory, University of Illinois. is work is supported in part by grants from NSF CNS 13-02563 and Navy N00014-14-1-0717. Any opinions, ndings, and conclusions or recommendations expressed here are those of the authors and do not necessarily reect the views of sponsors. Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for prot or commercial advantage and that copies bear this notice and the full citation on the rst page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permied. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specic permission and/or a fee. Request permissions from [email protected]. ICCPS, Pisburgh, PA USA © 2017 ACM. 978-1-4503-4965-9/17/04. . . $15.00 DOI: hp://dx.doi.org/10.1145/3055004.3055010 1 INTRODUCTION e booming Unmanned Aerial Systems (UAS) industry holds tremen- dous potential to boost productivity and the economy. In addition to military use cases, UAS platforms have already been experimented in many civil uses, such as delivery, surveillance, transportation, and journalism, to name a few. With ight intelligence and auton- omy enabled by modern computing and communication technolo- gies, UAS are ubiquitously networked as an important component for Internet of ings. e concern about UAS security is growing with the increasing demand on advanced functionalities and thus their increasing ca- pabilities. e increased computational power and connectivity in modern UAS, and open-soware environment (both operating system and applications) expose hitherto unknown security vulner- abilities. reats to such systems are growing both in number as well as sophistication, as demonstrated by recent aacks [8, 9, 16]. A successful aack on safety-critical systems like UAS can result in the safety of such systems being compromised, leading to disastrous eects, from loss of human life to damages to the environment. Hence, in order to fully integrate UAS into the current airspace, we need an aack-resilient UAS platform to assure the safety of modern UAS and the environment. In this paper, we propose Virtu- alDrone, a soware framework to tackle security challenges and achieve assured autonomy in modern UAS platforms. e frame- work aims to achieve cyber aack-resilient control of UAS even in the event of a security violation. For this, it provides two separate control environments – the normal control environment that allows the user to fully control the UAS with advanced functionalities, and the secure control environment that provides only a minimal set of capabilities for a safe control in order to minimize the aack surface. In normal circumstances, a UAS operates in the normal control environment, utilizing advanced but potentially untrusted applications. A security and safety monitoring module, which runs in the secure environment, continuously monitors the physical and logical states of the UAS in order to detect safety and security violations. Upon detection of such an event, the secure control environment takes the control of the UAS, limiting unreliable, un- trustworthy functionalities. en, the trusted controller drives the control of the UAS while a corrective action takes place. For a clean separation between the two control environments, we take advantage of modern embedded processor that features hardware-assisted virtualization technology. We sandbox the nor- mal control environment in a virtual machine to isolate potential security breaches. e secure control environment runs directly on the host machine, acting as if it is a hardware security module

VirtualDrone: Virtual Sensing, Actuation, and ... · Figure 1: Simplex architecture. the so›ware environment, in conjunction with the increased capa-bilities and complexities of

  • Upload
    others

  • View
    12

  • Download
    0

Embed Size (px)

Citation preview

Page 1: VirtualDrone: Virtual Sensing, Actuation, and ... · Figure 1: Simplex architecture. the so›ware environment, in conjunction with the increased capa-bilities and complexities of

VirtualDrone Virtual Sensing Actuation and Communicationfor Aack-Resilient Unmanned Aerial Systems

Man-Ki YoonUniversity of Illinois at Urbana-Champaign

mkyoonillinoisedu

Bo LiuUniversity of Illinois at Urbana-Champaign

boliu1illinoisedu

Naira HovakimyanUniversity of Illinois at Urbana-Champaign

nhovakimillinoisedu

Lui ShaUniversity of Illinois at Urbana-Champaign

lrsillinoisedu

ABSTRACTAs modern unmanned aerial systems (UAS) continue to expand thefrontiers of automation new challenges to security and thus itssafety are emerging It is now dicult to completely secure modernUAS platforms due to their openness and increasing complexityWe present the VirtualDrone Framework a soware architecturethat enables an aack-resilient control of modern UAS It allowsthe system to operate with potentially untrustworthy sowareenvironment by virtualizing the sensors actuators and communi-cation channels e framework provides mechanisms to monitorphysical and logical system behaviors and to detect security andsafety violations Upon detection of such an event the frameworkswitches to a trusted control mode in order to override malicioussystem state and to prevent potential safety violations We builta prototype quadcoper running an embedded multicore processorthat features a hardware-assisted virtualization technology Wepresent extensive experimental study and implementation detailsand demonstrate how the framework can ensure the robustness ofthe UAS in the presence of security breaches

CCS CONCEPTSbullSecurity and privacy rarrSystems security bullComputer sys-tems organizationrarrEmbedded and cyber-physical systemsRobotics

KEYWORDSUnmanned Aerial Systems Security VirtualizationACM Reference formatMan-Ki Yoon Bo Liu Naira Hovakimyan and Lui Sha 2017 VirtualDroneVirtual Sensing Actuation and Communication for Aack-Resilient Un-manned Aerial Systems In Proceedings of the 8th ACMIEEE InternationalConference on Cyber-Physical Systems Pisburgh PA USA April 2017 (ICCPS)12 pagesDOI hpdxdoiorg10114530550043055010

is work was carried out in part in the Intelligent Robotics Laboratory Universityof Illinois is work is supported in part by grants from NSF CNS 13-02563 andNavy N00014-14-1-0717 Any opinions ndings and conclusions or recommendationsexpressed here are those of the authors and do not necessarily reect the views ofsponsorsPermission to make digital or hard copies of all or part of this work for personal orclassroom use is granted without fee provided that copies are not made or distributedfor prot or commercial advantage and that copies bear this notice and the full citationon the rst page Copyrights for components of this work owned by others than ACMmust be honored Abstracting with credit is permied To copy otherwise or republishto post on servers or to redistribute to lists requires prior specic permission andor afee Request permissions from permissionsacmorgICCPS Pisburgh PA USAcopy 2017 ACM 978-1-4503-4965-91704 $1500DOI hpdxdoiorg10114530550043055010

1 INTRODUCTIONe boomingUnmannedAerial Systems (UAS) industry holds tremen-dous potential to boost productivity and the economy In addition tomilitary use cases UAS platforms have already been experimentedin many civil uses such as delivery surveillance transportationand journalism to name a few With ight intelligence and auton-omy enabled by modern computing and communication technolo-gies UAS are ubiquitously networked as an important componentfor Internet of ings

e concern about UAS security is growing with the increasingdemand on advanced functionalities and thus their increasing ca-pabilities e increased computational power and connectivityin modern UAS and open-soware environment (both operatingsystem and applications) expose hitherto unknown security vulner-abilities reats to such systems are growing both in number aswell as sophistication as demonstrated by recent aacks [8 9 16]A successful aack on safety-critical systems like UAS can result inthe safety of such systems being compromised leading to disastrouseects from loss of human life to damages to the environment

Hence in order to fully integrate UAS into the current airspacewe need an aack-resilient UAS platform to assure the safety ofmodern UAS and the environment In this paper we propose Virtu-alDrone a soware framework to tackle security challenges andachieve assured autonomy in modern UAS platforms e frame-work aims to achieve cyber aack-resilient control of UAS even inthe event of a security violation For this it provides two separatecontrol environments ndash the normal control environment that allowsthe user to fully control the UAS with advanced functionalitiesand the secure control environment that provides only a minimalset of capabilities for a safe control in order to minimize the aacksurface In normal circumstances a UAS operates in the normalcontrol environment utilizing advanced but potentially untrustedapplications A security and safety monitoring module which runsin the secure environment continuously monitors the physicaland logical states of the UAS in order to detect safety and securityviolations Upon detection of such an event the secure controlenvironment takes the control of the UAS limiting unreliable un-trustworthy functionalities en the trusted controller drives thecontrol of the UAS while a corrective action takes place

For a clean separation between the two control environmentswe take advantage of modern embedded processor that featureshardware-assisted virtualization technology We sandbox the nor-mal control environment in a virtual machine to isolate potentialsecurity breaches e secure control environment runs directlyon the host machine acting as if it is a hardware security module

ICCPS April 2017 Pisburgh PA USA M-K Yoon et al

but with a higher exibility due to soware control e virtualiza-tion of sensor actuator and communication is the key element ofthe VirtualDrone framework We virtualize these devices to pro-tect them from potential threats on the integrity and availabilityby abstracting away low-level details and by controlling accessese virtual communication also enables an authorized operator tooverride suspicious behaviors of the normal control environmentby providing a hidden communication channel e virtualizationalso allows for the use of a rich set of existing security techniquessuch as virtual machine introspection [14] Furthermore multicoreprocessors which become more prevalent in modern embeddedcomputing systems enable concurrent execution of the normal andsecure control environments and also run-time safety and securitymonitoring eciently on the same chip

Our paper makes the following contributions

bull We introduce a novel framework VirtualDrone a soware ar-chitecture that enables a cyber aack-resilient UAS platformby safeguarding critical system resources using a virtualizationtechnique on a multicore processor

bull We implemented the framework on a prototype quadcopter usingan o-the-shelf embedded computing board that runs a quad-core processor with hardware-assisted virtualization Our im-plementation aims to use existing open-source soware stackswithout any modications to the host and guest operating sys-tems as well as the virtual machine monitor

bull We present case studies to illustrate the eectiveness and versa-tility of the framework rough experimental validations wedemonstrate how the framework provides an integrated platformto defend against various types of aacks

2 BACKGROUNDModern UAS Computing Platform General-purpose operat-ing systems especially Linux-based OS variants are becomingthe leading OS for intelligent vehicles [7 10] enabling the indus-try to promote more intelligent applications anks to manufac-turing advancement embedded systems can run on light-weightcomputing platforms such as Raspberry Pi [5] alcomm Snap-dragon ight control board [10] and Intelrsquos Aero board [12] Manycomputation-intensive applications such as computer vision andcomplex navigation programs can now run onboard to unleashadvanced capabilities of modern UAS computing platforms Appli-cations developed for general-purpose systems can also be portedto these platforms with minimal migration eorts Moreover thesesystems provide convenient networking interface such as WiFi andcellular network which increases connectivity and usability of theplatforms Meanwhile many UAS applications are community-supported open-source applications [1] ey allow for adding newfeatures tuning the performance etc However the open nature of

SafetyController

Complex Controller

SafetyDecision Module

Physical SystemActuators

SensorsSensor dataSensor data

Actuation

Figure 1 Simplex architecture

the soware environment in conjunction with the increased capa-bilities and complexities of the modern UAS platforms inevitablyintroduce more security vulnerabilities to UAS

Simplex Architecture e Simplex architecture [24 27] shownin Figure 1 is a soware solution that enables the use of a high-performance (with the purpose of system performance optimiza-tion) potentially unveriable controller (due to complex sowarestructure) in a safe manner a high-assurance control is guaranteedeven when the complex controller fails due to for example sowarebugs or unreliable logic is is achieved by running a safety con-troller which has a limited level of performance but is robust inparallel Sensor data from the physical system is fed to both con-trollers each of which individually computes actuation commandsusing their own control logic Under normal circumstances thephysical plant is driven by the complex controller e safety deci-sion module plays a critical role in assuring the safety of the systemit continuously monitors physical states of the plant and checkssafety violations determined by a safety envelope If such a viola-tion is detected the control is transferred to the safety controllerto guarantee a continuous and robust control of the system

3 VIRTUALDRONE FRAMEWORKe increasing security challenges posed on the modern UAS plat-forms make it infeasible to completely secure them because thereexist many entry points that are vulnerable to potential securityaacks e main idea that we propose in this paper is that of asoware framework to achieve an aack-resiliency e frameworkisolates a normal but untrustworthy execution environment from atrusted one that (i) manages real IO operations (ii) continuouslymonitors for detection of security and safety violations by the for-mer and (iii) takes back the control of the physical system in suchan event We achieve this by taking advantage of modern embed-ded processor that features virtualization technology and increasedcomputing power due to multiple cores

31 High-level Frameworke VirtualDrone framework runs two separate control environ-ments that provide dierent levels of functionalities and capabilitiesand thus require dierent degrees of protection

Normal Control Environment (NCE) It corresponds to the com-plex controller in the Simplex architecture (see Figure 1) that runssoware components for any normal function of UAS is includesadvanced ight and mission controls and supplementary sowaresuch as image processing and networking applications ese typ-ically require external networking (which could be insecure) forstatus reporting data transfer administration etc Also oen theyare complex third party-developed andor subject to frequent up-datesupgrades which hinders pre-verication or certication onthem Hence these types of soware components running in theNCE are more susceptible to security threats

Secure Control Environment (SCE) It runs a minimal set ofsoware components that are critically required to control the UASeven when the normal environment is completely taken over by anadversary and does not function A security and safety monitoringmodule in the SCE thus not only monitors the physical state of thesystem but also implements a set of security monitors to detectpotential security violations e soware components runningin the SCE are static since they are designed for safety purpose

VirtualDrone Architecture for Aack-Resilient UAS ICCPS April 2017 Pisburgh PA USA

Initialization

Time

Initialization

Secure Control Mode

Ready

Control Control

Control Control Control

Normal Control Mode

SCE

NCE

Secure Control Mode

Control

Control

Violation

Active Active

Inactive

Security and Safety Monitoring

Figure 2 Switching between the SCE and the NCE

and thus require simple soware structure and that a signicantamount of analysis is carried out post-designimplementation Alsothey require no or infrequent updates once deployed

We call the system is in virtual control mode if the system isdriven by the controller running in the NCE (ie virtual machine)By contrast the system is in host control mode if the system isdriven by the trusted controller in the SCE (ie on the host) Innormal circumstances the system is in the virtual control mode(ie NCE) as illustrated in Figure 2 providing the user with the fullfunctionality Upon detection of the event of a security or safetyviolation the SCE takes back the control of the system in order tooverride the malicious behavior and to maintain the system in acontrollable state

Figure 3 presents the high-level overview of the VirtualDroneframework e key components in the framework are (i) the virtualmachine that sandboxes the full-featured but untrusted operationsincluding the control and other applications (eg mission imagingnetworking) (ii) the virtualized sensors (eg inertial-measurementunit) actuators (eg motors) communication channel (eg teleme-try with the ground station) for use by the normal environment(iii) the interface between the real IO devices and the virtualizedones (iv) the security and safety monitor that continuously moni-tors on the logical and physical behaviors of the system driven bythe normal environment and lastly (v) the trusted controller for arobust backup and recovery It should be noted that the controllerrunning in the NCE could have been fully veried However itis deemed untrustworthy because of potential direct and indirectthreats by other soware components residing together

e VirtualDrone framework benets from a multicore processorby being able to run the normal and secure environments in parallele laer can continuously perform safety and security checksand real IO operations while the former is carrying out its normaloperations which are not possible on a single core processor

32 Assumptions and Adversary Modelbull Since we utilize a virtualization technique for the isolation of

potentially untrustworthy soware components the virtual ma-chine monitor is our trusted computing base

bull e SCE does not use the external network (ie Internet) becauseas explained above the soware components in the SCE are staticIf needed any updates to the SCE require physical accesses tothe hardware over-the-air management is not allowed

bull Inside the virtual machine an adversary may breach any part ofthe soware stack (the OS kernel run-time libraries le systemuser applications) and can even have root-level access (in theVM) and thus have full control of any soware running in theVM is would enable the aacker to create a backdoor andeven replace applications with maliciously modied ones byexploiting vulnerabilities or social-engineering techniques

Host OS

Hardware

TrustedController

Sensors Actuators

Peripheral Interfaces

Virtual Sensorsamp Actuators amp

Communication

Guest OS

IO Proxy

Secure Control Environment (Host)

Security amp Safety Monitor

Normal Control Environment (VM)

Netw

ork

Communication

Untrustworthy Controller amp

Apps

Figure 3 Overview of the VirtualDrone Framework

bull We do not consider physical aacks [16 26] such as GPS spoof-ing against the hardware Such aacks can be handled by control-theoretic approaches such as [18 19]

33 Virtual Sensing Actuation andCommunication

e key requirement for sound functioning of the VirtualDroneframework is a clear separation between the normal and securecontrol environments Otherwise an aacker may take over thetrusted controller or the monitoring module so that they could notfunction properly when needed It is also crucial to protect thesensors and actuators from the untrustworthy components in theNCE as the aacker may degrade their availability or even corruptthem so that the entire system operates with incorrect informationon the physical state Hence we use a virtualization techniqueto isolate the NCE from what we need to protect ie the SCEe NCE which runs potentially untrustworthy components issandboxed in a virtual machine ey see a controlled environmentcongured by the secure side that has a direct control on the systemresources

Virtual Sensing and Actuation One of the key functions of theSCE is to protect the sensors and actuators Our framework does notallow the NCE to directly access such devices (eg passthrough IO[17]) because of potential security risks Instead as typically done invirtualization the IO operations tofrom the devices are emulatedMost sensors and actuators that we can nd from UAS are typicallyinterfaced through certain on-board peripheral communicationprotocols such as SPI (Serial Peripheral Interface) and I2C (Inter-Integrated Circuit) Hence one possible way is to implement back-end drivers for such common protocols at the virtual machinemonitor (VMM) layer so that the applications running in the NCEcan transparently use the (front-end) drivers already provided bythe guest OS However this approach poses signicant challengesto security and complexity for the following reasons

bull An aacker running in the NCE might recongure some sensordevices (eg changing the sampling rate or gain) in use Hencewe would need a proper way to lter out impermissible IO trans-actions from the NCE is requires the emulation interface tohave a comprehensive map of device registers that species writeand read permissions for the NCE Furthermore some permis-sion assignments may need to change dynamically depending

ICCPS April 2017 Pisburgh PA USA M-K Yoon et al

IO Proxy

Inertial Measurement Unit (MPU9250)

TrustedController

MPU9250 Driver

IMU Interface

IMU Raw Data

Receiver

Hardware

Host OSSPI

UntrustworthyController amp Apps

IMU Interface

Security amp Safety Monitor

NCE (VM) SCE (Host)

IMU Feeder Thread

Host-Guest Communication

Figure 4 Sensor virtualization in the VirtualDrone frame-work

on the current high-level context of each IO operation which ishidden in the low-level IO emulation

bull e aacker may even aempt denial-of-service aacks on theshared devices by simply keeping them busy

bull Allowing low-level IO transactions also requires a tight syn-chronization between the NCE and the SCE because some IOoperations are stateful For instance a compass sensor used inour prototype performs a register read in two stages ndash the devicedriver initializes a read by writing the read address waiting for10 ms and then collecting the data GPS parsing is also donewith a state machine Without a proper synchronization thestate of the device could be lost due to interleaving transactionsfrom the NCE and the SCE An aacker in the NCE could usethis very property to hinder a timely correct use of sensor databy the SCE (eg aacker may reinitialize a sensor while the SCEis waiting for a sample) If a synchronization is to be enforcedthe availability could signicantly degrade because the deviceshould be locked for a long time to serve one at a timeTo solve the challenges illustrated above we take a more passive

approach to sensor and actuator virtualization e frameworkruns an IO proxy for each device in the SCE that feeds sensor datato the NCE is is a suitable mechanism because of the periodicnature of their operations and the small data sizes that we cannd from typical sensor and actuator devices on UAS platforms(see Table 1 in Section 4) Since it is known and xed how oeneach sensor data should be sampled the IO proxy only needs tomake sure that the SCE feeds the sensor data in time It feeds rawsensor data instead of processed ones so that the applications inthe NCE can process them as needed From the perspective ofthe NCE this sensor feeding looks as if the data is sampled frominvisible inaccessible devices (ie virtual sensors) Hence the SCEcan also remove certain side-channels (eg radio signal strengthindicator) present in sensor information by not providing it to theNCE especially if this would not degrade the normal functionalityof the NCE

Figure 4 illustrates how an IMU (Inertial Measurement Unit)sensor is virtualized in our prototype based on an open-sourceautopilot suite [1] A user-level device driver (MPU9250 Driver)uses the SPI interface to fetch raw IMU data e IMU IO proxyruns a feeder thread which sends the current sample to the rawdata receiver running inside the NCE through a host-to-guest com-munication interface e receiver behaves as a device driver from

GCS

Controller

ControllerApp

Switch

NCESCE

Hidden Channel

Telemetry Analyzer

Radio Transceiver

(eg Switch to SCE and Return to Home)

Monitors NCErsquos Telemetry Data

Figure 5 Telemetry virtualization creates a hidden commu-nication channel between the SCE and the GCS

which the higher-level interface (ie IMU interface) can fetch sen-sor data without needing to know the particular model of the realdevice Hence no modications are needed in the higher layersActuators (eg motors) are virtualized in a similar way as explainedin Appendix A

Virtual Communication Applications running in the NCE re-quire network communication with the external world for datatransfer remote management update etc Hence as shown inFigure 3 the NCE allows users to directly access into the NCEthrough for example a port forwarding mechanism provided bythe VMM However there exist some communication channels thatneed to be managed by the SCE ndash the ground control and the remotecontroller

e ground control application utilizes a radio communicationchannel to establish a telemetry transfer between the ground con-trol station (GCS) and a vehicle e telemetry data such as theGPS location and sensor measurement can be monitored at theGCS It can also use telemetry to dynamically control the vehicleby sending commands for seing new waypoints landing armingetc However this communication channel can be exploited by anadversary who can simply disconnect the channel by disabling theradio driver Hence we virtualize the telemetry communicationchannel as done for the sensor and actuator

e key benet of this mechanism is that it can create a hiddencommunication channel for the SCE as illustrated in Figure 5 Forexample the GCS can send a special command to the SCE egswitching to the SCE and returning to the home which is lteredby the telemetry analyzer (part of the telemetry IO proxy) thatinspects every incoming message ese hidden messages are notrelayed to the NCE We take advantage of this mechanism as asolution to drone hijacking scenario presented in Section 51 upona detection of a hijacking aempt the GCS commands the SCEto switch to the host control mode and to return to where it islaunched We can use the same mechanism to reboot the virtualmachine (aer the control is switched to the SCE) from the GCSwhen a suspicious behavior is observed Note that an aacker cansend these special commands Hence such commands should bechosen carefully in such a way that a successful aempt cannotlead to a safety hazard

A hand-held remote controller (see Figure 11 in Section 5) is usedby a human pilot to wire-lessly y a vehicle e communicationis also carried via a radio link (eg 24 GHz) It is virtualized inthe same fashion as the telemetry radio and we can also create ahidden channel For instance in our prototype implementation webind one of the switches of the remote controller with the functionthat tells the VirtualDrone to switch to the SCE e pilot usesthis function to manually control the vehicle when the NCE-drivenvehicle shows abnormal behavior

VirtualDrone Architecture for Aack-Resilient UAS ICCPS April 2017 Pisburgh PA USA

Security amp Safety Monitor

Geo-fence

Sensor Data(IMU GPS Battery hellip)

Telemetry Command from GCS

Telemetry Report from NCE

Actuation Command from NCE

Attitude Errorfrom SCEVMI Fake Report

Detector

Safety Monitor

Command to SCE(Switch RTL hellip)

Figure 6 Example conguration of the security and safetymonitor

34 Security and Safety MonitoringFigure 6 shows an example conguration of the security and safetymonitor and data ow based on the prototype implementation pre-sented in Section 4 Notice from the gure (and also from Figure 4)that the monitor receives the sensor data for analysis Becausethe data are fetched from the trusted environment the monitoris guaranteed to use the true measurement for a safety analysisHence we can detect aacks that for example try to put the vehiclein an open-loop state or to set wrong control parameters In ourprototype quadcopter we analyze the aitude (ie roll pitch andyaw) errors which are bounded in normal conditions to detect anunsafe physical state One can also implement a control-theoreticanalysis [27] e monitor also analyzes the actuation outputs fromthe NCE as shown in Figure 16 in Appendix A to prevent potentialsafety violations For example the monitor can upper-bound onthe motor outputs to prevent motor failure due to the aackerrsquos at-tempt to apply abrupt voltage changes e monitor can also checkif it receives actuation commands from the NCE at the denedfrequency ndash abnormal paerns could be an indicator of a potentialsecurity breach In order to handle physical aacks to the sensorsone can also implement a sensor aack detection technique [18 19]using the true measurements available in the SCE

e SCE also inspects communications between the NCE andthe external world e telemetry analyzer shown in Figure 5 inter-cepts radio telemetry messages to and from the NCE and providesthem to the monitoring module for analysis Using this mecha-nism one can detect an aacker that for example sends out fab-ricated messages (eg ight path report replayed or generated bya soware-in-the-loop simulation) in an aempt to misinform theground control station about the true physical and logical states

e monitoring module can also host critical safety measuresthat otherwise would run at the same layer as untrustworthy ap-plications For instance geo-fencing typically runs as a part of anautopilot soware An aacker can simply disable it or modify theconguration to y the vehicle into a no-y-zone Since this typeof function does not require external interaction it can run in theSCE using the true sensor measurements (eg GPS location)

Virtualization also enables the use of virtualization-based secu-rity measures for instance virtual machine introspection (VMI) [14]e monitoring module in the SCE can implement various VMItechniques to monitor the behavior of the applications and the guestOS running in the NCE For example through interfaces providedby the VMM the module can continuously check the integrity ofthe kernel code andor its critical data structures (eg interruptvector table process and module lists) for detection of rootkits andinspect network connections and packets for detection of back-doors and so on Upon a detection the framework may switch tothe SCE as a preventive action from which moment comprehensive

Navio+(Sensor board)

Raspberry PI 2(Quad-core ARM Linux)

GPS

Telemetry Radio (915MHz) Radio Receiver for

Remote Control (24GHz)

Figure 7 adcopter prototype implementation with Rasp-berry Pi 2 and Navio+ sensor boards

Security amp Safety Monitor

Virtual Machine (QEMU)

Linux

Hardware

ArduPilot

IMU Barometer

Compass

Motors RC

DMASPI I2C

Virtual Sensorsamp Actuators amp

Communication

Linux

ArduPilot

IO Proxies

Host User Space

ADC

KVM

HW

AppApp

Net

Network

Port-

Forw

ardi

ng

IC

RG

AM

Nav

io+

GPSTelemetry

Radio

Serial

App

B

TSock

et

Seria

lPor

t

WiFi

Figure 8 VirtualDrone implementation on the prototype

security analyses (eg deep memory scan rebooting VMs) can takeplace without losing control of the vehicle

4 IMPLEMENTATIONIn this section we present the implementation details for our proto-type of the VirtualDrone framework on a quadcopter drone shownin Figure 7 running an open-source autopilot on an embeddedcomputing board

System Implementation We implemented theVirtualDrone frame-work on a Raspberry PI 2 Model B (RPI2) board [5] as depictedin Figure 8 It has a quad-core ARM Cortex-A7 CPU each coreof which runs at 900 MHz and has a main memory of 1 GB eprocessor features the ARM Architecture Virtualization ExtensionIt enables running VMs with unmodied guest OS using KVM(Kernel-based Virtual Machine)

On the host we run Linux 318 No modication was made tothe kernel except that we enabled virtualization with KVM in theconguration On top of the host OS we run unmodied QEMUv23 [4] an open-source virtual machine monitor As explainedin Section 32 QEMU ie the VMM is our trusted computing base(TCB) We created one VM that emulates an ARM Versatile ExpressA15 board (which runs a Cortex-A15 CPU the same ARMv7 ar-chitecture as Cortex-A7) and assigned one of the four cores of theprocessor exclusively to the virtual machine In the virtual machinewe run unmodied Linux 43

We use QEMUrsquos port forwarding mechanism to open an SSH (Se-cure Shell) port on the virtual machine through which a user logsin to launch update manage services and applications More portscan be open to the virtual machine using the port forwarding mech-anism In this paper we assume the QEMUrsquos port forwarding mecha-nism is secure

In our prototype we chose to use Linux as the host OS Howeverit is desirable to use a formally veried OS on the host instead of

ICCPS April 2017 Pisburgh PA USA M-K Yoon et al

Table 1 e rate and amount of data transfer between thesecure and normal control environments

Component Direction Rate SizeIMU Hostrarr VM 200 Hz 14 bytes

Barometer Hostrarr VM 25 Hz 4 byteCompass Hostrarr VM 50 Hz 24 bytes

ADC Hostrarr VM 167 Hz 5 bytesGPS Hostrarr VM 5 Hz Max 1K bytes

Motor Output VMrarr Host 200 Hz 16 bytesRC Input Hostrarr VM 55 Hz 16 bytesTelemetry Hostharr VM Vary Vary

such a general-purpose monolithic kernel Our choice of Linux isto minimize engineering eorts to port VMM autopilot and sensorand actuator device drivers to a new OS Our implementation didnot require any modications to the host OS VMM and guest OS

Autopilot We stack Navio+ sensor board [2] on top of the Rasp-berry PI 2 (as shown in Figures 7 and 8) to provide various sensordata for ight control e NCE (ie the virtual machine) runs theopen-source ArduPilot (aka APM) [1] autopilot suite as the ightcontrol soware for our quadcopter drone APM combines sensordata and RC ight maneuver commands to compute correct inputsfor the four motor-prop units which are sent by the actuator portsof the Navio+ board to drive the actuators

As shown in Figure 8 we run one instance of APM in the SCE(ie the host) e Simplex architecture suggests the use of a robustcontroller for the safety controller in order to handle and recoverfrom physical failures For demonstration purposes we chose touse the APMrsquos default PID controller as the trusted controller In aproduction implementation however a high-assurance controllerwould be used

Virtualization e IO proxy shown in Figures 4 and 8 runsone feeder thread for each sensor Each sensor retrieves a newsample at a xed frequency Each feeder thread then sends thenewly available data to the virtual machine using a host-guestcommunication channel Appendix B explains how the sensorsand the actuators are virtualized in our prototype implementationwhich are also summarized in Table 1

Host-GuestCommunication We use QEMUrsquos virtio-serial fordata transfer between the host (ie IO proxy threads) and guestsystems It creates virtual serial ports in the guest each of whichis mapped to a character device such as Unix domain socket pipeTCPUDP port etc in the host side We created eight virtualserial ports for the components listed in Table 1 e IO proxythreads in the SCE use eight Unix domain sockets to communicatewith the virtual machine One may use other types of host-guestcommunication mechanisms such as shared memory In our im-plementation we aimed to utilize an existing infrastructure thatdoes not require any modication or insertion to the stock QEMUe virtio-serial is adequate enough to handle the low-speedlow-volume data transfer for sensoractuatorcommunication vir-tualization We assume virtio-serial is trustworthy as it is partof QEMU the TCB

Virtual Telemetry e APM uses a serial port (UART) for teleme-try radio transceiver1 Hence the NCE-side APM does not need any1Our prototype copter also supports WiFi and APMrsquos telemetry can be transferredthrough UDP or TCP as well e APM abstracts these away by treating them as UARTcommunication

additionmodication for the virtual telemetry e SCE-side APMreadssends telemetry data fromto the real UART port performs altering (as described in Figure 5) and relays tofrom the virtualmachine using the virtual-serial port mechanism explained abovee APM uses MAVLink protocol (Micro Air Vehicle Communica-tion Protocol)2 MAVLink contains all interface functions to controlthe vehicle monitor states change parameters etc Each MAVLinkmessage size and frequencies vary depending on the message typee messages typically have small size (the maximum is 263 bytes)and low frequency (a few Hz)

5 EXPERIMENTSWe now present case studies that demonstrate how the Virtual-Drone framework can detect and prevent various types of securityand safety violations

51 Case StudyTo demonstrate the eectiveness and versatility of our frameworkwe consider the following ve scenarios Note that we are notproposing new detectionmitigation solutions for the use cases pre-sented here Each scenario could be handled in many dierent waysFor instance hijacking can be easily defeated by a simple authen-tication of the communication We instead intend to demonstratehow an integrated platform ie the VirtualDrone framework candefend against various aack scenarios that would otherwise havebeen handled separately with potentially conicting requirementsWe also note that these aacks can occur in a number of dierentforms In this paper we consider a pessimistic scenario the aackercan know the HWSW conguration and even gain a root accessto the NCE

Attacks on Safety An adversary can launch an aack on thesafety of a vehicle by for example degrading the availability ofcritical sensors (eg IMU) or actuators or the control performance(eg by changing PID gains) e worst-case scenario from thevehiclersquos safety perspective is when the aacker disables the ightcontroller while the vehicle is ying is immediately leads thesystem to an open-loop state which will cause the vehicle to crashTo demonstrate this type of aack we consider an extreme sce-nario in which the ight controller is killed by an aacker eaacker can launch this aack by for example entering through abackdoor replacing the control program with one that self-crashesor installing a rootkit We do not assume specic scenario of howit is launched We implemented a Linux kernel module that 1) ndsthe APM autopilot process from the kernelrsquos process list and then2) kills the process e aacker could achieve the same goal bycausing the virtual machine to crash

ere could be several ways to detect this type of aack One mayuse a heartbeat mechanism which however can be circumvented byan aacker that impersonates the ight controller Instead we takeadvantage of the SCErsquos ability to monitor the true physical state ofthe vehicle We use the aitude control performance measured atthe SCE At each control loop the SCE-side controller calculates theerrors of the rate control on the pitch roll and yaw of the copterDuring a stable ight the rate errors are bounded as shown inFigure 17 in Appendix C because the ight controller is active tominimize the rate errors In case of an open-loop state the ightcontroller cannot work to minimize the rate errors Due to the factthat a multirotor system is naturally an unstable ight platform2hpqgroundcontrolorgmavlinkstart

VirtualDrone Architecture for Aack-Resilient UAS ICCPS April 2017 Pisburgh PA USA

865 87 875 88 885 89 895 90 905 91Time (s)

-10000-7500-5000-2500

0250050007500

10000125001500017500200002250025000

Rol

l Pi

tch

Yaw

Erro

rs

RollPitchYaw

865 87 875 88 885 89 895 90 905 91Time (s)

1000

1100

1200

1300

1400

1500

1600

1700

1800

1900

2000

Mot

or o

utpu

t (PW

Ms)

Motor[0]Motor[1]Motor[2]Motor[3]

Open-loop

Kill ArduPilotprocess

SafetyViolation

Normal Control Mode(NCE)

Secure Control Mode(SCE)

Figure 9 e motor outputs (top) and the roll pitch yawerrors (bottom) measured at the SCE e attacker in NCEkills the ight controller which leads the copter to an open-loop state e SCE takes the control when the errors growbeyond the thresholds aer which the copter is stabilized

the rate errors will increase quickly beyond the normal bounderefore a properly chosen threshold of rate errors can be used indetection of ight safety violations Hence the security and safetymonitoring module in the SCE continuously checks if the errorsgrow beyond the threshold Upon a safety violation the frameworkswitches to the secure control mode Appendix C explains how theAPMrsquos aitude control works and how we obtained the thresholdof rate errors

Figure 9 shows the results of this experiment While the dronewas in the virtual control mode the aacker activated the rootkitmentioned above at time around 888 sec at which moment theAPM process running in the VM is killed e top plot in Figure 9shows the motor outputs (4 channels) from the motor driver in theSCE As we can see the drone was in an open-loop state for about300 ms e boom plot shows the aitude errors also measuredat the SCE e drone becomes unstable (ie the errors are faraway from zero) for a moment because no actuation is applied tothe motors during the open-loop period Upon the detection ofthe violation on the errors (at time around 891 sec) the control isswitched to the SCE from which moment the control loop is closedand the drone returns to a stable state

We also tested a scenario when the control parameters are modi-ed during ight Figure 10 shows the aitude control errors whenthis happens At time around 1643 sec a MAVLink message wassent via radio to change the proportional gain (180 times bigger thanthe original value) of the aitude controller As can be seen thedrone became unstable immediately e safety module detectedthe large roll errors aer which the SCE took the control

Time (s)162 164 166 168 170 172 174

Rol

l Pi

tch

Yaw

Erro

rs

-20000

-10000

0

10000

20000

30000

40000

50000

60000RollPitchYaw

Normal Control Mode

(NCE)

ChangeProportional

Gain

Secure Control Mode(SCE)

Figure 10 e roll pitch yaw errors when the proportionalgain of the attitude controller is set to an abnormally highvalue e SCE immediately stabilizes the drone upon thedetection of the unstable physical state

Hijacking It has been demonstrated that it is possible to hijack adrone by exploiting the MAVLink protocol [9] e idea is to send acommand that sets a new ight plan through the telemetry channele telemetry radio pair of the drone and the ground control station(GCS) distinguish themselves from others by their unique NetIDand the frequency band Hence by using the same NetID and radioband and running the same rmware (which decodes the MAVLinkpackets) as the target vehicle the aacker can send any MAVLinkmessages to the target

To demonstrate this aack scenario we used three telemetryradio (ie for the GCS the drone and the aacker) that utilize thesame frequency band (915MHz) and same default congurationSince the out-of-the-box default NetIDs are same the aackerrsquostelemetry radio did not need any rmware modication3 Figure 11describes the hijacking scenario e drone takes o at the launch-ing point (marked as lsquoTrsquo) and communicates with the GCS locatedat lsquoGrsquo e pilot ies the drone along the normal path e aackerlocated at lsquoArsquo then launches its ground control application en itsends a new waypoint plan to the drone which will send it to thelocation marked as rsquoWrsquo e aacker did not need to modify the3It is possible to nd out the NetID used between the GCS and the drone by modifyingthe rmware [9]

G

T

A

W

T

A

W

A

G

T

Hijack

Ground Control Station

Launching Point

Attacker

Hijacked Drone

Attacker

Figure 11 e attacker (lsquoArsquo) tries to hijack the drone yingalong the normal path and to send it to a newwaypoint (lsquoWrsquo)e attacker uses the same telemetry radio as the GCS andthe drone and unmodied APM Planner GCS

ICCPS April 2017 Pisburgh PA USA M-K Yoon et al

G G

T T

A A

W W

(a) Without VirtualDrone (b) With VirtualDrone

Figure 12 (a) e ight trajectory of the drone hijacked bythe attacker It is sent to new location lsquoWrsquo set by the attacker(b) e attackerrsquos attempt to hijack the drone is detected bythe GCS Upon the detection the GCS sends a special com-mand to the SCE which switches the control mode to theSCE and directs the drone to where it was launched

GCS program (the stock APM Planner 204 with default seings)Figure 12(a) shows the ight trajectory of the drone when it wassuccessfully hijacked by the aacker

While the drone itself cannot detect such a hijacking aemptthe GCS can detect it because of unexpected message exchange initi-ated by the aacker as detailed in Appendix D Hence we addedthe functionality that detects such unexpected messages to ourlegitimate GCS Upon a detection the GCS commands the droneto return to where it was launched as shown in Figure 12(b) istakes advantage of the VirtualDronersquos virtual telemetry explainedin Section 33 the SCErsquos telemetry proxy enables a hidden com-munication channel between the GCS and the SCE through whichthe former sends the drone a pre-dened set of special commandsIn this scenario the command from the GCS overrides the NCErsquosabnormal operation by switching the drone to the secure controlmode Note that the aacker might be able to send the same specialcommand However what it can do at worst is to send the droneback to the home

As explained in Section 34 the virtual telemetry also enables theSCE to detect if the NCE is trying to deceive the ground station Forexample aer a successful hijacking the aacker may report fakeGPS location (by replaying or by generating from SW simulator) tothe GCS so that it looks as if it is ying on the planned path etelemetry analyzer however can detect such aempts by analyzingeach outgoing MAVLink packet and comparing against the truelocation retrieved from the GPS receiver which is also implementedon our prototype

Corrupting Safety Functions Autopilot programs also supportcritical failsafe mechanisms that are activated under certain con-ditions such as losing radio communication signal or low-baeryIt is in fact easy to corrupt such a safety-critical measure becausetypically it can be enableddisabled remotely through a telemetrycommand (hence an aacker can send a command via radio asdone in the hijacking scenario) Moreover such a mechanism isoen implemented as a part of autopilot that runs at the user-levelHence an aacker who has gained a root access can easily corruptit by modifying the conguration le or the memory

4hpardupilotorgplanner2indexhtml

No-fly zone

Original Path

Figure 13 Attacker disables the geo-fence andmodiesWay-point 3 so that the drone ies into a no-y zone Such asafety-critical function can be protected by running in theSCE

In this case study the aacker corrupts the geo-fence mechanismGeo-fence employs positioning data such as GPS signal or localradio-frequency identiers to set up a virtual boundary to preventthe vehicle entering a prohibited zone e vehicle position ismonitored at all times such that before the vehicle enters a no-y zone the system could act accordingly to prevent a geo-fenceviolation Corruption of the geo-fence can result in a catastrophicresult an aacker may disable the geo-fencing and induce thevehicle to y into a congested airspace such as takeo pathwaysfor mid-air collision

To demonstrate this type of aack we developed a rootkit thatdisables the geo-fence of APM during a ight and sends it intoa no-y zone e rootkit executes this aack by modifying theAPMrsquos memory as detailed in Appendix E Our drone was plannedto y through a path (0-1-2-3) in an autonomous mode as shownin Figure 13 During the ight the aacker logged into the systemthrough WiFi and launched the rootkit when the drone was yingtoward Waypoint 2 e new Waypoint 3 set by the rootkit islocated inside a no-y zone and because the rootkit has alreadydisabled the geo-fence the drone consequently ied into the no-yzone deviating from the original path as shown in Figure 13

e SCE of VirtualDrone provides a protected layer at whichsafety-critical functions like geo-fence can be placed We imple-mented a simple geo-fence module in the security and safety mon-itoring module in the SCE It continuously monitors the currentGPS coordinate and checks it against the list of no-y zones alsostored at the SCE layer Upon a violation a pre-dened action istaken In our implementation the SCE takes back the control fromthe NCE and returns to where it was launched as done for thehijacking scenario explained earlier

Side-channel e virtualization of sensor actuator and commu-nication allows for hiding certain types of information from theNCE One of the examples is the RSSI (Received Signal StrengthIndication) that indicates the link quality between a pair of radiotransmier and receiver We especially consider a scenario in whichan aacker tries to estimate the location of the GCS by observingthe RSSI measured between the vehicle and the GCS Due to signalaenuation the radio signal is stronger as the vehicle is closer to theGCS Hence one can correlate the RSSI with the GPS coordinate

VirtualDrone Architecture for Aack-Resilient UAS ICCPS April 2017 Pisburgh PA USA

T

1

2

3

4

G

Lat 401626060Lng -883074907

0 20 40 60 80 100 120 140 160 180Time (s)

100

120

140

160

180

RSS

I

0 20 40 60 80 100 120 140 160 180Time (s)

401615

40162

401625

40163

401635

Latit

ude

0 20 40 60 80 100 120 140 160 180Time (s)

-88309

-88308

-88307

-88306Lo

ngitu

de

Figure 14 e drone ies through T-1-2-3-4-1 e graphsrepresent the RSSI (top) the latitude (middle) and the longi-tude (bottom) An attacker can estimate the location of theGCS by correlating the RSSI and the GPS information

Figure 14 illustrates such a possibility of side-channel e graphsin the gure represents the RSSI (between the drone and the GCS)and the GPS coordinate (latitude and longitude) measured whilethe drone ies through a path (T-1-2-3-4-1) If the aacker is able toobtain these RSSI information heshe can estimate the location (ora region) of the GCS by nding when the RSSI is high e resultsshow quite accurate estimation of the true GCS location (shown inthe map) A complex algorithm will allow for further narrowingdown the location e VirtualDrone framework eliminates thispossibility by not providing the RSSI information to the NCE Notethat RSSI is needed only for the SCE (eg switches to the SCEand then performs a pre-dened operation such as return-to-homewhen RSSI is low due to the loss of telemetry link) Furthermorebecause of the telemetry virtualization the NCE cannot even knowif the telemetry is communicated through a radio channel or anetwork (eg WiFi) In case of the network-based telemetry theSCE can even hide the IP address of the GCS

Virtual Machine Introspection Many rootkits modify criticalkernel data structures to intercept sensitive data hide maliciousprocesses or les etc For a demonstration we implemented a secu-rity module that checks the integrity of the system call table of theguest OS For this we chose to utilize an existing interface providedby QEMU namely the QEMU Machine Protocol (QMP) It allows host-side applications to communicate with or control a running QEMUVM We created a QMP Unix socket to which our security modulecan connect During the initialization of the VM the module dumpsthe current system call table and stores this initial state in memoryFrom then on the module regularly dumps the current table andcompares it against the one obtained initially Using this techniquewe were able to detect a known rootkit modhide1 that hijacks theopen call to hide itself from the kernel module list

Note that we are not proposing new rootkit detection methodshere We instead intend to demonstrate how the VirtualDroneframework can handle such a stealthy security violation One canuse a rich set of library for virtual machine introspection such asLibVMI [3] which we leave for future work

52 DiscussionSensor attack e VirtualDrone framework cannot handle phys-ical manipulations on the sensors such as GPS spoong esetypes of aacks are called sensor aack or false data injection aackand typically tackled by control-theoretic approaches [18 19] erequirement however is that the methods themselves should beprotected from cyber-aacks Hence one can implement such a

Time (sec)0 20 40 60 80 100 120 140 160 180

Vo

lta

ge

(v)

105

11

115

12Without VirtualDroneWith VirtualDrone

Figure 15 Voltage drop at the battery for 3-minutes of hov-ering with and without the VirtualDrone framework

technique on the SCE layer specically in the security and safetymonitoring module as it can see the true (but potentially physicallymanipulated) sensor measurements

Power consumption Since UAS typically runs on baery powerwe compare the power consumption of the prototype drone withand without the VirtualDrone framework In order to compare thepower consumption in a controlled environment (eg eliminatingvarying disturbance due to wind) we ew the drone indoors hov-ering it at a xed position We ew the drone for about 3 minuteswith the same fully-charged baery and measured the voltage dropsduring the ight

Figure 15 shows that the VirtualDrone does not impose over-head on the power consumption is is because the majority ofthe power is consumed by the motors to li the copter e powerconsumption by RPI2 board and the Navio+ sensors cannot exceed5 Was which is the upper bound of the power supply by the powermodule at is the power consumption by any on-board comput-ing cannot be more than 5 Was We calculated the average powerof the 3-minutes of ights which ranged between 114 and 118Was Hence the power consumption by any on-board computingcan be ignored Due to the fact that the upper bound of powerconsumption by computing is two orders of magnitude smallerthan that of the motors we conclude that the power consumptionoverhead of running the VirtualDrone is negligible

6 RELATEDWORKCurrent unmanned vehicle systems are very vulnerable to cyber-aacks as demonstrated by recent aacks Maldrone [8] is a so-ware virus that can compromise drones based on ARM Linux sys-tems e malware can open a backdoor in the Parrot AR Dronesinfect on-board soware and take over the control Pleban et al[23] presented analysis details on the insecure WiFi network andOS user management of the Parrot AR Drones Also researchersdemonstrated a hijacking of DJI consumer drones by emulatingfake GPS signals using low-cost soware dened radio tools [11]It is also possible to inject MAVLink message into a radio link bymodifying the radio rmware and hijack a ying drone [9] whichwe reproduced for our case study Javaid et al [15] addressed somevulnerabilities of wireless communications channels in unmannedaerial vehicles Commercial airplanes are also facing with suchsecurity problems e Actel ProASIC chip used in early Boeing

ICCPS April 2017 Pisburgh PA USA M-K Yoon et al

787 had a backdoor [6] that could allow an aacker via internetconnection or as a passenger to use entertainment system in theaircra to take over the control of the aircra

Advances in virtualization technologies have enabled VirtualMachine Introspection (VMI) [14] in which a trusted VM or theVMM monitors and analyzes the state of applications or OS runninginside untrusted VMs By placing the detection mechanism outsideof the VM it monitors (ie the untrusted VMs) VMI overcomesthe vulnerability of the traditional host-based intrusion detectionsystems VMIs have been applied to process execution monitor-ing [25] control-ow integrity check [22] virtual memory and diskmonitoring [20] dynamic information ow tracking [29] etc

Hardware-based approaches can also be used to isolate vulnera-ble components ARM TrustZone [28] is an architectural extensionthat allows a coexistence of secure world and normal world usingthe same on-chip hardware Access to certain secure componentsare blocked depending on the execution mode Azab et al [13]proposed TZ-RKP which protects the integrity of operating systemkernel that runs on a normal world by running a security monitorin the secure world Zhou et al [33] use ARM processors memorydomain support for soware fault isolation Yoon et al [31] takesadvantage of the redundancy of a multicore processor a core is usedto monitor the execution time of a real-time application runningon a monitored core It was extended to monitor memory behaviorfor system-wide anomaly detection [32] and to protect in-place se-curity monitoring module [30] ese hardware-based approachesprovide beer security than virtualizations can do because the lat-ter relies on the security and correctness of the VMM which issusceptible to aacks [21] However virtualization-based methodshave advantages in that no hardware modication is needed andthat they are more exible due to the soware control

7 CONCLUSIONIn this paper we presented the VirtualDrone framework as a solu-tion to increasing security threats to unmanned aerial systems euse of this framework allows system designers (or users) to runadvanced ight applications in an untrustworthy environment Ourprototype implementation requires a minimal eort to build theframework on an o-the-shelf platform with open-source sowarestack rough case studies we demonstrated that the frameworkprovides an integrated way to handle various security threats thatwould otherwise have required potentially conicting requirementsNevertheless there still remains challenges for practical use of theframework We used a full-featured autopilot for both normaland safety controllers in the current implementation simply for ademonstration purpose only It is desirable to run a fully-veriedcontrol soware in the SCE Hence we plan to adopt and implementa high-assurance controller

REFERENCES[1] ArduPilot Autopilot Suite hpwwwardupilotorg[2] Emlid NAVIO+ hpsdocsemlidcomnavio[3] LibVMI hplibvmicom[4] QEMU hpwikiqemuorg[5] Raspberry PI 2 Model B

hpswwwraspberrypiorgproductsraspberry-pi-2-model-b[6] Cyber-aack concerns raised over Boeing 787 chiprsquos rsquoback doorrsquo e Guardian

hpswwwtheguardiancomtechnology2012may29cyber-aack-concerns-boeing-chip

[7] 3DRrsquos Solo Drone Boasts Dual Linux Computers Run-ning Dronecode hpswwwlinuxcomnews3drs-solo-drone-boasts-dual-linux-computers-running-dronecode

[8] A hacker developed Maldrone the rst malware for drones Se-curity Aairs hpsecurityaairscowordpress32767hackingmaldrone-malware-for-droneshtml

[9] Hijacking drones with a MAVLink exploit hpdiydronescomprolesblogshijacking-quadcopters-with-a-mavlink-exploit

[10] alcomm Goes Ubuntu for Drone Reference Platform hpswwwlinuxcomnewsqualcomm-goes-ubuntu-drone-reference-platform

[11] Watch GPS Aacks at Can Kill DJI Drones Or Bypass White HouseBan Forbes hpwwwforbescomsitesthomasbrewster20150808qihoo-hacks-drone-gps26431a2853fe

[12] Intel Aero Compute Board hpwwwintelcomcontentwwwusentechnology-innovationaerial-technology-overviewhtml

[13] Ahmed M Azab Peng Ning Jitesh Shah an Chen Rohan Bhutkar GuruprasadGanesh Jia Ma and Wenbo Shen 2014 Hypervision Across Worlds Real-timeKernel Protection from the ARM TrustZone Secure World In the ACM Conferenceon Computer and Communications Security

[14] Tal Garnkel and Mendel Rosenblum 2003 A Virtual Machine IntrospectionBased Architecture for Intrusion Detection In the Network and Distributed Sys-tems Security Symposium

[15] Ahmad Y Javaid Weiqing Sun Vijay K Devabhaktuni and Mansoor Alam 2012Cyber security threat analysis and modeling of an unmanned aerial vehiclesystem In the IEEE Conference on Technologies for Homeland Security

[16] Andrew J Kerns Daniel P Shepard Jahshan A Bhai and Todd E Humphreys2014 Unmanned Aircra Capture and Control Via GPS Spoong Journal ofField Robotics 31 (2014)

[17] Jiuxing Liu Wei Huang Bulent Abali and Dhabaleswar K Panda 2006 High Per-formance VMM-bypass IO in Virtual Machines In the USENIX Annual TechnicalConference

[18] Y Mo and B Sinopoli 2015 Secure Estimation in the Presence of IntegrityAacks IEEE Trans Automat Control 60 4 (2015) 1145ndash1151

[19] Miroslav Pajic James Weimer Nicola Bezzo Paulo Tabuada Oleg Sokolsky InsupLee and George J Pappas 2014 Robustness of Aack-Resilient State EstimatorsIn the ACMIEEE International Conference on Cyber-Physical Systems

[20] Bryan D Payne Martim Carbone and Wenke Lee 2007 Secure and FlexibleMonitoring of Virtual Machines In the Annual Computer Security ApplicationsConference

[21] Gabor Pek Andrea Lanzi Abhinav Srivastava Davide Balzaroi Aurelien Fran-cillon and Christoph Neumann 2014 On the Feasibility of Soware Aackson Commodity Virtual Machine Monitors via Direct Device Assignment In theACM Symposium on Information Computer and Communications Security

[22] Nick L Petroni Jr and Michael Hicks 2007 Automated Detection of PersistentKernel Control-ow Aacks In the ACM Conference on Computer and Communi-cations Security

[23] Johann-Sebastian Pleban Ricardo Band and Reiner Creutzburg 2014 Hackingand securing the ARDrone 20 quadcopter investigations for improving thesecurity of a toy In the SPIEMobile Devices andMultimedia Enabling TechnologiesAlgorithms and Applications

[24] Lui Sha 2001 Using Simplicity to Control Complexity IEEE Sow 18 4 (2001)20ndash28 DOIhpdxdoiorgdxdoiorg101109MS2001936213

[25] Deepa Srinivasan Zhi Wang Xuxian Jiang and Dongyan Xu 2011 Process Out-graing An Ecient rdquoout-of-VMrdquo Approach for Fine-grained Process ExecutionMonitoring In the ACM Conference on Computer and Communications Security

[26] Nils Ole Tippenhauer Christina Popper Kasper Bonne Rasmussen and SrdjanCapkun 2011 On the Requirements for Successful GPS Spoong Aacks In theACM Conference on Computer and Communications Security

[27] X Wang N Hovakimyan and L Sha 2013 L1Simplex Fault-tolerant controlof cyber-physical systems In the ACMIEEE International Conference on Cyber-Physical Systems

[28] Peter Wilson Alexandre Frey Tom Mihm Danny Kershaw and Tiago Alves2007 Implementing Embedded Security on Dual-Virtual-CPU Systems IEEEDes Test 24 6 (Nov 2007) 582ndash591

[29] Heng Yin Dawn Song Manuel Egele Christopher Kruegel and Engin Kirda 2007Panorama Capturing System-wide Information Flow for Malware Detection andAnalysis In the ACM Conference on Computer and Communications Security

[30] Man-Ki Yoon Mihai Christodorescu Lui Sha and Sibin Mohan 2016 eDragonBeam Framework Hardware-Protected Security Modules for In-PlaceIntrusion Detection In the ACM International Systems and Storage Conference

[31] Man-Ki Yoon Sibin Mohan Jaesik Choi Jung-Eun Kim and Lui Sha 2013SecureCore A Multicore-based Intrusion Detection Architecture for Real-TimeEmbedded Systems In the IEEE Real-Time Embedded Technology and ApplicationsSymposium

[32] Man-Ki Yoon Sibin Mohan Jaesik Choi and Lui Sha 2015 Memory Heat MapAnomaly Detection in Real-Time Embedded Systems Using Memory BehaviorIn the ACMEDACIEEE Design Automation Conference

[33] Yajin Zhou Xiaoguang Wang Yue Chen and Zhi Wang 2014 ARMlockHardware-based Fault Isolation for ARM In the ACM Conference on Computerand Communications Security

VirtualDrone Architecture for Aack-Resilient UAS ICCPS April 2017 Pisburgh PA USA

A ACTUATOR VIRTUALIZATION

IO Proxy

PWM Generator(PCA9685)

TrustedController

Motor Driver

Motor Interface

Virtual Motor Driver

Hardware

Host OSI2C

UntrustworthyController

Motor Interface

Security amp Safety Monitor

NCE (VM) SCE (Host)

MotorThread

Host-Guest Communication

Motors 0123

Figure 16 Actuator virtualization in the VirtualDroneframework

Figure 16 shows how an actuator is virtualized in the Virtual-Drone framework which is similar to the sensor virtualizationexplained in Section 33 e controller running in the NCE com-putes a set of PWM (Pulse Width Modulation) output values tocontrol the motors of the vehicle e controller writes these valuesto the virtual motor driver through the motor interface It transfersthe data to an IO proxy thread that relays the PWM values to themotor driver in the SCE e motors are nally actuated by analogsignals converted by the on-board speed controller

B DETAILS ON VIRTUALIZATIONSensors e following describes how the sensors are virtualizedin our prototype implementationbull Inertial Measurement Unit (MPU9250) e device driver run-

ning on the host retrieves a raw IMU data (14 bytes) every 1ms through SPI However every 5th sample is actually used forcontrol (hence the eective control frequency is 200 Hz) edata includes a 3-axis gyroscope and 3-axis accelerometer values

bull Barometer (MS5611) is sensor measures the barometric pres-sure and temperature e driver runs a state machine thatoperates at a frequency of 25 Hz A raw data (24 bits) retrievedfrom the sensor through I2C is converted to either pressure ortemperature value depending on the state (8 bits)

bull Compass (AK8963) It measures terrestrial magnetism in the 3axes at a frequency of 50 Hz using I2C Total 24 bytes (includingper-axis calibration factor) of raw data are fed to the NCE

bull Analog-to-Digital Converter (ADS1115) It measures the voltageson 6 ADC channels It reads each channel every 600 ms throughI2C For each channel a data of 40 bits (8 bits for channel ID and32 bits for sampled data) is transferred to the VM

bull GPS (u-blox NEO-M8) It provides the current longitude latitudeand altitude of the vehicle the time information (current millisec-ond time of week) etc e driver reads UBX protocol messagesfrom the u-blox GPS receiver through SPI parses each one andthen obtains the above information e parsing is stateful anda aer-parsing data can be at most 1K bytes It is fed to the NCEat the frequency of 5 Hz

Actuator For the motor actuation the virtual controller in theNCE sends the PWM values (for the four motors) to the host at thefrequency of the main control loop (ie 200 Hz)

Radio Control Input A remote control via radio link is used tomanually control (armdisarm ight maneuver) the quadcoptere raw input pulses are retrieved through DMA (Direct MemoryAccess) at 1666 Hz About every 18 ms (ie 55 Hz) a new set ofPWM values representing the stick and switch movements (total 8channels) becomes available As done for the sensors mentionedabove the IO proxy runs an RC feeding thread However insteadof feeding the raw pulse data we send the processed data ie thePWMs in order to avoid the overhead due to feeding the raw dataat such a high frequency (1666 Hz)

C ATTITUDE CONTROL AND ERROR BOUND

Time (s)50 55 60 65 70 75 80 85

Rol

l Pi

tch

Yaw

Erro

rs

-25000

-20000

-15000

-10000

-5000

0

5000

10000

15000

20000

25000RollPitchYaw

Time (s)50 55 60 65 70 75 80 85

RC

Inpu

t (PW

Ms)

800

1000

1200

1400

1600

1800

2000

2200RollPitchThrottleYaw

Drone hit the ground

Switched to SCE

Figure 17 e roll pitch yaw errors (top) measured duringthe dronersquos extreme movements e bottom plot shows theroll pitch throttle and yaw targets set by the pilot using theremote controller

e APM uses a double-loop PIDP control to stabilize the quad-copter e Angle loop aka the outer loop controls the aitudeof the vehicle e Angle loop utilizes a P control to achieve thedesired aitude by outpuing a desired angular speed ie the an-gular speed setpoint to the Rate loop aka the inner loop eAngle looprsquos output ie the angular speed setpoint is proportionalto the dierence between the target angle value set by the pilot(or autopilot when in autonomous ight mode) and the measuredangle value from the IMU sensor e Rate loop controls the aituderates of the aircra e Rate loop continuously calculates an errorvalue as the dierence between the angular speed setpoint and themeasured angular speed from the IMU sensor A PID control is

ICCPS April 2017 Pisburgh PA USA M-K Yoon et al

utilized in Rate loop to minimize the error over time by outpuingPWM signals to control motors

For the thresholds on the errors we used plusmn20 000 (radsec) forroll and pitch and plusmn10 000 (radsec) for yaw e switching logicactivates when the violation happens three times consecutivelyWe obtained these bounds on the errors by measuring from bothnormal and extreme movements of the prototype drone e topplot in Figure 17 shows those errors measured during the dronersquosextreme movements and the boom plot shows how the pilot cre-ated the movements e result indicates that the errors are wellbounded even when the drone experiences such movements epilot intentionally made the drone hit the ground at time between75 sec and 76 sec aer which the control is switched to the SCEWe did not aempt to nd optimal thresholds e smaller thethreshold is the easier it is for the SCE to recover to a stable stateHowever at the same time it could create more false positives

D DETECTION OF HIJACKING ATTEMPT

(a) LegitimateTim

e

Vehicle GCS

hellip

Attacker

hellip

Unexpected

Time

VehicleGCS

hellip

(b) Hijacking attempt

Figure 18 (a) MAVLink messages exchanged between theGCS and the vehicle for waypoint setup (b) e legitimateGCS can detect the attackerrsquos update on the vehicles routeas the vehiclersquos responses are unexpected

In order for a GCS to set waypoints for a vehicle a series ofMAVLink messages are exchanged Figure 18(a) shows the MAVLinkwaypoint protocol e GCS rst sends MISSION COUNT(N) to thevehicle where N represents the number of waypoints that it willset e vehicle prepares for receiving the N waypoints and thenrequests for each waypoint by sending MISSION REQUEST(i) untilall the waypoint locations are received

Note that both the legitimate GCS and the aacker need to followthis protocol to set any waypoints From the vehiclersquos perspectivethe initialization requests (ie MISSION COUNT(N)) from them areindistinguishable at is the vehicle itself cannot detect suspiciousrequests for a route change However the fact that the aacker canreceive messages from the vehicle means that the legitimate GCScan also hear what the vehicle responds to the aackerrsquos requestAs Figure 18(b) shows the legitimate GCS can detect the aackerrsquosupdate on the vehiclersquos waypoints when it receives unexpectedMISSION REQUEST messages as it did not initialize the message ex-change Due to such stateful communication the MAVLink protocolenables detecting other types of suspicious aempts (eg changingcontrol parameters) as well

E GEO-FENCE ATTACK ROOTKITWe developed a rootkit that disables the geo-fence and sends thevehicle into a no-y zone e rootkit nds the APM process andthen modies itsmemory that stores (i) the ag that enablesdisablesthe geo-fencing and (ii) the list of waypoints ese are loadedfrom the APM conguration le (varAPMArduCopterstg) onits startup and buered in the memory

Waypoint 3Waypoint 2

Waypoint 4

Geo-fence enabled

Figure 19 ewaypoint list and geo-fence enable ag storedin the memory of APM process An attacker who gained aroot-level access canmodify thesememory values to disablethe geo-fence and then send the drone to a new location

Figure 20 e rootkit that disables the geo-fence and modi-es the ight plan by manipulating the APMrsquos memory

One can change these values remotely through radio which how-ever is easy to prevent since radio communication can be monitoredeasily Modifying the buered values in the memory is dicult toprevent especially if the aacker has gained a root access e mem-ory locations of these data can be easily found if the source codeor the executable binary is available Figure 19 shows the memorydump of the waypoint list and geo-fence enable ag Figure 20shows how these values are modied by the rootkit

  • Abstract
  • 1 Introduction
  • 2 Background
  • 3 VirtualDrone Framework
    • 31 High-level Framework
    • 32 Assumptions and Adversary Model
    • 33 Virtual Sensing Actuation and Communication
    • 34 Security and Safety Monitoring
      • 4 Implementation
      • 5 Experiments
        • 51 Case Study
        • 52 Discussion
          • 6 Related Work
          • 7 Conclusion
          • References
          • A Actuator Virtualization
          • B Details on Virtualization
          • C Attitude Control and Error Bound
          • D Detection of Hijacking Attempt
          • E Geo-Fence Attack Rootkit
Page 2: VirtualDrone: Virtual Sensing, Actuation, and ... · Figure 1: Simplex architecture. the so›ware environment, in conjunction with the increased capa-bilities and complexities of

ICCPS April 2017 Pisburgh PA USA M-K Yoon et al

but with a higher exibility due to soware control e virtualiza-tion of sensor actuator and communication is the key element ofthe VirtualDrone framework We virtualize these devices to pro-tect them from potential threats on the integrity and availabilityby abstracting away low-level details and by controlling accessese virtual communication also enables an authorized operator tooverride suspicious behaviors of the normal control environmentby providing a hidden communication channel e virtualizationalso allows for the use of a rich set of existing security techniquessuch as virtual machine introspection [14] Furthermore multicoreprocessors which become more prevalent in modern embeddedcomputing systems enable concurrent execution of the normal andsecure control environments and also run-time safety and securitymonitoring eciently on the same chip

Our paper makes the following contributions

bull We introduce a novel framework VirtualDrone a soware ar-chitecture that enables a cyber aack-resilient UAS platformby safeguarding critical system resources using a virtualizationtechnique on a multicore processor

bull We implemented the framework on a prototype quadcopter usingan o-the-shelf embedded computing board that runs a quad-core processor with hardware-assisted virtualization Our im-plementation aims to use existing open-source soware stackswithout any modications to the host and guest operating sys-tems as well as the virtual machine monitor

bull We present case studies to illustrate the eectiveness and versa-tility of the framework rough experimental validations wedemonstrate how the framework provides an integrated platformto defend against various types of aacks

2 BACKGROUNDModern UAS Computing Platform General-purpose operat-ing systems especially Linux-based OS variants are becomingthe leading OS for intelligent vehicles [7 10] enabling the indus-try to promote more intelligent applications anks to manufac-turing advancement embedded systems can run on light-weightcomputing platforms such as Raspberry Pi [5] alcomm Snap-dragon ight control board [10] and Intelrsquos Aero board [12] Manycomputation-intensive applications such as computer vision andcomplex navigation programs can now run onboard to unleashadvanced capabilities of modern UAS computing platforms Appli-cations developed for general-purpose systems can also be portedto these platforms with minimal migration eorts Moreover thesesystems provide convenient networking interface such as WiFi andcellular network which increases connectivity and usability of theplatforms Meanwhile many UAS applications are community-supported open-source applications [1] ey allow for adding newfeatures tuning the performance etc However the open nature of

SafetyController

Complex Controller

SafetyDecision Module

Physical SystemActuators

SensorsSensor dataSensor data

Actuation

Figure 1 Simplex architecture

the soware environment in conjunction with the increased capa-bilities and complexities of the modern UAS platforms inevitablyintroduce more security vulnerabilities to UAS

Simplex Architecture e Simplex architecture [24 27] shownin Figure 1 is a soware solution that enables the use of a high-performance (with the purpose of system performance optimiza-tion) potentially unveriable controller (due to complex sowarestructure) in a safe manner a high-assurance control is guaranteedeven when the complex controller fails due to for example sowarebugs or unreliable logic is is achieved by running a safety con-troller which has a limited level of performance but is robust inparallel Sensor data from the physical system is fed to both con-trollers each of which individually computes actuation commandsusing their own control logic Under normal circumstances thephysical plant is driven by the complex controller e safety deci-sion module plays a critical role in assuring the safety of the systemit continuously monitors physical states of the plant and checkssafety violations determined by a safety envelope If such a viola-tion is detected the control is transferred to the safety controllerto guarantee a continuous and robust control of the system

3 VIRTUALDRONE FRAMEWORKe increasing security challenges posed on the modern UAS plat-forms make it infeasible to completely secure them because thereexist many entry points that are vulnerable to potential securityaacks e main idea that we propose in this paper is that of asoware framework to achieve an aack-resiliency e frameworkisolates a normal but untrustworthy execution environment from atrusted one that (i) manages real IO operations (ii) continuouslymonitors for detection of security and safety violations by the for-mer and (iii) takes back the control of the physical system in suchan event We achieve this by taking advantage of modern embed-ded processor that features virtualization technology and increasedcomputing power due to multiple cores

31 High-level Frameworke VirtualDrone framework runs two separate control environ-ments that provide dierent levels of functionalities and capabilitiesand thus require dierent degrees of protection

Normal Control Environment (NCE) It corresponds to the com-plex controller in the Simplex architecture (see Figure 1) that runssoware components for any normal function of UAS is includesadvanced ight and mission controls and supplementary sowaresuch as image processing and networking applications ese typ-ically require external networking (which could be insecure) forstatus reporting data transfer administration etc Also oen theyare complex third party-developed andor subject to frequent up-datesupgrades which hinders pre-verication or certication onthem Hence these types of soware components running in theNCE are more susceptible to security threats

Secure Control Environment (SCE) It runs a minimal set ofsoware components that are critically required to control the UASeven when the normal environment is completely taken over by anadversary and does not function A security and safety monitoringmodule in the SCE thus not only monitors the physical state of thesystem but also implements a set of security monitors to detectpotential security violations e soware components runningin the SCE are static since they are designed for safety purpose

VirtualDrone Architecture for Aack-Resilient UAS ICCPS April 2017 Pisburgh PA USA

Initialization

Time

Initialization

Secure Control Mode

Ready

Control Control

Control Control Control

Normal Control Mode

SCE

NCE

Secure Control Mode

Control

Control

Violation

Active Active

Inactive

Security and Safety Monitoring

Figure 2 Switching between the SCE and the NCE

and thus require simple soware structure and that a signicantamount of analysis is carried out post-designimplementation Alsothey require no or infrequent updates once deployed

We call the system is in virtual control mode if the system isdriven by the controller running in the NCE (ie virtual machine)By contrast the system is in host control mode if the system isdriven by the trusted controller in the SCE (ie on the host) Innormal circumstances the system is in the virtual control mode(ie NCE) as illustrated in Figure 2 providing the user with the fullfunctionality Upon detection of the event of a security or safetyviolation the SCE takes back the control of the system in order tooverride the malicious behavior and to maintain the system in acontrollable state

Figure 3 presents the high-level overview of the VirtualDroneframework e key components in the framework are (i) the virtualmachine that sandboxes the full-featured but untrusted operationsincluding the control and other applications (eg mission imagingnetworking) (ii) the virtualized sensors (eg inertial-measurementunit) actuators (eg motors) communication channel (eg teleme-try with the ground station) for use by the normal environment(iii) the interface between the real IO devices and the virtualizedones (iv) the security and safety monitor that continuously moni-tors on the logical and physical behaviors of the system driven bythe normal environment and lastly (v) the trusted controller for arobust backup and recovery It should be noted that the controllerrunning in the NCE could have been fully veried However itis deemed untrustworthy because of potential direct and indirectthreats by other soware components residing together

e VirtualDrone framework benets from a multicore processorby being able to run the normal and secure environments in parallele laer can continuously perform safety and security checksand real IO operations while the former is carrying out its normaloperations which are not possible on a single core processor

32 Assumptions and Adversary Modelbull Since we utilize a virtualization technique for the isolation of

potentially untrustworthy soware components the virtual ma-chine monitor is our trusted computing base

bull e SCE does not use the external network (ie Internet) becauseas explained above the soware components in the SCE are staticIf needed any updates to the SCE require physical accesses tothe hardware over-the-air management is not allowed

bull Inside the virtual machine an adversary may breach any part ofthe soware stack (the OS kernel run-time libraries le systemuser applications) and can even have root-level access (in theVM) and thus have full control of any soware running in theVM is would enable the aacker to create a backdoor andeven replace applications with maliciously modied ones byexploiting vulnerabilities or social-engineering techniques

Host OS

Hardware

TrustedController

Sensors Actuators

Peripheral Interfaces

Virtual Sensorsamp Actuators amp

Communication

Guest OS

IO Proxy

Secure Control Environment (Host)

Security amp Safety Monitor

Normal Control Environment (VM)

Netw

ork

Communication

Untrustworthy Controller amp

Apps

Figure 3 Overview of the VirtualDrone Framework

bull We do not consider physical aacks [16 26] such as GPS spoof-ing against the hardware Such aacks can be handled by control-theoretic approaches such as [18 19]

33 Virtual Sensing Actuation andCommunication

e key requirement for sound functioning of the VirtualDroneframework is a clear separation between the normal and securecontrol environments Otherwise an aacker may take over thetrusted controller or the monitoring module so that they could notfunction properly when needed It is also crucial to protect thesensors and actuators from the untrustworthy components in theNCE as the aacker may degrade their availability or even corruptthem so that the entire system operates with incorrect informationon the physical state Hence we use a virtualization techniqueto isolate the NCE from what we need to protect ie the SCEe NCE which runs potentially untrustworthy components issandboxed in a virtual machine ey see a controlled environmentcongured by the secure side that has a direct control on the systemresources

Virtual Sensing and Actuation One of the key functions of theSCE is to protect the sensors and actuators Our framework does notallow the NCE to directly access such devices (eg passthrough IO[17]) because of potential security risks Instead as typically done invirtualization the IO operations tofrom the devices are emulatedMost sensors and actuators that we can nd from UAS are typicallyinterfaced through certain on-board peripheral communicationprotocols such as SPI (Serial Peripheral Interface) and I2C (Inter-Integrated Circuit) Hence one possible way is to implement back-end drivers for such common protocols at the virtual machinemonitor (VMM) layer so that the applications running in the NCEcan transparently use the (front-end) drivers already provided bythe guest OS However this approach poses signicant challengesto security and complexity for the following reasons

bull An aacker running in the NCE might recongure some sensordevices (eg changing the sampling rate or gain) in use Hencewe would need a proper way to lter out impermissible IO trans-actions from the NCE is requires the emulation interface tohave a comprehensive map of device registers that species writeand read permissions for the NCE Furthermore some permis-sion assignments may need to change dynamically depending

ICCPS April 2017 Pisburgh PA USA M-K Yoon et al

IO Proxy

Inertial Measurement Unit (MPU9250)

TrustedController

MPU9250 Driver

IMU Interface

IMU Raw Data

Receiver

Hardware

Host OSSPI

UntrustworthyController amp Apps

IMU Interface

Security amp Safety Monitor

NCE (VM) SCE (Host)

IMU Feeder Thread

Host-Guest Communication

Figure 4 Sensor virtualization in the VirtualDrone frame-work

on the current high-level context of each IO operation which ishidden in the low-level IO emulation

bull e aacker may even aempt denial-of-service aacks on theshared devices by simply keeping them busy

bull Allowing low-level IO transactions also requires a tight syn-chronization between the NCE and the SCE because some IOoperations are stateful For instance a compass sensor used inour prototype performs a register read in two stages ndash the devicedriver initializes a read by writing the read address waiting for10 ms and then collecting the data GPS parsing is also donewith a state machine Without a proper synchronization thestate of the device could be lost due to interleaving transactionsfrom the NCE and the SCE An aacker in the NCE could usethis very property to hinder a timely correct use of sensor databy the SCE (eg aacker may reinitialize a sensor while the SCEis waiting for a sample) If a synchronization is to be enforcedthe availability could signicantly degrade because the deviceshould be locked for a long time to serve one at a timeTo solve the challenges illustrated above we take a more passive

approach to sensor and actuator virtualization e frameworkruns an IO proxy for each device in the SCE that feeds sensor datato the NCE is is a suitable mechanism because of the periodicnature of their operations and the small data sizes that we cannd from typical sensor and actuator devices on UAS platforms(see Table 1 in Section 4) Since it is known and xed how oeneach sensor data should be sampled the IO proxy only needs tomake sure that the SCE feeds the sensor data in time It feeds rawsensor data instead of processed ones so that the applications inthe NCE can process them as needed From the perspective ofthe NCE this sensor feeding looks as if the data is sampled frominvisible inaccessible devices (ie virtual sensors) Hence the SCEcan also remove certain side-channels (eg radio signal strengthindicator) present in sensor information by not providing it to theNCE especially if this would not degrade the normal functionalityof the NCE

Figure 4 illustrates how an IMU (Inertial Measurement Unit)sensor is virtualized in our prototype based on an open-sourceautopilot suite [1] A user-level device driver (MPU9250 Driver)uses the SPI interface to fetch raw IMU data e IMU IO proxyruns a feeder thread which sends the current sample to the rawdata receiver running inside the NCE through a host-to-guest com-munication interface e receiver behaves as a device driver from

GCS

Controller

ControllerApp

Switch

NCESCE

Hidden Channel

Telemetry Analyzer

Radio Transceiver

(eg Switch to SCE and Return to Home)

Monitors NCErsquos Telemetry Data

Figure 5 Telemetry virtualization creates a hidden commu-nication channel between the SCE and the GCS

which the higher-level interface (ie IMU interface) can fetch sen-sor data without needing to know the particular model of the realdevice Hence no modications are needed in the higher layersActuators (eg motors) are virtualized in a similar way as explainedin Appendix A

Virtual Communication Applications running in the NCE re-quire network communication with the external world for datatransfer remote management update etc Hence as shown inFigure 3 the NCE allows users to directly access into the NCEthrough for example a port forwarding mechanism provided bythe VMM However there exist some communication channels thatneed to be managed by the SCE ndash the ground control and the remotecontroller

e ground control application utilizes a radio communicationchannel to establish a telemetry transfer between the ground con-trol station (GCS) and a vehicle e telemetry data such as theGPS location and sensor measurement can be monitored at theGCS It can also use telemetry to dynamically control the vehicleby sending commands for seing new waypoints landing armingetc However this communication channel can be exploited by anadversary who can simply disconnect the channel by disabling theradio driver Hence we virtualize the telemetry communicationchannel as done for the sensor and actuator

e key benet of this mechanism is that it can create a hiddencommunication channel for the SCE as illustrated in Figure 5 Forexample the GCS can send a special command to the SCE egswitching to the SCE and returning to the home which is lteredby the telemetry analyzer (part of the telemetry IO proxy) thatinspects every incoming message ese hidden messages are notrelayed to the NCE We take advantage of this mechanism as asolution to drone hijacking scenario presented in Section 51 upona detection of a hijacking aempt the GCS commands the SCEto switch to the host control mode and to return to where it islaunched We can use the same mechanism to reboot the virtualmachine (aer the control is switched to the SCE) from the GCSwhen a suspicious behavior is observed Note that an aacker cansend these special commands Hence such commands should bechosen carefully in such a way that a successful aempt cannotlead to a safety hazard

A hand-held remote controller (see Figure 11 in Section 5) is usedby a human pilot to wire-lessly y a vehicle e communicationis also carried via a radio link (eg 24 GHz) It is virtualized inthe same fashion as the telemetry radio and we can also create ahidden channel For instance in our prototype implementation webind one of the switches of the remote controller with the functionthat tells the VirtualDrone to switch to the SCE e pilot usesthis function to manually control the vehicle when the NCE-drivenvehicle shows abnormal behavior

VirtualDrone Architecture for Aack-Resilient UAS ICCPS April 2017 Pisburgh PA USA

Security amp Safety Monitor

Geo-fence

Sensor Data(IMU GPS Battery hellip)

Telemetry Command from GCS

Telemetry Report from NCE

Actuation Command from NCE

Attitude Errorfrom SCEVMI Fake Report

Detector

Safety Monitor

Command to SCE(Switch RTL hellip)

Figure 6 Example conguration of the security and safetymonitor

34 Security and Safety MonitoringFigure 6 shows an example conguration of the security and safetymonitor and data ow based on the prototype implementation pre-sented in Section 4 Notice from the gure (and also from Figure 4)that the monitor receives the sensor data for analysis Becausethe data are fetched from the trusted environment the monitoris guaranteed to use the true measurement for a safety analysisHence we can detect aacks that for example try to put the vehiclein an open-loop state or to set wrong control parameters In ourprototype quadcopter we analyze the aitude (ie roll pitch andyaw) errors which are bounded in normal conditions to detect anunsafe physical state One can also implement a control-theoreticanalysis [27] e monitor also analyzes the actuation outputs fromthe NCE as shown in Figure 16 in Appendix A to prevent potentialsafety violations For example the monitor can upper-bound onthe motor outputs to prevent motor failure due to the aackerrsquos at-tempt to apply abrupt voltage changes e monitor can also checkif it receives actuation commands from the NCE at the denedfrequency ndash abnormal paerns could be an indicator of a potentialsecurity breach In order to handle physical aacks to the sensorsone can also implement a sensor aack detection technique [18 19]using the true measurements available in the SCE

e SCE also inspects communications between the NCE andthe external world e telemetry analyzer shown in Figure 5 inter-cepts radio telemetry messages to and from the NCE and providesthem to the monitoring module for analysis Using this mecha-nism one can detect an aacker that for example sends out fab-ricated messages (eg ight path report replayed or generated bya soware-in-the-loop simulation) in an aempt to misinform theground control station about the true physical and logical states

e monitoring module can also host critical safety measuresthat otherwise would run at the same layer as untrustworthy ap-plications For instance geo-fencing typically runs as a part of anautopilot soware An aacker can simply disable it or modify theconguration to y the vehicle into a no-y-zone Since this typeof function does not require external interaction it can run in theSCE using the true sensor measurements (eg GPS location)

Virtualization also enables the use of virtualization-based secu-rity measures for instance virtual machine introspection (VMI) [14]e monitoring module in the SCE can implement various VMItechniques to monitor the behavior of the applications and the guestOS running in the NCE For example through interfaces providedby the VMM the module can continuously check the integrity ofthe kernel code andor its critical data structures (eg interruptvector table process and module lists) for detection of rootkits andinspect network connections and packets for detection of back-doors and so on Upon a detection the framework may switch tothe SCE as a preventive action from which moment comprehensive

Navio+(Sensor board)

Raspberry PI 2(Quad-core ARM Linux)

GPS

Telemetry Radio (915MHz) Radio Receiver for

Remote Control (24GHz)

Figure 7 adcopter prototype implementation with Rasp-berry Pi 2 and Navio+ sensor boards

Security amp Safety Monitor

Virtual Machine (QEMU)

Linux

Hardware

ArduPilot

IMU Barometer

Compass

Motors RC

DMASPI I2C

Virtual Sensorsamp Actuators amp

Communication

Linux

ArduPilot

IO Proxies

Host User Space

ADC

KVM

HW

AppApp

Net

Network

Port-

Forw

ardi

ng

IC

RG

AM

Nav

io+

GPSTelemetry

Radio

Serial

App

B

TSock

et

Seria

lPor

t

WiFi

Figure 8 VirtualDrone implementation on the prototype

security analyses (eg deep memory scan rebooting VMs) can takeplace without losing control of the vehicle

4 IMPLEMENTATIONIn this section we present the implementation details for our proto-type of the VirtualDrone framework on a quadcopter drone shownin Figure 7 running an open-source autopilot on an embeddedcomputing board

System Implementation We implemented theVirtualDrone frame-work on a Raspberry PI 2 Model B (RPI2) board [5] as depictedin Figure 8 It has a quad-core ARM Cortex-A7 CPU each coreof which runs at 900 MHz and has a main memory of 1 GB eprocessor features the ARM Architecture Virtualization ExtensionIt enables running VMs with unmodied guest OS using KVM(Kernel-based Virtual Machine)

On the host we run Linux 318 No modication was made tothe kernel except that we enabled virtualization with KVM in theconguration On top of the host OS we run unmodied QEMUv23 [4] an open-source virtual machine monitor As explainedin Section 32 QEMU ie the VMM is our trusted computing base(TCB) We created one VM that emulates an ARM Versatile ExpressA15 board (which runs a Cortex-A15 CPU the same ARMv7 ar-chitecture as Cortex-A7) and assigned one of the four cores of theprocessor exclusively to the virtual machine In the virtual machinewe run unmodied Linux 43

We use QEMUrsquos port forwarding mechanism to open an SSH (Se-cure Shell) port on the virtual machine through which a user logsin to launch update manage services and applications More portscan be open to the virtual machine using the port forwarding mech-anism In this paper we assume the QEMUrsquos port forwarding mecha-nism is secure

In our prototype we chose to use Linux as the host OS Howeverit is desirable to use a formally veried OS on the host instead of

ICCPS April 2017 Pisburgh PA USA M-K Yoon et al

Table 1 e rate and amount of data transfer between thesecure and normal control environments

Component Direction Rate SizeIMU Hostrarr VM 200 Hz 14 bytes

Barometer Hostrarr VM 25 Hz 4 byteCompass Hostrarr VM 50 Hz 24 bytes

ADC Hostrarr VM 167 Hz 5 bytesGPS Hostrarr VM 5 Hz Max 1K bytes

Motor Output VMrarr Host 200 Hz 16 bytesRC Input Hostrarr VM 55 Hz 16 bytesTelemetry Hostharr VM Vary Vary

such a general-purpose monolithic kernel Our choice of Linux isto minimize engineering eorts to port VMM autopilot and sensorand actuator device drivers to a new OS Our implementation didnot require any modications to the host OS VMM and guest OS

Autopilot We stack Navio+ sensor board [2] on top of the Rasp-berry PI 2 (as shown in Figures 7 and 8) to provide various sensordata for ight control e NCE (ie the virtual machine) runs theopen-source ArduPilot (aka APM) [1] autopilot suite as the ightcontrol soware for our quadcopter drone APM combines sensordata and RC ight maneuver commands to compute correct inputsfor the four motor-prop units which are sent by the actuator portsof the Navio+ board to drive the actuators

As shown in Figure 8 we run one instance of APM in the SCE(ie the host) e Simplex architecture suggests the use of a robustcontroller for the safety controller in order to handle and recoverfrom physical failures For demonstration purposes we chose touse the APMrsquos default PID controller as the trusted controller In aproduction implementation however a high-assurance controllerwould be used

Virtualization e IO proxy shown in Figures 4 and 8 runsone feeder thread for each sensor Each sensor retrieves a newsample at a xed frequency Each feeder thread then sends thenewly available data to the virtual machine using a host-guestcommunication channel Appendix B explains how the sensorsand the actuators are virtualized in our prototype implementationwhich are also summarized in Table 1

Host-GuestCommunication We use QEMUrsquos virtio-serial fordata transfer between the host (ie IO proxy threads) and guestsystems It creates virtual serial ports in the guest each of whichis mapped to a character device such as Unix domain socket pipeTCPUDP port etc in the host side We created eight virtualserial ports for the components listed in Table 1 e IO proxythreads in the SCE use eight Unix domain sockets to communicatewith the virtual machine One may use other types of host-guestcommunication mechanisms such as shared memory In our im-plementation we aimed to utilize an existing infrastructure thatdoes not require any modication or insertion to the stock QEMUe virtio-serial is adequate enough to handle the low-speedlow-volume data transfer for sensoractuatorcommunication vir-tualization We assume virtio-serial is trustworthy as it is partof QEMU the TCB

Virtual Telemetry e APM uses a serial port (UART) for teleme-try radio transceiver1 Hence the NCE-side APM does not need any1Our prototype copter also supports WiFi and APMrsquos telemetry can be transferredthrough UDP or TCP as well e APM abstracts these away by treating them as UARTcommunication

additionmodication for the virtual telemetry e SCE-side APMreadssends telemetry data fromto the real UART port performs altering (as described in Figure 5) and relays tofrom the virtualmachine using the virtual-serial port mechanism explained abovee APM uses MAVLink protocol (Micro Air Vehicle Communica-tion Protocol)2 MAVLink contains all interface functions to controlthe vehicle monitor states change parameters etc Each MAVLinkmessage size and frequencies vary depending on the message typee messages typically have small size (the maximum is 263 bytes)and low frequency (a few Hz)

5 EXPERIMENTSWe now present case studies that demonstrate how the Virtual-Drone framework can detect and prevent various types of securityand safety violations

51 Case StudyTo demonstrate the eectiveness and versatility of our frameworkwe consider the following ve scenarios Note that we are notproposing new detectionmitigation solutions for the use cases pre-sented here Each scenario could be handled in many dierent waysFor instance hijacking can be easily defeated by a simple authen-tication of the communication We instead intend to demonstratehow an integrated platform ie the VirtualDrone framework candefend against various aack scenarios that would otherwise havebeen handled separately with potentially conicting requirementsWe also note that these aacks can occur in a number of dierentforms In this paper we consider a pessimistic scenario the aackercan know the HWSW conguration and even gain a root accessto the NCE

Attacks on Safety An adversary can launch an aack on thesafety of a vehicle by for example degrading the availability ofcritical sensors (eg IMU) or actuators or the control performance(eg by changing PID gains) e worst-case scenario from thevehiclersquos safety perspective is when the aacker disables the ightcontroller while the vehicle is ying is immediately leads thesystem to an open-loop state which will cause the vehicle to crashTo demonstrate this type of aack we consider an extreme sce-nario in which the ight controller is killed by an aacker eaacker can launch this aack by for example entering through abackdoor replacing the control program with one that self-crashesor installing a rootkit We do not assume specic scenario of howit is launched We implemented a Linux kernel module that 1) ndsthe APM autopilot process from the kernelrsquos process list and then2) kills the process e aacker could achieve the same goal bycausing the virtual machine to crash

ere could be several ways to detect this type of aack One mayuse a heartbeat mechanism which however can be circumvented byan aacker that impersonates the ight controller Instead we takeadvantage of the SCErsquos ability to monitor the true physical state ofthe vehicle We use the aitude control performance measured atthe SCE At each control loop the SCE-side controller calculates theerrors of the rate control on the pitch roll and yaw of the copterDuring a stable ight the rate errors are bounded as shown inFigure 17 in Appendix C because the ight controller is active tominimize the rate errors In case of an open-loop state the ightcontroller cannot work to minimize the rate errors Due to the factthat a multirotor system is naturally an unstable ight platform2hpqgroundcontrolorgmavlinkstart

VirtualDrone Architecture for Aack-Resilient UAS ICCPS April 2017 Pisburgh PA USA

865 87 875 88 885 89 895 90 905 91Time (s)

-10000-7500-5000-2500

0250050007500

10000125001500017500200002250025000

Rol

l Pi

tch

Yaw

Erro

rs

RollPitchYaw

865 87 875 88 885 89 895 90 905 91Time (s)

1000

1100

1200

1300

1400

1500

1600

1700

1800

1900

2000

Mot

or o

utpu

t (PW

Ms)

Motor[0]Motor[1]Motor[2]Motor[3]

Open-loop

Kill ArduPilotprocess

SafetyViolation

Normal Control Mode(NCE)

Secure Control Mode(SCE)

Figure 9 e motor outputs (top) and the roll pitch yawerrors (bottom) measured at the SCE e attacker in NCEkills the ight controller which leads the copter to an open-loop state e SCE takes the control when the errors growbeyond the thresholds aer which the copter is stabilized

the rate errors will increase quickly beyond the normal bounderefore a properly chosen threshold of rate errors can be used indetection of ight safety violations Hence the security and safetymonitoring module in the SCE continuously checks if the errorsgrow beyond the threshold Upon a safety violation the frameworkswitches to the secure control mode Appendix C explains how theAPMrsquos aitude control works and how we obtained the thresholdof rate errors

Figure 9 shows the results of this experiment While the dronewas in the virtual control mode the aacker activated the rootkitmentioned above at time around 888 sec at which moment theAPM process running in the VM is killed e top plot in Figure 9shows the motor outputs (4 channels) from the motor driver in theSCE As we can see the drone was in an open-loop state for about300 ms e boom plot shows the aitude errors also measuredat the SCE e drone becomes unstable (ie the errors are faraway from zero) for a moment because no actuation is applied tothe motors during the open-loop period Upon the detection ofthe violation on the errors (at time around 891 sec) the control isswitched to the SCE from which moment the control loop is closedand the drone returns to a stable state

We also tested a scenario when the control parameters are modi-ed during ight Figure 10 shows the aitude control errors whenthis happens At time around 1643 sec a MAVLink message wassent via radio to change the proportional gain (180 times bigger thanthe original value) of the aitude controller As can be seen thedrone became unstable immediately e safety module detectedthe large roll errors aer which the SCE took the control

Time (s)162 164 166 168 170 172 174

Rol

l Pi

tch

Yaw

Erro

rs

-20000

-10000

0

10000

20000

30000

40000

50000

60000RollPitchYaw

Normal Control Mode

(NCE)

ChangeProportional

Gain

Secure Control Mode(SCE)

Figure 10 e roll pitch yaw errors when the proportionalgain of the attitude controller is set to an abnormally highvalue e SCE immediately stabilizes the drone upon thedetection of the unstable physical state

Hijacking It has been demonstrated that it is possible to hijack adrone by exploiting the MAVLink protocol [9] e idea is to send acommand that sets a new ight plan through the telemetry channele telemetry radio pair of the drone and the ground control station(GCS) distinguish themselves from others by their unique NetIDand the frequency band Hence by using the same NetID and radioband and running the same rmware (which decodes the MAVLinkpackets) as the target vehicle the aacker can send any MAVLinkmessages to the target

To demonstrate this aack scenario we used three telemetryradio (ie for the GCS the drone and the aacker) that utilize thesame frequency band (915MHz) and same default congurationSince the out-of-the-box default NetIDs are same the aackerrsquostelemetry radio did not need any rmware modication3 Figure 11describes the hijacking scenario e drone takes o at the launch-ing point (marked as lsquoTrsquo) and communicates with the GCS locatedat lsquoGrsquo e pilot ies the drone along the normal path e aackerlocated at lsquoArsquo then launches its ground control application en itsends a new waypoint plan to the drone which will send it to thelocation marked as rsquoWrsquo e aacker did not need to modify the3It is possible to nd out the NetID used between the GCS and the drone by modifyingthe rmware [9]

G

T

A

W

T

A

W

A

G

T

Hijack

Ground Control Station

Launching Point

Attacker

Hijacked Drone

Attacker

Figure 11 e attacker (lsquoArsquo) tries to hijack the drone yingalong the normal path and to send it to a newwaypoint (lsquoWrsquo)e attacker uses the same telemetry radio as the GCS andthe drone and unmodied APM Planner GCS

ICCPS April 2017 Pisburgh PA USA M-K Yoon et al

G G

T T

A A

W W

(a) Without VirtualDrone (b) With VirtualDrone

Figure 12 (a) e ight trajectory of the drone hijacked bythe attacker It is sent to new location lsquoWrsquo set by the attacker(b) e attackerrsquos attempt to hijack the drone is detected bythe GCS Upon the detection the GCS sends a special com-mand to the SCE which switches the control mode to theSCE and directs the drone to where it was launched

GCS program (the stock APM Planner 204 with default seings)Figure 12(a) shows the ight trajectory of the drone when it wassuccessfully hijacked by the aacker

While the drone itself cannot detect such a hijacking aemptthe GCS can detect it because of unexpected message exchange initi-ated by the aacker as detailed in Appendix D Hence we addedthe functionality that detects such unexpected messages to ourlegitimate GCS Upon a detection the GCS commands the droneto return to where it was launched as shown in Figure 12(b) istakes advantage of the VirtualDronersquos virtual telemetry explainedin Section 33 the SCErsquos telemetry proxy enables a hidden com-munication channel between the GCS and the SCE through whichthe former sends the drone a pre-dened set of special commandsIn this scenario the command from the GCS overrides the NCErsquosabnormal operation by switching the drone to the secure controlmode Note that the aacker might be able to send the same specialcommand However what it can do at worst is to send the droneback to the home

As explained in Section 34 the virtual telemetry also enables theSCE to detect if the NCE is trying to deceive the ground station Forexample aer a successful hijacking the aacker may report fakeGPS location (by replaying or by generating from SW simulator) tothe GCS so that it looks as if it is ying on the planned path etelemetry analyzer however can detect such aempts by analyzingeach outgoing MAVLink packet and comparing against the truelocation retrieved from the GPS receiver which is also implementedon our prototype

Corrupting Safety Functions Autopilot programs also supportcritical failsafe mechanisms that are activated under certain con-ditions such as losing radio communication signal or low-baeryIt is in fact easy to corrupt such a safety-critical measure becausetypically it can be enableddisabled remotely through a telemetrycommand (hence an aacker can send a command via radio asdone in the hijacking scenario) Moreover such a mechanism isoen implemented as a part of autopilot that runs at the user-levelHence an aacker who has gained a root access can easily corruptit by modifying the conguration le or the memory

4hpardupilotorgplanner2indexhtml

No-fly zone

Original Path

Figure 13 Attacker disables the geo-fence andmodiesWay-point 3 so that the drone ies into a no-y zone Such asafety-critical function can be protected by running in theSCE

In this case study the aacker corrupts the geo-fence mechanismGeo-fence employs positioning data such as GPS signal or localradio-frequency identiers to set up a virtual boundary to preventthe vehicle entering a prohibited zone e vehicle position ismonitored at all times such that before the vehicle enters a no-y zone the system could act accordingly to prevent a geo-fenceviolation Corruption of the geo-fence can result in a catastrophicresult an aacker may disable the geo-fencing and induce thevehicle to y into a congested airspace such as takeo pathwaysfor mid-air collision

To demonstrate this type of aack we developed a rootkit thatdisables the geo-fence of APM during a ight and sends it intoa no-y zone e rootkit executes this aack by modifying theAPMrsquos memory as detailed in Appendix E Our drone was plannedto y through a path (0-1-2-3) in an autonomous mode as shownin Figure 13 During the ight the aacker logged into the systemthrough WiFi and launched the rootkit when the drone was yingtoward Waypoint 2 e new Waypoint 3 set by the rootkit islocated inside a no-y zone and because the rootkit has alreadydisabled the geo-fence the drone consequently ied into the no-yzone deviating from the original path as shown in Figure 13

e SCE of VirtualDrone provides a protected layer at whichsafety-critical functions like geo-fence can be placed We imple-mented a simple geo-fence module in the security and safety mon-itoring module in the SCE It continuously monitors the currentGPS coordinate and checks it against the list of no-y zones alsostored at the SCE layer Upon a violation a pre-dened action istaken In our implementation the SCE takes back the control fromthe NCE and returns to where it was launched as done for thehijacking scenario explained earlier

Side-channel e virtualization of sensor actuator and commu-nication allows for hiding certain types of information from theNCE One of the examples is the RSSI (Received Signal StrengthIndication) that indicates the link quality between a pair of radiotransmier and receiver We especially consider a scenario in whichan aacker tries to estimate the location of the GCS by observingthe RSSI measured between the vehicle and the GCS Due to signalaenuation the radio signal is stronger as the vehicle is closer to theGCS Hence one can correlate the RSSI with the GPS coordinate

VirtualDrone Architecture for Aack-Resilient UAS ICCPS April 2017 Pisburgh PA USA

T

1

2

3

4

G

Lat 401626060Lng -883074907

0 20 40 60 80 100 120 140 160 180Time (s)

100

120

140

160

180

RSS

I

0 20 40 60 80 100 120 140 160 180Time (s)

401615

40162

401625

40163

401635

Latit

ude

0 20 40 60 80 100 120 140 160 180Time (s)

-88309

-88308

-88307

-88306Lo

ngitu

de

Figure 14 e drone ies through T-1-2-3-4-1 e graphsrepresent the RSSI (top) the latitude (middle) and the longi-tude (bottom) An attacker can estimate the location of theGCS by correlating the RSSI and the GPS information

Figure 14 illustrates such a possibility of side-channel e graphsin the gure represents the RSSI (between the drone and the GCS)and the GPS coordinate (latitude and longitude) measured whilethe drone ies through a path (T-1-2-3-4-1) If the aacker is able toobtain these RSSI information heshe can estimate the location (ora region) of the GCS by nding when the RSSI is high e resultsshow quite accurate estimation of the true GCS location (shown inthe map) A complex algorithm will allow for further narrowingdown the location e VirtualDrone framework eliminates thispossibility by not providing the RSSI information to the NCE Notethat RSSI is needed only for the SCE (eg switches to the SCEand then performs a pre-dened operation such as return-to-homewhen RSSI is low due to the loss of telemetry link) Furthermorebecause of the telemetry virtualization the NCE cannot even knowif the telemetry is communicated through a radio channel or anetwork (eg WiFi) In case of the network-based telemetry theSCE can even hide the IP address of the GCS

Virtual Machine Introspection Many rootkits modify criticalkernel data structures to intercept sensitive data hide maliciousprocesses or les etc For a demonstration we implemented a secu-rity module that checks the integrity of the system call table of theguest OS For this we chose to utilize an existing interface providedby QEMU namely the QEMU Machine Protocol (QMP) It allows host-side applications to communicate with or control a running QEMUVM We created a QMP Unix socket to which our security modulecan connect During the initialization of the VM the module dumpsthe current system call table and stores this initial state in memoryFrom then on the module regularly dumps the current table andcompares it against the one obtained initially Using this techniquewe were able to detect a known rootkit modhide1 that hijacks theopen call to hide itself from the kernel module list

Note that we are not proposing new rootkit detection methodshere We instead intend to demonstrate how the VirtualDroneframework can handle such a stealthy security violation One canuse a rich set of library for virtual machine introspection such asLibVMI [3] which we leave for future work

52 DiscussionSensor attack e VirtualDrone framework cannot handle phys-ical manipulations on the sensors such as GPS spoong esetypes of aacks are called sensor aack or false data injection aackand typically tackled by control-theoretic approaches [18 19] erequirement however is that the methods themselves should beprotected from cyber-aacks Hence one can implement such a

Time (sec)0 20 40 60 80 100 120 140 160 180

Vo

lta

ge

(v)

105

11

115

12Without VirtualDroneWith VirtualDrone

Figure 15 Voltage drop at the battery for 3-minutes of hov-ering with and without the VirtualDrone framework

technique on the SCE layer specically in the security and safetymonitoring module as it can see the true (but potentially physicallymanipulated) sensor measurements

Power consumption Since UAS typically runs on baery powerwe compare the power consumption of the prototype drone withand without the VirtualDrone framework In order to compare thepower consumption in a controlled environment (eg eliminatingvarying disturbance due to wind) we ew the drone indoors hov-ering it at a xed position We ew the drone for about 3 minuteswith the same fully-charged baery and measured the voltage dropsduring the ight

Figure 15 shows that the VirtualDrone does not impose over-head on the power consumption is is because the majority ofthe power is consumed by the motors to li the copter e powerconsumption by RPI2 board and the Navio+ sensors cannot exceed5 Was which is the upper bound of the power supply by the powermodule at is the power consumption by any on-board comput-ing cannot be more than 5 Was We calculated the average powerof the 3-minutes of ights which ranged between 114 and 118Was Hence the power consumption by any on-board computingcan be ignored Due to the fact that the upper bound of powerconsumption by computing is two orders of magnitude smallerthan that of the motors we conclude that the power consumptionoverhead of running the VirtualDrone is negligible

6 RELATEDWORKCurrent unmanned vehicle systems are very vulnerable to cyber-aacks as demonstrated by recent aacks Maldrone [8] is a so-ware virus that can compromise drones based on ARM Linux sys-tems e malware can open a backdoor in the Parrot AR Dronesinfect on-board soware and take over the control Pleban et al[23] presented analysis details on the insecure WiFi network andOS user management of the Parrot AR Drones Also researchersdemonstrated a hijacking of DJI consumer drones by emulatingfake GPS signals using low-cost soware dened radio tools [11]It is also possible to inject MAVLink message into a radio link bymodifying the radio rmware and hijack a ying drone [9] whichwe reproduced for our case study Javaid et al [15] addressed somevulnerabilities of wireless communications channels in unmannedaerial vehicles Commercial airplanes are also facing with suchsecurity problems e Actel ProASIC chip used in early Boeing

ICCPS April 2017 Pisburgh PA USA M-K Yoon et al

787 had a backdoor [6] that could allow an aacker via internetconnection or as a passenger to use entertainment system in theaircra to take over the control of the aircra

Advances in virtualization technologies have enabled VirtualMachine Introspection (VMI) [14] in which a trusted VM or theVMM monitors and analyzes the state of applications or OS runninginside untrusted VMs By placing the detection mechanism outsideof the VM it monitors (ie the untrusted VMs) VMI overcomesthe vulnerability of the traditional host-based intrusion detectionsystems VMIs have been applied to process execution monitor-ing [25] control-ow integrity check [22] virtual memory and diskmonitoring [20] dynamic information ow tracking [29] etc

Hardware-based approaches can also be used to isolate vulnera-ble components ARM TrustZone [28] is an architectural extensionthat allows a coexistence of secure world and normal world usingthe same on-chip hardware Access to certain secure componentsare blocked depending on the execution mode Azab et al [13]proposed TZ-RKP which protects the integrity of operating systemkernel that runs on a normal world by running a security monitorin the secure world Zhou et al [33] use ARM processors memorydomain support for soware fault isolation Yoon et al [31] takesadvantage of the redundancy of a multicore processor a core is usedto monitor the execution time of a real-time application runningon a monitored core It was extended to monitor memory behaviorfor system-wide anomaly detection [32] and to protect in-place se-curity monitoring module [30] ese hardware-based approachesprovide beer security than virtualizations can do because the lat-ter relies on the security and correctness of the VMM which issusceptible to aacks [21] However virtualization-based methodshave advantages in that no hardware modication is needed andthat they are more exible due to the soware control

7 CONCLUSIONIn this paper we presented the VirtualDrone framework as a solu-tion to increasing security threats to unmanned aerial systems euse of this framework allows system designers (or users) to runadvanced ight applications in an untrustworthy environment Ourprototype implementation requires a minimal eort to build theframework on an o-the-shelf platform with open-source sowarestack rough case studies we demonstrated that the frameworkprovides an integrated way to handle various security threats thatwould otherwise have required potentially conicting requirementsNevertheless there still remains challenges for practical use of theframework We used a full-featured autopilot for both normaland safety controllers in the current implementation simply for ademonstration purpose only It is desirable to run a fully-veriedcontrol soware in the SCE Hence we plan to adopt and implementa high-assurance controller

REFERENCES[1] ArduPilot Autopilot Suite hpwwwardupilotorg[2] Emlid NAVIO+ hpsdocsemlidcomnavio[3] LibVMI hplibvmicom[4] QEMU hpwikiqemuorg[5] Raspberry PI 2 Model B

hpswwwraspberrypiorgproductsraspberry-pi-2-model-b[6] Cyber-aack concerns raised over Boeing 787 chiprsquos rsquoback doorrsquo e Guardian

hpswwwtheguardiancomtechnology2012may29cyber-aack-concerns-boeing-chip

[7] 3DRrsquos Solo Drone Boasts Dual Linux Computers Run-ning Dronecode hpswwwlinuxcomnews3drs-solo-drone-boasts-dual-linux-computers-running-dronecode

[8] A hacker developed Maldrone the rst malware for drones Se-curity Aairs hpsecurityaairscowordpress32767hackingmaldrone-malware-for-droneshtml

[9] Hijacking drones with a MAVLink exploit hpdiydronescomprolesblogshijacking-quadcopters-with-a-mavlink-exploit

[10] alcomm Goes Ubuntu for Drone Reference Platform hpswwwlinuxcomnewsqualcomm-goes-ubuntu-drone-reference-platform

[11] Watch GPS Aacks at Can Kill DJI Drones Or Bypass White HouseBan Forbes hpwwwforbescomsitesthomasbrewster20150808qihoo-hacks-drone-gps26431a2853fe

[12] Intel Aero Compute Board hpwwwintelcomcontentwwwusentechnology-innovationaerial-technology-overviewhtml

[13] Ahmed M Azab Peng Ning Jitesh Shah an Chen Rohan Bhutkar GuruprasadGanesh Jia Ma and Wenbo Shen 2014 Hypervision Across Worlds Real-timeKernel Protection from the ARM TrustZone Secure World In the ACM Conferenceon Computer and Communications Security

[14] Tal Garnkel and Mendel Rosenblum 2003 A Virtual Machine IntrospectionBased Architecture for Intrusion Detection In the Network and Distributed Sys-tems Security Symposium

[15] Ahmad Y Javaid Weiqing Sun Vijay K Devabhaktuni and Mansoor Alam 2012Cyber security threat analysis and modeling of an unmanned aerial vehiclesystem In the IEEE Conference on Technologies for Homeland Security

[16] Andrew J Kerns Daniel P Shepard Jahshan A Bhai and Todd E Humphreys2014 Unmanned Aircra Capture and Control Via GPS Spoong Journal ofField Robotics 31 (2014)

[17] Jiuxing Liu Wei Huang Bulent Abali and Dhabaleswar K Panda 2006 High Per-formance VMM-bypass IO in Virtual Machines In the USENIX Annual TechnicalConference

[18] Y Mo and B Sinopoli 2015 Secure Estimation in the Presence of IntegrityAacks IEEE Trans Automat Control 60 4 (2015) 1145ndash1151

[19] Miroslav Pajic James Weimer Nicola Bezzo Paulo Tabuada Oleg Sokolsky InsupLee and George J Pappas 2014 Robustness of Aack-Resilient State EstimatorsIn the ACMIEEE International Conference on Cyber-Physical Systems

[20] Bryan D Payne Martim Carbone and Wenke Lee 2007 Secure and FlexibleMonitoring of Virtual Machines In the Annual Computer Security ApplicationsConference

[21] Gabor Pek Andrea Lanzi Abhinav Srivastava Davide Balzaroi Aurelien Fran-cillon and Christoph Neumann 2014 On the Feasibility of Soware Aackson Commodity Virtual Machine Monitors via Direct Device Assignment In theACM Symposium on Information Computer and Communications Security

[22] Nick L Petroni Jr and Michael Hicks 2007 Automated Detection of PersistentKernel Control-ow Aacks In the ACM Conference on Computer and Communi-cations Security

[23] Johann-Sebastian Pleban Ricardo Band and Reiner Creutzburg 2014 Hackingand securing the ARDrone 20 quadcopter investigations for improving thesecurity of a toy In the SPIEMobile Devices andMultimedia Enabling TechnologiesAlgorithms and Applications

[24] Lui Sha 2001 Using Simplicity to Control Complexity IEEE Sow 18 4 (2001)20ndash28 DOIhpdxdoiorgdxdoiorg101109MS2001936213

[25] Deepa Srinivasan Zhi Wang Xuxian Jiang and Dongyan Xu 2011 Process Out-graing An Ecient rdquoout-of-VMrdquo Approach for Fine-grained Process ExecutionMonitoring In the ACM Conference on Computer and Communications Security

[26] Nils Ole Tippenhauer Christina Popper Kasper Bonne Rasmussen and SrdjanCapkun 2011 On the Requirements for Successful GPS Spoong Aacks In theACM Conference on Computer and Communications Security

[27] X Wang N Hovakimyan and L Sha 2013 L1Simplex Fault-tolerant controlof cyber-physical systems In the ACMIEEE International Conference on Cyber-Physical Systems

[28] Peter Wilson Alexandre Frey Tom Mihm Danny Kershaw and Tiago Alves2007 Implementing Embedded Security on Dual-Virtual-CPU Systems IEEEDes Test 24 6 (Nov 2007) 582ndash591

[29] Heng Yin Dawn Song Manuel Egele Christopher Kruegel and Engin Kirda 2007Panorama Capturing System-wide Information Flow for Malware Detection andAnalysis In the ACM Conference on Computer and Communications Security

[30] Man-Ki Yoon Mihai Christodorescu Lui Sha and Sibin Mohan 2016 eDragonBeam Framework Hardware-Protected Security Modules for In-PlaceIntrusion Detection In the ACM International Systems and Storage Conference

[31] Man-Ki Yoon Sibin Mohan Jaesik Choi Jung-Eun Kim and Lui Sha 2013SecureCore A Multicore-based Intrusion Detection Architecture for Real-TimeEmbedded Systems In the IEEE Real-Time Embedded Technology and ApplicationsSymposium

[32] Man-Ki Yoon Sibin Mohan Jaesik Choi and Lui Sha 2015 Memory Heat MapAnomaly Detection in Real-Time Embedded Systems Using Memory BehaviorIn the ACMEDACIEEE Design Automation Conference

[33] Yajin Zhou Xiaoguang Wang Yue Chen and Zhi Wang 2014 ARMlockHardware-based Fault Isolation for ARM In the ACM Conference on Computerand Communications Security

VirtualDrone Architecture for Aack-Resilient UAS ICCPS April 2017 Pisburgh PA USA

A ACTUATOR VIRTUALIZATION

IO Proxy

PWM Generator(PCA9685)

TrustedController

Motor Driver

Motor Interface

Virtual Motor Driver

Hardware

Host OSI2C

UntrustworthyController

Motor Interface

Security amp Safety Monitor

NCE (VM) SCE (Host)

MotorThread

Host-Guest Communication

Motors 0123

Figure 16 Actuator virtualization in the VirtualDroneframework

Figure 16 shows how an actuator is virtualized in the Virtual-Drone framework which is similar to the sensor virtualizationexplained in Section 33 e controller running in the NCE com-putes a set of PWM (Pulse Width Modulation) output values tocontrol the motors of the vehicle e controller writes these valuesto the virtual motor driver through the motor interface It transfersthe data to an IO proxy thread that relays the PWM values to themotor driver in the SCE e motors are nally actuated by analogsignals converted by the on-board speed controller

B DETAILS ON VIRTUALIZATIONSensors e following describes how the sensors are virtualizedin our prototype implementationbull Inertial Measurement Unit (MPU9250) e device driver run-

ning on the host retrieves a raw IMU data (14 bytes) every 1ms through SPI However every 5th sample is actually used forcontrol (hence the eective control frequency is 200 Hz) edata includes a 3-axis gyroscope and 3-axis accelerometer values

bull Barometer (MS5611) is sensor measures the barometric pres-sure and temperature e driver runs a state machine thatoperates at a frequency of 25 Hz A raw data (24 bits) retrievedfrom the sensor through I2C is converted to either pressure ortemperature value depending on the state (8 bits)

bull Compass (AK8963) It measures terrestrial magnetism in the 3axes at a frequency of 50 Hz using I2C Total 24 bytes (includingper-axis calibration factor) of raw data are fed to the NCE

bull Analog-to-Digital Converter (ADS1115) It measures the voltageson 6 ADC channels It reads each channel every 600 ms throughI2C For each channel a data of 40 bits (8 bits for channel ID and32 bits for sampled data) is transferred to the VM

bull GPS (u-blox NEO-M8) It provides the current longitude latitudeand altitude of the vehicle the time information (current millisec-ond time of week) etc e driver reads UBX protocol messagesfrom the u-blox GPS receiver through SPI parses each one andthen obtains the above information e parsing is stateful anda aer-parsing data can be at most 1K bytes It is fed to the NCEat the frequency of 5 Hz

Actuator For the motor actuation the virtual controller in theNCE sends the PWM values (for the four motors) to the host at thefrequency of the main control loop (ie 200 Hz)

Radio Control Input A remote control via radio link is used tomanually control (armdisarm ight maneuver) the quadcoptere raw input pulses are retrieved through DMA (Direct MemoryAccess) at 1666 Hz About every 18 ms (ie 55 Hz) a new set ofPWM values representing the stick and switch movements (total 8channels) becomes available As done for the sensors mentionedabove the IO proxy runs an RC feeding thread However insteadof feeding the raw pulse data we send the processed data ie thePWMs in order to avoid the overhead due to feeding the raw dataat such a high frequency (1666 Hz)

C ATTITUDE CONTROL AND ERROR BOUND

Time (s)50 55 60 65 70 75 80 85

Rol

l Pi

tch

Yaw

Erro

rs

-25000

-20000

-15000

-10000

-5000

0

5000

10000

15000

20000

25000RollPitchYaw

Time (s)50 55 60 65 70 75 80 85

RC

Inpu

t (PW

Ms)

800

1000

1200

1400

1600

1800

2000

2200RollPitchThrottleYaw

Drone hit the ground

Switched to SCE

Figure 17 e roll pitch yaw errors (top) measured duringthe dronersquos extreme movements e bottom plot shows theroll pitch throttle and yaw targets set by the pilot using theremote controller

e APM uses a double-loop PIDP control to stabilize the quad-copter e Angle loop aka the outer loop controls the aitudeof the vehicle e Angle loop utilizes a P control to achieve thedesired aitude by outpuing a desired angular speed ie the an-gular speed setpoint to the Rate loop aka the inner loop eAngle looprsquos output ie the angular speed setpoint is proportionalto the dierence between the target angle value set by the pilot(or autopilot when in autonomous ight mode) and the measuredangle value from the IMU sensor e Rate loop controls the aituderates of the aircra e Rate loop continuously calculates an errorvalue as the dierence between the angular speed setpoint and themeasured angular speed from the IMU sensor A PID control is

ICCPS April 2017 Pisburgh PA USA M-K Yoon et al

utilized in Rate loop to minimize the error over time by outpuingPWM signals to control motors

For the thresholds on the errors we used plusmn20 000 (radsec) forroll and pitch and plusmn10 000 (radsec) for yaw e switching logicactivates when the violation happens three times consecutivelyWe obtained these bounds on the errors by measuring from bothnormal and extreme movements of the prototype drone e topplot in Figure 17 shows those errors measured during the dronersquosextreme movements and the boom plot shows how the pilot cre-ated the movements e result indicates that the errors are wellbounded even when the drone experiences such movements epilot intentionally made the drone hit the ground at time between75 sec and 76 sec aer which the control is switched to the SCEWe did not aempt to nd optimal thresholds e smaller thethreshold is the easier it is for the SCE to recover to a stable stateHowever at the same time it could create more false positives

D DETECTION OF HIJACKING ATTEMPT

(a) LegitimateTim

e

Vehicle GCS

hellip

Attacker

hellip

Unexpected

Time

VehicleGCS

hellip

(b) Hijacking attempt

Figure 18 (a) MAVLink messages exchanged between theGCS and the vehicle for waypoint setup (b) e legitimateGCS can detect the attackerrsquos update on the vehicles routeas the vehiclersquos responses are unexpected

In order for a GCS to set waypoints for a vehicle a series ofMAVLink messages are exchanged Figure 18(a) shows the MAVLinkwaypoint protocol e GCS rst sends MISSION COUNT(N) to thevehicle where N represents the number of waypoints that it willset e vehicle prepares for receiving the N waypoints and thenrequests for each waypoint by sending MISSION REQUEST(i) untilall the waypoint locations are received

Note that both the legitimate GCS and the aacker need to followthis protocol to set any waypoints From the vehiclersquos perspectivethe initialization requests (ie MISSION COUNT(N)) from them areindistinguishable at is the vehicle itself cannot detect suspiciousrequests for a route change However the fact that the aacker canreceive messages from the vehicle means that the legitimate GCScan also hear what the vehicle responds to the aackerrsquos requestAs Figure 18(b) shows the legitimate GCS can detect the aackerrsquosupdate on the vehiclersquos waypoints when it receives unexpectedMISSION REQUEST messages as it did not initialize the message ex-change Due to such stateful communication the MAVLink protocolenables detecting other types of suspicious aempts (eg changingcontrol parameters) as well

E GEO-FENCE ATTACK ROOTKITWe developed a rootkit that disables the geo-fence and sends thevehicle into a no-y zone e rootkit nds the APM process andthen modies itsmemory that stores (i) the ag that enablesdisablesthe geo-fencing and (ii) the list of waypoints ese are loadedfrom the APM conguration le (varAPMArduCopterstg) onits startup and buered in the memory

Waypoint 3Waypoint 2

Waypoint 4

Geo-fence enabled

Figure 19 ewaypoint list and geo-fence enable ag storedin the memory of APM process An attacker who gained aroot-level access canmodify thesememory values to disablethe geo-fence and then send the drone to a new location

Figure 20 e rootkit that disables the geo-fence and modi-es the ight plan by manipulating the APMrsquos memory

One can change these values remotely through radio which how-ever is easy to prevent since radio communication can be monitoredeasily Modifying the buered values in the memory is dicult toprevent especially if the aacker has gained a root access e mem-ory locations of these data can be easily found if the source codeor the executable binary is available Figure 19 shows the memorydump of the waypoint list and geo-fence enable ag Figure 20shows how these values are modied by the rootkit

  • Abstract
  • 1 Introduction
  • 2 Background
  • 3 VirtualDrone Framework
    • 31 High-level Framework
    • 32 Assumptions and Adversary Model
    • 33 Virtual Sensing Actuation and Communication
    • 34 Security and Safety Monitoring
      • 4 Implementation
      • 5 Experiments
        • 51 Case Study
        • 52 Discussion
          • 6 Related Work
          • 7 Conclusion
          • References
          • A Actuator Virtualization
          • B Details on Virtualization
          • C Attitude Control and Error Bound
          • D Detection of Hijacking Attempt
          • E Geo-Fence Attack Rootkit
Page 3: VirtualDrone: Virtual Sensing, Actuation, and ... · Figure 1: Simplex architecture. the so›ware environment, in conjunction with the increased capa-bilities and complexities of

VirtualDrone Architecture for Aack-Resilient UAS ICCPS April 2017 Pisburgh PA USA

Initialization

Time

Initialization

Secure Control Mode

Ready

Control Control

Control Control Control

Normal Control Mode

SCE

NCE

Secure Control Mode

Control

Control

Violation

Active Active

Inactive

Security and Safety Monitoring

Figure 2 Switching between the SCE and the NCE

and thus require simple soware structure and that a signicantamount of analysis is carried out post-designimplementation Alsothey require no or infrequent updates once deployed

We call the system is in virtual control mode if the system isdriven by the controller running in the NCE (ie virtual machine)By contrast the system is in host control mode if the system isdriven by the trusted controller in the SCE (ie on the host) Innormal circumstances the system is in the virtual control mode(ie NCE) as illustrated in Figure 2 providing the user with the fullfunctionality Upon detection of the event of a security or safetyviolation the SCE takes back the control of the system in order tooverride the malicious behavior and to maintain the system in acontrollable state

Figure 3 presents the high-level overview of the VirtualDroneframework e key components in the framework are (i) the virtualmachine that sandboxes the full-featured but untrusted operationsincluding the control and other applications (eg mission imagingnetworking) (ii) the virtualized sensors (eg inertial-measurementunit) actuators (eg motors) communication channel (eg teleme-try with the ground station) for use by the normal environment(iii) the interface between the real IO devices and the virtualizedones (iv) the security and safety monitor that continuously moni-tors on the logical and physical behaviors of the system driven bythe normal environment and lastly (v) the trusted controller for arobust backup and recovery It should be noted that the controllerrunning in the NCE could have been fully veried However itis deemed untrustworthy because of potential direct and indirectthreats by other soware components residing together

e VirtualDrone framework benets from a multicore processorby being able to run the normal and secure environments in parallele laer can continuously perform safety and security checksand real IO operations while the former is carrying out its normaloperations which are not possible on a single core processor

32 Assumptions and Adversary Modelbull Since we utilize a virtualization technique for the isolation of

potentially untrustworthy soware components the virtual ma-chine monitor is our trusted computing base

bull e SCE does not use the external network (ie Internet) becauseas explained above the soware components in the SCE are staticIf needed any updates to the SCE require physical accesses tothe hardware over-the-air management is not allowed

bull Inside the virtual machine an adversary may breach any part ofthe soware stack (the OS kernel run-time libraries le systemuser applications) and can even have root-level access (in theVM) and thus have full control of any soware running in theVM is would enable the aacker to create a backdoor andeven replace applications with maliciously modied ones byexploiting vulnerabilities or social-engineering techniques

Host OS

Hardware

TrustedController

Sensors Actuators

Peripheral Interfaces

Virtual Sensorsamp Actuators amp

Communication

Guest OS

IO Proxy

Secure Control Environment (Host)

Security amp Safety Monitor

Normal Control Environment (VM)

Netw

ork

Communication

Untrustworthy Controller amp

Apps

Figure 3 Overview of the VirtualDrone Framework

bull We do not consider physical aacks [16 26] such as GPS spoof-ing against the hardware Such aacks can be handled by control-theoretic approaches such as [18 19]

33 Virtual Sensing Actuation andCommunication

e key requirement for sound functioning of the VirtualDroneframework is a clear separation between the normal and securecontrol environments Otherwise an aacker may take over thetrusted controller or the monitoring module so that they could notfunction properly when needed It is also crucial to protect thesensors and actuators from the untrustworthy components in theNCE as the aacker may degrade their availability or even corruptthem so that the entire system operates with incorrect informationon the physical state Hence we use a virtualization techniqueto isolate the NCE from what we need to protect ie the SCEe NCE which runs potentially untrustworthy components issandboxed in a virtual machine ey see a controlled environmentcongured by the secure side that has a direct control on the systemresources

Virtual Sensing and Actuation One of the key functions of theSCE is to protect the sensors and actuators Our framework does notallow the NCE to directly access such devices (eg passthrough IO[17]) because of potential security risks Instead as typically done invirtualization the IO operations tofrom the devices are emulatedMost sensors and actuators that we can nd from UAS are typicallyinterfaced through certain on-board peripheral communicationprotocols such as SPI (Serial Peripheral Interface) and I2C (Inter-Integrated Circuit) Hence one possible way is to implement back-end drivers for such common protocols at the virtual machinemonitor (VMM) layer so that the applications running in the NCEcan transparently use the (front-end) drivers already provided bythe guest OS However this approach poses signicant challengesto security and complexity for the following reasons

bull An aacker running in the NCE might recongure some sensordevices (eg changing the sampling rate or gain) in use Hencewe would need a proper way to lter out impermissible IO trans-actions from the NCE is requires the emulation interface tohave a comprehensive map of device registers that species writeand read permissions for the NCE Furthermore some permis-sion assignments may need to change dynamically depending

ICCPS April 2017 Pisburgh PA USA M-K Yoon et al

IO Proxy

Inertial Measurement Unit (MPU9250)

TrustedController

MPU9250 Driver

IMU Interface

IMU Raw Data

Receiver

Hardware

Host OSSPI

UntrustworthyController amp Apps

IMU Interface

Security amp Safety Monitor

NCE (VM) SCE (Host)

IMU Feeder Thread

Host-Guest Communication

Figure 4 Sensor virtualization in the VirtualDrone frame-work

on the current high-level context of each IO operation which ishidden in the low-level IO emulation

bull e aacker may even aempt denial-of-service aacks on theshared devices by simply keeping them busy

bull Allowing low-level IO transactions also requires a tight syn-chronization between the NCE and the SCE because some IOoperations are stateful For instance a compass sensor used inour prototype performs a register read in two stages ndash the devicedriver initializes a read by writing the read address waiting for10 ms and then collecting the data GPS parsing is also donewith a state machine Without a proper synchronization thestate of the device could be lost due to interleaving transactionsfrom the NCE and the SCE An aacker in the NCE could usethis very property to hinder a timely correct use of sensor databy the SCE (eg aacker may reinitialize a sensor while the SCEis waiting for a sample) If a synchronization is to be enforcedthe availability could signicantly degrade because the deviceshould be locked for a long time to serve one at a timeTo solve the challenges illustrated above we take a more passive

approach to sensor and actuator virtualization e frameworkruns an IO proxy for each device in the SCE that feeds sensor datato the NCE is is a suitable mechanism because of the periodicnature of their operations and the small data sizes that we cannd from typical sensor and actuator devices on UAS platforms(see Table 1 in Section 4) Since it is known and xed how oeneach sensor data should be sampled the IO proxy only needs tomake sure that the SCE feeds the sensor data in time It feeds rawsensor data instead of processed ones so that the applications inthe NCE can process them as needed From the perspective ofthe NCE this sensor feeding looks as if the data is sampled frominvisible inaccessible devices (ie virtual sensors) Hence the SCEcan also remove certain side-channels (eg radio signal strengthindicator) present in sensor information by not providing it to theNCE especially if this would not degrade the normal functionalityof the NCE

Figure 4 illustrates how an IMU (Inertial Measurement Unit)sensor is virtualized in our prototype based on an open-sourceautopilot suite [1] A user-level device driver (MPU9250 Driver)uses the SPI interface to fetch raw IMU data e IMU IO proxyruns a feeder thread which sends the current sample to the rawdata receiver running inside the NCE through a host-to-guest com-munication interface e receiver behaves as a device driver from

GCS

Controller

ControllerApp

Switch

NCESCE

Hidden Channel

Telemetry Analyzer

Radio Transceiver

(eg Switch to SCE and Return to Home)

Monitors NCErsquos Telemetry Data

Figure 5 Telemetry virtualization creates a hidden commu-nication channel between the SCE and the GCS

which the higher-level interface (ie IMU interface) can fetch sen-sor data without needing to know the particular model of the realdevice Hence no modications are needed in the higher layersActuators (eg motors) are virtualized in a similar way as explainedin Appendix A

Virtual Communication Applications running in the NCE re-quire network communication with the external world for datatransfer remote management update etc Hence as shown inFigure 3 the NCE allows users to directly access into the NCEthrough for example a port forwarding mechanism provided bythe VMM However there exist some communication channels thatneed to be managed by the SCE ndash the ground control and the remotecontroller

e ground control application utilizes a radio communicationchannel to establish a telemetry transfer between the ground con-trol station (GCS) and a vehicle e telemetry data such as theGPS location and sensor measurement can be monitored at theGCS It can also use telemetry to dynamically control the vehicleby sending commands for seing new waypoints landing armingetc However this communication channel can be exploited by anadversary who can simply disconnect the channel by disabling theradio driver Hence we virtualize the telemetry communicationchannel as done for the sensor and actuator

e key benet of this mechanism is that it can create a hiddencommunication channel for the SCE as illustrated in Figure 5 Forexample the GCS can send a special command to the SCE egswitching to the SCE and returning to the home which is lteredby the telemetry analyzer (part of the telemetry IO proxy) thatinspects every incoming message ese hidden messages are notrelayed to the NCE We take advantage of this mechanism as asolution to drone hijacking scenario presented in Section 51 upona detection of a hijacking aempt the GCS commands the SCEto switch to the host control mode and to return to where it islaunched We can use the same mechanism to reboot the virtualmachine (aer the control is switched to the SCE) from the GCSwhen a suspicious behavior is observed Note that an aacker cansend these special commands Hence such commands should bechosen carefully in such a way that a successful aempt cannotlead to a safety hazard

A hand-held remote controller (see Figure 11 in Section 5) is usedby a human pilot to wire-lessly y a vehicle e communicationis also carried via a radio link (eg 24 GHz) It is virtualized inthe same fashion as the telemetry radio and we can also create ahidden channel For instance in our prototype implementation webind one of the switches of the remote controller with the functionthat tells the VirtualDrone to switch to the SCE e pilot usesthis function to manually control the vehicle when the NCE-drivenvehicle shows abnormal behavior

VirtualDrone Architecture for Aack-Resilient UAS ICCPS April 2017 Pisburgh PA USA

Security amp Safety Monitor

Geo-fence

Sensor Data(IMU GPS Battery hellip)

Telemetry Command from GCS

Telemetry Report from NCE

Actuation Command from NCE

Attitude Errorfrom SCEVMI Fake Report

Detector

Safety Monitor

Command to SCE(Switch RTL hellip)

Figure 6 Example conguration of the security and safetymonitor

34 Security and Safety MonitoringFigure 6 shows an example conguration of the security and safetymonitor and data ow based on the prototype implementation pre-sented in Section 4 Notice from the gure (and also from Figure 4)that the monitor receives the sensor data for analysis Becausethe data are fetched from the trusted environment the monitoris guaranteed to use the true measurement for a safety analysisHence we can detect aacks that for example try to put the vehiclein an open-loop state or to set wrong control parameters In ourprototype quadcopter we analyze the aitude (ie roll pitch andyaw) errors which are bounded in normal conditions to detect anunsafe physical state One can also implement a control-theoreticanalysis [27] e monitor also analyzes the actuation outputs fromthe NCE as shown in Figure 16 in Appendix A to prevent potentialsafety violations For example the monitor can upper-bound onthe motor outputs to prevent motor failure due to the aackerrsquos at-tempt to apply abrupt voltage changes e monitor can also checkif it receives actuation commands from the NCE at the denedfrequency ndash abnormal paerns could be an indicator of a potentialsecurity breach In order to handle physical aacks to the sensorsone can also implement a sensor aack detection technique [18 19]using the true measurements available in the SCE

e SCE also inspects communications between the NCE andthe external world e telemetry analyzer shown in Figure 5 inter-cepts radio telemetry messages to and from the NCE and providesthem to the monitoring module for analysis Using this mecha-nism one can detect an aacker that for example sends out fab-ricated messages (eg ight path report replayed or generated bya soware-in-the-loop simulation) in an aempt to misinform theground control station about the true physical and logical states

e monitoring module can also host critical safety measuresthat otherwise would run at the same layer as untrustworthy ap-plications For instance geo-fencing typically runs as a part of anautopilot soware An aacker can simply disable it or modify theconguration to y the vehicle into a no-y-zone Since this typeof function does not require external interaction it can run in theSCE using the true sensor measurements (eg GPS location)

Virtualization also enables the use of virtualization-based secu-rity measures for instance virtual machine introspection (VMI) [14]e monitoring module in the SCE can implement various VMItechniques to monitor the behavior of the applications and the guestOS running in the NCE For example through interfaces providedby the VMM the module can continuously check the integrity ofthe kernel code andor its critical data structures (eg interruptvector table process and module lists) for detection of rootkits andinspect network connections and packets for detection of back-doors and so on Upon a detection the framework may switch tothe SCE as a preventive action from which moment comprehensive

Navio+(Sensor board)

Raspberry PI 2(Quad-core ARM Linux)

GPS

Telemetry Radio (915MHz) Radio Receiver for

Remote Control (24GHz)

Figure 7 adcopter prototype implementation with Rasp-berry Pi 2 and Navio+ sensor boards

Security amp Safety Monitor

Virtual Machine (QEMU)

Linux

Hardware

ArduPilot

IMU Barometer

Compass

Motors RC

DMASPI I2C

Virtual Sensorsamp Actuators amp

Communication

Linux

ArduPilot

IO Proxies

Host User Space

ADC

KVM

HW

AppApp

Net

Network

Port-

Forw

ardi

ng

IC

RG

AM

Nav

io+

GPSTelemetry

Radio

Serial

App

B

TSock

et

Seria

lPor

t

WiFi

Figure 8 VirtualDrone implementation on the prototype

security analyses (eg deep memory scan rebooting VMs) can takeplace without losing control of the vehicle

4 IMPLEMENTATIONIn this section we present the implementation details for our proto-type of the VirtualDrone framework on a quadcopter drone shownin Figure 7 running an open-source autopilot on an embeddedcomputing board

System Implementation We implemented theVirtualDrone frame-work on a Raspberry PI 2 Model B (RPI2) board [5] as depictedin Figure 8 It has a quad-core ARM Cortex-A7 CPU each coreof which runs at 900 MHz and has a main memory of 1 GB eprocessor features the ARM Architecture Virtualization ExtensionIt enables running VMs with unmodied guest OS using KVM(Kernel-based Virtual Machine)

On the host we run Linux 318 No modication was made tothe kernel except that we enabled virtualization with KVM in theconguration On top of the host OS we run unmodied QEMUv23 [4] an open-source virtual machine monitor As explainedin Section 32 QEMU ie the VMM is our trusted computing base(TCB) We created one VM that emulates an ARM Versatile ExpressA15 board (which runs a Cortex-A15 CPU the same ARMv7 ar-chitecture as Cortex-A7) and assigned one of the four cores of theprocessor exclusively to the virtual machine In the virtual machinewe run unmodied Linux 43

We use QEMUrsquos port forwarding mechanism to open an SSH (Se-cure Shell) port on the virtual machine through which a user logsin to launch update manage services and applications More portscan be open to the virtual machine using the port forwarding mech-anism In this paper we assume the QEMUrsquos port forwarding mecha-nism is secure

In our prototype we chose to use Linux as the host OS Howeverit is desirable to use a formally veried OS on the host instead of

ICCPS April 2017 Pisburgh PA USA M-K Yoon et al

Table 1 e rate and amount of data transfer between thesecure and normal control environments

Component Direction Rate SizeIMU Hostrarr VM 200 Hz 14 bytes

Barometer Hostrarr VM 25 Hz 4 byteCompass Hostrarr VM 50 Hz 24 bytes

ADC Hostrarr VM 167 Hz 5 bytesGPS Hostrarr VM 5 Hz Max 1K bytes

Motor Output VMrarr Host 200 Hz 16 bytesRC Input Hostrarr VM 55 Hz 16 bytesTelemetry Hostharr VM Vary Vary

such a general-purpose monolithic kernel Our choice of Linux isto minimize engineering eorts to port VMM autopilot and sensorand actuator device drivers to a new OS Our implementation didnot require any modications to the host OS VMM and guest OS

Autopilot We stack Navio+ sensor board [2] on top of the Rasp-berry PI 2 (as shown in Figures 7 and 8) to provide various sensordata for ight control e NCE (ie the virtual machine) runs theopen-source ArduPilot (aka APM) [1] autopilot suite as the ightcontrol soware for our quadcopter drone APM combines sensordata and RC ight maneuver commands to compute correct inputsfor the four motor-prop units which are sent by the actuator portsof the Navio+ board to drive the actuators

As shown in Figure 8 we run one instance of APM in the SCE(ie the host) e Simplex architecture suggests the use of a robustcontroller for the safety controller in order to handle and recoverfrom physical failures For demonstration purposes we chose touse the APMrsquos default PID controller as the trusted controller In aproduction implementation however a high-assurance controllerwould be used

Virtualization e IO proxy shown in Figures 4 and 8 runsone feeder thread for each sensor Each sensor retrieves a newsample at a xed frequency Each feeder thread then sends thenewly available data to the virtual machine using a host-guestcommunication channel Appendix B explains how the sensorsand the actuators are virtualized in our prototype implementationwhich are also summarized in Table 1

Host-GuestCommunication We use QEMUrsquos virtio-serial fordata transfer between the host (ie IO proxy threads) and guestsystems It creates virtual serial ports in the guest each of whichis mapped to a character device such as Unix domain socket pipeTCPUDP port etc in the host side We created eight virtualserial ports for the components listed in Table 1 e IO proxythreads in the SCE use eight Unix domain sockets to communicatewith the virtual machine One may use other types of host-guestcommunication mechanisms such as shared memory In our im-plementation we aimed to utilize an existing infrastructure thatdoes not require any modication or insertion to the stock QEMUe virtio-serial is adequate enough to handle the low-speedlow-volume data transfer for sensoractuatorcommunication vir-tualization We assume virtio-serial is trustworthy as it is partof QEMU the TCB

Virtual Telemetry e APM uses a serial port (UART) for teleme-try radio transceiver1 Hence the NCE-side APM does not need any1Our prototype copter also supports WiFi and APMrsquos telemetry can be transferredthrough UDP or TCP as well e APM abstracts these away by treating them as UARTcommunication

additionmodication for the virtual telemetry e SCE-side APMreadssends telemetry data fromto the real UART port performs altering (as described in Figure 5) and relays tofrom the virtualmachine using the virtual-serial port mechanism explained abovee APM uses MAVLink protocol (Micro Air Vehicle Communica-tion Protocol)2 MAVLink contains all interface functions to controlthe vehicle monitor states change parameters etc Each MAVLinkmessage size and frequencies vary depending on the message typee messages typically have small size (the maximum is 263 bytes)and low frequency (a few Hz)

5 EXPERIMENTSWe now present case studies that demonstrate how the Virtual-Drone framework can detect and prevent various types of securityand safety violations

51 Case StudyTo demonstrate the eectiveness and versatility of our frameworkwe consider the following ve scenarios Note that we are notproposing new detectionmitigation solutions for the use cases pre-sented here Each scenario could be handled in many dierent waysFor instance hijacking can be easily defeated by a simple authen-tication of the communication We instead intend to demonstratehow an integrated platform ie the VirtualDrone framework candefend against various aack scenarios that would otherwise havebeen handled separately with potentially conicting requirementsWe also note that these aacks can occur in a number of dierentforms In this paper we consider a pessimistic scenario the aackercan know the HWSW conguration and even gain a root accessto the NCE

Attacks on Safety An adversary can launch an aack on thesafety of a vehicle by for example degrading the availability ofcritical sensors (eg IMU) or actuators or the control performance(eg by changing PID gains) e worst-case scenario from thevehiclersquos safety perspective is when the aacker disables the ightcontroller while the vehicle is ying is immediately leads thesystem to an open-loop state which will cause the vehicle to crashTo demonstrate this type of aack we consider an extreme sce-nario in which the ight controller is killed by an aacker eaacker can launch this aack by for example entering through abackdoor replacing the control program with one that self-crashesor installing a rootkit We do not assume specic scenario of howit is launched We implemented a Linux kernel module that 1) ndsthe APM autopilot process from the kernelrsquos process list and then2) kills the process e aacker could achieve the same goal bycausing the virtual machine to crash

ere could be several ways to detect this type of aack One mayuse a heartbeat mechanism which however can be circumvented byan aacker that impersonates the ight controller Instead we takeadvantage of the SCErsquos ability to monitor the true physical state ofthe vehicle We use the aitude control performance measured atthe SCE At each control loop the SCE-side controller calculates theerrors of the rate control on the pitch roll and yaw of the copterDuring a stable ight the rate errors are bounded as shown inFigure 17 in Appendix C because the ight controller is active tominimize the rate errors In case of an open-loop state the ightcontroller cannot work to minimize the rate errors Due to the factthat a multirotor system is naturally an unstable ight platform2hpqgroundcontrolorgmavlinkstart

VirtualDrone Architecture for Aack-Resilient UAS ICCPS April 2017 Pisburgh PA USA

865 87 875 88 885 89 895 90 905 91Time (s)

-10000-7500-5000-2500

0250050007500

10000125001500017500200002250025000

Rol

l Pi

tch

Yaw

Erro

rs

RollPitchYaw

865 87 875 88 885 89 895 90 905 91Time (s)

1000

1100

1200

1300

1400

1500

1600

1700

1800

1900

2000

Mot

or o

utpu

t (PW

Ms)

Motor[0]Motor[1]Motor[2]Motor[3]

Open-loop

Kill ArduPilotprocess

SafetyViolation

Normal Control Mode(NCE)

Secure Control Mode(SCE)

Figure 9 e motor outputs (top) and the roll pitch yawerrors (bottom) measured at the SCE e attacker in NCEkills the ight controller which leads the copter to an open-loop state e SCE takes the control when the errors growbeyond the thresholds aer which the copter is stabilized

the rate errors will increase quickly beyond the normal bounderefore a properly chosen threshold of rate errors can be used indetection of ight safety violations Hence the security and safetymonitoring module in the SCE continuously checks if the errorsgrow beyond the threshold Upon a safety violation the frameworkswitches to the secure control mode Appendix C explains how theAPMrsquos aitude control works and how we obtained the thresholdof rate errors

Figure 9 shows the results of this experiment While the dronewas in the virtual control mode the aacker activated the rootkitmentioned above at time around 888 sec at which moment theAPM process running in the VM is killed e top plot in Figure 9shows the motor outputs (4 channels) from the motor driver in theSCE As we can see the drone was in an open-loop state for about300 ms e boom plot shows the aitude errors also measuredat the SCE e drone becomes unstable (ie the errors are faraway from zero) for a moment because no actuation is applied tothe motors during the open-loop period Upon the detection ofthe violation on the errors (at time around 891 sec) the control isswitched to the SCE from which moment the control loop is closedand the drone returns to a stable state

We also tested a scenario when the control parameters are modi-ed during ight Figure 10 shows the aitude control errors whenthis happens At time around 1643 sec a MAVLink message wassent via radio to change the proportional gain (180 times bigger thanthe original value) of the aitude controller As can be seen thedrone became unstable immediately e safety module detectedthe large roll errors aer which the SCE took the control

Time (s)162 164 166 168 170 172 174

Rol

l Pi

tch

Yaw

Erro

rs

-20000

-10000

0

10000

20000

30000

40000

50000

60000RollPitchYaw

Normal Control Mode

(NCE)

ChangeProportional

Gain

Secure Control Mode(SCE)

Figure 10 e roll pitch yaw errors when the proportionalgain of the attitude controller is set to an abnormally highvalue e SCE immediately stabilizes the drone upon thedetection of the unstable physical state

Hijacking It has been demonstrated that it is possible to hijack adrone by exploiting the MAVLink protocol [9] e idea is to send acommand that sets a new ight plan through the telemetry channele telemetry radio pair of the drone and the ground control station(GCS) distinguish themselves from others by their unique NetIDand the frequency band Hence by using the same NetID and radioband and running the same rmware (which decodes the MAVLinkpackets) as the target vehicle the aacker can send any MAVLinkmessages to the target

To demonstrate this aack scenario we used three telemetryradio (ie for the GCS the drone and the aacker) that utilize thesame frequency band (915MHz) and same default congurationSince the out-of-the-box default NetIDs are same the aackerrsquostelemetry radio did not need any rmware modication3 Figure 11describes the hijacking scenario e drone takes o at the launch-ing point (marked as lsquoTrsquo) and communicates with the GCS locatedat lsquoGrsquo e pilot ies the drone along the normal path e aackerlocated at lsquoArsquo then launches its ground control application en itsends a new waypoint plan to the drone which will send it to thelocation marked as rsquoWrsquo e aacker did not need to modify the3It is possible to nd out the NetID used between the GCS and the drone by modifyingthe rmware [9]

G

T

A

W

T

A

W

A

G

T

Hijack

Ground Control Station

Launching Point

Attacker

Hijacked Drone

Attacker

Figure 11 e attacker (lsquoArsquo) tries to hijack the drone yingalong the normal path and to send it to a newwaypoint (lsquoWrsquo)e attacker uses the same telemetry radio as the GCS andthe drone and unmodied APM Planner GCS

ICCPS April 2017 Pisburgh PA USA M-K Yoon et al

G G

T T

A A

W W

(a) Without VirtualDrone (b) With VirtualDrone

Figure 12 (a) e ight trajectory of the drone hijacked bythe attacker It is sent to new location lsquoWrsquo set by the attacker(b) e attackerrsquos attempt to hijack the drone is detected bythe GCS Upon the detection the GCS sends a special com-mand to the SCE which switches the control mode to theSCE and directs the drone to where it was launched

GCS program (the stock APM Planner 204 with default seings)Figure 12(a) shows the ight trajectory of the drone when it wassuccessfully hijacked by the aacker

While the drone itself cannot detect such a hijacking aemptthe GCS can detect it because of unexpected message exchange initi-ated by the aacker as detailed in Appendix D Hence we addedthe functionality that detects such unexpected messages to ourlegitimate GCS Upon a detection the GCS commands the droneto return to where it was launched as shown in Figure 12(b) istakes advantage of the VirtualDronersquos virtual telemetry explainedin Section 33 the SCErsquos telemetry proxy enables a hidden com-munication channel between the GCS and the SCE through whichthe former sends the drone a pre-dened set of special commandsIn this scenario the command from the GCS overrides the NCErsquosabnormal operation by switching the drone to the secure controlmode Note that the aacker might be able to send the same specialcommand However what it can do at worst is to send the droneback to the home

As explained in Section 34 the virtual telemetry also enables theSCE to detect if the NCE is trying to deceive the ground station Forexample aer a successful hijacking the aacker may report fakeGPS location (by replaying or by generating from SW simulator) tothe GCS so that it looks as if it is ying on the planned path etelemetry analyzer however can detect such aempts by analyzingeach outgoing MAVLink packet and comparing against the truelocation retrieved from the GPS receiver which is also implementedon our prototype

Corrupting Safety Functions Autopilot programs also supportcritical failsafe mechanisms that are activated under certain con-ditions such as losing radio communication signal or low-baeryIt is in fact easy to corrupt such a safety-critical measure becausetypically it can be enableddisabled remotely through a telemetrycommand (hence an aacker can send a command via radio asdone in the hijacking scenario) Moreover such a mechanism isoen implemented as a part of autopilot that runs at the user-levelHence an aacker who has gained a root access can easily corruptit by modifying the conguration le or the memory

4hpardupilotorgplanner2indexhtml

No-fly zone

Original Path

Figure 13 Attacker disables the geo-fence andmodiesWay-point 3 so that the drone ies into a no-y zone Such asafety-critical function can be protected by running in theSCE

In this case study the aacker corrupts the geo-fence mechanismGeo-fence employs positioning data such as GPS signal or localradio-frequency identiers to set up a virtual boundary to preventthe vehicle entering a prohibited zone e vehicle position ismonitored at all times such that before the vehicle enters a no-y zone the system could act accordingly to prevent a geo-fenceviolation Corruption of the geo-fence can result in a catastrophicresult an aacker may disable the geo-fencing and induce thevehicle to y into a congested airspace such as takeo pathwaysfor mid-air collision

To demonstrate this type of aack we developed a rootkit thatdisables the geo-fence of APM during a ight and sends it intoa no-y zone e rootkit executes this aack by modifying theAPMrsquos memory as detailed in Appendix E Our drone was plannedto y through a path (0-1-2-3) in an autonomous mode as shownin Figure 13 During the ight the aacker logged into the systemthrough WiFi and launched the rootkit when the drone was yingtoward Waypoint 2 e new Waypoint 3 set by the rootkit islocated inside a no-y zone and because the rootkit has alreadydisabled the geo-fence the drone consequently ied into the no-yzone deviating from the original path as shown in Figure 13

e SCE of VirtualDrone provides a protected layer at whichsafety-critical functions like geo-fence can be placed We imple-mented a simple geo-fence module in the security and safety mon-itoring module in the SCE It continuously monitors the currentGPS coordinate and checks it against the list of no-y zones alsostored at the SCE layer Upon a violation a pre-dened action istaken In our implementation the SCE takes back the control fromthe NCE and returns to where it was launched as done for thehijacking scenario explained earlier

Side-channel e virtualization of sensor actuator and commu-nication allows for hiding certain types of information from theNCE One of the examples is the RSSI (Received Signal StrengthIndication) that indicates the link quality between a pair of radiotransmier and receiver We especially consider a scenario in whichan aacker tries to estimate the location of the GCS by observingthe RSSI measured between the vehicle and the GCS Due to signalaenuation the radio signal is stronger as the vehicle is closer to theGCS Hence one can correlate the RSSI with the GPS coordinate

VirtualDrone Architecture for Aack-Resilient UAS ICCPS April 2017 Pisburgh PA USA

T

1

2

3

4

G

Lat 401626060Lng -883074907

0 20 40 60 80 100 120 140 160 180Time (s)

100

120

140

160

180

RSS

I

0 20 40 60 80 100 120 140 160 180Time (s)

401615

40162

401625

40163

401635

Latit

ude

0 20 40 60 80 100 120 140 160 180Time (s)

-88309

-88308

-88307

-88306Lo

ngitu

de

Figure 14 e drone ies through T-1-2-3-4-1 e graphsrepresent the RSSI (top) the latitude (middle) and the longi-tude (bottom) An attacker can estimate the location of theGCS by correlating the RSSI and the GPS information

Figure 14 illustrates such a possibility of side-channel e graphsin the gure represents the RSSI (between the drone and the GCS)and the GPS coordinate (latitude and longitude) measured whilethe drone ies through a path (T-1-2-3-4-1) If the aacker is able toobtain these RSSI information heshe can estimate the location (ora region) of the GCS by nding when the RSSI is high e resultsshow quite accurate estimation of the true GCS location (shown inthe map) A complex algorithm will allow for further narrowingdown the location e VirtualDrone framework eliminates thispossibility by not providing the RSSI information to the NCE Notethat RSSI is needed only for the SCE (eg switches to the SCEand then performs a pre-dened operation such as return-to-homewhen RSSI is low due to the loss of telemetry link) Furthermorebecause of the telemetry virtualization the NCE cannot even knowif the telemetry is communicated through a radio channel or anetwork (eg WiFi) In case of the network-based telemetry theSCE can even hide the IP address of the GCS

Virtual Machine Introspection Many rootkits modify criticalkernel data structures to intercept sensitive data hide maliciousprocesses or les etc For a demonstration we implemented a secu-rity module that checks the integrity of the system call table of theguest OS For this we chose to utilize an existing interface providedby QEMU namely the QEMU Machine Protocol (QMP) It allows host-side applications to communicate with or control a running QEMUVM We created a QMP Unix socket to which our security modulecan connect During the initialization of the VM the module dumpsthe current system call table and stores this initial state in memoryFrom then on the module regularly dumps the current table andcompares it against the one obtained initially Using this techniquewe were able to detect a known rootkit modhide1 that hijacks theopen call to hide itself from the kernel module list

Note that we are not proposing new rootkit detection methodshere We instead intend to demonstrate how the VirtualDroneframework can handle such a stealthy security violation One canuse a rich set of library for virtual machine introspection such asLibVMI [3] which we leave for future work

52 DiscussionSensor attack e VirtualDrone framework cannot handle phys-ical manipulations on the sensors such as GPS spoong esetypes of aacks are called sensor aack or false data injection aackand typically tackled by control-theoretic approaches [18 19] erequirement however is that the methods themselves should beprotected from cyber-aacks Hence one can implement such a

Time (sec)0 20 40 60 80 100 120 140 160 180

Vo

lta

ge

(v)

105

11

115

12Without VirtualDroneWith VirtualDrone

Figure 15 Voltage drop at the battery for 3-minutes of hov-ering with and without the VirtualDrone framework

technique on the SCE layer specically in the security and safetymonitoring module as it can see the true (but potentially physicallymanipulated) sensor measurements

Power consumption Since UAS typically runs on baery powerwe compare the power consumption of the prototype drone withand without the VirtualDrone framework In order to compare thepower consumption in a controlled environment (eg eliminatingvarying disturbance due to wind) we ew the drone indoors hov-ering it at a xed position We ew the drone for about 3 minuteswith the same fully-charged baery and measured the voltage dropsduring the ight

Figure 15 shows that the VirtualDrone does not impose over-head on the power consumption is is because the majority ofthe power is consumed by the motors to li the copter e powerconsumption by RPI2 board and the Navio+ sensors cannot exceed5 Was which is the upper bound of the power supply by the powermodule at is the power consumption by any on-board comput-ing cannot be more than 5 Was We calculated the average powerof the 3-minutes of ights which ranged between 114 and 118Was Hence the power consumption by any on-board computingcan be ignored Due to the fact that the upper bound of powerconsumption by computing is two orders of magnitude smallerthan that of the motors we conclude that the power consumptionoverhead of running the VirtualDrone is negligible

6 RELATEDWORKCurrent unmanned vehicle systems are very vulnerable to cyber-aacks as demonstrated by recent aacks Maldrone [8] is a so-ware virus that can compromise drones based on ARM Linux sys-tems e malware can open a backdoor in the Parrot AR Dronesinfect on-board soware and take over the control Pleban et al[23] presented analysis details on the insecure WiFi network andOS user management of the Parrot AR Drones Also researchersdemonstrated a hijacking of DJI consumer drones by emulatingfake GPS signals using low-cost soware dened radio tools [11]It is also possible to inject MAVLink message into a radio link bymodifying the radio rmware and hijack a ying drone [9] whichwe reproduced for our case study Javaid et al [15] addressed somevulnerabilities of wireless communications channels in unmannedaerial vehicles Commercial airplanes are also facing with suchsecurity problems e Actel ProASIC chip used in early Boeing

ICCPS April 2017 Pisburgh PA USA M-K Yoon et al

787 had a backdoor [6] that could allow an aacker via internetconnection or as a passenger to use entertainment system in theaircra to take over the control of the aircra

Advances in virtualization technologies have enabled VirtualMachine Introspection (VMI) [14] in which a trusted VM or theVMM monitors and analyzes the state of applications or OS runninginside untrusted VMs By placing the detection mechanism outsideof the VM it monitors (ie the untrusted VMs) VMI overcomesthe vulnerability of the traditional host-based intrusion detectionsystems VMIs have been applied to process execution monitor-ing [25] control-ow integrity check [22] virtual memory and diskmonitoring [20] dynamic information ow tracking [29] etc

Hardware-based approaches can also be used to isolate vulnera-ble components ARM TrustZone [28] is an architectural extensionthat allows a coexistence of secure world and normal world usingthe same on-chip hardware Access to certain secure componentsare blocked depending on the execution mode Azab et al [13]proposed TZ-RKP which protects the integrity of operating systemkernel that runs on a normal world by running a security monitorin the secure world Zhou et al [33] use ARM processors memorydomain support for soware fault isolation Yoon et al [31] takesadvantage of the redundancy of a multicore processor a core is usedto monitor the execution time of a real-time application runningon a monitored core It was extended to monitor memory behaviorfor system-wide anomaly detection [32] and to protect in-place se-curity monitoring module [30] ese hardware-based approachesprovide beer security than virtualizations can do because the lat-ter relies on the security and correctness of the VMM which issusceptible to aacks [21] However virtualization-based methodshave advantages in that no hardware modication is needed andthat they are more exible due to the soware control

7 CONCLUSIONIn this paper we presented the VirtualDrone framework as a solu-tion to increasing security threats to unmanned aerial systems euse of this framework allows system designers (or users) to runadvanced ight applications in an untrustworthy environment Ourprototype implementation requires a minimal eort to build theframework on an o-the-shelf platform with open-source sowarestack rough case studies we demonstrated that the frameworkprovides an integrated way to handle various security threats thatwould otherwise have required potentially conicting requirementsNevertheless there still remains challenges for practical use of theframework We used a full-featured autopilot for both normaland safety controllers in the current implementation simply for ademonstration purpose only It is desirable to run a fully-veriedcontrol soware in the SCE Hence we plan to adopt and implementa high-assurance controller

REFERENCES[1] ArduPilot Autopilot Suite hpwwwardupilotorg[2] Emlid NAVIO+ hpsdocsemlidcomnavio[3] LibVMI hplibvmicom[4] QEMU hpwikiqemuorg[5] Raspberry PI 2 Model B

hpswwwraspberrypiorgproductsraspberry-pi-2-model-b[6] Cyber-aack concerns raised over Boeing 787 chiprsquos rsquoback doorrsquo e Guardian

hpswwwtheguardiancomtechnology2012may29cyber-aack-concerns-boeing-chip

[7] 3DRrsquos Solo Drone Boasts Dual Linux Computers Run-ning Dronecode hpswwwlinuxcomnews3drs-solo-drone-boasts-dual-linux-computers-running-dronecode

[8] A hacker developed Maldrone the rst malware for drones Se-curity Aairs hpsecurityaairscowordpress32767hackingmaldrone-malware-for-droneshtml

[9] Hijacking drones with a MAVLink exploit hpdiydronescomprolesblogshijacking-quadcopters-with-a-mavlink-exploit

[10] alcomm Goes Ubuntu for Drone Reference Platform hpswwwlinuxcomnewsqualcomm-goes-ubuntu-drone-reference-platform

[11] Watch GPS Aacks at Can Kill DJI Drones Or Bypass White HouseBan Forbes hpwwwforbescomsitesthomasbrewster20150808qihoo-hacks-drone-gps26431a2853fe

[12] Intel Aero Compute Board hpwwwintelcomcontentwwwusentechnology-innovationaerial-technology-overviewhtml

[13] Ahmed M Azab Peng Ning Jitesh Shah an Chen Rohan Bhutkar GuruprasadGanesh Jia Ma and Wenbo Shen 2014 Hypervision Across Worlds Real-timeKernel Protection from the ARM TrustZone Secure World In the ACM Conferenceon Computer and Communications Security

[14] Tal Garnkel and Mendel Rosenblum 2003 A Virtual Machine IntrospectionBased Architecture for Intrusion Detection In the Network and Distributed Sys-tems Security Symposium

[15] Ahmad Y Javaid Weiqing Sun Vijay K Devabhaktuni and Mansoor Alam 2012Cyber security threat analysis and modeling of an unmanned aerial vehiclesystem In the IEEE Conference on Technologies for Homeland Security

[16] Andrew J Kerns Daniel P Shepard Jahshan A Bhai and Todd E Humphreys2014 Unmanned Aircra Capture and Control Via GPS Spoong Journal ofField Robotics 31 (2014)

[17] Jiuxing Liu Wei Huang Bulent Abali and Dhabaleswar K Panda 2006 High Per-formance VMM-bypass IO in Virtual Machines In the USENIX Annual TechnicalConference

[18] Y Mo and B Sinopoli 2015 Secure Estimation in the Presence of IntegrityAacks IEEE Trans Automat Control 60 4 (2015) 1145ndash1151

[19] Miroslav Pajic James Weimer Nicola Bezzo Paulo Tabuada Oleg Sokolsky InsupLee and George J Pappas 2014 Robustness of Aack-Resilient State EstimatorsIn the ACMIEEE International Conference on Cyber-Physical Systems

[20] Bryan D Payne Martim Carbone and Wenke Lee 2007 Secure and FlexibleMonitoring of Virtual Machines In the Annual Computer Security ApplicationsConference

[21] Gabor Pek Andrea Lanzi Abhinav Srivastava Davide Balzaroi Aurelien Fran-cillon and Christoph Neumann 2014 On the Feasibility of Soware Aackson Commodity Virtual Machine Monitors via Direct Device Assignment In theACM Symposium on Information Computer and Communications Security

[22] Nick L Petroni Jr and Michael Hicks 2007 Automated Detection of PersistentKernel Control-ow Aacks In the ACM Conference on Computer and Communi-cations Security

[23] Johann-Sebastian Pleban Ricardo Band and Reiner Creutzburg 2014 Hackingand securing the ARDrone 20 quadcopter investigations for improving thesecurity of a toy In the SPIEMobile Devices andMultimedia Enabling TechnologiesAlgorithms and Applications

[24] Lui Sha 2001 Using Simplicity to Control Complexity IEEE Sow 18 4 (2001)20ndash28 DOIhpdxdoiorgdxdoiorg101109MS2001936213

[25] Deepa Srinivasan Zhi Wang Xuxian Jiang and Dongyan Xu 2011 Process Out-graing An Ecient rdquoout-of-VMrdquo Approach for Fine-grained Process ExecutionMonitoring In the ACM Conference on Computer and Communications Security

[26] Nils Ole Tippenhauer Christina Popper Kasper Bonne Rasmussen and SrdjanCapkun 2011 On the Requirements for Successful GPS Spoong Aacks In theACM Conference on Computer and Communications Security

[27] X Wang N Hovakimyan and L Sha 2013 L1Simplex Fault-tolerant controlof cyber-physical systems In the ACMIEEE International Conference on Cyber-Physical Systems

[28] Peter Wilson Alexandre Frey Tom Mihm Danny Kershaw and Tiago Alves2007 Implementing Embedded Security on Dual-Virtual-CPU Systems IEEEDes Test 24 6 (Nov 2007) 582ndash591

[29] Heng Yin Dawn Song Manuel Egele Christopher Kruegel and Engin Kirda 2007Panorama Capturing System-wide Information Flow for Malware Detection andAnalysis In the ACM Conference on Computer and Communications Security

[30] Man-Ki Yoon Mihai Christodorescu Lui Sha and Sibin Mohan 2016 eDragonBeam Framework Hardware-Protected Security Modules for In-PlaceIntrusion Detection In the ACM International Systems and Storage Conference

[31] Man-Ki Yoon Sibin Mohan Jaesik Choi Jung-Eun Kim and Lui Sha 2013SecureCore A Multicore-based Intrusion Detection Architecture for Real-TimeEmbedded Systems In the IEEE Real-Time Embedded Technology and ApplicationsSymposium

[32] Man-Ki Yoon Sibin Mohan Jaesik Choi and Lui Sha 2015 Memory Heat MapAnomaly Detection in Real-Time Embedded Systems Using Memory BehaviorIn the ACMEDACIEEE Design Automation Conference

[33] Yajin Zhou Xiaoguang Wang Yue Chen and Zhi Wang 2014 ARMlockHardware-based Fault Isolation for ARM In the ACM Conference on Computerand Communications Security

VirtualDrone Architecture for Aack-Resilient UAS ICCPS April 2017 Pisburgh PA USA

A ACTUATOR VIRTUALIZATION

IO Proxy

PWM Generator(PCA9685)

TrustedController

Motor Driver

Motor Interface

Virtual Motor Driver

Hardware

Host OSI2C

UntrustworthyController

Motor Interface

Security amp Safety Monitor

NCE (VM) SCE (Host)

MotorThread

Host-Guest Communication

Motors 0123

Figure 16 Actuator virtualization in the VirtualDroneframework

Figure 16 shows how an actuator is virtualized in the Virtual-Drone framework which is similar to the sensor virtualizationexplained in Section 33 e controller running in the NCE com-putes a set of PWM (Pulse Width Modulation) output values tocontrol the motors of the vehicle e controller writes these valuesto the virtual motor driver through the motor interface It transfersthe data to an IO proxy thread that relays the PWM values to themotor driver in the SCE e motors are nally actuated by analogsignals converted by the on-board speed controller

B DETAILS ON VIRTUALIZATIONSensors e following describes how the sensors are virtualizedin our prototype implementationbull Inertial Measurement Unit (MPU9250) e device driver run-

ning on the host retrieves a raw IMU data (14 bytes) every 1ms through SPI However every 5th sample is actually used forcontrol (hence the eective control frequency is 200 Hz) edata includes a 3-axis gyroscope and 3-axis accelerometer values

bull Barometer (MS5611) is sensor measures the barometric pres-sure and temperature e driver runs a state machine thatoperates at a frequency of 25 Hz A raw data (24 bits) retrievedfrom the sensor through I2C is converted to either pressure ortemperature value depending on the state (8 bits)

bull Compass (AK8963) It measures terrestrial magnetism in the 3axes at a frequency of 50 Hz using I2C Total 24 bytes (includingper-axis calibration factor) of raw data are fed to the NCE

bull Analog-to-Digital Converter (ADS1115) It measures the voltageson 6 ADC channels It reads each channel every 600 ms throughI2C For each channel a data of 40 bits (8 bits for channel ID and32 bits for sampled data) is transferred to the VM

bull GPS (u-blox NEO-M8) It provides the current longitude latitudeand altitude of the vehicle the time information (current millisec-ond time of week) etc e driver reads UBX protocol messagesfrom the u-blox GPS receiver through SPI parses each one andthen obtains the above information e parsing is stateful anda aer-parsing data can be at most 1K bytes It is fed to the NCEat the frequency of 5 Hz

Actuator For the motor actuation the virtual controller in theNCE sends the PWM values (for the four motors) to the host at thefrequency of the main control loop (ie 200 Hz)

Radio Control Input A remote control via radio link is used tomanually control (armdisarm ight maneuver) the quadcoptere raw input pulses are retrieved through DMA (Direct MemoryAccess) at 1666 Hz About every 18 ms (ie 55 Hz) a new set ofPWM values representing the stick and switch movements (total 8channels) becomes available As done for the sensors mentionedabove the IO proxy runs an RC feeding thread However insteadof feeding the raw pulse data we send the processed data ie thePWMs in order to avoid the overhead due to feeding the raw dataat such a high frequency (1666 Hz)

C ATTITUDE CONTROL AND ERROR BOUND

Time (s)50 55 60 65 70 75 80 85

Rol

l Pi

tch

Yaw

Erro

rs

-25000

-20000

-15000

-10000

-5000

0

5000

10000

15000

20000

25000RollPitchYaw

Time (s)50 55 60 65 70 75 80 85

RC

Inpu

t (PW

Ms)

800

1000

1200

1400

1600

1800

2000

2200RollPitchThrottleYaw

Drone hit the ground

Switched to SCE

Figure 17 e roll pitch yaw errors (top) measured duringthe dronersquos extreme movements e bottom plot shows theroll pitch throttle and yaw targets set by the pilot using theremote controller

e APM uses a double-loop PIDP control to stabilize the quad-copter e Angle loop aka the outer loop controls the aitudeof the vehicle e Angle loop utilizes a P control to achieve thedesired aitude by outpuing a desired angular speed ie the an-gular speed setpoint to the Rate loop aka the inner loop eAngle looprsquos output ie the angular speed setpoint is proportionalto the dierence between the target angle value set by the pilot(or autopilot when in autonomous ight mode) and the measuredangle value from the IMU sensor e Rate loop controls the aituderates of the aircra e Rate loop continuously calculates an errorvalue as the dierence between the angular speed setpoint and themeasured angular speed from the IMU sensor A PID control is

ICCPS April 2017 Pisburgh PA USA M-K Yoon et al

utilized in Rate loop to minimize the error over time by outpuingPWM signals to control motors

For the thresholds on the errors we used plusmn20 000 (radsec) forroll and pitch and plusmn10 000 (radsec) for yaw e switching logicactivates when the violation happens three times consecutivelyWe obtained these bounds on the errors by measuring from bothnormal and extreme movements of the prototype drone e topplot in Figure 17 shows those errors measured during the dronersquosextreme movements and the boom plot shows how the pilot cre-ated the movements e result indicates that the errors are wellbounded even when the drone experiences such movements epilot intentionally made the drone hit the ground at time between75 sec and 76 sec aer which the control is switched to the SCEWe did not aempt to nd optimal thresholds e smaller thethreshold is the easier it is for the SCE to recover to a stable stateHowever at the same time it could create more false positives

D DETECTION OF HIJACKING ATTEMPT

(a) LegitimateTim

e

Vehicle GCS

hellip

Attacker

hellip

Unexpected

Time

VehicleGCS

hellip

(b) Hijacking attempt

Figure 18 (a) MAVLink messages exchanged between theGCS and the vehicle for waypoint setup (b) e legitimateGCS can detect the attackerrsquos update on the vehicles routeas the vehiclersquos responses are unexpected

In order for a GCS to set waypoints for a vehicle a series ofMAVLink messages are exchanged Figure 18(a) shows the MAVLinkwaypoint protocol e GCS rst sends MISSION COUNT(N) to thevehicle where N represents the number of waypoints that it willset e vehicle prepares for receiving the N waypoints and thenrequests for each waypoint by sending MISSION REQUEST(i) untilall the waypoint locations are received

Note that both the legitimate GCS and the aacker need to followthis protocol to set any waypoints From the vehiclersquos perspectivethe initialization requests (ie MISSION COUNT(N)) from them areindistinguishable at is the vehicle itself cannot detect suspiciousrequests for a route change However the fact that the aacker canreceive messages from the vehicle means that the legitimate GCScan also hear what the vehicle responds to the aackerrsquos requestAs Figure 18(b) shows the legitimate GCS can detect the aackerrsquosupdate on the vehiclersquos waypoints when it receives unexpectedMISSION REQUEST messages as it did not initialize the message ex-change Due to such stateful communication the MAVLink protocolenables detecting other types of suspicious aempts (eg changingcontrol parameters) as well

E GEO-FENCE ATTACK ROOTKITWe developed a rootkit that disables the geo-fence and sends thevehicle into a no-y zone e rootkit nds the APM process andthen modies itsmemory that stores (i) the ag that enablesdisablesthe geo-fencing and (ii) the list of waypoints ese are loadedfrom the APM conguration le (varAPMArduCopterstg) onits startup and buered in the memory

Waypoint 3Waypoint 2

Waypoint 4

Geo-fence enabled

Figure 19 ewaypoint list and geo-fence enable ag storedin the memory of APM process An attacker who gained aroot-level access canmodify thesememory values to disablethe geo-fence and then send the drone to a new location

Figure 20 e rootkit that disables the geo-fence and modi-es the ight plan by manipulating the APMrsquos memory

One can change these values remotely through radio which how-ever is easy to prevent since radio communication can be monitoredeasily Modifying the buered values in the memory is dicult toprevent especially if the aacker has gained a root access e mem-ory locations of these data can be easily found if the source codeor the executable binary is available Figure 19 shows the memorydump of the waypoint list and geo-fence enable ag Figure 20shows how these values are modied by the rootkit

  • Abstract
  • 1 Introduction
  • 2 Background
  • 3 VirtualDrone Framework
    • 31 High-level Framework
    • 32 Assumptions and Adversary Model
    • 33 Virtual Sensing Actuation and Communication
    • 34 Security and Safety Monitoring
      • 4 Implementation
      • 5 Experiments
        • 51 Case Study
        • 52 Discussion
          • 6 Related Work
          • 7 Conclusion
          • References
          • A Actuator Virtualization
          • B Details on Virtualization
          • C Attitude Control and Error Bound
          • D Detection of Hijacking Attempt
          • E Geo-Fence Attack Rootkit
Page 4: VirtualDrone: Virtual Sensing, Actuation, and ... · Figure 1: Simplex architecture. the so›ware environment, in conjunction with the increased capa-bilities and complexities of

ICCPS April 2017 Pisburgh PA USA M-K Yoon et al

IO Proxy

Inertial Measurement Unit (MPU9250)

TrustedController

MPU9250 Driver

IMU Interface

IMU Raw Data

Receiver

Hardware

Host OSSPI

UntrustworthyController amp Apps

IMU Interface

Security amp Safety Monitor

NCE (VM) SCE (Host)

IMU Feeder Thread

Host-Guest Communication

Figure 4 Sensor virtualization in the VirtualDrone frame-work

on the current high-level context of each IO operation which ishidden in the low-level IO emulation

bull e aacker may even aempt denial-of-service aacks on theshared devices by simply keeping them busy

bull Allowing low-level IO transactions also requires a tight syn-chronization between the NCE and the SCE because some IOoperations are stateful For instance a compass sensor used inour prototype performs a register read in two stages ndash the devicedriver initializes a read by writing the read address waiting for10 ms and then collecting the data GPS parsing is also donewith a state machine Without a proper synchronization thestate of the device could be lost due to interleaving transactionsfrom the NCE and the SCE An aacker in the NCE could usethis very property to hinder a timely correct use of sensor databy the SCE (eg aacker may reinitialize a sensor while the SCEis waiting for a sample) If a synchronization is to be enforcedthe availability could signicantly degrade because the deviceshould be locked for a long time to serve one at a timeTo solve the challenges illustrated above we take a more passive

approach to sensor and actuator virtualization e frameworkruns an IO proxy for each device in the SCE that feeds sensor datato the NCE is is a suitable mechanism because of the periodicnature of their operations and the small data sizes that we cannd from typical sensor and actuator devices on UAS platforms(see Table 1 in Section 4) Since it is known and xed how oeneach sensor data should be sampled the IO proxy only needs tomake sure that the SCE feeds the sensor data in time It feeds rawsensor data instead of processed ones so that the applications inthe NCE can process them as needed From the perspective ofthe NCE this sensor feeding looks as if the data is sampled frominvisible inaccessible devices (ie virtual sensors) Hence the SCEcan also remove certain side-channels (eg radio signal strengthindicator) present in sensor information by not providing it to theNCE especially if this would not degrade the normal functionalityof the NCE

Figure 4 illustrates how an IMU (Inertial Measurement Unit)sensor is virtualized in our prototype based on an open-sourceautopilot suite [1] A user-level device driver (MPU9250 Driver)uses the SPI interface to fetch raw IMU data e IMU IO proxyruns a feeder thread which sends the current sample to the rawdata receiver running inside the NCE through a host-to-guest com-munication interface e receiver behaves as a device driver from

GCS

Controller

ControllerApp

Switch

NCESCE

Hidden Channel

Telemetry Analyzer

Radio Transceiver

(eg Switch to SCE and Return to Home)

Monitors NCErsquos Telemetry Data

Figure 5 Telemetry virtualization creates a hidden commu-nication channel between the SCE and the GCS

which the higher-level interface (ie IMU interface) can fetch sen-sor data without needing to know the particular model of the realdevice Hence no modications are needed in the higher layersActuators (eg motors) are virtualized in a similar way as explainedin Appendix A

Virtual Communication Applications running in the NCE re-quire network communication with the external world for datatransfer remote management update etc Hence as shown inFigure 3 the NCE allows users to directly access into the NCEthrough for example a port forwarding mechanism provided bythe VMM However there exist some communication channels thatneed to be managed by the SCE ndash the ground control and the remotecontroller

e ground control application utilizes a radio communicationchannel to establish a telemetry transfer between the ground con-trol station (GCS) and a vehicle e telemetry data such as theGPS location and sensor measurement can be monitored at theGCS It can also use telemetry to dynamically control the vehicleby sending commands for seing new waypoints landing armingetc However this communication channel can be exploited by anadversary who can simply disconnect the channel by disabling theradio driver Hence we virtualize the telemetry communicationchannel as done for the sensor and actuator

e key benet of this mechanism is that it can create a hiddencommunication channel for the SCE as illustrated in Figure 5 Forexample the GCS can send a special command to the SCE egswitching to the SCE and returning to the home which is lteredby the telemetry analyzer (part of the telemetry IO proxy) thatinspects every incoming message ese hidden messages are notrelayed to the NCE We take advantage of this mechanism as asolution to drone hijacking scenario presented in Section 51 upona detection of a hijacking aempt the GCS commands the SCEto switch to the host control mode and to return to where it islaunched We can use the same mechanism to reboot the virtualmachine (aer the control is switched to the SCE) from the GCSwhen a suspicious behavior is observed Note that an aacker cansend these special commands Hence such commands should bechosen carefully in such a way that a successful aempt cannotlead to a safety hazard

A hand-held remote controller (see Figure 11 in Section 5) is usedby a human pilot to wire-lessly y a vehicle e communicationis also carried via a radio link (eg 24 GHz) It is virtualized inthe same fashion as the telemetry radio and we can also create ahidden channel For instance in our prototype implementation webind one of the switches of the remote controller with the functionthat tells the VirtualDrone to switch to the SCE e pilot usesthis function to manually control the vehicle when the NCE-drivenvehicle shows abnormal behavior

VirtualDrone Architecture for Aack-Resilient UAS ICCPS April 2017 Pisburgh PA USA

Security amp Safety Monitor

Geo-fence

Sensor Data(IMU GPS Battery hellip)

Telemetry Command from GCS

Telemetry Report from NCE

Actuation Command from NCE

Attitude Errorfrom SCEVMI Fake Report

Detector

Safety Monitor

Command to SCE(Switch RTL hellip)

Figure 6 Example conguration of the security and safetymonitor

34 Security and Safety MonitoringFigure 6 shows an example conguration of the security and safetymonitor and data ow based on the prototype implementation pre-sented in Section 4 Notice from the gure (and also from Figure 4)that the monitor receives the sensor data for analysis Becausethe data are fetched from the trusted environment the monitoris guaranteed to use the true measurement for a safety analysisHence we can detect aacks that for example try to put the vehiclein an open-loop state or to set wrong control parameters In ourprototype quadcopter we analyze the aitude (ie roll pitch andyaw) errors which are bounded in normal conditions to detect anunsafe physical state One can also implement a control-theoreticanalysis [27] e monitor also analyzes the actuation outputs fromthe NCE as shown in Figure 16 in Appendix A to prevent potentialsafety violations For example the monitor can upper-bound onthe motor outputs to prevent motor failure due to the aackerrsquos at-tempt to apply abrupt voltage changes e monitor can also checkif it receives actuation commands from the NCE at the denedfrequency ndash abnormal paerns could be an indicator of a potentialsecurity breach In order to handle physical aacks to the sensorsone can also implement a sensor aack detection technique [18 19]using the true measurements available in the SCE

e SCE also inspects communications between the NCE andthe external world e telemetry analyzer shown in Figure 5 inter-cepts radio telemetry messages to and from the NCE and providesthem to the monitoring module for analysis Using this mecha-nism one can detect an aacker that for example sends out fab-ricated messages (eg ight path report replayed or generated bya soware-in-the-loop simulation) in an aempt to misinform theground control station about the true physical and logical states

e monitoring module can also host critical safety measuresthat otherwise would run at the same layer as untrustworthy ap-plications For instance geo-fencing typically runs as a part of anautopilot soware An aacker can simply disable it or modify theconguration to y the vehicle into a no-y-zone Since this typeof function does not require external interaction it can run in theSCE using the true sensor measurements (eg GPS location)

Virtualization also enables the use of virtualization-based secu-rity measures for instance virtual machine introspection (VMI) [14]e monitoring module in the SCE can implement various VMItechniques to monitor the behavior of the applications and the guestOS running in the NCE For example through interfaces providedby the VMM the module can continuously check the integrity ofthe kernel code andor its critical data structures (eg interruptvector table process and module lists) for detection of rootkits andinspect network connections and packets for detection of back-doors and so on Upon a detection the framework may switch tothe SCE as a preventive action from which moment comprehensive

Navio+(Sensor board)

Raspberry PI 2(Quad-core ARM Linux)

GPS

Telemetry Radio (915MHz) Radio Receiver for

Remote Control (24GHz)

Figure 7 adcopter prototype implementation with Rasp-berry Pi 2 and Navio+ sensor boards

Security amp Safety Monitor

Virtual Machine (QEMU)

Linux

Hardware

ArduPilot

IMU Barometer

Compass

Motors RC

DMASPI I2C

Virtual Sensorsamp Actuators amp

Communication

Linux

ArduPilot

IO Proxies

Host User Space

ADC

KVM

HW

AppApp

Net

Network

Port-

Forw

ardi

ng

IC

RG

AM

Nav

io+

GPSTelemetry

Radio

Serial

App

B

TSock

et

Seria

lPor

t

WiFi

Figure 8 VirtualDrone implementation on the prototype

security analyses (eg deep memory scan rebooting VMs) can takeplace without losing control of the vehicle

4 IMPLEMENTATIONIn this section we present the implementation details for our proto-type of the VirtualDrone framework on a quadcopter drone shownin Figure 7 running an open-source autopilot on an embeddedcomputing board

System Implementation We implemented theVirtualDrone frame-work on a Raspberry PI 2 Model B (RPI2) board [5] as depictedin Figure 8 It has a quad-core ARM Cortex-A7 CPU each coreof which runs at 900 MHz and has a main memory of 1 GB eprocessor features the ARM Architecture Virtualization ExtensionIt enables running VMs with unmodied guest OS using KVM(Kernel-based Virtual Machine)

On the host we run Linux 318 No modication was made tothe kernel except that we enabled virtualization with KVM in theconguration On top of the host OS we run unmodied QEMUv23 [4] an open-source virtual machine monitor As explainedin Section 32 QEMU ie the VMM is our trusted computing base(TCB) We created one VM that emulates an ARM Versatile ExpressA15 board (which runs a Cortex-A15 CPU the same ARMv7 ar-chitecture as Cortex-A7) and assigned one of the four cores of theprocessor exclusively to the virtual machine In the virtual machinewe run unmodied Linux 43

We use QEMUrsquos port forwarding mechanism to open an SSH (Se-cure Shell) port on the virtual machine through which a user logsin to launch update manage services and applications More portscan be open to the virtual machine using the port forwarding mech-anism In this paper we assume the QEMUrsquos port forwarding mecha-nism is secure

In our prototype we chose to use Linux as the host OS Howeverit is desirable to use a formally veried OS on the host instead of

ICCPS April 2017 Pisburgh PA USA M-K Yoon et al

Table 1 e rate and amount of data transfer between thesecure and normal control environments

Component Direction Rate SizeIMU Hostrarr VM 200 Hz 14 bytes

Barometer Hostrarr VM 25 Hz 4 byteCompass Hostrarr VM 50 Hz 24 bytes

ADC Hostrarr VM 167 Hz 5 bytesGPS Hostrarr VM 5 Hz Max 1K bytes

Motor Output VMrarr Host 200 Hz 16 bytesRC Input Hostrarr VM 55 Hz 16 bytesTelemetry Hostharr VM Vary Vary

such a general-purpose monolithic kernel Our choice of Linux isto minimize engineering eorts to port VMM autopilot and sensorand actuator device drivers to a new OS Our implementation didnot require any modications to the host OS VMM and guest OS

Autopilot We stack Navio+ sensor board [2] on top of the Rasp-berry PI 2 (as shown in Figures 7 and 8) to provide various sensordata for ight control e NCE (ie the virtual machine) runs theopen-source ArduPilot (aka APM) [1] autopilot suite as the ightcontrol soware for our quadcopter drone APM combines sensordata and RC ight maneuver commands to compute correct inputsfor the four motor-prop units which are sent by the actuator portsof the Navio+ board to drive the actuators

As shown in Figure 8 we run one instance of APM in the SCE(ie the host) e Simplex architecture suggests the use of a robustcontroller for the safety controller in order to handle and recoverfrom physical failures For demonstration purposes we chose touse the APMrsquos default PID controller as the trusted controller In aproduction implementation however a high-assurance controllerwould be used

Virtualization e IO proxy shown in Figures 4 and 8 runsone feeder thread for each sensor Each sensor retrieves a newsample at a xed frequency Each feeder thread then sends thenewly available data to the virtual machine using a host-guestcommunication channel Appendix B explains how the sensorsand the actuators are virtualized in our prototype implementationwhich are also summarized in Table 1

Host-GuestCommunication We use QEMUrsquos virtio-serial fordata transfer between the host (ie IO proxy threads) and guestsystems It creates virtual serial ports in the guest each of whichis mapped to a character device such as Unix domain socket pipeTCPUDP port etc in the host side We created eight virtualserial ports for the components listed in Table 1 e IO proxythreads in the SCE use eight Unix domain sockets to communicatewith the virtual machine One may use other types of host-guestcommunication mechanisms such as shared memory In our im-plementation we aimed to utilize an existing infrastructure thatdoes not require any modication or insertion to the stock QEMUe virtio-serial is adequate enough to handle the low-speedlow-volume data transfer for sensoractuatorcommunication vir-tualization We assume virtio-serial is trustworthy as it is partof QEMU the TCB

Virtual Telemetry e APM uses a serial port (UART) for teleme-try radio transceiver1 Hence the NCE-side APM does not need any1Our prototype copter also supports WiFi and APMrsquos telemetry can be transferredthrough UDP or TCP as well e APM abstracts these away by treating them as UARTcommunication

additionmodication for the virtual telemetry e SCE-side APMreadssends telemetry data fromto the real UART port performs altering (as described in Figure 5) and relays tofrom the virtualmachine using the virtual-serial port mechanism explained abovee APM uses MAVLink protocol (Micro Air Vehicle Communica-tion Protocol)2 MAVLink contains all interface functions to controlthe vehicle monitor states change parameters etc Each MAVLinkmessage size and frequencies vary depending on the message typee messages typically have small size (the maximum is 263 bytes)and low frequency (a few Hz)

5 EXPERIMENTSWe now present case studies that demonstrate how the Virtual-Drone framework can detect and prevent various types of securityand safety violations

51 Case StudyTo demonstrate the eectiveness and versatility of our frameworkwe consider the following ve scenarios Note that we are notproposing new detectionmitigation solutions for the use cases pre-sented here Each scenario could be handled in many dierent waysFor instance hijacking can be easily defeated by a simple authen-tication of the communication We instead intend to demonstratehow an integrated platform ie the VirtualDrone framework candefend against various aack scenarios that would otherwise havebeen handled separately with potentially conicting requirementsWe also note that these aacks can occur in a number of dierentforms In this paper we consider a pessimistic scenario the aackercan know the HWSW conguration and even gain a root accessto the NCE

Attacks on Safety An adversary can launch an aack on thesafety of a vehicle by for example degrading the availability ofcritical sensors (eg IMU) or actuators or the control performance(eg by changing PID gains) e worst-case scenario from thevehiclersquos safety perspective is when the aacker disables the ightcontroller while the vehicle is ying is immediately leads thesystem to an open-loop state which will cause the vehicle to crashTo demonstrate this type of aack we consider an extreme sce-nario in which the ight controller is killed by an aacker eaacker can launch this aack by for example entering through abackdoor replacing the control program with one that self-crashesor installing a rootkit We do not assume specic scenario of howit is launched We implemented a Linux kernel module that 1) ndsthe APM autopilot process from the kernelrsquos process list and then2) kills the process e aacker could achieve the same goal bycausing the virtual machine to crash

ere could be several ways to detect this type of aack One mayuse a heartbeat mechanism which however can be circumvented byan aacker that impersonates the ight controller Instead we takeadvantage of the SCErsquos ability to monitor the true physical state ofthe vehicle We use the aitude control performance measured atthe SCE At each control loop the SCE-side controller calculates theerrors of the rate control on the pitch roll and yaw of the copterDuring a stable ight the rate errors are bounded as shown inFigure 17 in Appendix C because the ight controller is active tominimize the rate errors In case of an open-loop state the ightcontroller cannot work to minimize the rate errors Due to the factthat a multirotor system is naturally an unstable ight platform2hpqgroundcontrolorgmavlinkstart

VirtualDrone Architecture for Aack-Resilient UAS ICCPS April 2017 Pisburgh PA USA

865 87 875 88 885 89 895 90 905 91Time (s)

-10000-7500-5000-2500

0250050007500

10000125001500017500200002250025000

Rol

l Pi

tch

Yaw

Erro

rs

RollPitchYaw

865 87 875 88 885 89 895 90 905 91Time (s)

1000

1100

1200

1300

1400

1500

1600

1700

1800

1900

2000

Mot

or o

utpu

t (PW

Ms)

Motor[0]Motor[1]Motor[2]Motor[3]

Open-loop

Kill ArduPilotprocess

SafetyViolation

Normal Control Mode(NCE)

Secure Control Mode(SCE)

Figure 9 e motor outputs (top) and the roll pitch yawerrors (bottom) measured at the SCE e attacker in NCEkills the ight controller which leads the copter to an open-loop state e SCE takes the control when the errors growbeyond the thresholds aer which the copter is stabilized

the rate errors will increase quickly beyond the normal bounderefore a properly chosen threshold of rate errors can be used indetection of ight safety violations Hence the security and safetymonitoring module in the SCE continuously checks if the errorsgrow beyond the threshold Upon a safety violation the frameworkswitches to the secure control mode Appendix C explains how theAPMrsquos aitude control works and how we obtained the thresholdof rate errors

Figure 9 shows the results of this experiment While the dronewas in the virtual control mode the aacker activated the rootkitmentioned above at time around 888 sec at which moment theAPM process running in the VM is killed e top plot in Figure 9shows the motor outputs (4 channels) from the motor driver in theSCE As we can see the drone was in an open-loop state for about300 ms e boom plot shows the aitude errors also measuredat the SCE e drone becomes unstable (ie the errors are faraway from zero) for a moment because no actuation is applied tothe motors during the open-loop period Upon the detection ofthe violation on the errors (at time around 891 sec) the control isswitched to the SCE from which moment the control loop is closedand the drone returns to a stable state

We also tested a scenario when the control parameters are modi-ed during ight Figure 10 shows the aitude control errors whenthis happens At time around 1643 sec a MAVLink message wassent via radio to change the proportional gain (180 times bigger thanthe original value) of the aitude controller As can be seen thedrone became unstable immediately e safety module detectedthe large roll errors aer which the SCE took the control

Time (s)162 164 166 168 170 172 174

Rol

l Pi

tch

Yaw

Erro

rs

-20000

-10000

0

10000

20000

30000

40000

50000

60000RollPitchYaw

Normal Control Mode

(NCE)

ChangeProportional

Gain

Secure Control Mode(SCE)

Figure 10 e roll pitch yaw errors when the proportionalgain of the attitude controller is set to an abnormally highvalue e SCE immediately stabilizes the drone upon thedetection of the unstable physical state

Hijacking It has been demonstrated that it is possible to hijack adrone by exploiting the MAVLink protocol [9] e idea is to send acommand that sets a new ight plan through the telemetry channele telemetry radio pair of the drone and the ground control station(GCS) distinguish themselves from others by their unique NetIDand the frequency band Hence by using the same NetID and radioband and running the same rmware (which decodes the MAVLinkpackets) as the target vehicle the aacker can send any MAVLinkmessages to the target

To demonstrate this aack scenario we used three telemetryradio (ie for the GCS the drone and the aacker) that utilize thesame frequency band (915MHz) and same default congurationSince the out-of-the-box default NetIDs are same the aackerrsquostelemetry radio did not need any rmware modication3 Figure 11describes the hijacking scenario e drone takes o at the launch-ing point (marked as lsquoTrsquo) and communicates with the GCS locatedat lsquoGrsquo e pilot ies the drone along the normal path e aackerlocated at lsquoArsquo then launches its ground control application en itsends a new waypoint plan to the drone which will send it to thelocation marked as rsquoWrsquo e aacker did not need to modify the3It is possible to nd out the NetID used between the GCS and the drone by modifyingthe rmware [9]

G

T

A

W

T

A

W

A

G

T

Hijack

Ground Control Station

Launching Point

Attacker

Hijacked Drone

Attacker

Figure 11 e attacker (lsquoArsquo) tries to hijack the drone yingalong the normal path and to send it to a newwaypoint (lsquoWrsquo)e attacker uses the same telemetry radio as the GCS andthe drone and unmodied APM Planner GCS

ICCPS April 2017 Pisburgh PA USA M-K Yoon et al

G G

T T

A A

W W

(a) Without VirtualDrone (b) With VirtualDrone

Figure 12 (a) e ight trajectory of the drone hijacked bythe attacker It is sent to new location lsquoWrsquo set by the attacker(b) e attackerrsquos attempt to hijack the drone is detected bythe GCS Upon the detection the GCS sends a special com-mand to the SCE which switches the control mode to theSCE and directs the drone to where it was launched

GCS program (the stock APM Planner 204 with default seings)Figure 12(a) shows the ight trajectory of the drone when it wassuccessfully hijacked by the aacker

While the drone itself cannot detect such a hijacking aemptthe GCS can detect it because of unexpected message exchange initi-ated by the aacker as detailed in Appendix D Hence we addedthe functionality that detects such unexpected messages to ourlegitimate GCS Upon a detection the GCS commands the droneto return to where it was launched as shown in Figure 12(b) istakes advantage of the VirtualDronersquos virtual telemetry explainedin Section 33 the SCErsquos telemetry proxy enables a hidden com-munication channel between the GCS and the SCE through whichthe former sends the drone a pre-dened set of special commandsIn this scenario the command from the GCS overrides the NCErsquosabnormal operation by switching the drone to the secure controlmode Note that the aacker might be able to send the same specialcommand However what it can do at worst is to send the droneback to the home

As explained in Section 34 the virtual telemetry also enables theSCE to detect if the NCE is trying to deceive the ground station Forexample aer a successful hijacking the aacker may report fakeGPS location (by replaying or by generating from SW simulator) tothe GCS so that it looks as if it is ying on the planned path etelemetry analyzer however can detect such aempts by analyzingeach outgoing MAVLink packet and comparing against the truelocation retrieved from the GPS receiver which is also implementedon our prototype

Corrupting Safety Functions Autopilot programs also supportcritical failsafe mechanisms that are activated under certain con-ditions such as losing radio communication signal or low-baeryIt is in fact easy to corrupt such a safety-critical measure becausetypically it can be enableddisabled remotely through a telemetrycommand (hence an aacker can send a command via radio asdone in the hijacking scenario) Moreover such a mechanism isoen implemented as a part of autopilot that runs at the user-levelHence an aacker who has gained a root access can easily corruptit by modifying the conguration le or the memory

4hpardupilotorgplanner2indexhtml

No-fly zone

Original Path

Figure 13 Attacker disables the geo-fence andmodiesWay-point 3 so that the drone ies into a no-y zone Such asafety-critical function can be protected by running in theSCE

In this case study the aacker corrupts the geo-fence mechanismGeo-fence employs positioning data such as GPS signal or localradio-frequency identiers to set up a virtual boundary to preventthe vehicle entering a prohibited zone e vehicle position ismonitored at all times such that before the vehicle enters a no-y zone the system could act accordingly to prevent a geo-fenceviolation Corruption of the geo-fence can result in a catastrophicresult an aacker may disable the geo-fencing and induce thevehicle to y into a congested airspace such as takeo pathwaysfor mid-air collision

To demonstrate this type of aack we developed a rootkit thatdisables the geo-fence of APM during a ight and sends it intoa no-y zone e rootkit executes this aack by modifying theAPMrsquos memory as detailed in Appendix E Our drone was plannedto y through a path (0-1-2-3) in an autonomous mode as shownin Figure 13 During the ight the aacker logged into the systemthrough WiFi and launched the rootkit when the drone was yingtoward Waypoint 2 e new Waypoint 3 set by the rootkit islocated inside a no-y zone and because the rootkit has alreadydisabled the geo-fence the drone consequently ied into the no-yzone deviating from the original path as shown in Figure 13

e SCE of VirtualDrone provides a protected layer at whichsafety-critical functions like geo-fence can be placed We imple-mented a simple geo-fence module in the security and safety mon-itoring module in the SCE It continuously monitors the currentGPS coordinate and checks it against the list of no-y zones alsostored at the SCE layer Upon a violation a pre-dened action istaken In our implementation the SCE takes back the control fromthe NCE and returns to where it was launched as done for thehijacking scenario explained earlier

Side-channel e virtualization of sensor actuator and commu-nication allows for hiding certain types of information from theNCE One of the examples is the RSSI (Received Signal StrengthIndication) that indicates the link quality between a pair of radiotransmier and receiver We especially consider a scenario in whichan aacker tries to estimate the location of the GCS by observingthe RSSI measured between the vehicle and the GCS Due to signalaenuation the radio signal is stronger as the vehicle is closer to theGCS Hence one can correlate the RSSI with the GPS coordinate

VirtualDrone Architecture for Aack-Resilient UAS ICCPS April 2017 Pisburgh PA USA

T

1

2

3

4

G

Lat 401626060Lng -883074907

0 20 40 60 80 100 120 140 160 180Time (s)

100

120

140

160

180

RSS

I

0 20 40 60 80 100 120 140 160 180Time (s)

401615

40162

401625

40163

401635

Latit

ude

0 20 40 60 80 100 120 140 160 180Time (s)

-88309

-88308

-88307

-88306Lo

ngitu

de

Figure 14 e drone ies through T-1-2-3-4-1 e graphsrepresent the RSSI (top) the latitude (middle) and the longi-tude (bottom) An attacker can estimate the location of theGCS by correlating the RSSI and the GPS information

Figure 14 illustrates such a possibility of side-channel e graphsin the gure represents the RSSI (between the drone and the GCS)and the GPS coordinate (latitude and longitude) measured whilethe drone ies through a path (T-1-2-3-4-1) If the aacker is able toobtain these RSSI information heshe can estimate the location (ora region) of the GCS by nding when the RSSI is high e resultsshow quite accurate estimation of the true GCS location (shown inthe map) A complex algorithm will allow for further narrowingdown the location e VirtualDrone framework eliminates thispossibility by not providing the RSSI information to the NCE Notethat RSSI is needed only for the SCE (eg switches to the SCEand then performs a pre-dened operation such as return-to-homewhen RSSI is low due to the loss of telemetry link) Furthermorebecause of the telemetry virtualization the NCE cannot even knowif the telemetry is communicated through a radio channel or anetwork (eg WiFi) In case of the network-based telemetry theSCE can even hide the IP address of the GCS

Virtual Machine Introspection Many rootkits modify criticalkernel data structures to intercept sensitive data hide maliciousprocesses or les etc For a demonstration we implemented a secu-rity module that checks the integrity of the system call table of theguest OS For this we chose to utilize an existing interface providedby QEMU namely the QEMU Machine Protocol (QMP) It allows host-side applications to communicate with or control a running QEMUVM We created a QMP Unix socket to which our security modulecan connect During the initialization of the VM the module dumpsthe current system call table and stores this initial state in memoryFrom then on the module regularly dumps the current table andcompares it against the one obtained initially Using this techniquewe were able to detect a known rootkit modhide1 that hijacks theopen call to hide itself from the kernel module list

Note that we are not proposing new rootkit detection methodshere We instead intend to demonstrate how the VirtualDroneframework can handle such a stealthy security violation One canuse a rich set of library for virtual machine introspection such asLibVMI [3] which we leave for future work

52 DiscussionSensor attack e VirtualDrone framework cannot handle phys-ical manipulations on the sensors such as GPS spoong esetypes of aacks are called sensor aack or false data injection aackand typically tackled by control-theoretic approaches [18 19] erequirement however is that the methods themselves should beprotected from cyber-aacks Hence one can implement such a

Time (sec)0 20 40 60 80 100 120 140 160 180

Vo

lta

ge

(v)

105

11

115

12Without VirtualDroneWith VirtualDrone

Figure 15 Voltage drop at the battery for 3-minutes of hov-ering with and without the VirtualDrone framework

technique on the SCE layer specically in the security and safetymonitoring module as it can see the true (but potentially physicallymanipulated) sensor measurements

Power consumption Since UAS typically runs on baery powerwe compare the power consumption of the prototype drone withand without the VirtualDrone framework In order to compare thepower consumption in a controlled environment (eg eliminatingvarying disturbance due to wind) we ew the drone indoors hov-ering it at a xed position We ew the drone for about 3 minuteswith the same fully-charged baery and measured the voltage dropsduring the ight

Figure 15 shows that the VirtualDrone does not impose over-head on the power consumption is is because the majority ofthe power is consumed by the motors to li the copter e powerconsumption by RPI2 board and the Navio+ sensors cannot exceed5 Was which is the upper bound of the power supply by the powermodule at is the power consumption by any on-board comput-ing cannot be more than 5 Was We calculated the average powerof the 3-minutes of ights which ranged between 114 and 118Was Hence the power consumption by any on-board computingcan be ignored Due to the fact that the upper bound of powerconsumption by computing is two orders of magnitude smallerthan that of the motors we conclude that the power consumptionoverhead of running the VirtualDrone is negligible

6 RELATEDWORKCurrent unmanned vehicle systems are very vulnerable to cyber-aacks as demonstrated by recent aacks Maldrone [8] is a so-ware virus that can compromise drones based on ARM Linux sys-tems e malware can open a backdoor in the Parrot AR Dronesinfect on-board soware and take over the control Pleban et al[23] presented analysis details on the insecure WiFi network andOS user management of the Parrot AR Drones Also researchersdemonstrated a hijacking of DJI consumer drones by emulatingfake GPS signals using low-cost soware dened radio tools [11]It is also possible to inject MAVLink message into a radio link bymodifying the radio rmware and hijack a ying drone [9] whichwe reproduced for our case study Javaid et al [15] addressed somevulnerabilities of wireless communications channels in unmannedaerial vehicles Commercial airplanes are also facing with suchsecurity problems e Actel ProASIC chip used in early Boeing

ICCPS April 2017 Pisburgh PA USA M-K Yoon et al

787 had a backdoor [6] that could allow an aacker via internetconnection or as a passenger to use entertainment system in theaircra to take over the control of the aircra

Advances in virtualization technologies have enabled VirtualMachine Introspection (VMI) [14] in which a trusted VM or theVMM monitors and analyzes the state of applications or OS runninginside untrusted VMs By placing the detection mechanism outsideof the VM it monitors (ie the untrusted VMs) VMI overcomesthe vulnerability of the traditional host-based intrusion detectionsystems VMIs have been applied to process execution monitor-ing [25] control-ow integrity check [22] virtual memory and diskmonitoring [20] dynamic information ow tracking [29] etc

Hardware-based approaches can also be used to isolate vulnera-ble components ARM TrustZone [28] is an architectural extensionthat allows a coexistence of secure world and normal world usingthe same on-chip hardware Access to certain secure componentsare blocked depending on the execution mode Azab et al [13]proposed TZ-RKP which protects the integrity of operating systemkernel that runs on a normal world by running a security monitorin the secure world Zhou et al [33] use ARM processors memorydomain support for soware fault isolation Yoon et al [31] takesadvantage of the redundancy of a multicore processor a core is usedto monitor the execution time of a real-time application runningon a monitored core It was extended to monitor memory behaviorfor system-wide anomaly detection [32] and to protect in-place se-curity monitoring module [30] ese hardware-based approachesprovide beer security than virtualizations can do because the lat-ter relies on the security and correctness of the VMM which issusceptible to aacks [21] However virtualization-based methodshave advantages in that no hardware modication is needed andthat they are more exible due to the soware control

7 CONCLUSIONIn this paper we presented the VirtualDrone framework as a solu-tion to increasing security threats to unmanned aerial systems euse of this framework allows system designers (or users) to runadvanced ight applications in an untrustworthy environment Ourprototype implementation requires a minimal eort to build theframework on an o-the-shelf platform with open-source sowarestack rough case studies we demonstrated that the frameworkprovides an integrated way to handle various security threats thatwould otherwise have required potentially conicting requirementsNevertheless there still remains challenges for practical use of theframework We used a full-featured autopilot for both normaland safety controllers in the current implementation simply for ademonstration purpose only It is desirable to run a fully-veriedcontrol soware in the SCE Hence we plan to adopt and implementa high-assurance controller

REFERENCES[1] ArduPilot Autopilot Suite hpwwwardupilotorg[2] Emlid NAVIO+ hpsdocsemlidcomnavio[3] LibVMI hplibvmicom[4] QEMU hpwikiqemuorg[5] Raspberry PI 2 Model B

hpswwwraspberrypiorgproductsraspberry-pi-2-model-b[6] Cyber-aack concerns raised over Boeing 787 chiprsquos rsquoback doorrsquo e Guardian

hpswwwtheguardiancomtechnology2012may29cyber-aack-concerns-boeing-chip

[7] 3DRrsquos Solo Drone Boasts Dual Linux Computers Run-ning Dronecode hpswwwlinuxcomnews3drs-solo-drone-boasts-dual-linux-computers-running-dronecode

[8] A hacker developed Maldrone the rst malware for drones Se-curity Aairs hpsecurityaairscowordpress32767hackingmaldrone-malware-for-droneshtml

[9] Hijacking drones with a MAVLink exploit hpdiydronescomprolesblogshijacking-quadcopters-with-a-mavlink-exploit

[10] alcomm Goes Ubuntu for Drone Reference Platform hpswwwlinuxcomnewsqualcomm-goes-ubuntu-drone-reference-platform

[11] Watch GPS Aacks at Can Kill DJI Drones Or Bypass White HouseBan Forbes hpwwwforbescomsitesthomasbrewster20150808qihoo-hacks-drone-gps26431a2853fe

[12] Intel Aero Compute Board hpwwwintelcomcontentwwwusentechnology-innovationaerial-technology-overviewhtml

[13] Ahmed M Azab Peng Ning Jitesh Shah an Chen Rohan Bhutkar GuruprasadGanesh Jia Ma and Wenbo Shen 2014 Hypervision Across Worlds Real-timeKernel Protection from the ARM TrustZone Secure World In the ACM Conferenceon Computer and Communications Security

[14] Tal Garnkel and Mendel Rosenblum 2003 A Virtual Machine IntrospectionBased Architecture for Intrusion Detection In the Network and Distributed Sys-tems Security Symposium

[15] Ahmad Y Javaid Weiqing Sun Vijay K Devabhaktuni and Mansoor Alam 2012Cyber security threat analysis and modeling of an unmanned aerial vehiclesystem In the IEEE Conference on Technologies for Homeland Security

[16] Andrew J Kerns Daniel P Shepard Jahshan A Bhai and Todd E Humphreys2014 Unmanned Aircra Capture and Control Via GPS Spoong Journal ofField Robotics 31 (2014)

[17] Jiuxing Liu Wei Huang Bulent Abali and Dhabaleswar K Panda 2006 High Per-formance VMM-bypass IO in Virtual Machines In the USENIX Annual TechnicalConference

[18] Y Mo and B Sinopoli 2015 Secure Estimation in the Presence of IntegrityAacks IEEE Trans Automat Control 60 4 (2015) 1145ndash1151

[19] Miroslav Pajic James Weimer Nicola Bezzo Paulo Tabuada Oleg Sokolsky InsupLee and George J Pappas 2014 Robustness of Aack-Resilient State EstimatorsIn the ACMIEEE International Conference on Cyber-Physical Systems

[20] Bryan D Payne Martim Carbone and Wenke Lee 2007 Secure and FlexibleMonitoring of Virtual Machines In the Annual Computer Security ApplicationsConference

[21] Gabor Pek Andrea Lanzi Abhinav Srivastava Davide Balzaroi Aurelien Fran-cillon and Christoph Neumann 2014 On the Feasibility of Soware Aackson Commodity Virtual Machine Monitors via Direct Device Assignment In theACM Symposium on Information Computer and Communications Security

[22] Nick L Petroni Jr and Michael Hicks 2007 Automated Detection of PersistentKernel Control-ow Aacks In the ACM Conference on Computer and Communi-cations Security

[23] Johann-Sebastian Pleban Ricardo Band and Reiner Creutzburg 2014 Hackingand securing the ARDrone 20 quadcopter investigations for improving thesecurity of a toy In the SPIEMobile Devices andMultimedia Enabling TechnologiesAlgorithms and Applications

[24] Lui Sha 2001 Using Simplicity to Control Complexity IEEE Sow 18 4 (2001)20ndash28 DOIhpdxdoiorgdxdoiorg101109MS2001936213

[25] Deepa Srinivasan Zhi Wang Xuxian Jiang and Dongyan Xu 2011 Process Out-graing An Ecient rdquoout-of-VMrdquo Approach for Fine-grained Process ExecutionMonitoring In the ACM Conference on Computer and Communications Security

[26] Nils Ole Tippenhauer Christina Popper Kasper Bonne Rasmussen and SrdjanCapkun 2011 On the Requirements for Successful GPS Spoong Aacks In theACM Conference on Computer and Communications Security

[27] X Wang N Hovakimyan and L Sha 2013 L1Simplex Fault-tolerant controlof cyber-physical systems In the ACMIEEE International Conference on Cyber-Physical Systems

[28] Peter Wilson Alexandre Frey Tom Mihm Danny Kershaw and Tiago Alves2007 Implementing Embedded Security on Dual-Virtual-CPU Systems IEEEDes Test 24 6 (Nov 2007) 582ndash591

[29] Heng Yin Dawn Song Manuel Egele Christopher Kruegel and Engin Kirda 2007Panorama Capturing System-wide Information Flow for Malware Detection andAnalysis In the ACM Conference on Computer and Communications Security

[30] Man-Ki Yoon Mihai Christodorescu Lui Sha and Sibin Mohan 2016 eDragonBeam Framework Hardware-Protected Security Modules for In-PlaceIntrusion Detection In the ACM International Systems and Storage Conference

[31] Man-Ki Yoon Sibin Mohan Jaesik Choi Jung-Eun Kim and Lui Sha 2013SecureCore A Multicore-based Intrusion Detection Architecture for Real-TimeEmbedded Systems In the IEEE Real-Time Embedded Technology and ApplicationsSymposium

[32] Man-Ki Yoon Sibin Mohan Jaesik Choi and Lui Sha 2015 Memory Heat MapAnomaly Detection in Real-Time Embedded Systems Using Memory BehaviorIn the ACMEDACIEEE Design Automation Conference

[33] Yajin Zhou Xiaoguang Wang Yue Chen and Zhi Wang 2014 ARMlockHardware-based Fault Isolation for ARM In the ACM Conference on Computerand Communications Security

VirtualDrone Architecture for Aack-Resilient UAS ICCPS April 2017 Pisburgh PA USA

A ACTUATOR VIRTUALIZATION

IO Proxy

PWM Generator(PCA9685)

TrustedController

Motor Driver

Motor Interface

Virtual Motor Driver

Hardware

Host OSI2C

UntrustworthyController

Motor Interface

Security amp Safety Monitor

NCE (VM) SCE (Host)

MotorThread

Host-Guest Communication

Motors 0123

Figure 16 Actuator virtualization in the VirtualDroneframework

Figure 16 shows how an actuator is virtualized in the Virtual-Drone framework which is similar to the sensor virtualizationexplained in Section 33 e controller running in the NCE com-putes a set of PWM (Pulse Width Modulation) output values tocontrol the motors of the vehicle e controller writes these valuesto the virtual motor driver through the motor interface It transfersthe data to an IO proxy thread that relays the PWM values to themotor driver in the SCE e motors are nally actuated by analogsignals converted by the on-board speed controller

B DETAILS ON VIRTUALIZATIONSensors e following describes how the sensors are virtualizedin our prototype implementationbull Inertial Measurement Unit (MPU9250) e device driver run-

ning on the host retrieves a raw IMU data (14 bytes) every 1ms through SPI However every 5th sample is actually used forcontrol (hence the eective control frequency is 200 Hz) edata includes a 3-axis gyroscope and 3-axis accelerometer values

bull Barometer (MS5611) is sensor measures the barometric pres-sure and temperature e driver runs a state machine thatoperates at a frequency of 25 Hz A raw data (24 bits) retrievedfrom the sensor through I2C is converted to either pressure ortemperature value depending on the state (8 bits)

bull Compass (AK8963) It measures terrestrial magnetism in the 3axes at a frequency of 50 Hz using I2C Total 24 bytes (includingper-axis calibration factor) of raw data are fed to the NCE

bull Analog-to-Digital Converter (ADS1115) It measures the voltageson 6 ADC channels It reads each channel every 600 ms throughI2C For each channel a data of 40 bits (8 bits for channel ID and32 bits for sampled data) is transferred to the VM

bull GPS (u-blox NEO-M8) It provides the current longitude latitudeand altitude of the vehicle the time information (current millisec-ond time of week) etc e driver reads UBX protocol messagesfrom the u-blox GPS receiver through SPI parses each one andthen obtains the above information e parsing is stateful anda aer-parsing data can be at most 1K bytes It is fed to the NCEat the frequency of 5 Hz

Actuator For the motor actuation the virtual controller in theNCE sends the PWM values (for the four motors) to the host at thefrequency of the main control loop (ie 200 Hz)

Radio Control Input A remote control via radio link is used tomanually control (armdisarm ight maneuver) the quadcoptere raw input pulses are retrieved through DMA (Direct MemoryAccess) at 1666 Hz About every 18 ms (ie 55 Hz) a new set ofPWM values representing the stick and switch movements (total 8channels) becomes available As done for the sensors mentionedabove the IO proxy runs an RC feeding thread However insteadof feeding the raw pulse data we send the processed data ie thePWMs in order to avoid the overhead due to feeding the raw dataat such a high frequency (1666 Hz)

C ATTITUDE CONTROL AND ERROR BOUND

Time (s)50 55 60 65 70 75 80 85

Rol

l Pi

tch

Yaw

Erro

rs

-25000

-20000

-15000

-10000

-5000

0

5000

10000

15000

20000

25000RollPitchYaw

Time (s)50 55 60 65 70 75 80 85

RC

Inpu

t (PW

Ms)

800

1000

1200

1400

1600

1800

2000

2200RollPitchThrottleYaw

Drone hit the ground

Switched to SCE

Figure 17 e roll pitch yaw errors (top) measured duringthe dronersquos extreme movements e bottom plot shows theroll pitch throttle and yaw targets set by the pilot using theremote controller

e APM uses a double-loop PIDP control to stabilize the quad-copter e Angle loop aka the outer loop controls the aitudeof the vehicle e Angle loop utilizes a P control to achieve thedesired aitude by outpuing a desired angular speed ie the an-gular speed setpoint to the Rate loop aka the inner loop eAngle looprsquos output ie the angular speed setpoint is proportionalto the dierence between the target angle value set by the pilot(or autopilot when in autonomous ight mode) and the measuredangle value from the IMU sensor e Rate loop controls the aituderates of the aircra e Rate loop continuously calculates an errorvalue as the dierence between the angular speed setpoint and themeasured angular speed from the IMU sensor A PID control is

ICCPS April 2017 Pisburgh PA USA M-K Yoon et al

utilized in Rate loop to minimize the error over time by outpuingPWM signals to control motors

For the thresholds on the errors we used plusmn20 000 (radsec) forroll and pitch and plusmn10 000 (radsec) for yaw e switching logicactivates when the violation happens three times consecutivelyWe obtained these bounds on the errors by measuring from bothnormal and extreme movements of the prototype drone e topplot in Figure 17 shows those errors measured during the dronersquosextreme movements and the boom plot shows how the pilot cre-ated the movements e result indicates that the errors are wellbounded even when the drone experiences such movements epilot intentionally made the drone hit the ground at time between75 sec and 76 sec aer which the control is switched to the SCEWe did not aempt to nd optimal thresholds e smaller thethreshold is the easier it is for the SCE to recover to a stable stateHowever at the same time it could create more false positives

D DETECTION OF HIJACKING ATTEMPT

(a) LegitimateTim

e

Vehicle GCS

hellip

Attacker

hellip

Unexpected

Time

VehicleGCS

hellip

(b) Hijacking attempt

Figure 18 (a) MAVLink messages exchanged between theGCS and the vehicle for waypoint setup (b) e legitimateGCS can detect the attackerrsquos update on the vehicles routeas the vehiclersquos responses are unexpected

In order for a GCS to set waypoints for a vehicle a series ofMAVLink messages are exchanged Figure 18(a) shows the MAVLinkwaypoint protocol e GCS rst sends MISSION COUNT(N) to thevehicle where N represents the number of waypoints that it willset e vehicle prepares for receiving the N waypoints and thenrequests for each waypoint by sending MISSION REQUEST(i) untilall the waypoint locations are received

Note that both the legitimate GCS and the aacker need to followthis protocol to set any waypoints From the vehiclersquos perspectivethe initialization requests (ie MISSION COUNT(N)) from them areindistinguishable at is the vehicle itself cannot detect suspiciousrequests for a route change However the fact that the aacker canreceive messages from the vehicle means that the legitimate GCScan also hear what the vehicle responds to the aackerrsquos requestAs Figure 18(b) shows the legitimate GCS can detect the aackerrsquosupdate on the vehiclersquos waypoints when it receives unexpectedMISSION REQUEST messages as it did not initialize the message ex-change Due to such stateful communication the MAVLink protocolenables detecting other types of suspicious aempts (eg changingcontrol parameters) as well

E GEO-FENCE ATTACK ROOTKITWe developed a rootkit that disables the geo-fence and sends thevehicle into a no-y zone e rootkit nds the APM process andthen modies itsmemory that stores (i) the ag that enablesdisablesthe geo-fencing and (ii) the list of waypoints ese are loadedfrom the APM conguration le (varAPMArduCopterstg) onits startup and buered in the memory

Waypoint 3Waypoint 2

Waypoint 4

Geo-fence enabled

Figure 19 ewaypoint list and geo-fence enable ag storedin the memory of APM process An attacker who gained aroot-level access canmodify thesememory values to disablethe geo-fence and then send the drone to a new location

Figure 20 e rootkit that disables the geo-fence and modi-es the ight plan by manipulating the APMrsquos memory

One can change these values remotely through radio which how-ever is easy to prevent since radio communication can be monitoredeasily Modifying the buered values in the memory is dicult toprevent especially if the aacker has gained a root access e mem-ory locations of these data can be easily found if the source codeor the executable binary is available Figure 19 shows the memorydump of the waypoint list and geo-fence enable ag Figure 20shows how these values are modied by the rootkit

  • Abstract
  • 1 Introduction
  • 2 Background
  • 3 VirtualDrone Framework
    • 31 High-level Framework
    • 32 Assumptions and Adversary Model
    • 33 Virtual Sensing Actuation and Communication
    • 34 Security and Safety Monitoring
      • 4 Implementation
      • 5 Experiments
        • 51 Case Study
        • 52 Discussion
          • 6 Related Work
          • 7 Conclusion
          • References
          • A Actuator Virtualization
          • B Details on Virtualization
          • C Attitude Control and Error Bound
          • D Detection of Hijacking Attempt
          • E Geo-Fence Attack Rootkit
Page 5: VirtualDrone: Virtual Sensing, Actuation, and ... · Figure 1: Simplex architecture. the so›ware environment, in conjunction with the increased capa-bilities and complexities of

VirtualDrone Architecture for Aack-Resilient UAS ICCPS April 2017 Pisburgh PA USA

Security amp Safety Monitor

Geo-fence

Sensor Data(IMU GPS Battery hellip)

Telemetry Command from GCS

Telemetry Report from NCE

Actuation Command from NCE

Attitude Errorfrom SCEVMI Fake Report

Detector

Safety Monitor

Command to SCE(Switch RTL hellip)

Figure 6 Example conguration of the security and safetymonitor

34 Security and Safety MonitoringFigure 6 shows an example conguration of the security and safetymonitor and data ow based on the prototype implementation pre-sented in Section 4 Notice from the gure (and also from Figure 4)that the monitor receives the sensor data for analysis Becausethe data are fetched from the trusted environment the monitoris guaranteed to use the true measurement for a safety analysisHence we can detect aacks that for example try to put the vehiclein an open-loop state or to set wrong control parameters In ourprototype quadcopter we analyze the aitude (ie roll pitch andyaw) errors which are bounded in normal conditions to detect anunsafe physical state One can also implement a control-theoreticanalysis [27] e monitor also analyzes the actuation outputs fromthe NCE as shown in Figure 16 in Appendix A to prevent potentialsafety violations For example the monitor can upper-bound onthe motor outputs to prevent motor failure due to the aackerrsquos at-tempt to apply abrupt voltage changes e monitor can also checkif it receives actuation commands from the NCE at the denedfrequency ndash abnormal paerns could be an indicator of a potentialsecurity breach In order to handle physical aacks to the sensorsone can also implement a sensor aack detection technique [18 19]using the true measurements available in the SCE

e SCE also inspects communications between the NCE andthe external world e telemetry analyzer shown in Figure 5 inter-cepts radio telemetry messages to and from the NCE and providesthem to the monitoring module for analysis Using this mecha-nism one can detect an aacker that for example sends out fab-ricated messages (eg ight path report replayed or generated bya soware-in-the-loop simulation) in an aempt to misinform theground control station about the true physical and logical states

e monitoring module can also host critical safety measuresthat otherwise would run at the same layer as untrustworthy ap-plications For instance geo-fencing typically runs as a part of anautopilot soware An aacker can simply disable it or modify theconguration to y the vehicle into a no-y-zone Since this typeof function does not require external interaction it can run in theSCE using the true sensor measurements (eg GPS location)

Virtualization also enables the use of virtualization-based secu-rity measures for instance virtual machine introspection (VMI) [14]e monitoring module in the SCE can implement various VMItechniques to monitor the behavior of the applications and the guestOS running in the NCE For example through interfaces providedby the VMM the module can continuously check the integrity ofthe kernel code andor its critical data structures (eg interruptvector table process and module lists) for detection of rootkits andinspect network connections and packets for detection of back-doors and so on Upon a detection the framework may switch tothe SCE as a preventive action from which moment comprehensive

Navio+(Sensor board)

Raspberry PI 2(Quad-core ARM Linux)

GPS

Telemetry Radio (915MHz) Radio Receiver for

Remote Control (24GHz)

Figure 7 adcopter prototype implementation with Rasp-berry Pi 2 and Navio+ sensor boards

Security amp Safety Monitor

Virtual Machine (QEMU)

Linux

Hardware

ArduPilot

IMU Barometer

Compass

Motors RC

DMASPI I2C

Virtual Sensorsamp Actuators amp

Communication

Linux

ArduPilot

IO Proxies

Host User Space

ADC

KVM

HW

AppApp

Net

Network

Port-

Forw

ardi

ng

IC

RG

AM

Nav

io+

GPSTelemetry

Radio

Serial

App

B

TSock

et

Seria

lPor

t

WiFi

Figure 8 VirtualDrone implementation on the prototype

security analyses (eg deep memory scan rebooting VMs) can takeplace without losing control of the vehicle

4 IMPLEMENTATIONIn this section we present the implementation details for our proto-type of the VirtualDrone framework on a quadcopter drone shownin Figure 7 running an open-source autopilot on an embeddedcomputing board

System Implementation We implemented theVirtualDrone frame-work on a Raspberry PI 2 Model B (RPI2) board [5] as depictedin Figure 8 It has a quad-core ARM Cortex-A7 CPU each coreof which runs at 900 MHz and has a main memory of 1 GB eprocessor features the ARM Architecture Virtualization ExtensionIt enables running VMs with unmodied guest OS using KVM(Kernel-based Virtual Machine)

On the host we run Linux 318 No modication was made tothe kernel except that we enabled virtualization with KVM in theconguration On top of the host OS we run unmodied QEMUv23 [4] an open-source virtual machine monitor As explainedin Section 32 QEMU ie the VMM is our trusted computing base(TCB) We created one VM that emulates an ARM Versatile ExpressA15 board (which runs a Cortex-A15 CPU the same ARMv7 ar-chitecture as Cortex-A7) and assigned one of the four cores of theprocessor exclusively to the virtual machine In the virtual machinewe run unmodied Linux 43

We use QEMUrsquos port forwarding mechanism to open an SSH (Se-cure Shell) port on the virtual machine through which a user logsin to launch update manage services and applications More portscan be open to the virtual machine using the port forwarding mech-anism In this paper we assume the QEMUrsquos port forwarding mecha-nism is secure

In our prototype we chose to use Linux as the host OS Howeverit is desirable to use a formally veried OS on the host instead of

ICCPS April 2017 Pisburgh PA USA M-K Yoon et al

Table 1 e rate and amount of data transfer between thesecure and normal control environments

Component Direction Rate SizeIMU Hostrarr VM 200 Hz 14 bytes

Barometer Hostrarr VM 25 Hz 4 byteCompass Hostrarr VM 50 Hz 24 bytes

ADC Hostrarr VM 167 Hz 5 bytesGPS Hostrarr VM 5 Hz Max 1K bytes

Motor Output VMrarr Host 200 Hz 16 bytesRC Input Hostrarr VM 55 Hz 16 bytesTelemetry Hostharr VM Vary Vary

such a general-purpose monolithic kernel Our choice of Linux isto minimize engineering eorts to port VMM autopilot and sensorand actuator device drivers to a new OS Our implementation didnot require any modications to the host OS VMM and guest OS

Autopilot We stack Navio+ sensor board [2] on top of the Rasp-berry PI 2 (as shown in Figures 7 and 8) to provide various sensordata for ight control e NCE (ie the virtual machine) runs theopen-source ArduPilot (aka APM) [1] autopilot suite as the ightcontrol soware for our quadcopter drone APM combines sensordata and RC ight maneuver commands to compute correct inputsfor the four motor-prop units which are sent by the actuator portsof the Navio+ board to drive the actuators

As shown in Figure 8 we run one instance of APM in the SCE(ie the host) e Simplex architecture suggests the use of a robustcontroller for the safety controller in order to handle and recoverfrom physical failures For demonstration purposes we chose touse the APMrsquos default PID controller as the trusted controller In aproduction implementation however a high-assurance controllerwould be used

Virtualization e IO proxy shown in Figures 4 and 8 runsone feeder thread for each sensor Each sensor retrieves a newsample at a xed frequency Each feeder thread then sends thenewly available data to the virtual machine using a host-guestcommunication channel Appendix B explains how the sensorsand the actuators are virtualized in our prototype implementationwhich are also summarized in Table 1

Host-GuestCommunication We use QEMUrsquos virtio-serial fordata transfer between the host (ie IO proxy threads) and guestsystems It creates virtual serial ports in the guest each of whichis mapped to a character device such as Unix domain socket pipeTCPUDP port etc in the host side We created eight virtualserial ports for the components listed in Table 1 e IO proxythreads in the SCE use eight Unix domain sockets to communicatewith the virtual machine One may use other types of host-guestcommunication mechanisms such as shared memory In our im-plementation we aimed to utilize an existing infrastructure thatdoes not require any modication or insertion to the stock QEMUe virtio-serial is adequate enough to handle the low-speedlow-volume data transfer for sensoractuatorcommunication vir-tualization We assume virtio-serial is trustworthy as it is partof QEMU the TCB

Virtual Telemetry e APM uses a serial port (UART) for teleme-try radio transceiver1 Hence the NCE-side APM does not need any1Our prototype copter also supports WiFi and APMrsquos telemetry can be transferredthrough UDP or TCP as well e APM abstracts these away by treating them as UARTcommunication

additionmodication for the virtual telemetry e SCE-side APMreadssends telemetry data fromto the real UART port performs altering (as described in Figure 5) and relays tofrom the virtualmachine using the virtual-serial port mechanism explained abovee APM uses MAVLink protocol (Micro Air Vehicle Communica-tion Protocol)2 MAVLink contains all interface functions to controlthe vehicle monitor states change parameters etc Each MAVLinkmessage size and frequencies vary depending on the message typee messages typically have small size (the maximum is 263 bytes)and low frequency (a few Hz)

5 EXPERIMENTSWe now present case studies that demonstrate how the Virtual-Drone framework can detect and prevent various types of securityand safety violations

51 Case StudyTo demonstrate the eectiveness and versatility of our frameworkwe consider the following ve scenarios Note that we are notproposing new detectionmitigation solutions for the use cases pre-sented here Each scenario could be handled in many dierent waysFor instance hijacking can be easily defeated by a simple authen-tication of the communication We instead intend to demonstratehow an integrated platform ie the VirtualDrone framework candefend against various aack scenarios that would otherwise havebeen handled separately with potentially conicting requirementsWe also note that these aacks can occur in a number of dierentforms In this paper we consider a pessimistic scenario the aackercan know the HWSW conguration and even gain a root accessto the NCE

Attacks on Safety An adversary can launch an aack on thesafety of a vehicle by for example degrading the availability ofcritical sensors (eg IMU) or actuators or the control performance(eg by changing PID gains) e worst-case scenario from thevehiclersquos safety perspective is when the aacker disables the ightcontroller while the vehicle is ying is immediately leads thesystem to an open-loop state which will cause the vehicle to crashTo demonstrate this type of aack we consider an extreme sce-nario in which the ight controller is killed by an aacker eaacker can launch this aack by for example entering through abackdoor replacing the control program with one that self-crashesor installing a rootkit We do not assume specic scenario of howit is launched We implemented a Linux kernel module that 1) ndsthe APM autopilot process from the kernelrsquos process list and then2) kills the process e aacker could achieve the same goal bycausing the virtual machine to crash

ere could be several ways to detect this type of aack One mayuse a heartbeat mechanism which however can be circumvented byan aacker that impersonates the ight controller Instead we takeadvantage of the SCErsquos ability to monitor the true physical state ofthe vehicle We use the aitude control performance measured atthe SCE At each control loop the SCE-side controller calculates theerrors of the rate control on the pitch roll and yaw of the copterDuring a stable ight the rate errors are bounded as shown inFigure 17 in Appendix C because the ight controller is active tominimize the rate errors In case of an open-loop state the ightcontroller cannot work to minimize the rate errors Due to the factthat a multirotor system is naturally an unstable ight platform2hpqgroundcontrolorgmavlinkstart

VirtualDrone Architecture for Aack-Resilient UAS ICCPS April 2017 Pisburgh PA USA

865 87 875 88 885 89 895 90 905 91Time (s)

-10000-7500-5000-2500

0250050007500

10000125001500017500200002250025000

Rol

l Pi

tch

Yaw

Erro

rs

RollPitchYaw

865 87 875 88 885 89 895 90 905 91Time (s)

1000

1100

1200

1300

1400

1500

1600

1700

1800

1900

2000

Mot

or o

utpu

t (PW

Ms)

Motor[0]Motor[1]Motor[2]Motor[3]

Open-loop

Kill ArduPilotprocess

SafetyViolation

Normal Control Mode(NCE)

Secure Control Mode(SCE)

Figure 9 e motor outputs (top) and the roll pitch yawerrors (bottom) measured at the SCE e attacker in NCEkills the ight controller which leads the copter to an open-loop state e SCE takes the control when the errors growbeyond the thresholds aer which the copter is stabilized

the rate errors will increase quickly beyond the normal bounderefore a properly chosen threshold of rate errors can be used indetection of ight safety violations Hence the security and safetymonitoring module in the SCE continuously checks if the errorsgrow beyond the threshold Upon a safety violation the frameworkswitches to the secure control mode Appendix C explains how theAPMrsquos aitude control works and how we obtained the thresholdof rate errors

Figure 9 shows the results of this experiment While the dronewas in the virtual control mode the aacker activated the rootkitmentioned above at time around 888 sec at which moment theAPM process running in the VM is killed e top plot in Figure 9shows the motor outputs (4 channels) from the motor driver in theSCE As we can see the drone was in an open-loop state for about300 ms e boom plot shows the aitude errors also measuredat the SCE e drone becomes unstable (ie the errors are faraway from zero) for a moment because no actuation is applied tothe motors during the open-loop period Upon the detection ofthe violation on the errors (at time around 891 sec) the control isswitched to the SCE from which moment the control loop is closedand the drone returns to a stable state

We also tested a scenario when the control parameters are modi-ed during ight Figure 10 shows the aitude control errors whenthis happens At time around 1643 sec a MAVLink message wassent via radio to change the proportional gain (180 times bigger thanthe original value) of the aitude controller As can be seen thedrone became unstable immediately e safety module detectedthe large roll errors aer which the SCE took the control

Time (s)162 164 166 168 170 172 174

Rol

l Pi

tch

Yaw

Erro

rs

-20000

-10000

0

10000

20000

30000

40000

50000

60000RollPitchYaw

Normal Control Mode

(NCE)

ChangeProportional

Gain

Secure Control Mode(SCE)

Figure 10 e roll pitch yaw errors when the proportionalgain of the attitude controller is set to an abnormally highvalue e SCE immediately stabilizes the drone upon thedetection of the unstable physical state

Hijacking It has been demonstrated that it is possible to hijack adrone by exploiting the MAVLink protocol [9] e idea is to send acommand that sets a new ight plan through the telemetry channele telemetry radio pair of the drone and the ground control station(GCS) distinguish themselves from others by their unique NetIDand the frequency band Hence by using the same NetID and radioband and running the same rmware (which decodes the MAVLinkpackets) as the target vehicle the aacker can send any MAVLinkmessages to the target

To demonstrate this aack scenario we used three telemetryradio (ie for the GCS the drone and the aacker) that utilize thesame frequency band (915MHz) and same default congurationSince the out-of-the-box default NetIDs are same the aackerrsquostelemetry radio did not need any rmware modication3 Figure 11describes the hijacking scenario e drone takes o at the launch-ing point (marked as lsquoTrsquo) and communicates with the GCS locatedat lsquoGrsquo e pilot ies the drone along the normal path e aackerlocated at lsquoArsquo then launches its ground control application en itsends a new waypoint plan to the drone which will send it to thelocation marked as rsquoWrsquo e aacker did not need to modify the3It is possible to nd out the NetID used between the GCS and the drone by modifyingthe rmware [9]

G

T

A

W

T

A

W

A

G

T

Hijack

Ground Control Station

Launching Point

Attacker

Hijacked Drone

Attacker

Figure 11 e attacker (lsquoArsquo) tries to hijack the drone yingalong the normal path and to send it to a newwaypoint (lsquoWrsquo)e attacker uses the same telemetry radio as the GCS andthe drone and unmodied APM Planner GCS

ICCPS April 2017 Pisburgh PA USA M-K Yoon et al

G G

T T

A A

W W

(a) Without VirtualDrone (b) With VirtualDrone

Figure 12 (a) e ight trajectory of the drone hijacked bythe attacker It is sent to new location lsquoWrsquo set by the attacker(b) e attackerrsquos attempt to hijack the drone is detected bythe GCS Upon the detection the GCS sends a special com-mand to the SCE which switches the control mode to theSCE and directs the drone to where it was launched

GCS program (the stock APM Planner 204 with default seings)Figure 12(a) shows the ight trajectory of the drone when it wassuccessfully hijacked by the aacker

While the drone itself cannot detect such a hijacking aemptthe GCS can detect it because of unexpected message exchange initi-ated by the aacker as detailed in Appendix D Hence we addedthe functionality that detects such unexpected messages to ourlegitimate GCS Upon a detection the GCS commands the droneto return to where it was launched as shown in Figure 12(b) istakes advantage of the VirtualDronersquos virtual telemetry explainedin Section 33 the SCErsquos telemetry proxy enables a hidden com-munication channel between the GCS and the SCE through whichthe former sends the drone a pre-dened set of special commandsIn this scenario the command from the GCS overrides the NCErsquosabnormal operation by switching the drone to the secure controlmode Note that the aacker might be able to send the same specialcommand However what it can do at worst is to send the droneback to the home

As explained in Section 34 the virtual telemetry also enables theSCE to detect if the NCE is trying to deceive the ground station Forexample aer a successful hijacking the aacker may report fakeGPS location (by replaying or by generating from SW simulator) tothe GCS so that it looks as if it is ying on the planned path etelemetry analyzer however can detect such aempts by analyzingeach outgoing MAVLink packet and comparing against the truelocation retrieved from the GPS receiver which is also implementedon our prototype

Corrupting Safety Functions Autopilot programs also supportcritical failsafe mechanisms that are activated under certain con-ditions such as losing radio communication signal or low-baeryIt is in fact easy to corrupt such a safety-critical measure becausetypically it can be enableddisabled remotely through a telemetrycommand (hence an aacker can send a command via radio asdone in the hijacking scenario) Moreover such a mechanism isoen implemented as a part of autopilot that runs at the user-levelHence an aacker who has gained a root access can easily corruptit by modifying the conguration le or the memory

4hpardupilotorgplanner2indexhtml

No-fly zone

Original Path

Figure 13 Attacker disables the geo-fence andmodiesWay-point 3 so that the drone ies into a no-y zone Such asafety-critical function can be protected by running in theSCE

In this case study the aacker corrupts the geo-fence mechanismGeo-fence employs positioning data such as GPS signal or localradio-frequency identiers to set up a virtual boundary to preventthe vehicle entering a prohibited zone e vehicle position ismonitored at all times such that before the vehicle enters a no-y zone the system could act accordingly to prevent a geo-fenceviolation Corruption of the geo-fence can result in a catastrophicresult an aacker may disable the geo-fencing and induce thevehicle to y into a congested airspace such as takeo pathwaysfor mid-air collision

To demonstrate this type of aack we developed a rootkit thatdisables the geo-fence of APM during a ight and sends it intoa no-y zone e rootkit executes this aack by modifying theAPMrsquos memory as detailed in Appendix E Our drone was plannedto y through a path (0-1-2-3) in an autonomous mode as shownin Figure 13 During the ight the aacker logged into the systemthrough WiFi and launched the rootkit when the drone was yingtoward Waypoint 2 e new Waypoint 3 set by the rootkit islocated inside a no-y zone and because the rootkit has alreadydisabled the geo-fence the drone consequently ied into the no-yzone deviating from the original path as shown in Figure 13

e SCE of VirtualDrone provides a protected layer at whichsafety-critical functions like geo-fence can be placed We imple-mented a simple geo-fence module in the security and safety mon-itoring module in the SCE It continuously monitors the currentGPS coordinate and checks it against the list of no-y zones alsostored at the SCE layer Upon a violation a pre-dened action istaken In our implementation the SCE takes back the control fromthe NCE and returns to where it was launched as done for thehijacking scenario explained earlier

Side-channel e virtualization of sensor actuator and commu-nication allows for hiding certain types of information from theNCE One of the examples is the RSSI (Received Signal StrengthIndication) that indicates the link quality between a pair of radiotransmier and receiver We especially consider a scenario in whichan aacker tries to estimate the location of the GCS by observingthe RSSI measured between the vehicle and the GCS Due to signalaenuation the radio signal is stronger as the vehicle is closer to theGCS Hence one can correlate the RSSI with the GPS coordinate

VirtualDrone Architecture for Aack-Resilient UAS ICCPS April 2017 Pisburgh PA USA

T

1

2

3

4

G

Lat 401626060Lng -883074907

0 20 40 60 80 100 120 140 160 180Time (s)

100

120

140

160

180

RSS

I

0 20 40 60 80 100 120 140 160 180Time (s)

401615

40162

401625

40163

401635

Latit

ude

0 20 40 60 80 100 120 140 160 180Time (s)

-88309

-88308

-88307

-88306Lo

ngitu

de

Figure 14 e drone ies through T-1-2-3-4-1 e graphsrepresent the RSSI (top) the latitude (middle) and the longi-tude (bottom) An attacker can estimate the location of theGCS by correlating the RSSI and the GPS information

Figure 14 illustrates such a possibility of side-channel e graphsin the gure represents the RSSI (between the drone and the GCS)and the GPS coordinate (latitude and longitude) measured whilethe drone ies through a path (T-1-2-3-4-1) If the aacker is able toobtain these RSSI information heshe can estimate the location (ora region) of the GCS by nding when the RSSI is high e resultsshow quite accurate estimation of the true GCS location (shown inthe map) A complex algorithm will allow for further narrowingdown the location e VirtualDrone framework eliminates thispossibility by not providing the RSSI information to the NCE Notethat RSSI is needed only for the SCE (eg switches to the SCEand then performs a pre-dened operation such as return-to-homewhen RSSI is low due to the loss of telemetry link) Furthermorebecause of the telemetry virtualization the NCE cannot even knowif the telemetry is communicated through a radio channel or anetwork (eg WiFi) In case of the network-based telemetry theSCE can even hide the IP address of the GCS

Virtual Machine Introspection Many rootkits modify criticalkernel data structures to intercept sensitive data hide maliciousprocesses or les etc For a demonstration we implemented a secu-rity module that checks the integrity of the system call table of theguest OS For this we chose to utilize an existing interface providedby QEMU namely the QEMU Machine Protocol (QMP) It allows host-side applications to communicate with or control a running QEMUVM We created a QMP Unix socket to which our security modulecan connect During the initialization of the VM the module dumpsthe current system call table and stores this initial state in memoryFrom then on the module regularly dumps the current table andcompares it against the one obtained initially Using this techniquewe were able to detect a known rootkit modhide1 that hijacks theopen call to hide itself from the kernel module list

Note that we are not proposing new rootkit detection methodshere We instead intend to demonstrate how the VirtualDroneframework can handle such a stealthy security violation One canuse a rich set of library for virtual machine introspection such asLibVMI [3] which we leave for future work

52 DiscussionSensor attack e VirtualDrone framework cannot handle phys-ical manipulations on the sensors such as GPS spoong esetypes of aacks are called sensor aack or false data injection aackand typically tackled by control-theoretic approaches [18 19] erequirement however is that the methods themselves should beprotected from cyber-aacks Hence one can implement such a

Time (sec)0 20 40 60 80 100 120 140 160 180

Vo

lta

ge

(v)

105

11

115

12Without VirtualDroneWith VirtualDrone

Figure 15 Voltage drop at the battery for 3-minutes of hov-ering with and without the VirtualDrone framework

technique on the SCE layer specically in the security and safetymonitoring module as it can see the true (but potentially physicallymanipulated) sensor measurements

Power consumption Since UAS typically runs on baery powerwe compare the power consumption of the prototype drone withand without the VirtualDrone framework In order to compare thepower consumption in a controlled environment (eg eliminatingvarying disturbance due to wind) we ew the drone indoors hov-ering it at a xed position We ew the drone for about 3 minuteswith the same fully-charged baery and measured the voltage dropsduring the ight

Figure 15 shows that the VirtualDrone does not impose over-head on the power consumption is is because the majority ofthe power is consumed by the motors to li the copter e powerconsumption by RPI2 board and the Navio+ sensors cannot exceed5 Was which is the upper bound of the power supply by the powermodule at is the power consumption by any on-board comput-ing cannot be more than 5 Was We calculated the average powerof the 3-minutes of ights which ranged between 114 and 118Was Hence the power consumption by any on-board computingcan be ignored Due to the fact that the upper bound of powerconsumption by computing is two orders of magnitude smallerthan that of the motors we conclude that the power consumptionoverhead of running the VirtualDrone is negligible

6 RELATEDWORKCurrent unmanned vehicle systems are very vulnerable to cyber-aacks as demonstrated by recent aacks Maldrone [8] is a so-ware virus that can compromise drones based on ARM Linux sys-tems e malware can open a backdoor in the Parrot AR Dronesinfect on-board soware and take over the control Pleban et al[23] presented analysis details on the insecure WiFi network andOS user management of the Parrot AR Drones Also researchersdemonstrated a hijacking of DJI consumer drones by emulatingfake GPS signals using low-cost soware dened radio tools [11]It is also possible to inject MAVLink message into a radio link bymodifying the radio rmware and hijack a ying drone [9] whichwe reproduced for our case study Javaid et al [15] addressed somevulnerabilities of wireless communications channels in unmannedaerial vehicles Commercial airplanes are also facing with suchsecurity problems e Actel ProASIC chip used in early Boeing

ICCPS April 2017 Pisburgh PA USA M-K Yoon et al

787 had a backdoor [6] that could allow an aacker via internetconnection or as a passenger to use entertainment system in theaircra to take over the control of the aircra

Advances in virtualization technologies have enabled VirtualMachine Introspection (VMI) [14] in which a trusted VM or theVMM monitors and analyzes the state of applications or OS runninginside untrusted VMs By placing the detection mechanism outsideof the VM it monitors (ie the untrusted VMs) VMI overcomesthe vulnerability of the traditional host-based intrusion detectionsystems VMIs have been applied to process execution monitor-ing [25] control-ow integrity check [22] virtual memory and diskmonitoring [20] dynamic information ow tracking [29] etc

Hardware-based approaches can also be used to isolate vulnera-ble components ARM TrustZone [28] is an architectural extensionthat allows a coexistence of secure world and normal world usingthe same on-chip hardware Access to certain secure componentsare blocked depending on the execution mode Azab et al [13]proposed TZ-RKP which protects the integrity of operating systemkernel that runs on a normal world by running a security monitorin the secure world Zhou et al [33] use ARM processors memorydomain support for soware fault isolation Yoon et al [31] takesadvantage of the redundancy of a multicore processor a core is usedto monitor the execution time of a real-time application runningon a monitored core It was extended to monitor memory behaviorfor system-wide anomaly detection [32] and to protect in-place se-curity monitoring module [30] ese hardware-based approachesprovide beer security than virtualizations can do because the lat-ter relies on the security and correctness of the VMM which issusceptible to aacks [21] However virtualization-based methodshave advantages in that no hardware modication is needed andthat they are more exible due to the soware control

7 CONCLUSIONIn this paper we presented the VirtualDrone framework as a solu-tion to increasing security threats to unmanned aerial systems euse of this framework allows system designers (or users) to runadvanced ight applications in an untrustworthy environment Ourprototype implementation requires a minimal eort to build theframework on an o-the-shelf platform with open-source sowarestack rough case studies we demonstrated that the frameworkprovides an integrated way to handle various security threats thatwould otherwise have required potentially conicting requirementsNevertheless there still remains challenges for practical use of theframework We used a full-featured autopilot for both normaland safety controllers in the current implementation simply for ademonstration purpose only It is desirable to run a fully-veriedcontrol soware in the SCE Hence we plan to adopt and implementa high-assurance controller

REFERENCES[1] ArduPilot Autopilot Suite hpwwwardupilotorg[2] Emlid NAVIO+ hpsdocsemlidcomnavio[3] LibVMI hplibvmicom[4] QEMU hpwikiqemuorg[5] Raspberry PI 2 Model B

hpswwwraspberrypiorgproductsraspberry-pi-2-model-b[6] Cyber-aack concerns raised over Boeing 787 chiprsquos rsquoback doorrsquo e Guardian

hpswwwtheguardiancomtechnology2012may29cyber-aack-concerns-boeing-chip

[7] 3DRrsquos Solo Drone Boasts Dual Linux Computers Run-ning Dronecode hpswwwlinuxcomnews3drs-solo-drone-boasts-dual-linux-computers-running-dronecode

[8] A hacker developed Maldrone the rst malware for drones Se-curity Aairs hpsecurityaairscowordpress32767hackingmaldrone-malware-for-droneshtml

[9] Hijacking drones with a MAVLink exploit hpdiydronescomprolesblogshijacking-quadcopters-with-a-mavlink-exploit

[10] alcomm Goes Ubuntu for Drone Reference Platform hpswwwlinuxcomnewsqualcomm-goes-ubuntu-drone-reference-platform

[11] Watch GPS Aacks at Can Kill DJI Drones Or Bypass White HouseBan Forbes hpwwwforbescomsitesthomasbrewster20150808qihoo-hacks-drone-gps26431a2853fe

[12] Intel Aero Compute Board hpwwwintelcomcontentwwwusentechnology-innovationaerial-technology-overviewhtml

[13] Ahmed M Azab Peng Ning Jitesh Shah an Chen Rohan Bhutkar GuruprasadGanesh Jia Ma and Wenbo Shen 2014 Hypervision Across Worlds Real-timeKernel Protection from the ARM TrustZone Secure World In the ACM Conferenceon Computer and Communications Security

[14] Tal Garnkel and Mendel Rosenblum 2003 A Virtual Machine IntrospectionBased Architecture for Intrusion Detection In the Network and Distributed Sys-tems Security Symposium

[15] Ahmad Y Javaid Weiqing Sun Vijay K Devabhaktuni and Mansoor Alam 2012Cyber security threat analysis and modeling of an unmanned aerial vehiclesystem In the IEEE Conference on Technologies for Homeland Security

[16] Andrew J Kerns Daniel P Shepard Jahshan A Bhai and Todd E Humphreys2014 Unmanned Aircra Capture and Control Via GPS Spoong Journal ofField Robotics 31 (2014)

[17] Jiuxing Liu Wei Huang Bulent Abali and Dhabaleswar K Panda 2006 High Per-formance VMM-bypass IO in Virtual Machines In the USENIX Annual TechnicalConference

[18] Y Mo and B Sinopoli 2015 Secure Estimation in the Presence of IntegrityAacks IEEE Trans Automat Control 60 4 (2015) 1145ndash1151

[19] Miroslav Pajic James Weimer Nicola Bezzo Paulo Tabuada Oleg Sokolsky InsupLee and George J Pappas 2014 Robustness of Aack-Resilient State EstimatorsIn the ACMIEEE International Conference on Cyber-Physical Systems

[20] Bryan D Payne Martim Carbone and Wenke Lee 2007 Secure and FlexibleMonitoring of Virtual Machines In the Annual Computer Security ApplicationsConference

[21] Gabor Pek Andrea Lanzi Abhinav Srivastava Davide Balzaroi Aurelien Fran-cillon and Christoph Neumann 2014 On the Feasibility of Soware Aackson Commodity Virtual Machine Monitors via Direct Device Assignment In theACM Symposium on Information Computer and Communications Security

[22] Nick L Petroni Jr and Michael Hicks 2007 Automated Detection of PersistentKernel Control-ow Aacks In the ACM Conference on Computer and Communi-cations Security

[23] Johann-Sebastian Pleban Ricardo Band and Reiner Creutzburg 2014 Hackingand securing the ARDrone 20 quadcopter investigations for improving thesecurity of a toy In the SPIEMobile Devices andMultimedia Enabling TechnologiesAlgorithms and Applications

[24] Lui Sha 2001 Using Simplicity to Control Complexity IEEE Sow 18 4 (2001)20ndash28 DOIhpdxdoiorgdxdoiorg101109MS2001936213

[25] Deepa Srinivasan Zhi Wang Xuxian Jiang and Dongyan Xu 2011 Process Out-graing An Ecient rdquoout-of-VMrdquo Approach for Fine-grained Process ExecutionMonitoring In the ACM Conference on Computer and Communications Security

[26] Nils Ole Tippenhauer Christina Popper Kasper Bonne Rasmussen and SrdjanCapkun 2011 On the Requirements for Successful GPS Spoong Aacks In theACM Conference on Computer and Communications Security

[27] X Wang N Hovakimyan and L Sha 2013 L1Simplex Fault-tolerant controlof cyber-physical systems In the ACMIEEE International Conference on Cyber-Physical Systems

[28] Peter Wilson Alexandre Frey Tom Mihm Danny Kershaw and Tiago Alves2007 Implementing Embedded Security on Dual-Virtual-CPU Systems IEEEDes Test 24 6 (Nov 2007) 582ndash591

[29] Heng Yin Dawn Song Manuel Egele Christopher Kruegel and Engin Kirda 2007Panorama Capturing System-wide Information Flow for Malware Detection andAnalysis In the ACM Conference on Computer and Communications Security

[30] Man-Ki Yoon Mihai Christodorescu Lui Sha and Sibin Mohan 2016 eDragonBeam Framework Hardware-Protected Security Modules for In-PlaceIntrusion Detection In the ACM International Systems and Storage Conference

[31] Man-Ki Yoon Sibin Mohan Jaesik Choi Jung-Eun Kim and Lui Sha 2013SecureCore A Multicore-based Intrusion Detection Architecture for Real-TimeEmbedded Systems In the IEEE Real-Time Embedded Technology and ApplicationsSymposium

[32] Man-Ki Yoon Sibin Mohan Jaesik Choi and Lui Sha 2015 Memory Heat MapAnomaly Detection in Real-Time Embedded Systems Using Memory BehaviorIn the ACMEDACIEEE Design Automation Conference

[33] Yajin Zhou Xiaoguang Wang Yue Chen and Zhi Wang 2014 ARMlockHardware-based Fault Isolation for ARM In the ACM Conference on Computerand Communications Security

VirtualDrone Architecture for Aack-Resilient UAS ICCPS April 2017 Pisburgh PA USA

A ACTUATOR VIRTUALIZATION

IO Proxy

PWM Generator(PCA9685)

TrustedController

Motor Driver

Motor Interface

Virtual Motor Driver

Hardware

Host OSI2C

UntrustworthyController

Motor Interface

Security amp Safety Monitor

NCE (VM) SCE (Host)

MotorThread

Host-Guest Communication

Motors 0123

Figure 16 Actuator virtualization in the VirtualDroneframework

Figure 16 shows how an actuator is virtualized in the Virtual-Drone framework which is similar to the sensor virtualizationexplained in Section 33 e controller running in the NCE com-putes a set of PWM (Pulse Width Modulation) output values tocontrol the motors of the vehicle e controller writes these valuesto the virtual motor driver through the motor interface It transfersthe data to an IO proxy thread that relays the PWM values to themotor driver in the SCE e motors are nally actuated by analogsignals converted by the on-board speed controller

B DETAILS ON VIRTUALIZATIONSensors e following describes how the sensors are virtualizedin our prototype implementationbull Inertial Measurement Unit (MPU9250) e device driver run-

ning on the host retrieves a raw IMU data (14 bytes) every 1ms through SPI However every 5th sample is actually used forcontrol (hence the eective control frequency is 200 Hz) edata includes a 3-axis gyroscope and 3-axis accelerometer values

bull Barometer (MS5611) is sensor measures the barometric pres-sure and temperature e driver runs a state machine thatoperates at a frequency of 25 Hz A raw data (24 bits) retrievedfrom the sensor through I2C is converted to either pressure ortemperature value depending on the state (8 bits)

bull Compass (AK8963) It measures terrestrial magnetism in the 3axes at a frequency of 50 Hz using I2C Total 24 bytes (includingper-axis calibration factor) of raw data are fed to the NCE

bull Analog-to-Digital Converter (ADS1115) It measures the voltageson 6 ADC channels It reads each channel every 600 ms throughI2C For each channel a data of 40 bits (8 bits for channel ID and32 bits for sampled data) is transferred to the VM

bull GPS (u-blox NEO-M8) It provides the current longitude latitudeand altitude of the vehicle the time information (current millisec-ond time of week) etc e driver reads UBX protocol messagesfrom the u-blox GPS receiver through SPI parses each one andthen obtains the above information e parsing is stateful anda aer-parsing data can be at most 1K bytes It is fed to the NCEat the frequency of 5 Hz

Actuator For the motor actuation the virtual controller in theNCE sends the PWM values (for the four motors) to the host at thefrequency of the main control loop (ie 200 Hz)

Radio Control Input A remote control via radio link is used tomanually control (armdisarm ight maneuver) the quadcoptere raw input pulses are retrieved through DMA (Direct MemoryAccess) at 1666 Hz About every 18 ms (ie 55 Hz) a new set ofPWM values representing the stick and switch movements (total 8channels) becomes available As done for the sensors mentionedabove the IO proxy runs an RC feeding thread However insteadof feeding the raw pulse data we send the processed data ie thePWMs in order to avoid the overhead due to feeding the raw dataat such a high frequency (1666 Hz)

C ATTITUDE CONTROL AND ERROR BOUND

Time (s)50 55 60 65 70 75 80 85

Rol

l Pi

tch

Yaw

Erro

rs

-25000

-20000

-15000

-10000

-5000

0

5000

10000

15000

20000

25000RollPitchYaw

Time (s)50 55 60 65 70 75 80 85

RC

Inpu

t (PW

Ms)

800

1000

1200

1400

1600

1800

2000

2200RollPitchThrottleYaw

Drone hit the ground

Switched to SCE

Figure 17 e roll pitch yaw errors (top) measured duringthe dronersquos extreme movements e bottom plot shows theroll pitch throttle and yaw targets set by the pilot using theremote controller

e APM uses a double-loop PIDP control to stabilize the quad-copter e Angle loop aka the outer loop controls the aitudeof the vehicle e Angle loop utilizes a P control to achieve thedesired aitude by outpuing a desired angular speed ie the an-gular speed setpoint to the Rate loop aka the inner loop eAngle looprsquos output ie the angular speed setpoint is proportionalto the dierence between the target angle value set by the pilot(or autopilot when in autonomous ight mode) and the measuredangle value from the IMU sensor e Rate loop controls the aituderates of the aircra e Rate loop continuously calculates an errorvalue as the dierence between the angular speed setpoint and themeasured angular speed from the IMU sensor A PID control is

ICCPS April 2017 Pisburgh PA USA M-K Yoon et al

utilized in Rate loop to minimize the error over time by outpuingPWM signals to control motors

For the thresholds on the errors we used plusmn20 000 (radsec) forroll and pitch and plusmn10 000 (radsec) for yaw e switching logicactivates when the violation happens three times consecutivelyWe obtained these bounds on the errors by measuring from bothnormal and extreme movements of the prototype drone e topplot in Figure 17 shows those errors measured during the dronersquosextreme movements and the boom plot shows how the pilot cre-ated the movements e result indicates that the errors are wellbounded even when the drone experiences such movements epilot intentionally made the drone hit the ground at time between75 sec and 76 sec aer which the control is switched to the SCEWe did not aempt to nd optimal thresholds e smaller thethreshold is the easier it is for the SCE to recover to a stable stateHowever at the same time it could create more false positives

D DETECTION OF HIJACKING ATTEMPT

(a) LegitimateTim

e

Vehicle GCS

hellip

Attacker

hellip

Unexpected

Time

VehicleGCS

hellip

(b) Hijacking attempt

Figure 18 (a) MAVLink messages exchanged between theGCS and the vehicle for waypoint setup (b) e legitimateGCS can detect the attackerrsquos update on the vehicles routeas the vehiclersquos responses are unexpected

In order for a GCS to set waypoints for a vehicle a series ofMAVLink messages are exchanged Figure 18(a) shows the MAVLinkwaypoint protocol e GCS rst sends MISSION COUNT(N) to thevehicle where N represents the number of waypoints that it willset e vehicle prepares for receiving the N waypoints and thenrequests for each waypoint by sending MISSION REQUEST(i) untilall the waypoint locations are received

Note that both the legitimate GCS and the aacker need to followthis protocol to set any waypoints From the vehiclersquos perspectivethe initialization requests (ie MISSION COUNT(N)) from them areindistinguishable at is the vehicle itself cannot detect suspiciousrequests for a route change However the fact that the aacker canreceive messages from the vehicle means that the legitimate GCScan also hear what the vehicle responds to the aackerrsquos requestAs Figure 18(b) shows the legitimate GCS can detect the aackerrsquosupdate on the vehiclersquos waypoints when it receives unexpectedMISSION REQUEST messages as it did not initialize the message ex-change Due to such stateful communication the MAVLink protocolenables detecting other types of suspicious aempts (eg changingcontrol parameters) as well

E GEO-FENCE ATTACK ROOTKITWe developed a rootkit that disables the geo-fence and sends thevehicle into a no-y zone e rootkit nds the APM process andthen modies itsmemory that stores (i) the ag that enablesdisablesthe geo-fencing and (ii) the list of waypoints ese are loadedfrom the APM conguration le (varAPMArduCopterstg) onits startup and buered in the memory

Waypoint 3Waypoint 2

Waypoint 4

Geo-fence enabled

Figure 19 ewaypoint list and geo-fence enable ag storedin the memory of APM process An attacker who gained aroot-level access canmodify thesememory values to disablethe geo-fence and then send the drone to a new location

Figure 20 e rootkit that disables the geo-fence and modi-es the ight plan by manipulating the APMrsquos memory

One can change these values remotely through radio which how-ever is easy to prevent since radio communication can be monitoredeasily Modifying the buered values in the memory is dicult toprevent especially if the aacker has gained a root access e mem-ory locations of these data can be easily found if the source codeor the executable binary is available Figure 19 shows the memorydump of the waypoint list and geo-fence enable ag Figure 20shows how these values are modied by the rootkit

  • Abstract
  • 1 Introduction
  • 2 Background
  • 3 VirtualDrone Framework
    • 31 High-level Framework
    • 32 Assumptions and Adversary Model
    • 33 Virtual Sensing Actuation and Communication
    • 34 Security and Safety Monitoring
      • 4 Implementation
      • 5 Experiments
        • 51 Case Study
        • 52 Discussion
          • 6 Related Work
          • 7 Conclusion
          • References
          • A Actuator Virtualization
          • B Details on Virtualization
          • C Attitude Control and Error Bound
          • D Detection of Hijacking Attempt
          • E Geo-Fence Attack Rootkit
Page 6: VirtualDrone: Virtual Sensing, Actuation, and ... · Figure 1: Simplex architecture. the so›ware environment, in conjunction with the increased capa-bilities and complexities of

ICCPS April 2017 Pisburgh PA USA M-K Yoon et al

Table 1 e rate and amount of data transfer between thesecure and normal control environments

Component Direction Rate SizeIMU Hostrarr VM 200 Hz 14 bytes

Barometer Hostrarr VM 25 Hz 4 byteCompass Hostrarr VM 50 Hz 24 bytes

ADC Hostrarr VM 167 Hz 5 bytesGPS Hostrarr VM 5 Hz Max 1K bytes

Motor Output VMrarr Host 200 Hz 16 bytesRC Input Hostrarr VM 55 Hz 16 bytesTelemetry Hostharr VM Vary Vary

such a general-purpose monolithic kernel Our choice of Linux isto minimize engineering eorts to port VMM autopilot and sensorand actuator device drivers to a new OS Our implementation didnot require any modications to the host OS VMM and guest OS

Autopilot We stack Navio+ sensor board [2] on top of the Rasp-berry PI 2 (as shown in Figures 7 and 8) to provide various sensordata for ight control e NCE (ie the virtual machine) runs theopen-source ArduPilot (aka APM) [1] autopilot suite as the ightcontrol soware for our quadcopter drone APM combines sensordata and RC ight maneuver commands to compute correct inputsfor the four motor-prop units which are sent by the actuator portsof the Navio+ board to drive the actuators

As shown in Figure 8 we run one instance of APM in the SCE(ie the host) e Simplex architecture suggests the use of a robustcontroller for the safety controller in order to handle and recoverfrom physical failures For demonstration purposes we chose touse the APMrsquos default PID controller as the trusted controller In aproduction implementation however a high-assurance controllerwould be used

Virtualization e IO proxy shown in Figures 4 and 8 runsone feeder thread for each sensor Each sensor retrieves a newsample at a xed frequency Each feeder thread then sends thenewly available data to the virtual machine using a host-guestcommunication channel Appendix B explains how the sensorsand the actuators are virtualized in our prototype implementationwhich are also summarized in Table 1

Host-GuestCommunication We use QEMUrsquos virtio-serial fordata transfer between the host (ie IO proxy threads) and guestsystems It creates virtual serial ports in the guest each of whichis mapped to a character device such as Unix domain socket pipeTCPUDP port etc in the host side We created eight virtualserial ports for the components listed in Table 1 e IO proxythreads in the SCE use eight Unix domain sockets to communicatewith the virtual machine One may use other types of host-guestcommunication mechanisms such as shared memory In our im-plementation we aimed to utilize an existing infrastructure thatdoes not require any modication or insertion to the stock QEMUe virtio-serial is adequate enough to handle the low-speedlow-volume data transfer for sensoractuatorcommunication vir-tualization We assume virtio-serial is trustworthy as it is partof QEMU the TCB

Virtual Telemetry e APM uses a serial port (UART) for teleme-try radio transceiver1 Hence the NCE-side APM does not need any1Our prototype copter also supports WiFi and APMrsquos telemetry can be transferredthrough UDP or TCP as well e APM abstracts these away by treating them as UARTcommunication

additionmodication for the virtual telemetry e SCE-side APMreadssends telemetry data fromto the real UART port performs altering (as described in Figure 5) and relays tofrom the virtualmachine using the virtual-serial port mechanism explained abovee APM uses MAVLink protocol (Micro Air Vehicle Communica-tion Protocol)2 MAVLink contains all interface functions to controlthe vehicle monitor states change parameters etc Each MAVLinkmessage size and frequencies vary depending on the message typee messages typically have small size (the maximum is 263 bytes)and low frequency (a few Hz)

5 EXPERIMENTSWe now present case studies that demonstrate how the Virtual-Drone framework can detect and prevent various types of securityand safety violations

51 Case StudyTo demonstrate the eectiveness and versatility of our frameworkwe consider the following ve scenarios Note that we are notproposing new detectionmitigation solutions for the use cases pre-sented here Each scenario could be handled in many dierent waysFor instance hijacking can be easily defeated by a simple authen-tication of the communication We instead intend to demonstratehow an integrated platform ie the VirtualDrone framework candefend against various aack scenarios that would otherwise havebeen handled separately with potentially conicting requirementsWe also note that these aacks can occur in a number of dierentforms In this paper we consider a pessimistic scenario the aackercan know the HWSW conguration and even gain a root accessto the NCE

Attacks on Safety An adversary can launch an aack on thesafety of a vehicle by for example degrading the availability ofcritical sensors (eg IMU) or actuators or the control performance(eg by changing PID gains) e worst-case scenario from thevehiclersquos safety perspective is when the aacker disables the ightcontroller while the vehicle is ying is immediately leads thesystem to an open-loop state which will cause the vehicle to crashTo demonstrate this type of aack we consider an extreme sce-nario in which the ight controller is killed by an aacker eaacker can launch this aack by for example entering through abackdoor replacing the control program with one that self-crashesor installing a rootkit We do not assume specic scenario of howit is launched We implemented a Linux kernel module that 1) ndsthe APM autopilot process from the kernelrsquos process list and then2) kills the process e aacker could achieve the same goal bycausing the virtual machine to crash

ere could be several ways to detect this type of aack One mayuse a heartbeat mechanism which however can be circumvented byan aacker that impersonates the ight controller Instead we takeadvantage of the SCErsquos ability to monitor the true physical state ofthe vehicle We use the aitude control performance measured atthe SCE At each control loop the SCE-side controller calculates theerrors of the rate control on the pitch roll and yaw of the copterDuring a stable ight the rate errors are bounded as shown inFigure 17 in Appendix C because the ight controller is active tominimize the rate errors In case of an open-loop state the ightcontroller cannot work to minimize the rate errors Due to the factthat a multirotor system is naturally an unstable ight platform2hpqgroundcontrolorgmavlinkstart

VirtualDrone Architecture for Aack-Resilient UAS ICCPS April 2017 Pisburgh PA USA

865 87 875 88 885 89 895 90 905 91Time (s)

-10000-7500-5000-2500

0250050007500

10000125001500017500200002250025000

Rol

l Pi

tch

Yaw

Erro

rs

RollPitchYaw

865 87 875 88 885 89 895 90 905 91Time (s)

1000

1100

1200

1300

1400

1500

1600

1700

1800

1900

2000

Mot

or o

utpu

t (PW

Ms)

Motor[0]Motor[1]Motor[2]Motor[3]

Open-loop

Kill ArduPilotprocess

SafetyViolation

Normal Control Mode(NCE)

Secure Control Mode(SCE)

Figure 9 e motor outputs (top) and the roll pitch yawerrors (bottom) measured at the SCE e attacker in NCEkills the ight controller which leads the copter to an open-loop state e SCE takes the control when the errors growbeyond the thresholds aer which the copter is stabilized

the rate errors will increase quickly beyond the normal bounderefore a properly chosen threshold of rate errors can be used indetection of ight safety violations Hence the security and safetymonitoring module in the SCE continuously checks if the errorsgrow beyond the threshold Upon a safety violation the frameworkswitches to the secure control mode Appendix C explains how theAPMrsquos aitude control works and how we obtained the thresholdof rate errors

Figure 9 shows the results of this experiment While the dronewas in the virtual control mode the aacker activated the rootkitmentioned above at time around 888 sec at which moment theAPM process running in the VM is killed e top plot in Figure 9shows the motor outputs (4 channels) from the motor driver in theSCE As we can see the drone was in an open-loop state for about300 ms e boom plot shows the aitude errors also measuredat the SCE e drone becomes unstable (ie the errors are faraway from zero) for a moment because no actuation is applied tothe motors during the open-loop period Upon the detection ofthe violation on the errors (at time around 891 sec) the control isswitched to the SCE from which moment the control loop is closedand the drone returns to a stable state

We also tested a scenario when the control parameters are modi-ed during ight Figure 10 shows the aitude control errors whenthis happens At time around 1643 sec a MAVLink message wassent via radio to change the proportional gain (180 times bigger thanthe original value) of the aitude controller As can be seen thedrone became unstable immediately e safety module detectedthe large roll errors aer which the SCE took the control

Time (s)162 164 166 168 170 172 174

Rol

l Pi

tch

Yaw

Erro

rs

-20000

-10000

0

10000

20000

30000

40000

50000

60000RollPitchYaw

Normal Control Mode

(NCE)

ChangeProportional

Gain

Secure Control Mode(SCE)

Figure 10 e roll pitch yaw errors when the proportionalgain of the attitude controller is set to an abnormally highvalue e SCE immediately stabilizes the drone upon thedetection of the unstable physical state

Hijacking It has been demonstrated that it is possible to hijack adrone by exploiting the MAVLink protocol [9] e idea is to send acommand that sets a new ight plan through the telemetry channele telemetry radio pair of the drone and the ground control station(GCS) distinguish themselves from others by their unique NetIDand the frequency band Hence by using the same NetID and radioband and running the same rmware (which decodes the MAVLinkpackets) as the target vehicle the aacker can send any MAVLinkmessages to the target

To demonstrate this aack scenario we used three telemetryradio (ie for the GCS the drone and the aacker) that utilize thesame frequency band (915MHz) and same default congurationSince the out-of-the-box default NetIDs are same the aackerrsquostelemetry radio did not need any rmware modication3 Figure 11describes the hijacking scenario e drone takes o at the launch-ing point (marked as lsquoTrsquo) and communicates with the GCS locatedat lsquoGrsquo e pilot ies the drone along the normal path e aackerlocated at lsquoArsquo then launches its ground control application en itsends a new waypoint plan to the drone which will send it to thelocation marked as rsquoWrsquo e aacker did not need to modify the3It is possible to nd out the NetID used between the GCS and the drone by modifyingthe rmware [9]

G

T

A

W

T

A

W

A

G

T

Hijack

Ground Control Station

Launching Point

Attacker

Hijacked Drone

Attacker

Figure 11 e attacker (lsquoArsquo) tries to hijack the drone yingalong the normal path and to send it to a newwaypoint (lsquoWrsquo)e attacker uses the same telemetry radio as the GCS andthe drone and unmodied APM Planner GCS

ICCPS April 2017 Pisburgh PA USA M-K Yoon et al

G G

T T

A A

W W

(a) Without VirtualDrone (b) With VirtualDrone

Figure 12 (a) e ight trajectory of the drone hijacked bythe attacker It is sent to new location lsquoWrsquo set by the attacker(b) e attackerrsquos attempt to hijack the drone is detected bythe GCS Upon the detection the GCS sends a special com-mand to the SCE which switches the control mode to theSCE and directs the drone to where it was launched

GCS program (the stock APM Planner 204 with default seings)Figure 12(a) shows the ight trajectory of the drone when it wassuccessfully hijacked by the aacker

While the drone itself cannot detect such a hijacking aemptthe GCS can detect it because of unexpected message exchange initi-ated by the aacker as detailed in Appendix D Hence we addedthe functionality that detects such unexpected messages to ourlegitimate GCS Upon a detection the GCS commands the droneto return to where it was launched as shown in Figure 12(b) istakes advantage of the VirtualDronersquos virtual telemetry explainedin Section 33 the SCErsquos telemetry proxy enables a hidden com-munication channel between the GCS and the SCE through whichthe former sends the drone a pre-dened set of special commandsIn this scenario the command from the GCS overrides the NCErsquosabnormal operation by switching the drone to the secure controlmode Note that the aacker might be able to send the same specialcommand However what it can do at worst is to send the droneback to the home

As explained in Section 34 the virtual telemetry also enables theSCE to detect if the NCE is trying to deceive the ground station Forexample aer a successful hijacking the aacker may report fakeGPS location (by replaying or by generating from SW simulator) tothe GCS so that it looks as if it is ying on the planned path etelemetry analyzer however can detect such aempts by analyzingeach outgoing MAVLink packet and comparing against the truelocation retrieved from the GPS receiver which is also implementedon our prototype

Corrupting Safety Functions Autopilot programs also supportcritical failsafe mechanisms that are activated under certain con-ditions such as losing radio communication signal or low-baeryIt is in fact easy to corrupt such a safety-critical measure becausetypically it can be enableddisabled remotely through a telemetrycommand (hence an aacker can send a command via radio asdone in the hijacking scenario) Moreover such a mechanism isoen implemented as a part of autopilot that runs at the user-levelHence an aacker who has gained a root access can easily corruptit by modifying the conguration le or the memory

4hpardupilotorgplanner2indexhtml

No-fly zone

Original Path

Figure 13 Attacker disables the geo-fence andmodiesWay-point 3 so that the drone ies into a no-y zone Such asafety-critical function can be protected by running in theSCE

In this case study the aacker corrupts the geo-fence mechanismGeo-fence employs positioning data such as GPS signal or localradio-frequency identiers to set up a virtual boundary to preventthe vehicle entering a prohibited zone e vehicle position ismonitored at all times such that before the vehicle enters a no-y zone the system could act accordingly to prevent a geo-fenceviolation Corruption of the geo-fence can result in a catastrophicresult an aacker may disable the geo-fencing and induce thevehicle to y into a congested airspace such as takeo pathwaysfor mid-air collision

To demonstrate this type of aack we developed a rootkit thatdisables the geo-fence of APM during a ight and sends it intoa no-y zone e rootkit executes this aack by modifying theAPMrsquos memory as detailed in Appendix E Our drone was plannedto y through a path (0-1-2-3) in an autonomous mode as shownin Figure 13 During the ight the aacker logged into the systemthrough WiFi and launched the rootkit when the drone was yingtoward Waypoint 2 e new Waypoint 3 set by the rootkit islocated inside a no-y zone and because the rootkit has alreadydisabled the geo-fence the drone consequently ied into the no-yzone deviating from the original path as shown in Figure 13

e SCE of VirtualDrone provides a protected layer at whichsafety-critical functions like geo-fence can be placed We imple-mented a simple geo-fence module in the security and safety mon-itoring module in the SCE It continuously monitors the currentGPS coordinate and checks it against the list of no-y zones alsostored at the SCE layer Upon a violation a pre-dened action istaken In our implementation the SCE takes back the control fromthe NCE and returns to where it was launched as done for thehijacking scenario explained earlier

Side-channel e virtualization of sensor actuator and commu-nication allows for hiding certain types of information from theNCE One of the examples is the RSSI (Received Signal StrengthIndication) that indicates the link quality between a pair of radiotransmier and receiver We especially consider a scenario in whichan aacker tries to estimate the location of the GCS by observingthe RSSI measured between the vehicle and the GCS Due to signalaenuation the radio signal is stronger as the vehicle is closer to theGCS Hence one can correlate the RSSI with the GPS coordinate

VirtualDrone Architecture for Aack-Resilient UAS ICCPS April 2017 Pisburgh PA USA

T

1

2

3

4

G

Lat 401626060Lng -883074907

0 20 40 60 80 100 120 140 160 180Time (s)

100

120

140

160

180

RSS

I

0 20 40 60 80 100 120 140 160 180Time (s)

401615

40162

401625

40163

401635

Latit

ude

0 20 40 60 80 100 120 140 160 180Time (s)

-88309

-88308

-88307

-88306Lo

ngitu

de

Figure 14 e drone ies through T-1-2-3-4-1 e graphsrepresent the RSSI (top) the latitude (middle) and the longi-tude (bottom) An attacker can estimate the location of theGCS by correlating the RSSI and the GPS information

Figure 14 illustrates such a possibility of side-channel e graphsin the gure represents the RSSI (between the drone and the GCS)and the GPS coordinate (latitude and longitude) measured whilethe drone ies through a path (T-1-2-3-4-1) If the aacker is able toobtain these RSSI information heshe can estimate the location (ora region) of the GCS by nding when the RSSI is high e resultsshow quite accurate estimation of the true GCS location (shown inthe map) A complex algorithm will allow for further narrowingdown the location e VirtualDrone framework eliminates thispossibility by not providing the RSSI information to the NCE Notethat RSSI is needed only for the SCE (eg switches to the SCEand then performs a pre-dened operation such as return-to-homewhen RSSI is low due to the loss of telemetry link) Furthermorebecause of the telemetry virtualization the NCE cannot even knowif the telemetry is communicated through a radio channel or anetwork (eg WiFi) In case of the network-based telemetry theSCE can even hide the IP address of the GCS

Virtual Machine Introspection Many rootkits modify criticalkernel data structures to intercept sensitive data hide maliciousprocesses or les etc For a demonstration we implemented a secu-rity module that checks the integrity of the system call table of theguest OS For this we chose to utilize an existing interface providedby QEMU namely the QEMU Machine Protocol (QMP) It allows host-side applications to communicate with or control a running QEMUVM We created a QMP Unix socket to which our security modulecan connect During the initialization of the VM the module dumpsthe current system call table and stores this initial state in memoryFrom then on the module regularly dumps the current table andcompares it against the one obtained initially Using this techniquewe were able to detect a known rootkit modhide1 that hijacks theopen call to hide itself from the kernel module list

Note that we are not proposing new rootkit detection methodshere We instead intend to demonstrate how the VirtualDroneframework can handle such a stealthy security violation One canuse a rich set of library for virtual machine introspection such asLibVMI [3] which we leave for future work

52 DiscussionSensor attack e VirtualDrone framework cannot handle phys-ical manipulations on the sensors such as GPS spoong esetypes of aacks are called sensor aack or false data injection aackand typically tackled by control-theoretic approaches [18 19] erequirement however is that the methods themselves should beprotected from cyber-aacks Hence one can implement such a

Time (sec)0 20 40 60 80 100 120 140 160 180

Vo

lta

ge

(v)

105

11

115

12Without VirtualDroneWith VirtualDrone

Figure 15 Voltage drop at the battery for 3-minutes of hov-ering with and without the VirtualDrone framework

technique on the SCE layer specically in the security and safetymonitoring module as it can see the true (but potentially physicallymanipulated) sensor measurements

Power consumption Since UAS typically runs on baery powerwe compare the power consumption of the prototype drone withand without the VirtualDrone framework In order to compare thepower consumption in a controlled environment (eg eliminatingvarying disturbance due to wind) we ew the drone indoors hov-ering it at a xed position We ew the drone for about 3 minuteswith the same fully-charged baery and measured the voltage dropsduring the ight

Figure 15 shows that the VirtualDrone does not impose over-head on the power consumption is is because the majority ofthe power is consumed by the motors to li the copter e powerconsumption by RPI2 board and the Navio+ sensors cannot exceed5 Was which is the upper bound of the power supply by the powermodule at is the power consumption by any on-board comput-ing cannot be more than 5 Was We calculated the average powerof the 3-minutes of ights which ranged between 114 and 118Was Hence the power consumption by any on-board computingcan be ignored Due to the fact that the upper bound of powerconsumption by computing is two orders of magnitude smallerthan that of the motors we conclude that the power consumptionoverhead of running the VirtualDrone is negligible

6 RELATEDWORKCurrent unmanned vehicle systems are very vulnerable to cyber-aacks as demonstrated by recent aacks Maldrone [8] is a so-ware virus that can compromise drones based on ARM Linux sys-tems e malware can open a backdoor in the Parrot AR Dronesinfect on-board soware and take over the control Pleban et al[23] presented analysis details on the insecure WiFi network andOS user management of the Parrot AR Drones Also researchersdemonstrated a hijacking of DJI consumer drones by emulatingfake GPS signals using low-cost soware dened radio tools [11]It is also possible to inject MAVLink message into a radio link bymodifying the radio rmware and hijack a ying drone [9] whichwe reproduced for our case study Javaid et al [15] addressed somevulnerabilities of wireless communications channels in unmannedaerial vehicles Commercial airplanes are also facing with suchsecurity problems e Actel ProASIC chip used in early Boeing

ICCPS April 2017 Pisburgh PA USA M-K Yoon et al

787 had a backdoor [6] that could allow an aacker via internetconnection or as a passenger to use entertainment system in theaircra to take over the control of the aircra

Advances in virtualization technologies have enabled VirtualMachine Introspection (VMI) [14] in which a trusted VM or theVMM monitors and analyzes the state of applications or OS runninginside untrusted VMs By placing the detection mechanism outsideof the VM it monitors (ie the untrusted VMs) VMI overcomesthe vulnerability of the traditional host-based intrusion detectionsystems VMIs have been applied to process execution monitor-ing [25] control-ow integrity check [22] virtual memory and diskmonitoring [20] dynamic information ow tracking [29] etc

Hardware-based approaches can also be used to isolate vulnera-ble components ARM TrustZone [28] is an architectural extensionthat allows a coexistence of secure world and normal world usingthe same on-chip hardware Access to certain secure componentsare blocked depending on the execution mode Azab et al [13]proposed TZ-RKP which protects the integrity of operating systemkernel that runs on a normal world by running a security monitorin the secure world Zhou et al [33] use ARM processors memorydomain support for soware fault isolation Yoon et al [31] takesadvantage of the redundancy of a multicore processor a core is usedto monitor the execution time of a real-time application runningon a monitored core It was extended to monitor memory behaviorfor system-wide anomaly detection [32] and to protect in-place se-curity monitoring module [30] ese hardware-based approachesprovide beer security than virtualizations can do because the lat-ter relies on the security and correctness of the VMM which issusceptible to aacks [21] However virtualization-based methodshave advantages in that no hardware modication is needed andthat they are more exible due to the soware control

7 CONCLUSIONIn this paper we presented the VirtualDrone framework as a solu-tion to increasing security threats to unmanned aerial systems euse of this framework allows system designers (or users) to runadvanced ight applications in an untrustworthy environment Ourprototype implementation requires a minimal eort to build theframework on an o-the-shelf platform with open-source sowarestack rough case studies we demonstrated that the frameworkprovides an integrated way to handle various security threats thatwould otherwise have required potentially conicting requirementsNevertheless there still remains challenges for practical use of theframework We used a full-featured autopilot for both normaland safety controllers in the current implementation simply for ademonstration purpose only It is desirable to run a fully-veriedcontrol soware in the SCE Hence we plan to adopt and implementa high-assurance controller

REFERENCES[1] ArduPilot Autopilot Suite hpwwwardupilotorg[2] Emlid NAVIO+ hpsdocsemlidcomnavio[3] LibVMI hplibvmicom[4] QEMU hpwikiqemuorg[5] Raspberry PI 2 Model B

hpswwwraspberrypiorgproductsraspberry-pi-2-model-b[6] Cyber-aack concerns raised over Boeing 787 chiprsquos rsquoback doorrsquo e Guardian

hpswwwtheguardiancomtechnology2012may29cyber-aack-concerns-boeing-chip

[7] 3DRrsquos Solo Drone Boasts Dual Linux Computers Run-ning Dronecode hpswwwlinuxcomnews3drs-solo-drone-boasts-dual-linux-computers-running-dronecode

[8] A hacker developed Maldrone the rst malware for drones Se-curity Aairs hpsecurityaairscowordpress32767hackingmaldrone-malware-for-droneshtml

[9] Hijacking drones with a MAVLink exploit hpdiydronescomprolesblogshijacking-quadcopters-with-a-mavlink-exploit

[10] alcomm Goes Ubuntu for Drone Reference Platform hpswwwlinuxcomnewsqualcomm-goes-ubuntu-drone-reference-platform

[11] Watch GPS Aacks at Can Kill DJI Drones Or Bypass White HouseBan Forbes hpwwwforbescomsitesthomasbrewster20150808qihoo-hacks-drone-gps26431a2853fe

[12] Intel Aero Compute Board hpwwwintelcomcontentwwwusentechnology-innovationaerial-technology-overviewhtml

[13] Ahmed M Azab Peng Ning Jitesh Shah an Chen Rohan Bhutkar GuruprasadGanesh Jia Ma and Wenbo Shen 2014 Hypervision Across Worlds Real-timeKernel Protection from the ARM TrustZone Secure World In the ACM Conferenceon Computer and Communications Security

[14] Tal Garnkel and Mendel Rosenblum 2003 A Virtual Machine IntrospectionBased Architecture for Intrusion Detection In the Network and Distributed Sys-tems Security Symposium

[15] Ahmad Y Javaid Weiqing Sun Vijay K Devabhaktuni and Mansoor Alam 2012Cyber security threat analysis and modeling of an unmanned aerial vehiclesystem In the IEEE Conference on Technologies for Homeland Security

[16] Andrew J Kerns Daniel P Shepard Jahshan A Bhai and Todd E Humphreys2014 Unmanned Aircra Capture and Control Via GPS Spoong Journal ofField Robotics 31 (2014)

[17] Jiuxing Liu Wei Huang Bulent Abali and Dhabaleswar K Panda 2006 High Per-formance VMM-bypass IO in Virtual Machines In the USENIX Annual TechnicalConference

[18] Y Mo and B Sinopoli 2015 Secure Estimation in the Presence of IntegrityAacks IEEE Trans Automat Control 60 4 (2015) 1145ndash1151

[19] Miroslav Pajic James Weimer Nicola Bezzo Paulo Tabuada Oleg Sokolsky InsupLee and George J Pappas 2014 Robustness of Aack-Resilient State EstimatorsIn the ACMIEEE International Conference on Cyber-Physical Systems

[20] Bryan D Payne Martim Carbone and Wenke Lee 2007 Secure and FlexibleMonitoring of Virtual Machines In the Annual Computer Security ApplicationsConference

[21] Gabor Pek Andrea Lanzi Abhinav Srivastava Davide Balzaroi Aurelien Fran-cillon and Christoph Neumann 2014 On the Feasibility of Soware Aackson Commodity Virtual Machine Monitors via Direct Device Assignment In theACM Symposium on Information Computer and Communications Security

[22] Nick L Petroni Jr and Michael Hicks 2007 Automated Detection of PersistentKernel Control-ow Aacks In the ACM Conference on Computer and Communi-cations Security

[23] Johann-Sebastian Pleban Ricardo Band and Reiner Creutzburg 2014 Hackingand securing the ARDrone 20 quadcopter investigations for improving thesecurity of a toy In the SPIEMobile Devices andMultimedia Enabling TechnologiesAlgorithms and Applications

[24] Lui Sha 2001 Using Simplicity to Control Complexity IEEE Sow 18 4 (2001)20ndash28 DOIhpdxdoiorgdxdoiorg101109MS2001936213

[25] Deepa Srinivasan Zhi Wang Xuxian Jiang and Dongyan Xu 2011 Process Out-graing An Ecient rdquoout-of-VMrdquo Approach for Fine-grained Process ExecutionMonitoring In the ACM Conference on Computer and Communications Security

[26] Nils Ole Tippenhauer Christina Popper Kasper Bonne Rasmussen and SrdjanCapkun 2011 On the Requirements for Successful GPS Spoong Aacks In theACM Conference on Computer and Communications Security

[27] X Wang N Hovakimyan and L Sha 2013 L1Simplex Fault-tolerant controlof cyber-physical systems In the ACMIEEE International Conference on Cyber-Physical Systems

[28] Peter Wilson Alexandre Frey Tom Mihm Danny Kershaw and Tiago Alves2007 Implementing Embedded Security on Dual-Virtual-CPU Systems IEEEDes Test 24 6 (Nov 2007) 582ndash591

[29] Heng Yin Dawn Song Manuel Egele Christopher Kruegel and Engin Kirda 2007Panorama Capturing System-wide Information Flow for Malware Detection andAnalysis In the ACM Conference on Computer and Communications Security

[30] Man-Ki Yoon Mihai Christodorescu Lui Sha and Sibin Mohan 2016 eDragonBeam Framework Hardware-Protected Security Modules for In-PlaceIntrusion Detection In the ACM International Systems and Storage Conference

[31] Man-Ki Yoon Sibin Mohan Jaesik Choi Jung-Eun Kim and Lui Sha 2013SecureCore A Multicore-based Intrusion Detection Architecture for Real-TimeEmbedded Systems In the IEEE Real-Time Embedded Technology and ApplicationsSymposium

[32] Man-Ki Yoon Sibin Mohan Jaesik Choi and Lui Sha 2015 Memory Heat MapAnomaly Detection in Real-Time Embedded Systems Using Memory BehaviorIn the ACMEDACIEEE Design Automation Conference

[33] Yajin Zhou Xiaoguang Wang Yue Chen and Zhi Wang 2014 ARMlockHardware-based Fault Isolation for ARM In the ACM Conference on Computerand Communications Security

VirtualDrone Architecture for Aack-Resilient UAS ICCPS April 2017 Pisburgh PA USA

A ACTUATOR VIRTUALIZATION

IO Proxy

PWM Generator(PCA9685)

TrustedController

Motor Driver

Motor Interface

Virtual Motor Driver

Hardware

Host OSI2C

UntrustworthyController

Motor Interface

Security amp Safety Monitor

NCE (VM) SCE (Host)

MotorThread

Host-Guest Communication

Motors 0123

Figure 16 Actuator virtualization in the VirtualDroneframework

Figure 16 shows how an actuator is virtualized in the Virtual-Drone framework which is similar to the sensor virtualizationexplained in Section 33 e controller running in the NCE com-putes a set of PWM (Pulse Width Modulation) output values tocontrol the motors of the vehicle e controller writes these valuesto the virtual motor driver through the motor interface It transfersthe data to an IO proxy thread that relays the PWM values to themotor driver in the SCE e motors are nally actuated by analogsignals converted by the on-board speed controller

B DETAILS ON VIRTUALIZATIONSensors e following describes how the sensors are virtualizedin our prototype implementationbull Inertial Measurement Unit (MPU9250) e device driver run-

ning on the host retrieves a raw IMU data (14 bytes) every 1ms through SPI However every 5th sample is actually used forcontrol (hence the eective control frequency is 200 Hz) edata includes a 3-axis gyroscope and 3-axis accelerometer values

bull Barometer (MS5611) is sensor measures the barometric pres-sure and temperature e driver runs a state machine thatoperates at a frequency of 25 Hz A raw data (24 bits) retrievedfrom the sensor through I2C is converted to either pressure ortemperature value depending on the state (8 bits)

bull Compass (AK8963) It measures terrestrial magnetism in the 3axes at a frequency of 50 Hz using I2C Total 24 bytes (includingper-axis calibration factor) of raw data are fed to the NCE

bull Analog-to-Digital Converter (ADS1115) It measures the voltageson 6 ADC channels It reads each channel every 600 ms throughI2C For each channel a data of 40 bits (8 bits for channel ID and32 bits for sampled data) is transferred to the VM

bull GPS (u-blox NEO-M8) It provides the current longitude latitudeand altitude of the vehicle the time information (current millisec-ond time of week) etc e driver reads UBX protocol messagesfrom the u-blox GPS receiver through SPI parses each one andthen obtains the above information e parsing is stateful anda aer-parsing data can be at most 1K bytes It is fed to the NCEat the frequency of 5 Hz

Actuator For the motor actuation the virtual controller in theNCE sends the PWM values (for the four motors) to the host at thefrequency of the main control loop (ie 200 Hz)

Radio Control Input A remote control via radio link is used tomanually control (armdisarm ight maneuver) the quadcoptere raw input pulses are retrieved through DMA (Direct MemoryAccess) at 1666 Hz About every 18 ms (ie 55 Hz) a new set ofPWM values representing the stick and switch movements (total 8channels) becomes available As done for the sensors mentionedabove the IO proxy runs an RC feeding thread However insteadof feeding the raw pulse data we send the processed data ie thePWMs in order to avoid the overhead due to feeding the raw dataat such a high frequency (1666 Hz)

C ATTITUDE CONTROL AND ERROR BOUND

Time (s)50 55 60 65 70 75 80 85

Rol

l Pi

tch

Yaw

Erro

rs

-25000

-20000

-15000

-10000

-5000

0

5000

10000

15000

20000

25000RollPitchYaw

Time (s)50 55 60 65 70 75 80 85

RC

Inpu

t (PW

Ms)

800

1000

1200

1400

1600

1800

2000

2200RollPitchThrottleYaw

Drone hit the ground

Switched to SCE

Figure 17 e roll pitch yaw errors (top) measured duringthe dronersquos extreme movements e bottom plot shows theroll pitch throttle and yaw targets set by the pilot using theremote controller

e APM uses a double-loop PIDP control to stabilize the quad-copter e Angle loop aka the outer loop controls the aitudeof the vehicle e Angle loop utilizes a P control to achieve thedesired aitude by outpuing a desired angular speed ie the an-gular speed setpoint to the Rate loop aka the inner loop eAngle looprsquos output ie the angular speed setpoint is proportionalto the dierence between the target angle value set by the pilot(or autopilot when in autonomous ight mode) and the measuredangle value from the IMU sensor e Rate loop controls the aituderates of the aircra e Rate loop continuously calculates an errorvalue as the dierence between the angular speed setpoint and themeasured angular speed from the IMU sensor A PID control is

ICCPS April 2017 Pisburgh PA USA M-K Yoon et al

utilized in Rate loop to minimize the error over time by outpuingPWM signals to control motors

For the thresholds on the errors we used plusmn20 000 (radsec) forroll and pitch and plusmn10 000 (radsec) for yaw e switching logicactivates when the violation happens three times consecutivelyWe obtained these bounds on the errors by measuring from bothnormal and extreme movements of the prototype drone e topplot in Figure 17 shows those errors measured during the dronersquosextreme movements and the boom plot shows how the pilot cre-ated the movements e result indicates that the errors are wellbounded even when the drone experiences such movements epilot intentionally made the drone hit the ground at time between75 sec and 76 sec aer which the control is switched to the SCEWe did not aempt to nd optimal thresholds e smaller thethreshold is the easier it is for the SCE to recover to a stable stateHowever at the same time it could create more false positives

D DETECTION OF HIJACKING ATTEMPT

(a) LegitimateTim

e

Vehicle GCS

hellip

Attacker

hellip

Unexpected

Time

VehicleGCS

hellip

(b) Hijacking attempt

Figure 18 (a) MAVLink messages exchanged between theGCS and the vehicle for waypoint setup (b) e legitimateGCS can detect the attackerrsquos update on the vehicles routeas the vehiclersquos responses are unexpected

In order for a GCS to set waypoints for a vehicle a series ofMAVLink messages are exchanged Figure 18(a) shows the MAVLinkwaypoint protocol e GCS rst sends MISSION COUNT(N) to thevehicle where N represents the number of waypoints that it willset e vehicle prepares for receiving the N waypoints and thenrequests for each waypoint by sending MISSION REQUEST(i) untilall the waypoint locations are received

Note that both the legitimate GCS and the aacker need to followthis protocol to set any waypoints From the vehiclersquos perspectivethe initialization requests (ie MISSION COUNT(N)) from them areindistinguishable at is the vehicle itself cannot detect suspiciousrequests for a route change However the fact that the aacker canreceive messages from the vehicle means that the legitimate GCScan also hear what the vehicle responds to the aackerrsquos requestAs Figure 18(b) shows the legitimate GCS can detect the aackerrsquosupdate on the vehiclersquos waypoints when it receives unexpectedMISSION REQUEST messages as it did not initialize the message ex-change Due to such stateful communication the MAVLink protocolenables detecting other types of suspicious aempts (eg changingcontrol parameters) as well

E GEO-FENCE ATTACK ROOTKITWe developed a rootkit that disables the geo-fence and sends thevehicle into a no-y zone e rootkit nds the APM process andthen modies itsmemory that stores (i) the ag that enablesdisablesthe geo-fencing and (ii) the list of waypoints ese are loadedfrom the APM conguration le (varAPMArduCopterstg) onits startup and buered in the memory

Waypoint 3Waypoint 2

Waypoint 4

Geo-fence enabled

Figure 19 ewaypoint list and geo-fence enable ag storedin the memory of APM process An attacker who gained aroot-level access canmodify thesememory values to disablethe geo-fence and then send the drone to a new location

Figure 20 e rootkit that disables the geo-fence and modi-es the ight plan by manipulating the APMrsquos memory

One can change these values remotely through radio which how-ever is easy to prevent since radio communication can be monitoredeasily Modifying the buered values in the memory is dicult toprevent especially if the aacker has gained a root access e mem-ory locations of these data can be easily found if the source codeor the executable binary is available Figure 19 shows the memorydump of the waypoint list and geo-fence enable ag Figure 20shows how these values are modied by the rootkit

  • Abstract
  • 1 Introduction
  • 2 Background
  • 3 VirtualDrone Framework
    • 31 High-level Framework
    • 32 Assumptions and Adversary Model
    • 33 Virtual Sensing Actuation and Communication
    • 34 Security and Safety Monitoring
      • 4 Implementation
      • 5 Experiments
        • 51 Case Study
        • 52 Discussion
          • 6 Related Work
          • 7 Conclusion
          • References
          • A Actuator Virtualization
          • B Details on Virtualization
          • C Attitude Control and Error Bound
          • D Detection of Hijacking Attempt
          • E Geo-Fence Attack Rootkit
Page 7: VirtualDrone: Virtual Sensing, Actuation, and ... · Figure 1: Simplex architecture. the so›ware environment, in conjunction with the increased capa-bilities and complexities of

VirtualDrone Architecture for Aack-Resilient UAS ICCPS April 2017 Pisburgh PA USA

865 87 875 88 885 89 895 90 905 91Time (s)

-10000-7500-5000-2500

0250050007500

10000125001500017500200002250025000

Rol

l Pi

tch

Yaw

Erro

rs

RollPitchYaw

865 87 875 88 885 89 895 90 905 91Time (s)

1000

1100

1200

1300

1400

1500

1600

1700

1800

1900

2000

Mot

or o

utpu

t (PW

Ms)

Motor[0]Motor[1]Motor[2]Motor[3]

Open-loop

Kill ArduPilotprocess

SafetyViolation

Normal Control Mode(NCE)

Secure Control Mode(SCE)

Figure 9 e motor outputs (top) and the roll pitch yawerrors (bottom) measured at the SCE e attacker in NCEkills the ight controller which leads the copter to an open-loop state e SCE takes the control when the errors growbeyond the thresholds aer which the copter is stabilized

the rate errors will increase quickly beyond the normal bounderefore a properly chosen threshold of rate errors can be used indetection of ight safety violations Hence the security and safetymonitoring module in the SCE continuously checks if the errorsgrow beyond the threshold Upon a safety violation the frameworkswitches to the secure control mode Appendix C explains how theAPMrsquos aitude control works and how we obtained the thresholdof rate errors

Figure 9 shows the results of this experiment While the dronewas in the virtual control mode the aacker activated the rootkitmentioned above at time around 888 sec at which moment theAPM process running in the VM is killed e top plot in Figure 9shows the motor outputs (4 channels) from the motor driver in theSCE As we can see the drone was in an open-loop state for about300 ms e boom plot shows the aitude errors also measuredat the SCE e drone becomes unstable (ie the errors are faraway from zero) for a moment because no actuation is applied tothe motors during the open-loop period Upon the detection ofthe violation on the errors (at time around 891 sec) the control isswitched to the SCE from which moment the control loop is closedand the drone returns to a stable state

We also tested a scenario when the control parameters are modi-ed during ight Figure 10 shows the aitude control errors whenthis happens At time around 1643 sec a MAVLink message wassent via radio to change the proportional gain (180 times bigger thanthe original value) of the aitude controller As can be seen thedrone became unstable immediately e safety module detectedthe large roll errors aer which the SCE took the control

Time (s)162 164 166 168 170 172 174

Rol

l Pi

tch

Yaw

Erro

rs

-20000

-10000

0

10000

20000

30000

40000

50000

60000RollPitchYaw

Normal Control Mode

(NCE)

ChangeProportional

Gain

Secure Control Mode(SCE)

Figure 10 e roll pitch yaw errors when the proportionalgain of the attitude controller is set to an abnormally highvalue e SCE immediately stabilizes the drone upon thedetection of the unstable physical state

Hijacking It has been demonstrated that it is possible to hijack adrone by exploiting the MAVLink protocol [9] e idea is to send acommand that sets a new ight plan through the telemetry channele telemetry radio pair of the drone and the ground control station(GCS) distinguish themselves from others by their unique NetIDand the frequency band Hence by using the same NetID and radioband and running the same rmware (which decodes the MAVLinkpackets) as the target vehicle the aacker can send any MAVLinkmessages to the target

To demonstrate this aack scenario we used three telemetryradio (ie for the GCS the drone and the aacker) that utilize thesame frequency band (915MHz) and same default congurationSince the out-of-the-box default NetIDs are same the aackerrsquostelemetry radio did not need any rmware modication3 Figure 11describes the hijacking scenario e drone takes o at the launch-ing point (marked as lsquoTrsquo) and communicates with the GCS locatedat lsquoGrsquo e pilot ies the drone along the normal path e aackerlocated at lsquoArsquo then launches its ground control application en itsends a new waypoint plan to the drone which will send it to thelocation marked as rsquoWrsquo e aacker did not need to modify the3It is possible to nd out the NetID used between the GCS and the drone by modifyingthe rmware [9]

G

T

A

W

T

A

W

A

G

T

Hijack

Ground Control Station

Launching Point

Attacker

Hijacked Drone

Attacker

Figure 11 e attacker (lsquoArsquo) tries to hijack the drone yingalong the normal path and to send it to a newwaypoint (lsquoWrsquo)e attacker uses the same telemetry radio as the GCS andthe drone and unmodied APM Planner GCS

ICCPS April 2017 Pisburgh PA USA M-K Yoon et al

G G

T T

A A

W W

(a) Without VirtualDrone (b) With VirtualDrone

Figure 12 (a) e ight trajectory of the drone hijacked bythe attacker It is sent to new location lsquoWrsquo set by the attacker(b) e attackerrsquos attempt to hijack the drone is detected bythe GCS Upon the detection the GCS sends a special com-mand to the SCE which switches the control mode to theSCE and directs the drone to where it was launched

GCS program (the stock APM Planner 204 with default seings)Figure 12(a) shows the ight trajectory of the drone when it wassuccessfully hijacked by the aacker

While the drone itself cannot detect such a hijacking aemptthe GCS can detect it because of unexpected message exchange initi-ated by the aacker as detailed in Appendix D Hence we addedthe functionality that detects such unexpected messages to ourlegitimate GCS Upon a detection the GCS commands the droneto return to where it was launched as shown in Figure 12(b) istakes advantage of the VirtualDronersquos virtual telemetry explainedin Section 33 the SCErsquos telemetry proxy enables a hidden com-munication channel between the GCS and the SCE through whichthe former sends the drone a pre-dened set of special commandsIn this scenario the command from the GCS overrides the NCErsquosabnormal operation by switching the drone to the secure controlmode Note that the aacker might be able to send the same specialcommand However what it can do at worst is to send the droneback to the home

As explained in Section 34 the virtual telemetry also enables theSCE to detect if the NCE is trying to deceive the ground station Forexample aer a successful hijacking the aacker may report fakeGPS location (by replaying or by generating from SW simulator) tothe GCS so that it looks as if it is ying on the planned path etelemetry analyzer however can detect such aempts by analyzingeach outgoing MAVLink packet and comparing against the truelocation retrieved from the GPS receiver which is also implementedon our prototype

Corrupting Safety Functions Autopilot programs also supportcritical failsafe mechanisms that are activated under certain con-ditions such as losing radio communication signal or low-baeryIt is in fact easy to corrupt such a safety-critical measure becausetypically it can be enableddisabled remotely through a telemetrycommand (hence an aacker can send a command via radio asdone in the hijacking scenario) Moreover such a mechanism isoen implemented as a part of autopilot that runs at the user-levelHence an aacker who has gained a root access can easily corruptit by modifying the conguration le or the memory

4hpardupilotorgplanner2indexhtml

No-fly zone

Original Path

Figure 13 Attacker disables the geo-fence andmodiesWay-point 3 so that the drone ies into a no-y zone Such asafety-critical function can be protected by running in theSCE

In this case study the aacker corrupts the geo-fence mechanismGeo-fence employs positioning data such as GPS signal or localradio-frequency identiers to set up a virtual boundary to preventthe vehicle entering a prohibited zone e vehicle position ismonitored at all times such that before the vehicle enters a no-y zone the system could act accordingly to prevent a geo-fenceviolation Corruption of the geo-fence can result in a catastrophicresult an aacker may disable the geo-fencing and induce thevehicle to y into a congested airspace such as takeo pathwaysfor mid-air collision

To demonstrate this type of aack we developed a rootkit thatdisables the geo-fence of APM during a ight and sends it intoa no-y zone e rootkit executes this aack by modifying theAPMrsquos memory as detailed in Appendix E Our drone was plannedto y through a path (0-1-2-3) in an autonomous mode as shownin Figure 13 During the ight the aacker logged into the systemthrough WiFi and launched the rootkit when the drone was yingtoward Waypoint 2 e new Waypoint 3 set by the rootkit islocated inside a no-y zone and because the rootkit has alreadydisabled the geo-fence the drone consequently ied into the no-yzone deviating from the original path as shown in Figure 13

e SCE of VirtualDrone provides a protected layer at whichsafety-critical functions like geo-fence can be placed We imple-mented a simple geo-fence module in the security and safety mon-itoring module in the SCE It continuously monitors the currentGPS coordinate and checks it against the list of no-y zones alsostored at the SCE layer Upon a violation a pre-dened action istaken In our implementation the SCE takes back the control fromthe NCE and returns to where it was launched as done for thehijacking scenario explained earlier

Side-channel e virtualization of sensor actuator and commu-nication allows for hiding certain types of information from theNCE One of the examples is the RSSI (Received Signal StrengthIndication) that indicates the link quality between a pair of radiotransmier and receiver We especially consider a scenario in whichan aacker tries to estimate the location of the GCS by observingthe RSSI measured between the vehicle and the GCS Due to signalaenuation the radio signal is stronger as the vehicle is closer to theGCS Hence one can correlate the RSSI with the GPS coordinate

VirtualDrone Architecture for Aack-Resilient UAS ICCPS April 2017 Pisburgh PA USA

T

1

2

3

4

G

Lat 401626060Lng -883074907

0 20 40 60 80 100 120 140 160 180Time (s)

100

120

140

160

180

RSS

I

0 20 40 60 80 100 120 140 160 180Time (s)

401615

40162

401625

40163

401635

Latit

ude

0 20 40 60 80 100 120 140 160 180Time (s)

-88309

-88308

-88307

-88306Lo

ngitu

de

Figure 14 e drone ies through T-1-2-3-4-1 e graphsrepresent the RSSI (top) the latitude (middle) and the longi-tude (bottom) An attacker can estimate the location of theGCS by correlating the RSSI and the GPS information

Figure 14 illustrates such a possibility of side-channel e graphsin the gure represents the RSSI (between the drone and the GCS)and the GPS coordinate (latitude and longitude) measured whilethe drone ies through a path (T-1-2-3-4-1) If the aacker is able toobtain these RSSI information heshe can estimate the location (ora region) of the GCS by nding when the RSSI is high e resultsshow quite accurate estimation of the true GCS location (shown inthe map) A complex algorithm will allow for further narrowingdown the location e VirtualDrone framework eliminates thispossibility by not providing the RSSI information to the NCE Notethat RSSI is needed only for the SCE (eg switches to the SCEand then performs a pre-dened operation such as return-to-homewhen RSSI is low due to the loss of telemetry link) Furthermorebecause of the telemetry virtualization the NCE cannot even knowif the telemetry is communicated through a radio channel or anetwork (eg WiFi) In case of the network-based telemetry theSCE can even hide the IP address of the GCS

Virtual Machine Introspection Many rootkits modify criticalkernel data structures to intercept sensitive data hide maliciousprocesses or les etc For a demonstration we implemented a secu-rity module that checks the integrity of the system call table of theguest OS For this we chose to utilize an existing interface providedby QEMU namely the QEMU Machine Protocol (QMP) It allows host-side applications to communicate with or control a running QEMUVM We created a QMP Unix socket to which our security modulecan connect During the initialization of the VM the module dumpsthe current system call table and stores this initial state in memoryFrom then on the module regularly dumps the current table andcompares it against the one obtained initially Using this techniquewe were able to detect a known rootkit modhide1 that hijacks theopen call to hide itself from the kernel module list

Note that we are not proposing new rootkit detection methodshere We instead intend to demonstrate how the VirtualDroneframework can handle such a stealthy security violation One canuse a rich set of library for virtual machine introspection such asLibVMI [3] which we leave for future work

52 DiscussionSensor attack e VirtualDrone framework cannot handle phys-ical manipulations on the sensors such as GPS spoong esetypes of aacks are called sensor aack or false data injection aackand typically tackled by control-theoretic approaches [18 19] erequirement however is that the methods themselves should beprotected from cyber-aacks Hence one can implement such a

Time (sec)0 20 40 60 80 100 120 140 160 180

Vo

lta

ge

(v)

105

11

115

12Without VirtualDroneWith VirtualDrone

Figure 15 Voltage drop at the battery for 3-minutes of hov-ering with and without the VirtualDrone framework

technique on the SCE layer specically in the security and safetymonitoring module as it can see the true (but potentially physicallymanipulated) sensor measurements

Power consumption Since UAS typically runs on baery powerwe compare the power consumption of the prototype drone withand without the VirtualDrone framework In order to compare thepower consumption in a controlled environment (eg eliminatingvarying disturbance due to wind) we ew the drone indoors hov-ering it at a xed position We ew the drone for about 3 minuteswith the same fully-charged baery and measured the voltage dropsduring the ight

Figure 15 shows that the VirtualDrone does not impose over-head on the power consumption is is because the majority ofthe power is consumed by the motors to li the copter e powerconsumption by RPI2 board and the Navio+ sensors cannot exceed5 Was which is the upper bound of the power supply by the powermodule at is the power consumption by any on-board comput-ing cannot be more than 5 Was We calculated the average powerof the 3-minutes of ights which ranged between 114 and 118Was Hence the power consumption by any on-board computingcan be ignored Due to the fact that the upper bound of powerconsumption by computing is two orders of magnitude smallerthan that of the motors we conclude that the power consumptionoverhead of running the VirtualDrone is negligible

6 RELATEDWORKCurrent unmanned vehicle systems are very vulnerable to cyber-aacks as demonstrated by recent aacks Maldrone [8] is a so-ware virus that can compromise drones based on ARM Linux sys-tems e malware can open a backdoor in the Parrot AR Dronesinfect on-board soware and take over the control Pleban et al[23] presented analysis details on the insecure WiFi network andOS user management of the Parrot AR Drones Also researchersdemonstrated a hijacking of DJI consumer drones by emulatingfake GPS signals using low-cost soware dened radio tools [11]It is also possible to inject MAVLink message into a radio link bymodifying the radio rmware and hijack a ying drone [9] whichwe reproduced for our case study Javaid et al [15] addressed somevulnerabilities of wireless communications channels in unmannedaerial vehicles Commercial airplanes are also facing with suchsecurity problems e Actel ProASIC chip used in early Boeing

ICCPS April 2017 Pisburgh PA USA M-K Yoon et al

787 had a backdoor [6] that could allow an aacker via internetconnection or as a passenger to use entertainment system in theaircra to take over the control of the aircra

Advances in virtualization technologies have enabled VirtualMachine Introspection (VMI) [14] in which a trusted VM or theVMM monitors and analyzes the state of applications or OS runninginside untrusted VMs By placing the detection mechanism outsideof the VM it monitors (ie the untrusted VMs) VMI overcomesthe vulnerability of the traditional host-based intrusion detectionsystems VMIs have been applied to process execution monitor-ing [25] control-ow integrity check [22] virtual memory and diskmonitoring [20] dynamic information ow tracking [29] etc

Hardware-based approaches can also be used to isolate vulnera-ble components ARM TrustZone [28] is an architectural extensionthat allows a coexistence of secure world and normal world usingthe same on-chip hardware Access to certain secure componentsare blocked depending on the execution mode Azab et al [13]proposed TZ-RKP which protects the integrity of operating systemkernel that runs on a normal world by running a security monitorin the secure world Zhou et al [33] use ARM processors memorydomain support for soware fault isolation Yoon et al [31] takesadvantage of the redundancy of a multicore processor a core is usedto monitor the execution time of a real-time application runningon a monitored core It was extended to monitor memory behaviorfor system-wide anomaly detection [32] and to protect in-place se-curity monitoring module [30] ese hardware-based approachesprovide beer security than virtualizations can do because the lat-ter relies on the security and correctness of the VMM which issusceptible to aacks [21] However virtualization-based methodshave advantages in that no hardware modication is needed andthat they are more exible due to the soware control

7 CONCLUSIONIn this paper we presented the VirtualDrone framework as a solu-tion to increasing security threats to unmanned aerial systems euse of this framework allows system designers (or users) to runadvanced ight applications in an untrustworthy environment Ourprototype implementation requires a minimal eort to build theframework on an o-the-shelf platform with open-source sowarestack rough case studies we demonstrated that the frameworkprovides an integrated way to handle various security threats thatwould otherwise have required potentially conicting requirementsNevertheless there still remains challenges for practical use of theframework We used a full-featured autopilot for both normaland safety controllers in the current implementation simply for ademonstration purpose only It is desirable to run a fully-veriedcontrol soware in the SCE Hence we plan to adopt and implementa high-assurance controller

REFERENCES[1] ArduPilot Autopilot Suite hpwwwardupilotorg[2] Emlid NAVIO+ hpsdocsemlidcomnavio[3] LibVMI hplibvmicom[4] QEMU hpwikiqemuorg[5] Raspberry PI 2 Model B

hpswwwraspberrypiorgproductsraspberry-pi-2-model-b[6] Cyber-aack concerns raised over Boeing 787 chiprsquos rsquoback doorrsquo e Guardian

hpswwwtheguardiancomtechnology2012may29cyber-aack-concerns-boeing-chip

[7] 3DRrsquos Solo Drone Boasts Dual Linux Computers Run-ning Dronecode hpswwwlinuxcomnews3drs-solo-drone-boasts-dual-linux-computers-running-dronecode

[8] A hacker developed Maldrone the rst malware for drones Se-curity Aairs hpsecurityaairscowordpress32767hackingmaldrone-malware-for-droneshtml

[9] Hijacking drones with a MAVLink exploit hpdiydronescomprolesblogshijacking-quadcopters-with-a-mavlink-exploit

[10] alcomm Goes Ubuntu for Drone Reference Platform hpswwwlinuxcomnewsqualcomm-goes-ubuntu-drone-reference-platform

[11] Watch GPS Aacks at Can Kill DJI Drones Or Bypass White HouseBan Forbes hpwwwforbescomsitesthomasbrewster20150808qihoo-hacks-drone-gps26431a2853fe

[12] Intel Aero Compute Board hpwwwintelcomcontentwwwusentechnology-innovationaerial-technology-overviewhtml

[13] Ahmed M Azab Peng Ning Jitesh Shah an Chen Rohan Bhutkar GuruprasadGanesh Jia Ma and Wenbo Shen 2014 Hypervision Across Worlds Real-timeKernel Protection from the ARM TrustZone Secure World In the ACM Conferenceon Computer and Communications Security

[14] Tal Garnkel and Mendel Rosenblum 2003 A Virtual Machine IntrospectionBased Architecture for Intrusion Detection In the Network and Distributed Sys-tems Security Symposium

[15] Ahmad Y Javaid Weiqing Sun Vijay K Devabhaktuni and Mansoor Alam 2012Cyber security threat analysis and modeling of an unmanned aerial vehiclesystem In the IEEE Conference on Technologies for Homeland Security

[16] Andrew J Kerns Daniel P Shepard Jahshan A Bhai and Todd E Humphreys2014 Unmanned Aircra Capture and Control Via GPS Spoong Journal ofField Robotics 31 (2014)

[17] Jiuxing Liu Wei Huang Bulent Abali and Dhabaleswar K Panda 2006 High Per-formance VMM-bypass IO in Virtual Machines In the USENIX Annual TechnicalConference

[18] Y Mo and B Sinopoli 2015 Secure Estimation in the Presence of IntegrityAacks IEEE Trans Automat Control 60 4 (2015) 1145ndash1151

[19] Miroslav Pajic James Weimer Nicola Bezzo Paulo Tabuada Oleg Sokolsky InsupLee and George J Pappas 2014 Robustness of Aack-Resilient State EstimatorsIn the ACMIEEE International Conference on Cyber-Physical Systems

[20] Bryan D Payne Martim Carbone and Wenke Lee 2007 Secure and FlexibleMonitoring of Virtual Machines In the Annual Computer Security ApplicationsConference

[21] Gabor Pek Andrea Lanzi Abhinav Srivastava Davide Balzaroi Aurelien Fran-cillon and Christoph Neumann 2014 On the Feasibility of Soware Aackson Commodity Virtual Machine Monitors via Direct Device Assignment In theACM Symposium on Information Computer and Communications Security

[22] Nick L Petroni Jr and Michael Hicks 2007 Automated Detection of PersistentKernel Control-ow Aacks In the ACM Conference on Computer and Communi-cations Security

[23] Johann-Sebastian Pleban Ricardo Band and Reiner Creutzburg 2014 Hackingand securing the ARDrone 20 quadcopter investigations for improving thesecurity of a toy In the SPIEMobile Devices andMultimedia Enabling TechnologiesAlgorithms and Applications

[24] Lui Sha 2001 Using Simplicity to Control Complexity IEEE Sow 18 4 (2001)20ndash28 DOIhpdxdoiorgdxdoiorg101109MS2001936213

[25] Deepa Srinivasan Zhi Wang Xuxian Jiang and Dongyan Xu 2011 Process Out-graing An Ecient rdquoout-of-VMrdquo Approach for Fine-grained Process ExecutionMonitoring In the ACM Conference on Computer and Communications Security

[26] Nils Ole Tippenhauer Christina Popper Kasper Bonne Rasmussen and SrdjanCapkun 2011 On the Requirements for Successful GPS Spoong Aacks In theACM Conference on Computer and Communications Security

[27] X Wang N Hovakimyan and L Sha 2013 L1Simplex Fault-tolerant controlof cyber-physical systems In the ACMIEEE International Conference on Cyber-Physical Systems

[28] Peter Wilson Alexandre Frey Tom Mihm Danny Kershaw and Tiago Alves2007 Implementing Embedded Security on Dual-Virtual-CPU Systems IEEEDes Test 24 6 (Nov 2007) 582ndash591

[29] Heng Yin Dawn Song Manuel Egele Christopher Kruegel and Engin Kirda 2007Panorama Capturing System-wide Information Flow for Malware Detection andAnalysis In the ACM Conference on Computer and Communications Security

[30] Man-Ki Yoon Mihai Christodorescu Lui Sha and Sibin Mohan 2016 eDragonBeam Framework Hardware-Protected Security Modules for In-PlaceIntrusion Detection In the ACM International Systems and Storage Conference

[31] Man-Ki Yoon Sibin Mohan Jaesik Choi Jung-Eun Kim and Lui Sha 2013SecureCore A Multicore-based Intrusion Detection Architecture for Real-TimeEmbedded Systems In the IEEE Real-Time Embedded Technology and ApplicationsSymposium

[32] Man-Ki Yoon Sibin Mohan Jaesik Choi and Lui Sha 2015 Memory Heat MapAnomaly Detection in Real-Time Embedded Systems Using Memory BehaviorIn the ACMEDACIEEE Design Automation Conference

[33] Yajin Zhou Xiaoguang Wang Yue Chen and Zhi Wang 2014 ARMlockHardware-based Fault Isolation for ARM In the ACM Conference on Computerand Communications Security

VirtualDrone Architecture for Aack-Resilient UAS ICCPS April 2017 Pisburgh PA USA

A ACTUATOR VIRTUALIZATION

IO Proxy

PWM Generator(PCA9685)

TrustedController

Motor Driver

Motor Interface

Virtual Motor Driver

Hardware

Host OSI2C

UntrustworthyController

Motor Interface

Security amp Safety Monitor

NCE (VM) SCE (Host)

MotorThread

Host-Guest Communication

Motors 0123

Figure 16 Actuator virtualization in the VirtualDroneframework

Figure 16 shows how an actuator is virtualized in the Virtual-Drone framework which is similar to the sensor virtualizationexplained in Section 33 e controller running in the NCE com-putes a set of PWM (Pulse Width Modulation) output values tocontrol the motors of the vehicle e controller writes these valuesto the virtual motor driver through the motor interface It transfersthe data to an IO proxy thread that relays the PWM values to themotor driver in the SCE e motors are nally actuated by analogsignals converted by the on-board speed controller

B DETAILS ON VIRTUALIZATIONSensors e following describes how the sensors are virtualizedin our prototype implementationbull Inertial Measurement Unit (MPU9250) e device driver run-

ning on the host retrieves a raw IMU data (14 bytes) every 1ms through SPI However every 5th sample is actually used forcontrol (hence the eective control frequency is 200 Hz) edata includes a 3-axis gyroscope and 3-axis accelerometer values

bull Barometer (MS5611) is sensor measures the barometric pres-sure and temperature e driver runs a state machine thatoperates at a frequency of 25 Hz A raw data (24 bits) retrievedfrom the sensor through I2C is converted to either pressure ortemperature value depending on the state (8 bits)

bull Compass (AK8963) It measures terrestrial magnetism in the 3axes at a frequency of 50 Hz using I2C Total 24 bytes (includingper-axis calibration factor) of raw data are fed to the NCE

bull Analog-to-Digital Converter (ADS1115) It measures the voltageson 6 ADC channels It reads each channel every 600 ms throughI2C For each channel a data of 40 bits (8 bits for channel ID and32 bits for sampled data) is transferred to the VM

bull GPS (u-blox NEO-M8) It provides the current longitude latitudeand altitude of the vehicle the time information (current millisec-ond time of week) etc e driver reads UBX protocol messagesfrom the u-blox GPS receiver through SPI parses each one andthen obtains the above information e parsing is stateful anda aer-parsing data can be at most 1K bytes It is fed to the NCEat the frequency of 5 Hz

Actuator For the motor actuation the virtual controller in theNCE sends the PWM values (for the four motors) to the host at thefrequency of the main control loop (ie 200 Hz)

Radio Control Input A remote control via radio link is used tomanually control (armdisarm ight maneuver) the quadcoptere raw input pulses are retrieved through DMA (Direct MemoryAccess) at 1666 Hz About every 18 ms (ie 55 Hz) a new set ofPWM values representing the stick and switch movements (total 8channels) becomes available As done for the sensors mentionedabove the IO proxy runs an RC feeding thread However insteadof feeding the raw pulse data we send the processed data ie thePWMs in order to avoid the overhead due to feeding the raw dataat such a high frequency (1666 Hz)

C ATTITUDE CONTROL AND ERROR BOUND

Time (s)50 55 60 65 70 75 80 85

Rol

l Pi

tch

Yaw

Erro

rs

-25000

-20000

-15000

-10000

-5000

0

5000

10000

15000

20000

25000RollPitchYaw

Time (s)50 55 60 65 70 75 80 85

RC

Inpu

t (PW

Ms)

800

1000

1200

1400

1600

1800

2000

2200RollPitchThrottleYaw

Drone hit the ground

Switched to SCE

Figure 17 e roll pitch yaw errors (top) measured duringthe dronersquos extreme movements e bottom plot shows theroll pitch throttle and yaw targets set by the pilot using theremote controller

e APM uses a double-loop PIDP control to stabilize the quad-copter e Angle loop aka the outer loop controls the aitudeof the vehicle e Angle loop utilizes a P control to achieve thedesired aitude by outpuing a desired angular speed ie the an-gular speed setpoint to the Rate loop aka the inner loop eAngle looprsquos output ie the angular speed setpoint is proportionalto the dierence between the target angle value set by the pilot(or autopilot when in autonomous ight mode) and the measuredangle value from the IMU sensor e Rate loop controls the aituderates of the aircra e Rate loop continuously calculates an errorvalue as the dierence between the angular speed setpoint and themeasured angular speed from the IMU sensor A PID control is

ICCPS April 2017 Pisburgh PA USA M-K Yoon et al

utilized in Rate loop to minimize the error over time by outpuingPWM signals to control motors

For the thresholds on the errors we used plusmn20 000 (radsec) forroll and pitch and plusmn10 000 (radsec) for yaw e switching logicactivates when the violation happens three times consecutivelyWe obtained these bounds on the errors by measuring from bothnormal and extreme movements of the prototype drone e topplot in Figure 17 shows those errors measured during the dronersquosextreme movements and the boom plot shows how the pilot cre-ated the movements e result indicates that the errors are wellbounded even when the drone experiences such movements epilot intentionally made the drone hit the ground at time between75 sec and 76 sec aer which the control is switched to the SCEWe did not aempt to nd optimal thresholds e smaller thethreshold is the easier it is for the SCE to recover to a stable stateHowever at the same time it could create more false positives

D DETECTION OF HIJACKING ATTEMPT

(a) LegitimateTim

e

Vehicle GCS

hellip

Attacker

hellip

Unexpected

Time

VehicleGCS

hellip

(b) Hijacking attempt

Figure 18 (a) MAVLink messages exchanged between theGCS and the vehicle for waypoint setup (b) e legitimateGCS can detect the attackerrsquos update on the vehicles routeas the vehiclersquos responses are unexpected

In order for a GCS to set waypoints for a vehicle a series ofMAVLink messages are exchanged Figure 18(a) shows the MAVLinkwaypoint protocol e GCS rst sends MISSION COUNT(N) to thevehicle where N represents the number of waypoints that it willset e vehicle prepares for receiving the N waypoints and thenrequests for each waypoint by sending MISSION REQUEST(i) untilall the waypoint locations are received

Note that both the legitimate GCS and the aacker need to followthis protocol to set any waypoints From the vehiclersquos perspectivethe initialization requests (ie MISSION COUNT(N)) from them areindistinguishable at is the vehicle itself cannot detect suspiciousrequests for a route change However the fact that the aacker canreceive messages from the vehicle means that the legitimate GCScan also hear what the vehicle responds to the aackerrsquos requestAs Figure 18(b) shows the legitimate GCS can detect the aackerrsquosupdate on the vehiclersquos waypoints when it receives unexpectedMISSION REQUEST messages as it did not initialize the message ex-change Due to such stateful communication the MAVLink protocolenables detecting other types of suspicious aempts (eg changingcontrol parameters) as well

E GEO-FENCE ATTACK ROOTKITWe developed a rootkit that disables the geo-fence and sends thevehicle into a no-y zone e rootkit nds the APM process andthen modies itsmemory that stores (i) the ag that enablesdisablesthe geo-fencing and (ii) the list of waypoints ese are loadedfrom the APM conguration le (varAPMArduCopterstg) onits startup and buered in the memory

Waypoint 3Waypoint 2

Waypoint 4

Geo-fence enabled

Figure 19 ewaypoint list and geo-fence enable ag storedin the memory of APM process An attacker who gained aroot-level access canmodify thesememory values to disablethe geo-fence and then send the drone to a new location

Figure 20 e rootkit that disables the geo-fence and modi-es the ight plan by manipulating the APMrsquos memory

One can change these values remotely through radio which how-ever is easy to prevent since radio communication can be monitoredeasily Modifying the buered values in the memory is dicult toprevent especially if the aacker has gained a root access e mem-ory locations of these data can be easily found if the source codeor the executable binary is available Figure 19 shows the memorydump of the waypoint list and geo-fence enable ag Figure 20shows how these values are modied by the rootkit

  • Abstract
  • 1 Introduction
  • 2 Background
  • 3 VirtualDrone Framework
    • 31 High-level Framework
    • 32 Assumptions and Adversary Model
    • 33 Virtual Sensing Actuation and Communication
    • 34 Security and Safety Monitoring
      • 4 Implementation
      • 5 Experiments
        • 51 Case Study
        • 52 Discussion
          • 6 Related Work
          • 7 Conclusion
          • References
          • A Actuator Virtualization
          • B Details on Virtualization
          • C Attitude Control and Error Bound
          • D Detection of Hijacking Attempt
          • E Geo-Fence Attack Rootkit
Page 8: VirtualDrone: Virtual Sensing, Actuation, and ... · Figure 1: Simplex architecture. the so›ware environment, in conjunction with the increased capa-bilities and complexities of

ICCPS April 2017 Pisburgh PA USA M-K Yoon et al

G G

T T

A A

W W

(a) Without VirtualDrone (b) With VirtualDrone

Figure 12 (a) e ight trajectory of the drone hijacked bythe attacker It is sent to new location lsquoWrsquo set by the attacker(b) e attackerrsquos attempt to hijack the drone is detected bythe GCS Upon the detection the GCS sends a special com-mand to the SCE which switches the control mode to theSCE and directs the drone to where it was launched

GCS program (the stock APM Planner 204 with default seings)Figure 12(a) shows the ight trajectory of the drone when it wassuccessfully hijacked by the aacker

While the drone itself cannot detect such a hijacking aemptthe GCS can detect it because of unexpected message exchange initi-ated by the aacker as detailed in Appendix D Hence we addedthe functionality that detects such unexpected messages to ourlegitimate GCS Upon a detection the GCS commands the droneto return to where it was launched as shown in Figure 12(b) istakes advantage of the VirtualDronersquos virtual telemetry explainedin Section 33 the SCErsquos telemetry proxy enables a hidden com-munication channel between the GCS and the SCE through whichthe former sends the drone a pre-dened set of special commandsIn this scenario the command from the GCS overrides the NCErsquosabnormal operation by switching the drone to the secure controlmode Note that the aacker might be able to send the same specialcommand However what it can do at worst is to send the droneback to the home

As explained in Section 34 the virtual telemetry also enables theSCE to detect if the NCE is trying to deceive the ground station Forexample aer a successful hijacking the aacker may report fakeGPS location (by replaying or by generating from SW simulator) tothe GCS so that it looks as if it is ying on the planned path etelemetry analyzer however can detect such aempts by analyzingeach outgoing MAVLink packet and comparing against the truelocation retrieved from the GPS receiver which is also implementedon our prototype

Corrupting Safety Functions Autopilot programs also supportcritical failsafe mechanisms that are activated under certain con-ditions such as losing radio communication signal or low-baeryIt is in fact easy to corrupt such a safety-critical measure becausetypically it can be enableddisabled remotely through a telemetrycommand (hence an aacker can send a command via radio asdone in the hijacking scenario) Moreover such a mechanism isoen implemented as a part of autopilot that runs at the user-levelHence an aacker who has gained a root access can easily corruptit by modifying the conguration le or the memory

4hpardupilotorgplanner2indexhtml

No-fly zone

Original Path

Figure 13 Attacker disables the geo-fence andmodiesWay-point 3 so that the drone ies into a no-y zone Such asafety-critical function can be protected by running in theSCE

In this case study the aacker corrupts the geo-fence mechanismGeo-fence employs positioning data such as GPS signal or localradio-frequency identiers to set up a virtual boundary to preventthe vehicle entering a prohibited zone e vehicle position ismonitored at all times such that before the vehicle enters a no-y zone the system could act accordingly to prevent a geo-fenceviolation Corruption of the geo-fence can result in a catastrophicresult an aacker may disable the geo-fencing and induce thevehicle to y into a congested airspace such as takeo pathwaysfor mid-air collision

To demonstrate this type of aack we developed a rootkit thatdisables the geo-fence of APM during a ight and sends it intoa no-y zone e rootkit executes this aack by modifying theAPMrsquos memory as detailed in Appendix E Our drone was plannedto y through a path (0-1-2-3) in an autonomous mode as shownin Figure 13 During the ight the aacker logged into the systemthrough WiFi and launched the rootkit when the drone was yingtoward Waypoint 2 e new Waypoint 3 set by the rootkit islocated inside a no-y zone and because the rootkit has alreadydisabled the geo-fence the drone consequently ied into the no-yzone deviating from the original path as shown in Figure 13

e SCE of VirtualDrone provides a protected layer at whichsafety-critical functions like geo-fence can be placed We imple-mented a simple geo-fence module in the security and safety mon-itoring module in the SCE It continuously monitors the currentGPS coordinate and checks it against the list of no-y zones alsostored at the SCE layer Upon a violation a pre-dened action istaken In our implementation the SCE takes back the control fromthe NCE and returns to where it was launched as done for thehijacking scenario explained earlier

Side-channel e virtualization of sensor actuator and commu-nication allows for hiding certain types of information from theNCE One of the examples is the RSSI (Received Signal StrengthIndication) that indicates the link quality between a pair of radiotransmier and receiver We especially consider a scenario in whichan aacker tries to estimate the location of the GCS by observingthe RSSI measured between the vehicle and the GCS Due to signalaenuation the radio signal is stronger as the vehicle is closer to theGCS Hence one can correlate the RSSI with the GPS coordinate

VirtualDrone Architecture for Aack-Resilient UAS ICCPS April 2017 Pisburgh PA USA

T

1

2

3

4

G

Lat 401626060Lng -883074907

0 20 40 60 80 100 120 140 160 180Time (s)

100

120

140

160

180

RSS

I

0 20 40 60 80 100 120 140 160 180Time (s)

401615

40162

401625

40163

401635

Latit

ude

0 20 40 60 80 100 120 140 160 180Time (s)

-88309

-88308

-88307

-88306Lo

ngitu

de

Figure 14 e drone ies through T-1-2-3-4-1 e graphsrepresent the RSSI (top) the latitude (middle) and the longi-tude (bottom) An attacker can estimate the location of theGCS by correlating the RSSI and the GPS information

Figure 14 illustrates such a possibility of side-channel e graphsin the gure represents the RSSI (between the drone and the GCS)and the GPS coordinate (latitude and longitude) measured whilethe drone ies through a path (T-1-2-3-4-1) If the aacker is able toobtain these RSSI information heshe can estimate the location (ora region) of the GCS by nding when the RSSI is high e resultsshow quite accurate estimation of the true GCS location (shown inthe map) A complex algorithm will allow for further narrowingdown the location e VirtualDrone framework eliminates thispossibility by not providing the RSSI information to the NCE Notethat RSSI is needed only for the SCE (eg switches to the SCEand then performs a pre-dened operation such as return-to-homewhen RSSI is low due to the loss of telemetry link) Furthermorebecause of the telemetry virtualization the NCE cannot even knowif the telemetry is communicated through a radio channel or anetwork (eg WiFi) In case of the network-based telemetry theSCE can even hide the IP address of the GCS

Virtual Machine Introspection Many rootkits modify criticalkernel data structures to intercept sensitive data hide maliciousprocesses or les etc For a demonstration we implemented a secu-rity module that checks the integrity of the system call table of theguest OS For this we chose to utilize an existing interface providedby QEMU namely the QEMU Machine Protocol (QMP) It allows host-side applications to communicate with or control a running QEMUVM We created a QMP Unix socket to which our security modulecan connect During the initialization of the VM the module dumpsthe current system call table and stores this initial state in memoryFrom then on the module regularly dumps the current table andcompares it against the one obtained initially Using this techniquewe were able to detect a known rootkit modhide1 that hijacks theopen call to hide itself from the kernel module list

Note that we are not proposing new rootkit detection methodshere We instead intend to demonstrate how the VirtualDroneframework can handle such a stealthy security violation One canuse a rich set of library for virtual machine introspection such asLibVMI [3] which we leave for future work

52 DiscussionSensor attack e VirtualDrone framework cannot handle phys-ical manipulations on the sensors such as GPS spoong esetypes of aacks are called sensor aack or false data injection aackand typically tackled by control-theoretic approaches [18 19] erequirement however is that the methods themselves should beprotected from cyber-aacks Hence one can implement such a

Time (sec)0 20 40 60 80 100 120 140 160 180

Vo

lta

ge

(v)

105

11

115

12Without VirtualDroneWith VirtualDrone

Figure 15 Voltage drop at the battery for 3-minutes of hov-ering with and without the VirtualDrone framework

technique on the SCE layer specically in the security and safetymonitoring module as it can see the true (but potentially physicallymanipulated) sensor measurements

Power consumption Since UAS typically runs on baery powerwe compare the power consumption of the prototype drone withand without the VirtualDrone framework In order to compare thepower consumption in a controlled environment (eg eliminatingvarying disturbance due to wind) we ew the drone indoors hov-ering it at a xed position We ew the drone for about 3 minuteswith the same fully-charged baery and measured the voltage dropsduring the ight

Figure 15 shows that the VirtualDrone does not impose over-head on the power consumption is is because the majority ofthe power is consumed by the motors to li the copter e powerconsumption by RPI2 board and the Navio+ sensors cannot exceed5 Was which is the upper bound of the power supply by the powermodule at is the power consumption by any on-board comput-ing cannot be more than 5 Was We calculated the average powerof the 3-minutes of ights which ranged between 114 and 118Was Hence the power consumption by any on-board computingcan be ignored Due to the fact that the upper bound of powerconsumption by computing is two orders of magnitude smallerthan that of the motors we conclude that the power consumptionoverhead of running the VirtualDrone is negligible

6 RELATEDWORKCurrent unmanned vehicle systems are very vulnerable to cyber-aacks as demonstrated by recent aacks Maldrone [8] is a so-ware virus that can compromise drones based on ARM Linux sys-tems e malware can open a backdoor in the Parrot AR Dronesinfect on-board soware and take over the control Pleban et al[23] presented analysis details on the insecure WiFi network andOS user management of the Parrot AR Drones Also researchersdemonstrated a hijacking of DJI consumer drones by emulatingfake GPS signals using low-cost soware dened radio tools [11]It is also possible to inject MAVLink message into a radio link bymodifying the radio rmware and hijack a ying drone [9] whichwe reproduced for our case study Javaid et al [15] addressed somevulnerabilities of wireless communications channels in unmannedaerial vehicles Commercial airplanes are also facing with suchsecurity problems e Actel ProASIC chip used in early Boeing

ICCPS April 2017 Pisburgh PA USA M-K Yoon et al

787 had a backdoor [6] that could allow an aacker via internetconnection or as a passenger to use entertainment system in theaircra to take over the control of the aircra

Advances in virtualization technologies have enabled VirtualMachine Introspection (VMI) [14] in which a trusted VM or theVMM monitors and analyzes the state of applications or OS runninginside untrusted VMs By placing the detection mechanism outsideof the VM it monitors (ie the untrusted VMs) VMI overcomesthe vulnerability of the traditional host-based intrusion detectionsystems VMIs have been applied to process execution monitor-ing [25] control-ow integrity check [22] virtual memory and diskmonitoring [20] dynamic information ow tracking [29] etc

Hardware-based approaches can also be used to isolate vulnera-ble components ARM TrustZone [28] is an architectural extensionthat allows a coexistence of secure world and normal world usingthe same on-chip hardware Access to certain secure componentsare blocked depending on the execution mode Azab et al [13]proposed TZ-RKP which protects the integrity of operating systemkernel that runs on a normal world by running a security monitorin the secure world Zhou et al [33] use ARM processors memorydomain support for soware fault isolation Yoon et al [31] takesadvantage of the redundancy of a multicore processor a core is usedto monitor the execution time of a real-time application runningon a monitored core It was extended to monitor memory behaviorfor system-wide anomaly detection [32] and to protect in-place se-curity monitoring module [30] ese hardware-based approachesprovide beer security than virtualizations can do because the lat-ter relies on the security and correctness of the VMM which issusceptible to aacks [21] However virtualization-based methodshave advantages in that no hardware modication is needed andthat they are more exible due to the soware control

7 CONCLUSIONIn this paper we presented the VirtualDrone framework as a solu-tion to increasing security threats to unmanned aerial systems euse of this framework allows system designers (or users) to runadvanced ight applications in an untrustworthy environment Ourprototype implementation requires a minimal eort to build theframework on an o-the-shelf platform with open-source sowarestack rough case studies we demonstrated that the frameworkprovides an integrated way to handle various security threats thatwould otherwise have required potentially conicting requirementsNevertheless there still remains challenges for practical use of theframework We used a full-featured autopilot for both normaland safety controllers in the current implementation simply for ademonstration purpose only It is desirable to run a fully-veriedcontrol soware in the SCE Hence we plan to adopt and implementa high-assurance controller

REFERENCES[1] ArduPilot Autopilot Suite hpwwwardupilotorg[2] Emlid NAVIO+ hpsdocsemlidcomnavio[3] LibVMI hplibvmicom[4] QEMU hpwikiqemuorg[5] Raspberry PI 2 Model B

hpswwwraspberrypiorgproductsraspberry-pi-2-model-b[6] Cyber-aack concerns raised over Boeing 787 chiprsquos rsquoback doorrsquo e Guardian

hpswwwtheguardiancomtechnology2012may29cyber-aack-concerns-boeing-chip

[7] 3DRrsquos Solo Drone Boasts Dual Linux Computers Run-ning Dronecode hpswwwlinuxcomnews3drs-solo-drone-boasts-dual-linux-computers-running-dronecode

[8] A hacker developed Maldrone the rst malware for drones Se-curity Aairs hpsecurityaairscowordpress32767hackingmaldrone-malware-for-droneshtml

[9] Hijacking drones with a MAVLink exploit hpdiydronescomprolesblogshijacking-quadcopters-with-a-mavlink-exploit

[10] alcomm Goes Ubuntu for Drone Reference Platform hpswwwlinuxcomnewsqualcomm-goes-ubuntu-drone-reference-platform

[11] Watch GPS Aacks at Can Kill DJI Drones Or Bypass White HouseBan Forbes hpwwwforbescomsitesthomasbrewster20150808qihoo-hacks-drone-gps26431a2853fe

[12] Intel Aero Compute Board hpwwwintelcomcontentwwwusentechnology-innovationaerial-technology-overviewhtml

[13] Ahmed M Azab Peng Ning Jitesh Shah an Chen Rohan Bhutkar GuruprasadGanesh Jia Ma and Wenbo Shen 2014 Hypervision Across Worlds Real-timeKernel Protection from the ARM TrustZone Secure World In the ACM Conferenceon Computer and Communications Security

[14] Tal Garnkel and Mendel Rosenblum 2003 A Virtual Machine IntrospectionBased Architecture for Intrusion Detection In the Network and Distributed Sys-tems Security Symposium

[15] Ahmad Y Javaid Weiqing Sun Vijay K Devabhaktuni and Mansoor Alam 2012Cyber security threat analysis and modeling of an unmanned aerial vehiclesystem In the IEEE Conference on Technologies for Homeland Security

[16] Andrew J Kerns Daniel P Shepard Jahshan A Bhai and Todd E Humphreys2014 Unmanned Aircra Capture and Control Via GPS Spoong Journal ofField Robotics 31 (2014)

[17] Jiuxing Liu Wei Huang Bulent Abali and Dhabaleswar K Panda 2006 High Per-formance VMM-bypass IO in Virtual Machines In the USENIX Annual TechnicalConference

[18] Y Mo and B Sinopoli 2015 Secure Estimation in the Presence of IntegrityAacks IEEE Trans Automat Control 60 4 (2015) 1145ndash1151

[19] Miroslav Pajic James Weimer Nicola Bezzo Paulo Tabuada Oleg Sokolsky InsupLee and George J Pappas 2014 Robustness of Aack-Resilient State EstimatorsIn the ACMIEEE International Conference on Cyber-Physical Systems

[20] Bryan D Payne Martim Carbone and Wenke Lee 2007 Secure and FlexibleMonitoring of Virtual Machines In the Annual Computer Security ApplicationsConference

[21] Gabor Pek Andrea Lanzi Abhinav Srivastava Davide Balzaroi Aurelien Fran-cillon and Christoph Neumann 2014 On the Feasibility of Soware Aackson Commodity Virtual Machine Monitors via Direct Device Assignment In theACM Symposium on Information Computer and Communications Security

[22] Nick L Petroni Jr and Michael Hicks 2007 Automated Detection of PersistentKernel Control-ow Aacks In the ACM Conference on Computer and Communi-cations Security

[23] Johann-Sebastian Pleban Ricardo Band and Reiner Creutzburg 2014 Hackingand securing the ARDrone 20 quadcopter investigations for improving thesecurity of a toy In the SPIEMobile Devices andMultimedia Enabling TechnologiesAlgorithms and Applications

[24] Lui Sha 2001 Using Simplicity to Control Complexity IEEE Sow 18 4 (2001)20ndash28 DOIhpdxdoiorgdxdoiorg101109MS2001936213

[25] Deepa Srinivasan Zhi Wang Xuxian Jiang and Dongyan Xu 2011 Process Out-graing An Ecient rdquoout-of-VMrdquo Approach for Fine-grained Process ExecutionMonitoring In the ACM Conference on Computer and Communications Security

[26] Nils Ole Tippenhauer Christina Popper Kasper Bonne Rasmussen and SrdjanCapkun 2011 On the Requirements for Successful GPS Spoong Aacks In theACM Conference on Computer and Communications Security

[27] X Wang N Hovakimyan and L Sha 2013 L1Simplex Fault-tolerant controlof cyber-physical systems In the ACMIEEE International Conference on Cyber-Physical Systems

[28] Peter Wilson Alexandre Frey Tom Mihm Danny Kershaw and Tiago Alves2007 Implementing Embedded Security on Dual-Virtual-CPU Systems IEEEDes Test 24 6 (Nov 2007) 582ndash591

[29] Heng Yin Dawn Song Manuel Egele Christopher Kruegel and Engin Kirda 2007Panorama Capturing System-wide Information Flow for Malware Detection andAnalysis In the ACM Conference on Computer and Communications Security

[30] Man-Ki Yoon Mihai Christodorescu Lui Sha and Sibin Mohan 2016 eDragonBeam Framework Hardware-Protected Security Modules for In-PlaceIntrusion Detection In the ACM International Systems and Storage Conference

[31] Man-Ki Yoon Sibin Mohan Jaesik Choi Jung-Eun Kim and Lui Sha 2013SecureCore A Multicore-based Intrusion Detection Architecture for Real-TimeEmbedded Systems In the IEEE Real-Time Embedded Technology and ApplicationsSymposium

[32] Man-Ki Yoon Sibin Mohan Jaesik Choi and Lui Sha 2015 Memory Heat MapAnomaly Detection in Real-Time Embedded Systems Using Memory BehaviorIn the ACMEDACIEEE Design Automation Conference

[33] Yajin Zhou Xiaoguang Wang Yue Chen and Zhi Wang 2014 ARMlockHardware-based Fault Isolation for ARM In the ACM Conference on Computerand Communications Security

VirtualDrone Architecture for Aack-Resilient UAS ICCPS April 2017 Pisburgh PA USA

A ACTUATOR VIRTUALIZATION

IO Proxy

PWM Generator(PCA9685)

TrustedController

Motor Driver

Motor Interface

Virtual Motor Driver

Hardware

Host OSI2C

UntrustworthyController

Motor Interface

Security amp Safety Monitor

NCE (VM) SCE (Host)

MotorThread

Host-Guest Communication

Motors 0123

Figure 16 Actuator virtualization in the VirtualDroneframework

Figure 16 shows how an actuator is virtualized in the Virtual-Drone framework which is similar to the sensor virtualizationexplained in Section 33 e controller running in the NCE com-putes a set of PWM (Pulse Width Modulation) output values tocontrol the motors of the vehicle e controller writes these valuesto the virtual motor driver through the motor interface It transfersthe data to an IO proxy thread that relays the PWM values to themotor driver in the SCE e motors are nally actuated by analogsignals converted by the on-board speed controller

B DETAILS ON VIRTUALIZATIONSensors e following describes how the sensors are virtualizedin our prototype implementationbull Inertial Measurement Unit (MPU9250) e device driver run-

ning on the host retrieves a raw IMU data (14 bytes) every 1ms through SPI However every 5th sample is actually used forcontrol (hence the eective control frequency is 200 Hz) edata includes a 3-axis gyroscope and 3-axis accelerometer values

bull Barometer (MS5611) is sensor measures the barometric pres-sure and temperature e driver runs a state machine thatoperates at a frequency of 25 Hz A raw data (24 bits) retrievedfrom the sensor through I2C is converted to either pressure ortemperature value depending on the state (8 bits)

bull Compass (AK8963) It measures terrestrial magnetism in the 3axes at a frequency of 50 Hz using I2C Total 24 bytes (includingper-axis calibration factor) of raw data are fed to the NCE

bull Analog-to-Digital Converter (ADS1115) It measures the voltageson 6 ADC channels It reads each channel every 600 ms throughI2C For each channel a data of 40 bits (8 bits for channel ID and32 bits for sampled data) is transferred to the VM

bull GPS (u-blox NEO-M8) It provides the current longitude latitudeand altitude of the vehicle the time information (current millisec-ond time of week) etc e driver reads UBX protocol messagesfrom the u-blox GPS receiver through SPI parses each one andthen obtains the above information e parsing is stateful anda aer-parsing data can be at most 1K bytes It is fed to the NCEat the frequency of 5 Hz

Actuator For the motor actuation the virtual controller in theNCE sends the PWM values (for the four motors) to the host at thefrequency of the main control loop (ie 200 Hz)

Radio Control Input A remote control via radio link is used tomanually control (armdisarm ight maneuver) the quadcoptere raw input pulses are retrieved through DMA (Direct MemoryAccess) at 1666 Hz About every 18 ms (ie 55 Hz) a new set ofPWM values representing the stick and switch movements (total 8channels) becomes available As done for the sensors mentionedabove the IO proxy runs an RC feeding thread However insteadof feeding the raw pulse data we send the processed data ie thePWMs in order to avoid the overhead due to feeding the raw dataat such a high frequency (1666 Hz)

C ATTITUDE CONTROL AND ERROR BOUND

Time (s)50 55 60 65 70 75 80 85

Rol

l Pi

tch

Yaw

Erro

rs

-25000

-20000

-15000

-10000

-5000

0

5000

10000

15000

20000

25000RollPitchYaw

Time (s)50 55 60 65 70 75 80 85

RC

Inpu

t (PW

Ms)

800

1000

1200

1400

1600

1800

2000

2200RollPitchThrottleYaw

Drone hit the ground

Switched to SCE

Figure 17 e roll pitch yaw errors (top) measured duringthe dronersquos extreme movements e bottom plot shows theroll pitch throttle and yaw targets set by the pilot using theremote controller

e APM uses a double-loop PIDP control to stabilize the quad-copter e Angle loop aka the outer loop controls the aitudeof the vehicle e Angle loop utilizes a P control to achieve thedesired aitude by outpuing a desired angular speed ie the an-gular speed setpoint to the Rate loop aka the inner loop eAngle looprsquos output ie the angular speed setpoint is proportionalto the dierence between the target angle value set by the pilot(or autopilot when in autonomous ight mode) and the measuredangle value from the IMU sensor e Rate loop controls the aituderates of the aircra e Rate loop continuously calculates an errorvalue as the dierence between the angular speed setpoint and themeasured angular speed from the IMU sensor A PID control is

ICCPS April 2017 Pisburgh PA USA M-K Yoon et al

utilized in Rate loop to minimize the error over time by outpuingPWM signals to control motors

For the thresholds on the errors we used plusmn20 000 (radsec) forroll and pitch and plusmn10 000 (radsec) for yaw e switching logicactivates when the violation happens three times consecutivelyWe obtained these bounds on the errors by measuring from bothnormal and extreme movements of the prototype drone e topplot in Figure 17 shows those errors measured during the dronersquosextreme movements and the boom plot shows how the pilot cre-ated the movements e result indicates that the errors are wellbounded even when the drone experiences such movements epilot intentionally made the drone hit the ground at time between75 sec and 76 sec aer which the control is switched to the SCEWe did not aempt to nd optimal thresholds e smaller thethreshold is the easier it is for the SCE to recover to a stable stateHowever at the same time it could create more false positives

D DETECTION OF HIJACKING ATTEMPT

(a) LegitimateTim

e

Vehicle GCS

hellip

Attacker

hellip

Unexpected

Time

VehicleGCS

hellip

(b) Hijacking attempt

Figure 18 (a) MAVLink messages exchanged between theGCS and the vehicle for waypoint setup (b) e legitimateGCS can detect the attackerrsquos update on the vehicles routeas the vehiclersquos responses are unexpected

In order for a GCS to set waypoints for a vehicle a series ofMAVLink messages are exchanged Figure 18(a) shows the MAVLinkwaypoint protocol e GCS rst sends MISSION COUNT(N) to thevehicle where N represents the number of waypoints that it willset e vehicle prepares for receiving the N waypoints and thenrequests for each waypoint by sending MISSION REQUEST(i) untilall the waypoint locations are received

Note that both the legitimate GCS and the aacker need to followthis protocol to set any waypoints From the vehiclersquos perspectivethe initialization requests (ie MISSION COUNT(N)) from them areindistinguishable at is the vehicle itself cannot detect suspiciousrequests for a route change However the fact that the aacker canreceive messages from the vehicle means that the legitimate GCScan also hear what the vehicle responds to the aackerrsquos requestAs Figure 18(b) shows the legitimate GCS can detect the aackerrsquosupdate on the vehiclersquos waypoints when it receives unexpectedMISSION REQUEST messages as it did not initialize the message ex-change Due to such stateful communication the MAVLink protocolenables detecting other types of suspicious aempts (eg changingcontrol parameters) as well

E GEO-FENCE ATTACK ROOTKITWe developed a rootkit that disables the geo-fence and sends thevehicle into a no-y zone e rootkit nds the APM process andthen modies itsmemory that stores (i) the ag that enablesdisablesthe geo-fencing and (ii) the list of waypoints ese are loadedfrom the APM conguration le (varAPMArduCopterstg) onits startup and buered in the memory

Waypoint 3Waypoint 2

Waypoint 4

Geo-fence enabled

Figure 19 ewaypoint list and geo-fence enable ag storedin the memory of APM process An attacker who gained aroot-level access canmodify thesememory values to disablethe geo-fence and then send the drone to a new location

Figure 20 e rootkit that disables the geo-fence and modi-es the ight plan by manipulating the APMrsquos memory

One can change these values remotely through radio which how-ever is easy to prevent since radio communication can be monitoredeasily Modifying the buered values in the memory is dicult toprevent especially if the aacker has gained a root access e mem-ory locations of these data can be easily found if the source codeor the executable binary is available Figure 19 shows the memorydump of the waypoint list and geo-fence enable ag Figure 20shows how these values are modied by the rootkit

  • Abstract
  • 1 Introduction
  • 2 Background
  • 3 VirtualDrone Framework
    • 31 High-level Framework
    • 32 Assumptions and Adversary Model
    • 33 Virtual Sensing Actuation and Communication
    • 34 Security and Safety Monitoring
      • 4 Implementation
      • 5 Experiments
        • 51 Case Study
        • 52 Discussion
          • 6 Related Work
          • 7 Conclusion
          • References
          • A Actuator Virtualization
          • B Details on Virtualization
          • C Attitude Control and Error Bound
          • D Detection of Hijacking Attempt
          • E Geo-Fence Attack Rootkit
Page 9: VirtualDrone: Virtual Sensing, Actuation, and ... · Figure 1: Simplex architecture. the so›ware environment, in conjunction with the increased capa-bilities and complexities of

VirtualDrone Architecture for Aack-Resilient UAS ICCPS April 2017 Pisburgh PA USA

T

1

2

3

4

G

Lat 401626060Lng -883074907

0 20 40 60 80 100 120 140 160 180Time (s)

100

120

140

160

180

RSS

I

0 20 40 60 80 100 120 140 160 180Time (s)

401615

40162

401625

40163

401635

Latit

ude

0 20 40 60 80 100 120 140 160 180Time (s)

-88309

-88308

-88307

-88306Lo

ngitu

de

Figure 14 e drone ies through T-1-2-3-4-1 e graphsrepresent the RSSI (top) the latitude (middle) and the longi-tude (bottom) An attacker can estimate the location of theGCS by correlating the RSSI and the GPS information

Figure 14 illustrates such a possibility of side-channel e graphsin the gure represents the RSSI (between the drone and the GCS)and the GPS coordinate (latitude and longitude) measured whilethe drone ies through a path (T-1-2-3-4-1) If the aacker is able toobtain these RSSI information heshe can estimate the location (ora region) of the GCS by nding when the RSSI is high e resultsshow quite accurate estimation of the true GCS location (shown inthe map) A complex algorithm will allow for further narrowingdown the location e VirtualDrone framework eliminates thispossibility by not providing the RSSI information to the NCE Notethat RSSI is needed only for the SCE (eg switches to the SCEand then performs a pre-dened operation such as return-to-homewhen RSSI is low due to the loss of telemetry link) Furthermorebecause of the telemetry virtualization the NCE cannot even knowif the telemetry is communicated through a radio channel or anetwork (eg WiFi) In case of the network-based telemetry theSCE can even hide the IP address of the GCS

Virtual Machine Introspection Many rootkits modify criticalkernel data structures to intercept sensitive data hide maliciousprocesses or les etc For a demonstration we implemented a secu-rity module that checks the integrity of the system call table of theguest OS For this we chose to utilize an existing interface providedby QEMU namely the QEMU Machine Protocol (QMP) It allows host-side applications to communicate with or control a running QEMUVM We created a QMP Unix socket to which our security modulecan connect During the initialization of the VM the module dumpsthe current system call table and stores this initial state in memoryFrom then on the module regularly dumps the current table andcompares it against the one obtained initially Using this techniquewe were able to detect a known rootkit modhide1 that hijacks theopen call to hide itself from the kernel module list

Note that we are not proposing new rootkit detection methodshere We instead intend to demonstrate how the VirtualDroneframework can handle such a stealthy security violation One canuse a rich set of library for virtual machine introspection such asLibVMI [3] which we leave for future work

52 DiscussionSensor attack e VirtualDrone framework cannot handle phys-ical manipulations on the sensors such as GPS spoong esetypes of aacks are called sensor aack or false data injection aackand typically tackled by control-theoretic approaches [18 19] erequirement however is that the methods themselves should beprotected from cyber-aacks Hence one can implement such a

Time (sec)0 20 40 60 80 100 120 140 160 180

Vo

lta

ge

(v)

105

11

115

12Without VirtualDroneWith VirtualDrone

Figure 15 Voltage drop at the battery for 3-minutes of hov-ering with and without the VirtualDrone framework

technique on the SCE layer specically in the security and safetymonitoring module as it can see the true (but potentially physicallymanipulated) sensor measurements

Power consumption Since UAS typically runs on baery powerwe compare the power consumption of the prototype drone withand without the VirtualDrone framework In order to compare thepower consumption in a controlled environment (eg eliminatingvarying disturbance due to wind) we ew the drone indoors hov-ering it at a xed position We ew the drone for about 3 minuteswith the same fully-charged baery and measured the voltage dropsduring the ight

Figure 15 shows that the VirtualDrone does not impose over-head on the power consumption is is because the majority ofthe power is consumed by the motors to li the copter e powerconsumption by RPI2 board and the Navio+ sensors cannot exceed5 Was which is the upper bound of the power supply by the powermodule at is the power consumption by any on-board comput-ing cannot be more than 5 Was We calculated the average powerof the 3-minutes of ights which ranged between 114 and 118Was Hence the power consumption by any on-board computingcan be ignored Due to the fact that the upper bound of powerconsumption by computing is two orders of magnitude smallerthan that of the motors we conclude that the power consumptionoverhead of running the VirtualDrone is negligible

6 RELATEDWORKCurrent unmanned vehicle systems are very vulnerable to cyber-aacks as demonstrated by recent aacks Maldrone [8] is a so-ware virus that can compromise drones based on ARM Linux sys-tems e malware can open a backdoor in the Parrot AR Dronesinfect on-board soware and take over the control Pleban et al[23] presented analysis details on the insecure WiFi network andOS user management of the Parrot AR Drones Also researchersdemonstrated a hijacking of DJI consumer drones by emulatingfake GPS signals using low-cost soware dened radio tools [11]It is also possible to inject MAVLink message into a radio link bymodifying the radio rmware and hijack a ying drone [9] whichwe reproduced for our case study Javaid et al [15] addressed somevulnerabilities of wireless communications channels in unmannedaerial vehicles Commercial airplanes are also facing with suchsecurity problems e Actel ProASIC chip used in early Boeing

ICCPS April 2017 Pisburgh PA USA M-K Yoon et al

787 had a backdoor [6] that could allow an aacker via internetconnection or as a passenger to use entertainment system in theaircra to take over the control of the aircra

Advances in virtualization technologies have enabled VirtualMachine Introspection (VMI) [14] in which a trusted VM or theVMM monitors and analyzes the state of applications or OS runninginside untrusted VMs By placing the detection mechanism outsideof the VM it monitors (ie the untrusted VMs) VMI overcomesthe vulnerability of the traditional host-based intrusion detectionsystems VMIs have been applied to process execution monitor-ing [25] control-ow integrity check [22] virtual memory and diskmonitoring [20] dynamic information ow tracking [29] etc

Hardware-based approaches can also be used to isolate vulnera-ble components ARM TrustZone [28] is an architectural extensionthat allows a coexistence of secure world and normal world usingthe same on-chip hardware Access to certain secure componentsare blocked depending on the execution mode Azab et al [13]proposed TZ-RKP which protects the integrity of operating systemkernel that runs on a normal world by running a security monitorin the secure world Zhou et al [33] use ARM processors memorydomain support for soware fault isolation Yoon et al [31] takesadvantage of the redundancy of a multicore processor a core is usedto monitor the execution time of a real-time application runningon a monitored core It was extended to monitor memory behaviorfor system-wide anomaly detection [32] and to protect in-place se-curity monitoring module [30] ese hardware-based approachesprovide beer security than virtualizations can do because the lat-ter relies on the security and correctness of the VMM which issusceptible to aacks [21] However virtualization-based methodshave advantages in that no hardware modication is needed andthat they are more exible due to the soware control

7 CONCLUSIONIn this paper we presented the VirtualDrone framework as a solu-tion to increasing security threats to unmanned aerial systems euse of this framework allows system designers (or users) to runadvanced ight applications in an untrustworthy environment Ourprototype implementation requires a minimal eort to build theframework on an o-the-shelf platform with open-source sowarestack rough case studies we demonstrated that the frameworkprovides an integrated way to handle various security threats thatwould otherwise have required potentially conicting requirementsNevertheless there still remains challenges for practical use of theframework We used a full-featured autopilot for both normaland safety controllers in the current implementation simply for ademonstration purpose only It is desirable to run a fully-veriedcontrol soware in the SCE Hence we plan to adopt and implementa high-assurance controller

REFERENCES[1] ArduPilot Autopilot Suite hpwwwardupilotorg[2] Emlid NAVIO+ hpsdocsemlidcomnavio[3] LibVMI hplibvmicom[4] QEMU hpwikiqemuorg[5] Raspberry PI 2 Model B

hpswwwraspberrypiorgproductsraspberry-pi-2-model-b[6] Cyber-aack concerns raised over Boeing 787 chiprsquos rsquoback doorrsquo e Guardian

hpswwwtheguardiancomtechnology2012may29cyber-aack-concerns-boeing-chip

[7] 3DRrsquos Solo Drone Boasts Dual Linux Computers Run-ning Dronecode hpswwwlinuxcomnews3drs-solo-drone-boasts-dual-linux-computers-running-dronecode

[8] A hacker developed Maldrone the rst malware for drones Se-curity Aairs hpsecurityaairscowordpress32767hackingmaldrone-malware-for-droneshtml

[9] Hijacking drones with a MAVLink exploit hpdiydronescomprolesblogshijacking-quadcopters-with-a-mavlink-exploit

[10] alcomm Goes Ubuntu for Drone Reference Platform hpswwwlinuxcomnewsqualcomm-goes-ubuntu-drone-reference-platform

[11] Watch GPS Aacks at Can Kill DJI Drones Or Bypass White HouseBan Forbes hpwwwforbescomsitesthomasbrewster20150808qihoo-hacks-drone-gps26431a2853fe

[12] Intel Aero Compute Board hpwwwintelcomcontentwwwusentechnology-innovationaerial-technology-overviewhtml

[13] Ahmed M Azab Peng Ning Jitesh Shah an Chen Rohan Bhutkar GuruprasadGanesh Jia Ma and Wenbo Shen 2014 Hypervision Across Worlds Real-timeKernel Protection from the ARM TrustZone Secure World In the ACM Conferenceon Computer and Communications Security

[14] Tal Garnkel and Mendel Rosenblum 2003 A Virtual Machine IntrospectionBased Architecture for Intrusion Detection In the Network and Distributed Sys-tems Security Symposium

[15] Ahmad Y Javaid Weiqing Sun Vijay K Devabhaktuni and Mansoor Alam 2012Cyber security threat analysis and modeling of an unmanned aerial vehiclesystem In the IEEE Conference on Technologies for Homeland Security

[16] Andrew J Kerns Daniel P Shepard Jahshan A Bhai and Todd E Humphreys2014 Unmanned Aircra Capture and Control Via GPS Spoong Journal ofField Robotics 31 (2014)

[17] Jiuxing Liu Wei Huang Bulent Abali and Dhabaleswar K Panda 2006 High Per-formance VMM-bypass IO in Virtual Machines In the USENIX Annual TechnicalConference

[18] Y Mo and B Sinopoli 2015 Secure Estimation in the Presence of IntegrityAacks IEEE Trans Automat Control 60 4 (2015) 1145ndash1151

[19] Miroslav Pajic James Weimer Nicola Bezzo Paulo Tabuada Oleg Sokolsky InsupLee and George J Pappas 2014 Robustness of Aack-Resilient State EstimatorsIn the ACMIEEE International Conference on Cyber-Physical Systems

[20] Bryan D Payne Martim Carbone and Wenke Lee 2007 Secure and FlexibleMonitoring of Virtual Machines In the Annual Computer Security ApplicationsConference

[21] Gabor Pek Andrea Lanzi Abhinav Srivastava Davide Balzaroi Aurelien Fran-cillon and Christoph Neumann 2014 On the Feasibility of Soware Aackson Commodity Virtual Machine Monitors via Direct Device Assignment In theACM Symposium on Information Computer and Communications Security

[22] Nick L Petroni Jr and Michael Hicks 2007 Automated Detection of PersistentKernel Control-ow Aacks In the ACM Conference on Computer and Communi-cations Security

[23] Johann-Sebastian Pleban Ricardo Band and Reiner Creutzburg 2014 Hackingand securing the ARDrone 20 quadcopter investigations for improving thesecurity of a toy In the SPIEMobile Devices andMultimedia Enabling TechnologiesAlgorithms and Applications

[24] Lui Sha 2001 Using Simplicity to Control Complexity IEEE Sow 18 4 (2001)20ndash28 DOIhpdxdoiorgdxdoiorg101109MS2001936213

[25] Deepa Srinivasan Zhi Wang Xuxian Jiang and Dongyan Xu 2011 Process Out-graing An Ecient rdquoout-of-VMrdquo Approach for Fine-grained Process ExecutionMonitoring In the ACM Conference on Computer and Communications Security

[26] Nils Ole Tippenhauer Christina Popper Kasper Bonne Rasmussen and SrdjanCapkun 2011 On the Requirements for Successful GPS Spoong Aacks In theACM Conference on Computer and Communications Security

[27] X Wang N Hovakimyan and L Sha 2013 L1Simplex Fault-tolerant controlof cyber-physical systems In the ACMIEEE International Conference on Cyber-Physical Systems

[28] Peter Wilson Alexandre Frey Tom Mihm Danny Kershaw and Tiago Alves2007 Implementing Embedded Security on Dual-Virtual-CPU Systems IEEEDes Test 24 6 (Nov 2007) 582ndash591

[29] Heng Yin Dawn Song Manuel Egele Christopher Kruegel and Engin Kirda 2007Panorama Capturing System-wide Information Flow for Malware Detection andAnalysis In the ACM Conference on Computer and Communications Security

[30] Man-Ki Yoon Mihai Christodorescu Lui Sha and Sibin Mohan 2016 eDragonBeam Framework Hardware-Protected Security Modules for In-PlaceIntrusion Detection In the ACM International Systems and Storage Conference

[31] Man-Ki Yoon Sibin Mohan Jaesik Choi Jung-Eun Kim and Lui Sha 2013SecureCore A Multicore-based Intrusion Detection Architecture for Real-TimeEmbedded Systems In the IEEE Real-Time Embedded Technology and ApplicationsSymposium

[32] Man-Ki Yoon Sibin Mohan Jaesik Choi and Lui Sha 2015 Memory Heat MapAnomaly Detection in Real-Time Embedded Systems Using Memory BehaviorIn the ACMEDACIEEE Design Automation Conference

[33] Yajin Zhou Xiaoguang Wang Yue Chen and Zhi Wang 2014 ARMlockHardware-based Fault Isolation for ARM In the ACM Conference on Computerand Communications Security

VirtualDrone Architecture for Aack-Resilient UAS ICCPS April 2017 Pisburgh PA USA

A ACTUATOR VIRTUALIZATION

IO Proxy

PWM Generator(PCA9685)

TrustedController

Motor Driver

Motor Interface

Virtual Motor Driver

Hardware

Host OSI2C

UntrustworthyController

Motor Interface

Security amp Safety Monitor

NCE (VM) SCE (Host)

MotorThread

Host-Guest Communication

Motors 0123

Figure 16 Actuator virtualization in the VirtualDroneframework

Figure 16 shows how an actuator is virtualized in the Virtual-Drone framework which is similar to the sensor virtualizationexplained in Section 33 e controller running in the NCE com-putes a set of PWM (Pulse Width Modulation) output values tocontrol the motors of the vehicle e controller writes these valuesto the virtual motor driver through the motor interface It transfersthe data to an IO proxy thread that relays the PWM values to themotor driver in the SCE e motors are nally actuated by analogsignals converted by the on-board speed controller

B DETAILS ON VIRTUALIZATIONSensors e following describes how the sensors are virtualizedin our prototype implementationbull Inertial Measurement Unit (MPU9250) e device driver run-

ning on the host retrieves a raw IMU data (14 bytes) every 1ms through SPI However every 5th sample is actually used forcontrol (hence the eective control frequency is 200 Hz) edata includes a 3-axis gyroscope and 3-axis accelerometer values

bull Barometer (MS5611) is sensor measures the barometric pres-sure and temperature e driver runs a state machine thatoperates at a frequency of 25 Hz A raw data (24 bits) retrievedfrom the sensor through I2C is converted to either pressure ortemperature value depending on the state (8 bits)

bull Compass (AK8963) It measures terrestrial magnetism in the 3axes at a frequency of 50 Hz using I2C Total 24 bytes (includingper-axis calibration factor) of raw data are fed to the NCE

bull Analog-to-Digital Converter (ADS1115) It measures the voltageson 6 ADC channels It reads each channel every 600 ms throughI2C For each channel a data of 40 bits (8 bits for channel ID and32 bits for sampled data) is transferred to the VM

bull GPS (u-blox NEO-M8) It provides the current longitude latitudeand altitude of the vehicle the time information (current millisec-ond time of week) etc e driver reads UBX protocol messagesfrom the u-blox GPS receiver through SPI parses each one andthen obtains the above information e parsing is stateful anda aer-parsing data can be at most 1K bytes It is fed to the NCEat the frequency of 5 Hz

Actuator For the motor actuation the virtual controller in theNCE sends the PWM values (for the four motors) to the host at thefrequency of the main control loop (ie 200 Hz)

Radio Control Input A remote control via radio link is used tomanually control (armdisarm ight maneuver) the quadcoptere raw input pulses are retrieved through DMA (Direct MemoryAccess) at 1666 Hz About every 18 ms (ie 55 Hz) a new set ofPWM values representing the stick and switch movements (total 8channels) becomes available As done for the sensors mentionedabove the IO proxy runs an RC feeding thread However insteadof feeding the raw pulse data we send the processed data ie thePWMs in order to avoid the overhead due to feeding the raw dataat such a high frequency (1666 Hz)

C ATTITUDE CONTROL AND ERROR BOUND

Time (s)50 55 60 65 70 75 80 85

Rol

l Pi

tch

Yaw

Erro

rs

-25000

-20000

-15000

-10000

-5000

0

5000

10000

15000

20000

25000RollPitchYaw

Time (s)50 55 60 65 70 75 80 85

RC

Inpu

t (PW

Ms)

800

1000

1200

1400

1600

1800

2000

2200RollPitchThrottleYaw

Drone hit the ground

Switched to SCE

Figure 17 e roll pitch yaw errors (top) measured duringthe dronersquos extreme movements e bottom plot shows theroll pitch throttle and yaw targets set by the pilot using theremote controller

e APM uses a double-loop PIDP control to stabilize the quad-copter e Angle loop aka the outer loop controls the aitudeof the vehicle e Angle loop utilizes a P control to achieve thedesired aitude by outpuing a desired angular speed ie the an-gular speed setpoint to the Rate loop aka the inner loop eAngle looprsquos output ie the angular speed setpoint is proportionalto the dierence between the target angle value set by the pilot(or autopilot when in autonomous ight mode) and the measuredangle value from the IMU sensor e Rate loop controls the aituderates of the aircra e Rate loop continuously calculates an errorvalue as the dierence between the angular speed setpoint and themeasured angular speed from the IMU sensor A PID control is

ICCPS April 2017 Pisburgh PA USA M-K Yoon et al

utilized in Rate loop to minimize the error over time by outpuingPWM signals to control motors

For the thresholds on the errors we used plusmn20 000 (radsec) forroll and pitch and plusmn10 000 (radsec) for yaw e switching logicactivates when the violation happens three times consecutivelyWe obtained these bounds on the errors by measuring from bothnormal and extreme movements of the prototype drone e topplot in Figure 17 shows those errors measured during the dronersquosextreme movements and the boom plot shows how the pilot cre-ated the movements e result indicates that the errors are wellbounded even when the drone experiences such movements epilot intentionally made the drone hit the ground at time between75 sec and 76 sec aer which the control is switched to the SCEWe did not aempt to nd optimal thresholds e smaller thethreshold is the easier it is for the SCE to recover to a stable stateHowever at the same time it could create more false positives

D DETECTION OF HIJACKING ATTEMPT

(a) LegitimateTim

e

Vehicle GCS

hellip

Attacker

hellip

Unexpected

Time

VehicleGCS

hellip

(b) Hijacking attempt

Figure 18 (a) MAVLink messages exchanged between theGCS and the vehicle for waypoint setup (b) e legitimateGCS can detect the attackerrsquos update on the vehicles routeas the vehiclersquos responses are unexpected

In order for a GCS to set waypoints for a vehicle a series ofMAVLink messages are exchanged Figure 18(a) shows the MAVLinkwaypoint protocol e GCS rst sends MISSION COUNT(N) to thevehicle where N represents the number of waypoints that it willset e vehicle prepares for receiving the N waypoints and thenrequests for each waypoint by sending MISSION REQUEST(i) untilall the waypoint locations are received

Note that both the legitimate GCS and the aacker need to followthis protocol to set any waypoints From the vehiclersquos perspectivethe initialization requests (ie MISSION COUNT(N)) from them areindistinguishable at is the vehicle itself cannot detect suspiciousrequests for a route change However the fact that the aacker canreceive messages from the vehicle means that the legitimate GCScan also hear what the vehicle responds to the aackerrsquos requestAs Figure 18(b) shows the legitimate GCS can detect the aackerrsquosupdate on the vehiclersquos waypoints when it receives unexpectedMISSION REQUEST messages as it did not initialize the message ex-change Due to such stateful communication the MAVLink protocolenables detecting other types of suspicious aempts (eg changingcontrol parameters) as well

E GEO-FENCE ATTACK ROOTKITWe developed a rootkit that disables the geo-fence and sends thevehicle into a no-y zone e rootkit nds the APM process andthen modies itsmemory that stores (i) the ag that enablesdisablesthe geo-fencing and (ii) the list of waypoints ese are loadedfrom the APM conguration le (varAPMArduCopterstg) onits startup and buered in the memory

Waypoint 3Waypoint 2

Waypoint 4

Geo-fence enabled

Figure 19 ewaypoint list and geo-fence enable ag storedin the memory of APM process An attacker who gained aroot-level access canmodify thesememory values to disablethe geo-fence and then send the drone to a new location

Figure 20 e rootkit that disables the geo-fence and modi-es the ight plan by manipulating the APMrsquos memory

One can change these values remotely through radio which how-ever is easy to prevent since radio communication can be monitoredeasily Modifying the buered values in the memory is dicult toprevent especially if the aacker has gained a root access e mem-ory locations of these data can be easily found if the source codeor the executable binary is available Figure 19 shows the memorydump of the waypoint list and geo-fence enable ag Figure 20shows how these values are modied by the rootkit

  • Abstract
  • 1 Introduction
  • 2 Background
  • 3 VirtualDrone Framework
    • 31 High-level Framework
    • 32 Assumptions and Adversary Model
    • 33 Virtual Sensing Actuation and Communication
    • 34 Security and Safety Monitoring
      • 4 Implementation
      • 5 Experiments
        • 51 Case Study
        • 52 Discussion
          • 6 Related Work
          • 7 Conclusion
          • References
          • A Actuator Virtualization
          • B Details on Virtualization
          • C Attitude Control and Error Bound
          • D Detection of Hijacking Attempt
          • E Geo-Fence Attack Rootkit
Page 10: VirtualDrone: Virtual Sensing, Actuation, and ... · Figure 1: Simplex architecture. the so›ware environment, in conjunction with the increased capa-bilities and complexities of

ICCPS April 2017 Pisburgh PA USA M-K Yoon et al

787 had a backdoor [6] that could allow an aacker via internetconnection or as a passenger to use entertainment system in theaircra to take over the control of the aircra

Advances in virtualization technologies have enabled VirtualMachine Introspection (VMI) [14] in which a trusted VM or theVMM monitors and analyzes the state of applications or OS runninginside untrusted VMs By placing the detection mechanism outsideof the VM it monitors (ie the untrusted VMs) VMI overcomesthe vulnerability of the traditional host-based intrusion detectionsystems VMIs have been applied to process execution monitor-ing [25] control-ow integrity check [22] virtual memory and diskmonitoring [20] dynamic information ow tracking [29] etc

Hardware-based approaches can also be used to isolate vulnera-ble components ARM TrustZone [28] is an architectural extensionthat allows a coexistence of secure world and normal world usingthe same on-chip hardware Access to certain secure componentsare blocked depending on the execution mode Azab et al [13]proposed TZ-RKP which protects the integrity of operating systemkernel that runs on a normal world by running a security monitorin the secure world Zhou et al [33] use ARM processors memorydomain support for soware fault isolation Yoon et al [31] takesadvantage of the redundancy of a multicore processor a core is usedto monitor the execution time of a real-time application runningon a monitored core It was extended to monitor memory behaviorfor system-wide anomaly detection [32] and to protect in-place se-curity monitoring module [30] ese hardware-based approachesprovide beer security than virtualizations can do because the lat-ter relies on the security and correctness of the VMM which issusceptible to aacks [21] However virtualization-based methodshave advantages in that no hardware modication is needed andthat they are more exible due to the soware control

7 CONCLUSIONIn this paper we presented the VirtualDrone framework as a solu-tion to increasing security threats to unmanned aerial systems euse of this framework allows system designers (or users) to runadvanced ight applications in an untrustworthy environment Ourprototype implementation requires a minimal eort to build theframework on an o-the-shelf platform with open-source sowarestack rough case studies we demonstrated that the frameworkprovides an integrated way to handle various security threats thatwould otherwise have required potentially conicting requirementsNevertheless there still remains challenges for practical use of theframework We used a full-featured autopilot for both normaland safety controllers in the current implementation simply for ademonstration purpose only It is desirable to run a fully-veriedcontrol soware in the SCE Hence we plan to adopt and implementa high-assurance controller

REFERENCES[1] ArduPilot Autopilot Suite hpwwwardupilotorg[2] Emlid NAVIO+ hpsdocsemlidcomnavio[3] LibVMI hplibvmicom[4] QEMU hpwikiqemuorg[5] Raspberry PI 2 Model B

hpswwwraspberrypiorgproductsraspberry-pi-2-model-b[6] Cyber-aack concerns raised over Boeing 787 chiprsquos rsquoback doorrsquo e Guardian

hpswwwtheguardiancomtechnology2012may29cyber-aack-concerns-boeing-chip

[7] 3DRrsquos Solo Drone Boasts Dual Linux Computers Run-ning Dronecode hpswwwlinuxcomnews3drs-solo-drone-boasts-dual-linux-computers-running-dronecode

[8] A hacker developed Maldrone the rst malware for drones Se-curity Aairs hpsecurityaairscowordpress32767hackingmaldrone-malware-for-droneshtml

[9] Hijacking drones with a MAVLink exploit hpdiydronescomprolesblogshijacking-quadcopters-with-a-mavlink-exploit

[10] alcomm Goes Ubuntu for Drone Reference Platform hpswwwlinuxcomnewsqualcomm-goes-ubuntu-drone-reference-platform

[11] Watch GPS Aacks at Can Kill DJI Drones Or Bypass White HouseBan Forbes hpwwwforbescomsitesthomasbrewster20150808qihoo-hacks-drone-gps26431a2853fe

[12] Intel Aero Compute Board hpwwwintelcomcontentwwwusentechnology-innovationaerial-technology-overviewhtml

[13] Ahmed M Azab Peng Ning Jitesh Shah an Chen Rohan Bhutkar GuruprasadGanesh Jia Ma and Wenbo Shen 2014 Hypervision Across Worlds Real-timeKernel Protection from the ARM TrustZone Secure World In the ACM Conferenceon Computer and Communications Security

[14] Tal Garnkel and Mendel Rosenblum 2003 A Virtual Machine IntrospectionBased Architecture for Intrusion Detection In the Network and Distributed Sys-tems Security Symposium

[15] Ahmad Y Javaid Weiqing Sun Vijay K Devabhaktuni and Mansoor Alam 2012Cyber security threat analysis and modeling of an unmanned aerial vehiclesystem In the IEEE Conference on Technologies for Homeland Security

[16] Andrew J Kerns Daniel P Shepard Jahshan A Bhai and Todd E Humphreys2014 Unmanned Aircra Capture and Control Via GPS Spoong Journal ofField Robotics 31 (2014)

[17] Jiuxing Liu Wei Huang Bulent Abali and Dhabaleswar K Panda 2006 High Per-formance VMM-bypass IO in Virtual Machines In the USENIX Annual TechnicalConference

[18] Y Mo and B Sinopoli 2015 Secure Estimation in the Presence of IntegrityAacks IEEE Trans Automat Control 60 4 (2015) 1145ndash1151

[19] Miroslav Pajic James Weimer Nicola Bezzo Paulo Tabuada Oleg Sokolsky InsupLee and George J Pappas 2014 Robustness of Aack-Resilient State EstimatorsIn the ACMIEEE International Conference on Cyber-Physical Systems

[20] Bryan D Payne Martim Carbone and Wenke Lee 2007 Secure and FlexibleMonitoring of Virtual Machines In the Annual Computer Security ApplicationsConference

[21] Gabor Pek Andrea Lanzi Abhinav Srivastava Davide Balzaroi Aurelien Fran-cillon and Christoph Neumann 2014 On the Feasibility of Soware Aackson Commodity Virtual Machine Monitors via Direct Device Assignment In theACM Symposium on Information Computer and Communications Security

[22] Nick L Petroni Jr and Michael Hicks 2007 Automated Detection of PersistentKernel Control-ow Aacks In the ACM Conference on Computer and Communi-cations Security

[23] Johann-Sebastian Pleban Ricardo Band and Reiner Creutzburg 2014 Hackingand securing the ARDrone 20 quadcopter investigations for improving thesecurity of a toy In the SPIEMobile Devices andMultimedia Enabling TechnologiesAlgorithms and Applications

[24] Lui Sha 2001 Using Simplicity to Control Complexity IEEE Sow 18 4 (2001)20ndash28 DOIhpdxdoiorgdxdoiorg101109MS2001936213

[25] Deepa Srinivasan Zhi Wang Xuxian Jiang and Dongyan Xu 2011 Process Out-graing An Ecient rdquoout-of-VMrdquo Approach for Fine-grained Process ExecutionMonitoring In the ACM Conference on Computer and Communications Security

[26] Nils Ole Tippenhauer Christina Popper Kasper Bonne Rasmussen and SrdjanCapkun 2011 On the Requirements for Successful GPS Spoong Aacks In theACM Conference on Computer and Communications Security

[27] X Wang N Hovakimyan and L Sha 2013 L1Simplex Fault-tolerant controlof cyber-physical systems In the ACMIEEE International Conference on Cyber-Physical Systems

[28] Peter Wilson Alexandre Frey Tom Mihm Danny Kershaw and Tiago Alves2007 Implementing Embedded Security on Dual-Virtual-CPU Systems IEEEDes Test 24 6 (Nov 2007) 582ndash591

[29] Heng Yin Dawn Song Manuel Egele Christopher Kruegel and Engin Kirda 2007Panorama Capturing System-wide Information Flow for Malware Detection andAnalysis In the ACM Conference on Computer and Communications Security

[30] Man-Ki Yoon Mihai Christodorescu Lui Sha and Sibin Mohan 2016 eDragonBeam Framework Hardware-Protected Security Modules for In-PlaceIntrusion Detection In the ACM International Systems and Storage Conference

[31] Man-Ki Yoon Sibin Mohan Jaesik Choi Jung-Eun Kim and Lui Sha 2013SecureCore A Multicore-based Intrusion Detection Architecture for Real-TimeEmbedded Systems In the IEEE Real-Time Embedded Technology and ApplicationsSymposium

[32] Man-Ki Yoon Sibin Mohan Jaesik Choi and Lui Sha 2015 Memory Heat MapAnomaly Detection in Real-Time Embedded Systems Using Memory BehaviorIn the ACMEDACIEEE Design Automation Conference

[33] Yajin Zhou Xiaoguang Wang Yue Chen and Zhi Wang 2014 ARMlockHardware-based Fault Isolation for ARM In the ACM Conference on Computerand Communications Security

VirtualDrone Architecture for Aack-Resilient UAS ICCPS April 2017 Pisburgh PA USA

A ACTUATOR VIRTUALIZATION

IO Proxy

PWM Generator(PCA9685)

TrustedController

Motor Driver

Motor Interface

Virtual Motor Driver

Hardware

Host OSI2C

UntrustworthyController

Motor Interface

Security amp Safety Monitor

NCE (VM) SCE (Host)

MotorThread

Host-Guest Communication

Motors 0123

Figure 16 Actuator virtualization in the VirtualDroneframework

Figure 16 shows how an actuator is virtualized in the Virtual-Drone framework which is similar to the sensor virtualizationexplained in Section 33 e controller running in the NCE com-putes a set of PWM (Pulse Width Modulation) output values tocontrol the motors of the vehicle e controller writes these valuesto the virtual motor driver through the motor interface It transfersthe data to an IO proxy thread that relays the PWM values to themotor driver in the SCE e motors are nally actuated by analogsignals converted by the on-board speed controller

B DETAILS ON VIRTUALIZATIONSensors e following describes how the sensors are virtualizedin our prototype implementationbull Inertial Measurement Unit (MPU9250) e device driver run-

ning on the host retrieves a raw IMU data (14 bytes) every 1ms through SPI However every 5th sample is actually used forcontrol (hence the eective control frequency is 200 Hz) edata includes a 3-axis gyroscope and 3-axis accelerometer values

bull Barometer (MS5611) is sensor measures the barometric pres-sure and temperature e driver runs a state machine thatoperates at a frequency of 25 Hz A raw data (24 bits) retrievedfrom the sensor through I2C is converted to either pressure ortemperature value depending on the state (8 bits)

bull Compass (AK8963) It measures terrestrial magnetism in the 3axes at a frequency of 50 Hz using I2C Total 24 bytes (includingper-axis calibration factor) of raw data are fed to the NCE

bull Analog-to-Digital Converter (ADS1115) It measures the voltageson 6 ADC channels It reads each channel every 600 ms throughI2C For each channel a data of 40 bits (8 bits for channel ID and32 bits for sampled data) is transferred to the VM

bull GPS (u-blox NEO-M8) It provides the current longitude latitudeand altitude of the vehicle the time information (current millisec-ond time of week) etc e driver reads UBX protocol messagesfrom the u-blox GPS receiver through SPI parses each one andthen obtains the above information e parsing is stateful anda aer-parsing data can be at most 1K bytes It is fed to the NCEat the frequency of 5 Hz

Actuator For the motor actuation the virtual controller in theNCE sends the PWM values (for the four motors) to the host at thefrequency of the main control loop (ie 200 Hz)

Radio Control Input A remote control via radio link is used tomanually control (armdisarm ight maneuver) the quadcoptere raw input pulses are retrieved through DMA (Direct MemoryAccess) at 1666 Hz About every 18 ms (ie 55 Hz) a new set ofPWM values representing the stick and switch movements (total 8channels) becomes available As done for the sensors mentionedabove the IO proxy runs an RC feeding thread However insteadof feeding the raw pulse data we send the processed data ie thePWMs in order to avoid the overhead due to feeding the raw dataat such a high frequency (1666 Hz)

C ATTITUDE CONTROL AND ERROR BOUND

Time (s)50 55 60 65 70 75 80 85

Rol

l Pi

tch

Yaw

Erro

rs

-25000

-20000

-15000

-10000

-5000

0

5000

10000

15000

20000

25000RollPitchYaw

Time (s)50 55 60 65 70 75 80 85

RC

Inpu

t (PW

Ms)

800

1000

1200

1400

1600

1800

2000

2200RollPitchThrottleYaw

Drone hit the ground

Switched to SCE

Figure 17 e roll pitch yaw errors (top) measured duringthe dronersquos extreme movements e bottom plot shows theroll pitch throttle and yaw targets set by the pilot using theremote controller

e APM uses a double-loop PIDP control to stabilize the quad-copter e Angle loop aka the outer loop controls the aitudeof the vehicle e Angle loop utilizes a P control to achieve thedesired aitude by outpuing a desired angular speed ie the an-gular speed setpoint to the Rate loop aka the inner loop eAngle looprsquos output ie the angular speed setpoint is proportionalto the dierence between the target angle value set by the pilot(or autopilot when in autonomous ight mode) and the measuredangle value from the IMU sensor e Rate loop controls the aituderates of the aircra e Rate loop continuously calculates an errorvalue as the dierence between the angular speed setpoint and themeasured angular speed from the IMU sensor A PID control is

ICCPS April 2017 Pisburgh PA USA M-K Yoon et al

utilized in Rate loop to minimize the error over time by outpuingPWM signals to control motors

For the thresholds on the errors we used plusmn20 000 (radsec) forroll and pitch and plusmn10 000 (radsec) for yaw e switching logicactivates when the violation happens three times consecutivelyWe obtained these bounds on the errors by measuring from bothnormal and extreme movements of the prototype drone e topplot in Figure 17 shows those errors measured during the dronersquosextreme movements and the boom plot shows how the pilot cre-ated the movements e result indicates that the errors are wellbounded even when the drone experiences such movements epilot intentionally made the drone hit the ground at time between75 sec and 76 sec aer which the control is switched to the SCEWe did not aempt to nd optimal thresholds e smaller thethreshold is the easier it is for the SCE to recover to a stable stateHowever at the same time it could create more false positives

D DETECTION OF HIJACKING ATTEMPT

(a) LegitimateTim

e

Vehicle GCS

hellip

Attacker

hellip

Unexpected

Time

VehicleGCS

hellip

(b) Hijacking attempt

Figure 18 (a) MAVLink messages exchanged between theGCS and the vehicle for waypoint setup (b) e legitimateGCS can detect the attackerrsquos update on the vehicles routeas the vehiclersquos responses are unexpected

In order for a GCS to set waypoints for a vehicle a series ofMAVLink messages are exchanged Figure 18(a) shows the MAVLinkwaypoint protocol e GCS rst sends MISSION COUNT(N) to thevehicle where N represents the number of waypoints that it willset e vehicle prepares for receiving the N waypoints and thenrequests for each waypoint by sending MISSION REQUEST(i) untilall the waypoint locations are received

Note that both the legitimate GCS and the aacker need to followthis protocol to set any waypoints From the vehiclersquos perspectivethe initialization requests (ie MISSION COUNT(N)) from them areindistinguishable at is the vehicle itself cannot detect suspiciousrequests for a route change However the fact that the aacker canreceive messages from the vehicle means that the legitimate GCScan also hear what the vehicle responds to the aackerrsquos requestAs Figure 18(b) shows the legitimate GCS can detect the aackerrsquosupdate on the vehiclersquos waypoints when it receives unexpectedMISSION REQUEST messages as it did not initialize the message ex-change Due to such stateful communication the MAVLink protocolenables detecting other types of suspicious aempts (eg changingcontrol parameters) as well

E GEO-FENCE ATTACK ROOTKITWe developed a rootkit that disables the geo-fence and sends thevehicle into a no-y zone e rootkit nds the APM process andthen modies itsmemory that stores (i) the ag that enablesdisablesthe geo-fencing and (ii) the list of waypoints ese are loadedfrom the APM conguration le (varAPMArduCopterstg) onits startup and buered in the memory

Waypoint 3Waypoint 2

Waypoint 4

Geo-fence enabled

Figure 19 ewaypoint list and geo-fence enable ag storedin the memory of APM process An attacker who gained aroot-level access canmodify thesememory values to disablethe geo-fence and then send the drone to a new location

Figure 20 e rootkit that disables the geo-fence and modi-es the ight plan by manipulating the APMrsquos memory

One can change these values remotely through radio which how-ever is easy to prevent since radio communication can be monitoredeasily Modifying the buered values in the memory is dicult toprevent especially if the aacker has gained a root access e mem-ory locations of these data can be easily found if the source codeor the executable binary is available Figure 19 shows the memorydump of the waypoint list and geo-fence enable ag Figure 20shows how these values are modied by the rootkit

  • Abstract
  • 1 Introduction
  • 2 Background
  • 3 VirtualDrone Framework
    • 31 High-level Framework
    • 32 Assumptions and Adversary Model
    • 33 Virtual Sensing Actuation and Communication
    • 34 Security and Safety Monitoring
      • 4 Implementation
      • 5 Experiments
        • 51 Case Study
        • 52 Discussion
          • 6 Related Work
          • 7 Conclusion
          • References
          • A Actuator Virtualization
          • B Details on Virtualization
          • C Attitude Control and Error Bound
          • D Detection of Hijacking Attempt
          • E Geo-Fence Attack Rootkit
Page 11: VirtualDrone: Virtual Sensing, Actuation, and ... · Figure 1: Simplex architecture. the so›ware environment, in conjunction with the increased capa-bilities and complexities of

VirtualDrone Architecture for Aack-Resilient UAS ICCPS April 2017 Pisburgh PA USA

A ACTUATOR VIRTUALIZATION

IO Proxy

PWM Generator(PCA9685)

TrustedController

Motor Driver

Motor Interface

Virtual Motor Driver

Hardware

Host OSI2C

UntrustworthyController

Motor Interface

Security amp Safety Monitor

NCE (VM) SCE (Host)

MotorThread

Host-Guest Communication

Motors 0123

Figure 16 Actuator virtualization in the VirtualDroneframework

Figure 16 shows how an actuator is virtualized in the Virtual-Drone framework which is similar to the sensor virtualizationexplained in Section 33 e controller running in the NCE com-putes a set of PWM (Pulse Width Modulation) output values tocontrol the motors of the vehicle e controller writes these valuesto the virtual motor driver through the motor interface It transfersthe data to an IO proxy thread that relays the PWM values to themotor driver in the SCE e motors are nally actuated by analogsignals converted by the on-board speed controller

B DETAILS ON VIRTUALIZATIONSensors e following describes how the sensors are virtualizedin our prototype implementationbull Inertial Measurement Unit (MPU9250) e device driver run-

ning on the host retrieves a raw IMU data (14 bytes) every 1ms through SPI However every 5th sample is actually used forcontrol (hence the eective control frequency is 200 Hz) edata includes a 3-axis gyroscope and 3-axis accelerometer values

bull Barometer (MS5611) is sensor measures the barometric pres-sure and temperature e driver runs a state machine thatoperates at a frequency of 25 Hz A raw data (24 bits) retrievedfrom the sensor through I2C is converted to either pressure ortemperature value depending on the state (8 bits)

bull Compass (AK8963) It measures terrestrial magnetism in the 3axes at a frequency of 50 Hz using I2C Total 24 bytes (includingper-axis calibration factor) of raw data are fed to the NCE

bull Analog-to-Digital Converter (ADS1115) It measures the voltageson 6 ADC channels It reads each channel every 600 ms throughI2C For each channel a data of 40 bits (8 bits for channel ID and32 bits for sampled data) is transferred to the VM

bull GPS (u-blox NEO-M8) It provides the current longitude latitudeand altitude of the vehicle the time information (current millisec-ond time of week) etc e driver reads UBX protocol messagesfrom the u-blox GPS receiver through SPI parses each one andthen obtains the above information e parsing is stateful anda aer-parsing data can be at most 1K bytes It is fed to the NCEat the frequency of 5 Hz

Actuator For the motor actuation the virtual controller in theNCE sends the PWM values (for the four motors) to the host at thefrequency of the main control loop (ie 200 Hz)

Radio Control Input A remote control via radio link is used tomanually control (armdisarm ight maneuver) the quadcoptere raw input pulses are retrieved through DMA (Direct MemoryAccess) at 1666 Hz About every 18 ms (ie 55 Hz) a new set ofPWM values representing the stick and switch movements (total 8channels) becomes available As done for the sensors mentionedabove the IO proxy runs an RC feeding thread However insteadof feeding the raw pulse data we send the processed data ie thePWMs in order to avoid the overhead due to feeding the raw dataat such a high frequency (1666 Hz)

C ATTITUDE CONTROL AND ERROR BOUND

Time (s)50 55 60 65 70 75 80 85

Rol

l Pi

tch

Yaw

Erro

rs

-25000

-20000

-15000

-10000

-5000

0

5000

10000

15000

20000

25000RollPitchYaw

Time (s)50 55 60 65 70 75 80 85

RC

Inpu

t (PW

Ms)

800

1000

1200

1400

1600

1800

2000

2200RollPitchThrottleYaw

Drone hit the ground

Switched to SCE

Figure 17 e roll pitch yaw errors (top) measured duringthe dronersquos extreme movements e bottom plot shows theroll pitch throttle and yaw targets set by the pilot using theremote controller

e APM uses a double-loop PIDP control to stabilize the quad-copter e Angle loop aka the outer loop controls the aitudeof the vehicle e Angle loop utilizes a P control to achieve thedesired aitude by outpuing a desired angular speed ie the an-gular speed setpoint to the Rate loop aka the inner loop eAngle looprsquos output ie the angular speed setpoint is proportionalto the dierence between the target angle value set by the pilot(or autopilot when in autonomous ight mode) and the measuredangle value from the IMU sensor e Rate loop controls the aituderates of the aircra e Rate loop continuously calculates an errorvalue as the dierence between the angular speed setpoint and themeasured angular speed from the IMU sensor A PID control is

ICCPS April 2017 Pisburgh PA USA M-K Yoon et al

utilized in Rate loop to minimize the error over time by outpuingPWM signals to control motors

For the thresholds on the errors we used plusmn20 000 (radsec) forroll and pitch and plusmn10 000 (radsec) for yaw e switching logicactivates when the violation happens three times consecutivelyWe obtained these bounds on the errors by measuring from bothnormal and extreme movements of the prototype drone e topplot in Figure 17 shows those errors measured during the dronersquosextreme movements and the boom plot shows how the pilot cre-ated the movements e result indicates that the errors are wellbounded even when the drone experiences such movements epilot intentionally made the drone hit the ground at time between75 sec and 76 sec aer which the control is switched to the SCEWe did not aempt to nd optimal thresholds e smaller thethreshold is the easier it is for the SCE to recover to a stable stateHowever at the same time it could create more false positives

D DETECTION OF HIJACKING ATTEMPT

(a) LegitimateTim

e

Vehicle GCS

hellip

Attacker

hellip

Unexpected

Time

VehicleGCS

hellip

(b) Hijacking attempt

Figure 18 (a) MAVLink messages exchanged between theGCS and the vehicle for waypoint setup (b) e legitimateGCS can detect the attackerrsquos update on the vehicles routeas the vehiclersquos responses are unexpected

In order for a GCS to set waypoints for a vehicle a series ofMAVLink messages are exchanged Figure 18(a) shows the MAVLinkwaypoint protocol e GCS rst sends MISSION COUNT(N) to thevehicle where N represents the number of waypoints that it willset e vehicle prepares for receiving the N waypoints and thenrequests for each waypoint by sending MISSION REQUEST(i) untilall the waypoint locations are received

Note that both the legitimate GCS and the aacker need to followthis protocol to set any waypoints From the vehiclersquos perspectivethe initialization requests (ie MISSION COUNT(N)) from them areindistinguishable at is the vehicle itself cannot detect suspiciousrequests for a route change However the fact that the aacker canreceive messages from the vehicle means that the legitimate GCScan also hear what the vehicle responds to the aackerrsquos requestAs Figure 18(b) shows the legitimate GCS can detect the aackerrsquosupdate on the vehiclersquos waypoints when it receives unexpectedMISSION REQUEST messages as it did not initialize the message ex-change Due to such stateful communication the MAVLink protocolenables detecting other types of suspicious aempts (eg changingcontrol parameters) as well

E GEO-FENCE ATTACK ROOTKITWe developed a rootkit that disables the geo-fence and sends thevehicle into a no-y zone e rootkit nds the APM process andthen modies itsmemory that stores (i) the ag that enablesdisablesthe geo-fencing and (ii) the list of waypoints ese are loadedfrom the APM conguration le (varAPMArduCopterstg) onits startup and buered in the memory

Waypoint 3Waypoint 2

Waypoint 4

Geo-fence enabled

Figure 19 ewaypoint list and geo-fence enable ag storedin the memory of APM process An attacker who gained aroot-level access canmodify thesememory values to disablethe geo-fence and then send the drone to a new location

Figure 20 e rootkit that disables the geo-fence and modi-es the ight plan by manipulating the APMrsquos memory

One can change these values remotely through radio which how-ever is easy to prevent since radio communication can be monitoredeasily Modifying the buered values in the memory is dicult toprevent especially if the aacker has gained a root access e mem-ory locations of these data can be easily found if the source codeor the executable binary is available Figure 19 shows the memorydump of the waypoint list and geo-fence enable ag Figure 20shows how these values are modied by the rootkit

  • Abstract
  • 1 Introduction
  • 2 Background
  • 3 VirtualDrone Framework
    • 31 High-level Framework
    • 32 Assumptions and Adversary Model
    • 33 Virtual Sensing Actuation and Communication
    • 34 Security and Safety Monitoring
      • 4 Implementation
      • 5 Experiments
        • 51 Case Study
        • 52 Discussion
          • 6 Related Work
          • 7 Conclusion
          • References
          • A Actuator Virtualization
          • B Details on Virtualization
          • C Attitude Control and Error Bound
          • D Detection of Hijacking Attempt
          • E Geo-Fence Attack Rootkit
Page 12: VirtualDrone: Virtual Sensing, Actuation, and ... · Figure 1: Simplex architecture. the so›ware environment, in conjunction with the increased capa-bilities and complexities of

ICCPS April 2017 Pisburgh PA USA M-K Yoon et al

utilized in Rate loop to minimize the error over time by outpuingPWM signals to control motors

For the thresholds on the errors we used plusmn20 000 (radsec) forroll and pitch and plusmn10 000 (radsec) for yaw e switching logicactivates when the violation happens three times consecutivelyWe obtained these bounds on the errors by measuring from bothnormal and extreme movements of the prototype drone e topplot in Figure 17 shows those errors measured during the dronersquosextreme movements and the boom plot shows how the pilot cre-ated the movements e result indicates that the errors are wellbounded even when the drone experiences such movements epilot intentionally made the drone hit the ground at time between75 sec and 76 sec aer which the control is switched to the SCEWe did not aempt to nd optimal thresholds e smaller thethreshold is the easier it is for the SCE to recover to a stable stateHowever at the same time it could create more false positives

D DETECTION OF HIJACKING ATTEMPT

(a) LegitimateTim

e

Vehicle GCS

hellip

Attacker

hellip

Unexpected

Time

VehicleGCS

hellip

(b) Hijacking attempt

Figure 18 (a) MAVLink messages exchanged between theGCS and the vehicle for waypoint setup (b) e legitimateGCS can detect the attackerrsquos update on the vehicles routeas the vehiclersquos responses are unexpected

In order for a GCS to set waypoints for a vehicle a series ofMAVLink messages are exchanged Figure 18(a) shows the MAVLinkwaypoint protocol e GCS rst sends MISSION COUNT(N) to thevehicle where N represents the number of waypoints that it willset e vehicle prepares for receiving the N waypoints and thenrequests for each waypoint by sending MISSION REQUEST(i) untilall the waypoint locations are received

Note that both the legitimate GCS and the aacker need to followthis protocol to set any waypoints From the vehiclersquos perspectivethe initialization requests (ie MISSION COUNT(N)) from them areindistinguishable at is the vehicle itself cannot detect suspiciousrequests for a route change However the fact that the aacker canreceive messages from the vehicle means that the legitimate GCScan also hear what the vehicle responds to the aackerrsquos requestAs Figure 18(b) shows the legitimate GCS can detect the aackerrsquosupdate on the vehiclersquos waypoints when it receives unexpectedMISSION REQUEST messages as it did not initialize the message ex-change Due to such stateful communication the MAVLink protocolenables detecting other types of suspicious aempts (eg changingcontrol parameters) as well

E GEO-FENCE ATTACK ROOTKITWe developed a rootkit that disables the geo-fence and sends thevehicle into a no-y zone e rootkit nds the APM process andthen modies itsmemory that stores (i) the ag that enablesdisablesthe geo-fencing and (ii) the list of waypoints ese are loadedfrom the APM conguration le (varAPMArduCopterstg) onits startup and buered in the memory

Waypoint 3Waypoint 2

Waypoint 4

Geo-fence enabled

Figure 19 ewaypoint list and geo-fence enable ag storedin the memory of APM process An attacker who gained aroot-level access canmodify thesememory values to disablethe geo-fence and then send the drone to a new location

Figure 20 e rootkit that disables the geo-fence and modi-es the ight plan by manipulating the APMrsquos memory

One can change these values remotely through radio which how-ever is easy to prevent since radio communication can be monitoredeasily Modifying the buered values in the memory is dicult toprevent especially if the aacker has gained a root access e mem-ory locations of these data can be easily found if the source codeor the executable binary is available Figure 19 shows the memorydump of the waypoint list and geo-fence enable ag Figure 20shows how these values are modied by the rootkit

  • Abstract
  • 1 Introduction
  • 2 Background
  • 3 VirtualDrone Framework
    • 31 High-level Framework
    • 32 Assumptions and Adversary Model
    • 33 Virtual Sensing Actuation and Communication
    • 34 Security and Safety Monitoring
      • 4 Implementation
      • 5 Experiments
        • 51 Case Study
        • 52 Discussion
          • 6 Related Work
          • 7 Conclusion
          • References
          • A Actuator Virtualization
          • B Details on Virtualization
          • C Attitude Control and Error Bound
          • D Detection of Hijacking Attempt
          • E Geo-Fence Attack Rootkit