How to Phone Home with Someone Else's Phone: Information ... · mobile phone to exfiltrate...

10
How to Phone Home with Someone Else’s Phone: Information Exfiltration Using Intentional Sound Noise on Gyroscopic Sensors Benyamin Farshteindiker, Nir Hasidim, Asaf Grosz and Yossi Oren Faculty of Engineering Sciences, Ben Gurion University of the Negev, Israel Abstract We show how a low-power device, such as a surveillance bug, can take advantage of a nearby mobile phone to exfiltrate arbitrary secrets across the Internet at a data rate of hundreds to thousands of bits per second, all without the phone owner’s awareness or permission. All the attack requires is for the phone to browse to an attacker-controlled website. This feat is carried out by exploiting a particular characteristic of the phone’s gyroscope which was discovered by Son et al. in [11]. We discuss the theoretical principles behind our attack, evaluate it on several different mobile devices, and discuss potential countermeasures and mitigations. Finally, we suggest how this attack vector can be used benevolently for the purpose of safer and eas- ier two-factor authentication. 1 Introduction An increasing number of people are finding them- selves branded as intelligence targets. Intelligence targets are entities which are of interest to state- sponsored signals intelligence agencies, or simi- larly powerful malicious adversaries. These ad- versaries presume their victims are in possession of some secret information, and attempt to acquire this information using various stealthy techniques. Most intelligence targets are tracked by huge scale, bulk collection efforts which target the Internet’s routing backbone and data centers; for higher-value targets, the malicious adversaries tend to make use of custom hardware implants, or “bugs”. Our work suggests a way of designing a particu- larly stealthy and effective implant. Before we de- scribe our design in detail, we first describe the ar- chitecture of implants in general. As described in Table 1, an implant has three main functional com- ponents: First, it must collect secret information from its victim; next, it must exfiltrate this secret payload by connecting to a central command and control (C&C) server, an activity colloquially re- ferred to as “phoning home”; finally, the implant requires some sort of power supply to power its computation and communication functions. Secret collection can be achieved by various methods. Most trivially, an implant can use on- board sensors such as microphones or cameras to Component Example Instantiations Secret Collection Microphone, camera, side-channel probe Secret Exfiltration RF backscatter, acoustical coupling, this work Power Supply Passive power, battery Table 1: Components of a general implant device spy on the victim. If the implant is placed near the victim’s computer or mobile phone, the implant can mount a side-channel attack on the phone, using techniques similar to Genkin et al. [4], to recover secret information such as encryption keys and bit- coin wallets. In some cases (such as supply-chain interdiction, as described below), implants have di- rect access to interesting data lines, such as the bus between a computer and its video display. Secret exfiltration is a bigger engineering chal- lenge. Implants have to operate in an adversar- ial setting, meaning that they should be as diffi- cult as possible to detect by the victim. Combined with their very limited power budget this implies they cannot contain a cellular modem, satellite ra- dio or other forms of long-range radio transmitter, since these functions are all power-hungry and eas- ily detectable. Instead, implants tend to use vari- ous low-power, short-range transmission schemes based on RFID backscatter, short-range radio net- works, acoustical coupling, etc. To collect this exfiltrated data, the intelligence agency is thus re- quired to deploy a field agent, equipped with a so- phisticated collection device, to the vicinity of in- telligence target [10]. This endeavor is both costly and risky, an aspect which limits the amount of im- plants in practical use. In this work we challenge this limitation and propose a low-cost, low-risk ex- filtration method. The power supply is the third main component of any implant. In many cases it is impossible to provide the implant with an external power supply, requiring it to survive on battery power for as long as possible. Some implants do without a power sup- ply altogether, harvesting electromagnetic energy from an external radiation source provided by the field agent’s collection device. The intelligence agency needs to place the im- plants in proximity to its victims. In some cases, 1

Transcript of How to Phone Home with Someone Else's Phone: Information ... · mobile phone to exfiltrate...

Page 1: How to Phone Home with Someone Else's Phone: Information ... · mobile phone to exfiltrate arbitrary secrets across the Internet at a data rate of hundreds to thousands of bits per

How to Phone Home with Someone Else’s Phone: InformationExfiltration Using Intentional Sound Noise on Gyroscopic Sensors

Benyamin Farshteindiker, Nir Hasidim, Asaf Grosz and Yossi OrenFaculty of Engineering Sciences, Ben Gurion University of the Negev, Israel

Abstract

We show how a low-power device, such as asurveillance bug, can take advantage of a nearbymobile phone to exfiltrate arbitrary secrets acrossthe Internet at a data rate of hundreds to thousandsof bits per second, all without the phone owner’sawareness or permission. All the attack requires isfor the phone to browse to an attacker-controlledwebsite. This feat is carried out by exploiting aparticular characteristic of the phone’s gyroscopewhich was discovered by Son et al. in [11]. Wediscuss the theoretical principles behind our attack,evaluate it on several different mobile devices, anddiscuss potential countermeasures and mitigations.Finally, we suggest how this attack vector can beused benevolently for the purpose of safer and eas-ier two-factor authentication.

1 Introduction

An increasing number of people are finding them-selves branded as intelligence targets. Intelligencetargets are entities which are of interest to state-sponsored signals intelligence agencies, or simi-larly powerful malicious adversaries. These ad-versaries presume their victims are in possessionof some secret information, and attempt to acquirethis information using various stealthy techniques.Most intelligence targets are tracked by huge scale,bulk collection efforts which target the Internet’srouting backbone and data centers; for higher-valuetargets, the malicious adversaries tend to make useof custom hardware implants, or “bugs”.

Our work suggests a way of designing a particu-larly stealthy and effective implant. Before we de-scribe our design in detail, we first describe the ar-chitecture of implants in general. As described inTable 1, an implant has three main functional com-ponents: First, it must collect secret informationfrom its victim; next, it must exfiltrate this secretpayload by connecting to a central command andcontrol (C&C) server, an activity colloquially re-ferred to as “phoning home”; finally, the implantrequires some sort of power supply to power itscomputation and communication functions.

Secret collection can be achieved by variousmethods. Most trivially, an implant can use on-board sensors such as microphones or cameras to

Component Example InstantiationsSecret

CollectionMicrophone, camera,side-channel probe

SecretExfiltration

RF backscatter, acousticalcoupling, this work

PowerSupply

Passive power, battery

Table 1: Components of a general implant device

spy on the victim. If the implant is placed near thevictim’s computer or mobile phone, the implant canmount a side-channel attack on the phone, usingtechniques similar to Genkin et al. [4], to recoversecret information such as encryption keys and bit-coin wallets. In some cases (such as supply-chaininterdiction, as described below), implants have di-rect access to interesting data lines, such as the busbetween a computer and its video display.

Secret exfiltration is a bigger engineering chal-lenge. Implants have to operate in an adversar-ial setting, meaning that they should be as diffi-cult as possible to detect by the victim. Combinedwith their very limited power budget this impliesthey cannot contain a cellular modem, satellite ra-dio or other forms of long-range radio transmitter,since these functions are all power-hungry and eas-ily detectable. Instead, implants tend to use vari-ous low-power, short-range transmission schemesbased on RFID backscatter, short-range radio net-works, acoustical coupling, etc. To collect thisexfiltrated data, the intelligence agency is thus re-quired to deploy a field agent, equipped with a so-phisticated collection device, to the vicinity of in-telligence target [10]. This endeavor is both costlyand risky, an aspect which limits the amount of im-plants in practical use. In this work we challengethis limitation and propose a low-cost, low-risk ex-filtration method.

The power supply is the third main componentof any implant. In many cases it is impossible toprovide the implant with an external power supply,requiring it to survive on battery power for as longas possible. Some implants do without a power sup-ply altogether, harvesting electromagnetic energyfrom an external radiation source provided by thefield agent’s collection device.

The intelligence agency needs to place the im-plants in proximity to its victims. In some cases,

1

Page 2: How to Phone Home with Someone Else's Phone: Information ... · mobile phone to exfiltrate arbitrary secrets across the Internet at a data rate of hundreds to thousands of bits per

a field agent will break and enter into the victim’sproperty to place the implant in the walls of the vic-tim’s residence or hide it among the victim’s be-longings. Less romantically but more practically,agencies use gifts and souvenirs: malicious agen-cies may distribute free accessories, such as USBsticks, screen protectors or phone cases, which con-tain embedded implants, with the hope that at leastone of them will end up in proximity to an intelli-gence target. Implants deployed using this methodare required to be very effective in hiding their ma-licious intent. A famous example of this methodwas used between 1945 and 1952 to listen in onthe US Embassy in Moscow [12, p. 162]. Anotherwell known method is called supply-chain inter-diction: according to reports published in the Ger-man magazine Der Spiegel in January 2015 [1], in-telligence agencies routinely intercept deliveries ofhardware which is on its way to its targets, physi-cally attach an implant into the hardware, then for-ward the implanted hardware onwards toward itsintended destination. In many cases the agency hasonly approximate knowledge about which particu-lar item of hardware from a certain batch of ship-ments will actually be delivered to the intelligencetarget. Therefore, implants may be installed onhundreds or thousands of devices, but only a smallsubset of them may be ultimately activated andused. Implants delivered via interdiction have moregenerous operating conditions, since they may tapdirectly into interesting data lines or external powersources; However, they still must operate under therisk of discovery by the victim.

Our discussion will focus on an implant whichspecifically targets mobile phones and personalcomputers. Specifically, our implant is designed tobe as close as possible to the victim’s mobile phone,but not to be connected to any of its interfaces. Ex-amples for such attack settings include maliciouslymodified phone cases, screen protectors and, quiteironically, the privacy stickers security-conscioususers are increasingly using to cover their phone’scameras. We assume that the secret to be exfiltratedhas already been collected and focus on the ques-tion of exfiltration. Specifically, we describe howan implant in close proximity to a mobile phonecan exfiltrate a reasonable amount of data over un-bounded distances through abuse of the phone, allwithout the awareness or permission of the userand without exploiting any software vulnerabilityon the phone. To do so, we exploit a particular char-acteristic of the micro-electromechanical (MEMS)gyroscope sensor found on virtually all phones, andon most portable personal computers.

1.1 Our contributionIn this work we present the first experimental ev-idence of the disruptive effect of ultrasonic vibra-tions on the gyroscope sensors of mobile phonesand laptops. Specifically, we show how a specially-

Victim Phone

Implant

Adversary s C&C Server

Exfiltrate Secret

Modulate Secret

Collect Secret

Figure 1: Attack model

crafted audio stimulus, which was first discussed ina different context by Son et al. [11] , can causethese sensors to vibrate at their resonant frequencyand falsely report that the device is being rotatedrapidly. We build on this ability to construct astealthy communications channel between a ma-licious device adjacent to the victim’s phone anda command-and-control server on the Internet. Asillustrated in Figure 1, the implant modulates thesecret to be exfiltrated using ultrasonic vibrations,these vibrations affect the phone’s sensor, and soft-ware running on the phone uses the phone’s con-nectivity to finally exfiltrate the secret to the adver-sary’s command and control server. We show thatthe communication channel we describe does notrequire any unprivileged code to run on the phone;specifically, it can be deployed in the form of anuntrusted webpage. This setup does away with therequirement of deploying a field agent to collect thesecret data, thus lowering the operational risk, andtherefore raising the potential deployment rate, ofthese stealthy devices. We extensively characterizethis communication channel, both empirically andtheoretically, and measure its performance undervarious data rates and victim activity profiles. Wediscuss both malicious and benevolent uses of thiscommunication channel and finally propose coun-termeasures at various levels that can be applied toreduce its potential for harm.

Document Structure: In Section 2 we providebackground about the nature and design of micro-electromechanical gyroscopes and their suscepti-bility to harmonic vibrations. We also discuss theaccess levels provided to untrusted websites and na-tive applications who wish to access the gyroscopeunder different operating systems. In Section 3 wepresent a thorough evaluation of our proposed at-tack vector for multiple devices and under variousenvironmental conditions. We conclude with a dis-cussion of the implications of this attack, possiblecountermeasures and open questions in Section 4.

2 Gyroscopes on PersonalDevices

Modern personal devices such as mobile phones,tablets and personal computers are equipped withvarious sensors such as ambient light detectors, ro-tation sensors, motion sensors, location monitorsand so on. This Section discusses one particularsensor, the gyroscope rotation sensor, and describes

2

Page 3: How to Phone Home with Someone Else's Phone: Information ... · mobile phone to exfiltrate arbitrary secrets across the Internet at a data rate of hundreds to thousands of bits per

its design and the permissions model it exposes toapplications.

2.1 Micro-electromechanical (MEMS)Gyroscopes

An excellent introduction to MEMS gyroscopes isgiven by Michalevsky et al. [9]. As stated inthat work, MEMS gyroscopes sense the angularrate of rotation by measuring the magnitude of theCoriolis effect force which is acting on a mov-ing mass within them. The mass is moving at aconstant frequency named the driving frequency( fdrive). To improve the sensor’s sensitivity and re-duce its power consumption, fdrive usually equalsto the mass mechanical resonance frequency in thedriving direction, fsens−res.

As the gyroscope is rotated, the Coriolis effectgenerates a force, orthogonal to the direction of thedriving and the rotation. This force causes the massto vibrate in this direction with a frequency equalto the driving frequency and an amplitude whichis directly related to the angular rotation rate. Themodulated vibration amplitude is then converted tovoltage, typically by a capacitive or a piezo-electricsensor, and demodulated back to baseband by ananalog or digital lock-in amplifier which is syn-chronized with fdrive.

2.2 Gyroscope Vulnerability Mecha-nisms

We consider a scenario where a vibration source isphysically connected to a structure which the sen-sor is anchored to, and is located in close proximityto it. Several previous works demonstrated that anacoustic signal may generate false readings at thegyroscope output [11]. In those works it was as-sumed that the sensor is subjected to an acousticnoise from a far source. Naturally, these assump-tions are not valid in our scenario and therefore wefound it necessary to describe the possible mecha-nisms that have the potential to generate false read-ings at the sensor output:

A rotational mechanism: The MEMS gyro-scope is soldered to a relatively long PCB whichcan slightly bend like a beam or a wing, depend-ing on how and where it is anchored to the phone.Vibrations can generate a bending moment in thePCB which may rotate the MEMS gyroscope.

A linear acceleration mechanism: Similarly tothe first case, vibrations can generate a linear accel-eration in the MEMS gyroscope sensing direction.Modern gyroscopes possess a differential sensingmechanism that mitigates the effect of linear ac-celerations in the sensing direction. However, thenon-ideality of the differential measurement (dueto slight differences in the MEMS structure or theanalog electronic circuitry) will allow part of thesignal to be sensed as a valid rotational movement.

Regardless of the induced motion mechanism,the gyroscope is sensitive to those vibrations es-pecially around two frequencies: the driving fre-quency, fdrive, and the mechanical resonance fre-quency in the sensing direction, fsens−res. Whilevibrations in fdrive will induce signals that willbe directly demodulated to baseband, vibrations infsens−res will appear in baseband after a more com-plex route. First, the vibrations will be dramati-cally amplified by the ultra-high quality factor ofthe mechanical system. Second, the induced sig-nal will be demodulated to a frequency equal to| fdrive− fsens−res|. Third, the signal will be filteredby an analog low pass filter (we note that sincefdrive and fsens−res are relatively close, and sincethe mechanical amplification in the first stage isextremely high, it is reasonable to assume that insome cases the analog low pass filter will not beable to sufficiently filter out this signal). Finally,the remaining signal will be sampled and aliasedinto the sensor bandwidth, appearing as a valid sig-nal at the gyroscope output.

The exact mechanism that leads to the appear-ance of a signal at the gyroscope output may verybetween different phone and gyroscope models.Since this mechanism has no effect on the princi-ples underlying our method, we did not investigateit thoroughly; therefore, we define the vibration fre-quency which generates a maximum signal as theresponsive frequency.

2.3 The Gyroscope Programming andPermission Model

In contrast to other sensors, such as the microphoneor the GPS-based location sensor, the rotation sen-sor is not considered as a sensitive component andthus no special privileges are required to access it.Specifically, any web page running on a modernbrowser can register for the ondevicemotion()

and ondeviceorientation() events and subse-quently be notified whenever the device is rotated.The web browser on iOS, Android and Windowsdevices enables this behavior without asking for theuser’s permission – in fact, it even does so withoutdisplaying any notifications that the gyroscope isbeing interrogated. Similarly, both on iOS and onAndroid any native app which the user downloadsand installs from the first-party app store has imme-diate and full access to the gyroscope without anyform of notification or confirmation.

As shown by [9], the sampling rate at which thegyroscope can be interrogated differs between webpages and native applications. This sampling rate is60 Hz for the Chrome and Safari browsers, 100 Hzfor Firefox and 20 Hz for the stock android browser.In contrast, native apps achieve a sampling rate of100 Hz for iOS and 200 Hz for Android.

Many websites and mobile app derive incomethrough advertising, either by embedding iframescontaining ads into their web content, or by link-

3

Page 4: How to Phone Home with Someone Else's Phone: Information ... · mobile phone to exfiltrate arbitrary secrets across the Internet at a data rate of hundreds to thousands of bits per

ing their native apps together with third-party ad-vertising libraries which load ads over the web ondemand. As a consequence of the gyroscope’s per-mission model, third-party ads of both types are al-ways allowed to query the gyroscope.

3 Our Attack

As shown in [11], intentional acoustic vibrationscan induce an undesired signal at the output of mostMEMS gyroscopes through their several mecha-nisms, as we discussed in Section 2. The centralpoint of our attack is the use of this induced signalto carry data: the implant can modulate a secretover the gyroscope channel by intentionally vary-ing the amplitude, frequency or phase of this unde-sired signal over time. A program running on themobile device can subsequently pick up this modu-lated signal and pass it on to the C&C server. Thereare two unique advantages to this exfiltration chan-nel, in comparison to other sensor-based exfiltra-tion schemes such as [3, 7]. The first advantage re-lates to the lax security model imposed on the gyro-scope sensor, especially in contrast to other sensorssuch as the microphone or camera. This weak secu-rity makes deploying an attack based on gyroscopesvery simple. In fact, as stated in Subsection 2.3, thevictim merely has to browse to an unprivileged webpage for the attack to succeed. The second advan-tage relates to the gyroscope’s enhanced sensitivityat its responsive frequency. Due to this sensitivity, arelatively weak audio signal (as low as several mi-crowatts in power, as we show in Subsection 4.1)is sufficient to trigger the phone’s sensors, allowingeven a small battery-powered implant to make useof this exfiltration method.

Figure 2 provides a brief demonstration of ourattack, based on real lab measurements. The topof the figure shows the baseband bit sequence thatthe implant wishes to exfiltrate. The bit sequence istransmitted to the phone by an on-off keying mod-ulation of the audio signal, with the frequency ofthe carrier wave set near the gyroscope’s responsivefrequency. The bottom of the Figure shows the ab-solute values of real-time readings from the victimphone’s gyroscope (an iPhone 5S in this case) as itreceives the audio signal, captured using JavaScriptcode running within an unprivileged web page. Itcan be seen, even with the naked eye, that the read-ings from the gyroscope experience strong fluctu-ations when the audio signal is being sent, but arerelatively quiet during other periods. Thus, the gy-roscope readings contain an encoding of the trans-mitted bit sequence. These readings can then triv-ially be sent to a C&C server, providing a very ef-fective exfiltration channel. We describe our resultsin more detail in the following Section.

3.1 Attack ModelOur attack assumes that the adversary has managedto place an implant in close proximity to the gyro-scope sensor located in the victim’s phone or mo-bile device, and that this implant has some secretit wishes to exfiltrate to the adversary’s commandand control (C&C) server. We furthermore assumethat the attacker has the ability to make the victim’smobile device display a website, or otherwise runsome unprivileged code. This assumption can beachieved by using one of the following methods:

• By purchasing a advertisement, containing theattacker’s JavaScript code, which will then bedisplayed on one of the victim’s favorite web-sites or native applications. Malicious adver-tisements are a well-known risk to the adver-tising ecosystem [14]. As we stated in 2.3, dis-playing an ad that interacts with the gyroscopedoes not require special permissions from thehosting webpage or native app.

• By inducing the user to download and in-stall a “repackaged” application – an innocent-looking native application modified to includeadditional malicious components [15]. Noteagain that the additional functionality requiresno extraordinary permissions, making it agood candidate for repackaging attacks .

• By replacing the contents of an innocent web-page the victim is attempting to view withan infected version containing the maliciousfunctionality, through the use of state-actor ca-pabilities such as man-in-the-middle or man-on-the-side attacks [5, 8].

The malicious functionality embedded into thewebsite or the app is very simple – it simply queriesthe gyroscope as quickly as possible and uploadsits reading to a central server. The implant will useintentional acoustic vibration to selectively corruptthe readings of the gyroscope as they are being readby the attacker’s code, therefore modulating the se-cret to be exfiltrated. 1

3.2 Evaluation SetupWe designed and carried out an experiment to eval-uate the data-bearing potential of the intentionalacoustic vibration channel. The hardware setup ofour experiment is indicated in Figure 3. As shownin the Figure, a Keysight 33622A Waveform Gen-erator was connected via an RG-58 coaxial cableto a PUI Audio APS2509S-T-R piezoelectric trans-ducer, which was placed on the victim device as

1We must assume that the implant knows to start transmittingprecisely when the malicious code is running on the phone. Syn-chronizing the implant and the code can either be done by send-ing a signal from the phone that is picked up by the implant’ssensors, or by fixing a predetermined time of day at which theimplant always transmits its payload.

4

Page 5: How to Phone Home with Someone Else's Phone: Information ... · mobile phone to exfiltrate arbitrary secrets across the Internet at a data rate of hundreds to thousands of bits per

Figure 2: A transmitted PRBS sequence is received by an iPhone 5S gyroscope

Victim Device

Piezoelectric speaker

Web Server

WiFi ConnectionSignal

Generator

Coaxial Cable

Figure 3: Experiment Setup

Figure 4: A phone with an attached transducer

close as possible to the location of the device’s in-ternal gyroscope. Figure 4 shows a photographof the victim phone and the attached piezoelectrictransducer.

While the PUI Audio piezoelectric transducer’sdata sheet states that its highest working frequencyis 20 kHz, we were consistently able to use it togenerate tones at frequencies of up to 30 kHz. Wedetermined the exact responsive frequency for eachdevice by generating a sine-sweep signal in the 25-29 kHz range, looking for anomalies in the gyro-scope response, then gradually reducing the spanof the sweep until we arrived at the exact respon-sive frequency. To determine the optimal loca-tion for the piezoelectric transducer, we referredto publicly-available tear-downs of the victim de-vices and attempted to locate the speaker as closeto the gyroscope as possible. If tear-downs werenot available, we manually moved the piezoelectrictransducer across the device, while vibrating at the

responsive frequency, until we detected a strong re-sponse at the gyroscope’s output.

The waveform generator was configured to cre-ate an on-off keying-modulated signal at its output.The carrier frequency of this output was a sine waveat a frequency close to the responsive frequency ofthe gyroscope of the victim device (typically be-tween 26 kHz and 28 kHz) and an amplitude of10 Vpk−pk. The modulating signal was the standardpseudorandom bit-sequence (PRBS) PN7, which iscreated with 7 bits of state and the generating poly-nomial G(X) = x7 + x6 + x0 .

The devices and software environments used inour experiment are listed in Table 2. As the ta-ble shows, we successfully evaluated devices frommultiple hardware vendors, running multiple oper-ating systems (Windows, iOS and Android) and us-ing both native applications and web browsers.

On the software side, we wrote a simple web-page that constantly queries the gyroscope usingJavaScript and uploads the measurements on de-mand to a web server. We also wrote a native An-droid app which queried the gyroscope at the high-est possible rate and uploaded its measurements tothe same web server. The web server, which weimplemented in node.js, simply time-stamped eachbatch of measurements and saved them to disk. Fi-nally, we analyzed the measurements using customscripts written in Matlab R2015a. In the analysisstep, we determined the optimal phase for detec-tion by cross-correlating the gyroscope signal witha locally-generated PN7 sequence, then applied asimple threshold-based detector to determine thevalues of each bit. Finally, we calculated the bit er-ror rate by counting how many bits were incorrectlydecoded by our method. As we state in Subsection4.1, it is certainly possible to improve this modu-lation scheme and increase the channel’s capacitywhile reducing its error rate.

5

Page 6: How to Phone Home with Someone Else's Phone: Information ... · mobile phone to exfiltrate arbitrary secrets across the Internet at a data rate of hundreds to thousands of bits per

Device Name Gyroscope Hardware Software Environment Max.Sam-plingRate

Apple iPhone 5s Unknown(STMicroelectronics?)

iOS 9.3 (Safari) 60 Hz

Samsung Galaxy S5 Invensense MP65M Android 5.1 (Chrome) 60 Hz- - Android 5.1 (Native App) 200 Hz

Microsoft Surface Pro 3 Unknown (Bosch Sensortec?) Windows 10 (IE Edge) 60 Hz

Table 2: Devices under test

Figure 5: Bit error rates for different devices

3.3 Evaluation Results

Figure 5 shows the bit error rates we achieved usingour basic decoder. The horizontal axis shows the bitrate chosen for the modulating bit sequence, whilethe vertical axis shows the average achievable biterror rate for this bit rate using our decoding setup.All bit error rates were measured when the deviceswere at rest on a flat surface. Our decoding setupachieved practical error rates on all three evaluatedhardware platforms, even at the highest samplingrates supported by the software setup. For exam-ple, a 60 bps sequence sent to the iPhone 5S wasreceived with an error rate of 11%. As expected,increasing the amount of samples per data bit, ei-ther by reducing the data rate or by increasing thesampling rate (by moving from a webpage to nativecode) resulted in a lower overall bit error rate. Aswe discuss in Subsection 4.1, the physical charac-teristics of the channel indicate that much higher bitrates can be achieved using advanced modulationtechniques and a better decoder. It is important tonote that the victim cannot detect that exfiltrationis in progress – the frequency of the audio signalgenerated as part of our attack is far beyond the hu-man hearing range, and its amplitude is too low tobe detected as motion.

Figure 6 shows the bit error rate exhibited byour stealthy channel under various user activity pro-files. All of the measurements were carried out ona Samsung Galaxy S5 device with a piezoelectrictransducer glued to its plastic back cover, runningthe native app at a data rate of 20 bits per second.

Figure 6: Bit error rates for various activities

Bit error rates were first measured when the phonewas at rest on a flat table. The experiment was re-peated while the phone was playing music throughits speakerphone. Then, it was repeated while thephone was vibrating as a result of an incoming call.Next, the bit error rate was measured while thephone was being shaken vigorously. Finally, thephone was placed in the front pants pocket of an ex-perimenter and the data rates were recorded whilethe experimenter was standing idly, walking at 2km/h and running at 6 km/h. As the results show,we achieve virtually error-free communications un-der low to moderate amounts of phone motion, butvigorous motions such as running or shaking makeour scheme less practical to use, at least using thebasic decoder evaluated in this work.

4 Discussion

Our results show how a low-powered implant cantake advantage of a mobile phone’s sensors andconnectivity to exfiltrate secret data. We believethat the methods we discuss in this paper are moretroubling than conventional exfiltration methodssuch as radio backscatter, since they allow the in-telligence agency to monitor many implants at thesame time at a low cost, with no risk of exposureto their field agents. State actors typically spreadthousands of implants through supply-chain inter-vention or other methods, but only interrogate a fewdozens due to the operational costs and risks in-volved with signal collection. This new attack vec-tor changes the economics of state-sponsored at-tacks, and may induce malicious intelligence agen-cies to activate all of the implants they distribute,

6

Page 7: How to Phone Home with Someone Else's Phone: Information ... · mobile phone to exfiltrate arbitrary secrets across the Internet at a data rate of hundreds to thousands of bits per

not only a selected few, thus drastically raising theamount of people targeted by hardware-based spy-ing methods.

4.1 Capacity and Power BoundsThe channel capacity according to Shannon-Hartley theorem is:

C = BW log2 (1+SNR)

Where BW is the bandwidth of the channel in Hzand SNR is the signal power to noise power ra-tio. To estimate the error-free capacity limit ofthe Samsung Galaxy S5 phone piezo-gyro channel,we start by measuring its bandwidth. A Keysight33509B function generator was operated as a volt-age source to excite the piezoelectric crystal with a10 V amplitude sine sweep. The noise was mea-sured in a quiet room during night. To further sup-press outer vibration interference, the phone wasplaced on top of a passive vibration isolation plat-form (model 25BM-4 made by Minus k Technol-ogy). The noise measurements results are presentedin Table 3 for the average of 20 measurements of100 seconds each2.

We have found that since the data output fre-quency is considerably lower than the analog band-width around the excitation frequency, the commu-nication channel’s bandwidth is limited by the gy-roscope sampling rate. As indicated in the Table,the theoretical capacity of the gyroscope channelis more than 1 kbps, even using a low samplingrate of 60 Hz, and it grows to over 4 kbps as thesampling rate increases. This compares well withother sensor-based exfiltration schemes based onthe phone’s microphone or magnetometer [7, 3]

We note that the results at Table 3 are given onlyfor the the single gyroscope channel which pro-duced the highest SNR. Combining the outputs ofmultiple channels may further improve the signal-to-noise ratio. To approach the theoretical capacityin Table 3, one can for example use high order mod-ulation schemes or OFDM, combined with a highefficiency code such as turbo or LDPC.

In the second part of the study, we examined theeffect of the excitation voltage and the power con-sumption of the piezoelectric crystal on the channelcapacity. The crystal was excited by a sine sweepwith different amplitudes while the gyroscope re-sponse was measured at a sampling rate of 200 Hz.The current was measured by a low-noise currentprobe (model i-prober 520 made by Aim-TTi In-struments). The results are presented in Figure 7.

As shown in the Figure, the gyroscope-basedtransmission channel achieves good data rates evenat power levels as low as -21 dBm (7µW). This sug-gests that it should be possible to power the exfil-tration device using passive power harvested from

2The sensor readings returned by Firefox were multiplied bythe software by a constant factor. This does not affect the ulti-mate SNR calculations.

Figure 7: Channel capacity as a function of transmitpower (60 samples per second)

the phone or from other nearby radiation sources,allowing an implant to operate without a battery.

4.2 CountermeasuresSeveral aspects of the phone’s attack model worktogether to make the attack possible. Disruptingany of them can be an effective countermeasure tothe attack we described.

The most critical contributor to the effectivenessof our attack is the fact that untrusted apps and webpages are able to access the gyroscope at will. Anatural response to this risk would be to requirepermission to access the gyroscope. While effec-tive, we believe this additional security step will notsolve the problem altogether: in contrast to securitywarnings for issues such as expired or revoked cer-tificates, which are reliable indicators of risky sit-uations, it is quite reasonable for a webpage (suchas a game) to ask permission to use the gyroscope.Therefore, users may not have enough informationto decide whether gyroscope access should be al-lowed or denied in certain situations. Nevertheless,even if this mechanism will only partially mitigatethe risk, we still consider it worth deploying.

Another possible mitigation would be to preventweb pages from accessing the gyroscope if theyare judged risky according to some heuristic. Webpages already have a method to limit the permis-sions of embedded content using the iframe sand-box attribute [13, §4.7.2], and an extension to thisattribute to limit sensor access would be a goodaddition. In another promising move in this di-rection, Google announced in September 2015 thatthey are intending to limit access to several pow-erful features, including device motion and orien-tation, to web pages delivered from insecure ori-gins [2]. The first powerful feature which was re-moved was the geolocation API, which is not avail-able to insecure origins starting from Chrome ver-sion 50 (deployed April 2016). While there is nocurrently planned deployment date for the restric-tion to the gyroscope, the current version of theChrome browser already displays a warning mes-sage in the developer console whenever the gyro-scope is accessed using JavaScript from an insecureorigin. Once this countermeasure is in place, an ad-versary will be required to obtain a certificate for its

7

Page 8: How to Phone Home with Someone Else's Phone: Information ... · mobile phone to exfiltrate arbitrary secrets across the Internet at a data rate of hundreds to thousands of bits per

Samplingrate (Hz)

Software Signal(Rad/s)

Noise(mRad/s)

SNR(dB)

Capacity(bps)

60 Chrome 2.09 0.853 67.7 1351100 Firefox 112 53 66.4 2209200 Native 2.17 0.92 67.4 4481

Table 3: Channel capacity for different sampling rates

C&C server from an external certification authoritybefore it can access the gyroscope, a fact which willsubstantially increase the cost and risk of creatingand deploying the command and control server.

A countermeasure suggested by Michalevsky etal. [9] to counter other gyroscope-based attackswas to lower the rate at which apps can sample theon-board gyroscope. Unfortunately the attacks de-scribed in our paper are possible even if the sam-pling rate of the gyroscope is throttled to its low-est practical value of 20 Hz. Similarly, reducingthe signal-to-noise ratio of the gyroscope by filter-ing the signal or intentionally jittering the outputwill only reduce the capacity of the channel but noteliminate it altogether.

Physical modifications to the gyroscope itselfcan also mitigate the problem – analog anti-aliasingfilters at the entrance to the gyroscope’s internalsampling circuits can reject the high-frequency os-cillations at the responsive frequency, while me-chanical damping or sound isolation can reduce theeffects of acoustic noise on the gyroscope. Sadly,these countermeasures tend to increase the cost, thepower consumption and the physical dimensionsof the gyroscope, making it highly unlikely thatthey will be integrated into gyroscopes destined forphones or other consumer devices.

An interesting countermeasure could be based onsensor fusion – the phone has multiple locationand orientation sensors (accelerometer, gyroscope,magnetic compass, GPS, etc.). Intentional acousticvibration corrupts only the readings from the gyro-scope, but leaves all other readings unaffected. Itmay be possible to design a mechanism that corre-lates readings from multiple sensors and suppressesthe readings from the gyroscope if they do not agreewith outputs from other sensors on the phone.

From the user’s standpoint, perhaps the bestcountermeasure would be to consider the closeperimeter of the phone to be as sensitive as thephone itself. Thus, security-conscious users shouldbe careful of using screen protectors, phone casesor privacy stickers with a questionable pedigree.

4.3 Benevolent use of Gyroscope-based Modulation

The very features of the gyroscope communica-tions channel which make it so desirable for ma-licious adversaries – namely, its ubiquity, its mini-mal power requirement, and its stealthiness – makeit ideal for beneficial uses, most immediately for

two-factor authentication. In a common two-factor authentication scenario, users are given ansecure device, called an authenticator, which dis-plays a constantly-changing numeric code, and areexpected to type in this code in addition to theirpassword as they log in to a high-security servicesuch as a bank or health care provider. The fact thatusers must manually copy the numeric code fromthe authenticator into the login page is a cause foruser errors and frustration. In addition, the digitsdisplayed by the authenticator must be large to beread by human users. This places a lower bound onthe size of the authenticator and exposes the schemeto snooping attacks, either by a shoulder-surfing ad-versary or by a camera.

Using gyroscope communications instead ofmanual key entry is an excellent way of address-ing these flaws – instead of a digital display, the au-thenticator can contain a small piezoelectric trans-ducer which transmits amplitude-modulated data atthe gyroscope’s responsive frequency. A human isnot required to read the audio output, resulting in adevice which can be as small and light as desired.In addition, the use of gyroscope-based communi-cations can reduce the opportunity for user errorand reduce the risk of outside snooping. Most im-portantly, no hardware or software changes must bemade to currently deployed phones to enable thisbehavior.

The authors of [7] suggested several usesfor their magnetic-based communications schemewhich can also be applied here – namely, ourscheme can also be used as a replacement for QRcodes, and it can also be used for device pair-ing, assuming both devices are equipped with high-frequency speakers as well as gyroscopes.

4.4 Responsible Disclosure

A preliminary draft version of this report has beenshared with the vendors of the hardware and soft-ware we evaluated. Browser vendors were hesi-tant to limit programmatic access to the gyroscope,since this step would potentially break the function-ality of many existing webpages while providing asecurity benefit only in very limited cases. The sen-sor working group at the web standards body W3Cwere more receptive, and notified us that the nextgeneration sensor API will include support for lim-iting sensor access to secure contexts. In addition,the new sensor API is planned to offer user moreexplicit control over sensor permissions.

8

Page 9: How to Phone Home with Someone Else's Phone: Information ... · mobile phone to exfiltrate arbitrary secrets across the Internet at a data rate of hundreds to thousands of bits per

4.5 Related Work

Several existing works have explored the suscep-tibility of gyroscope sensors to external noise andtheir potential use for malicious intent. Son etal. [11] demonstrated how intentional acoustic vi-brations can corrupt the gyroscope readings in aremote-control drone, causing it to crash. The au-thors also characterized a large variety of MEMSgyroscopes, showing that the precise effect of in-tentional acoustic vibration depended on the makeand model of the MEMS gyroscope. The work ofSon et al. did not consider the data bearing capac-ity of the intentional noise channel. Michalevskyet al. presented a work titled “Gyrophone” [9],in which a mobile phone’s gyroscope was treatedas a low-frequency microphone and used to recordand recognize speech. The experimental evalua-tion in Michalevsky et al.’s paper was done withan externally-powered standalone speaker systemwith a peak power rating of 50 watts, playing backrecorded speech at a high sound power level. Incontrast, the very short distance between the piezo-electric transducer and the gyroscope in our attack,combined with the gyroscope’s enhanced responseat its responsive frequency, allows us to use an ex-tremely low-power audio signal, on the order ofseveral microwatts, as we showed in Subsection4.1. This allows our exfiltration mechanism to bebattery powered, or even passively powered usingenergy harvesting techniques similar to those usedby RFID tags. We note that while several of thecountermeasures suggested by Michalevsky et al.will also be effective in mitigating our attack, re-ducing the sampling rate of the gyroscope will onlyslow down the exfiltration process by some factor,but not prevent it altogether.

In 2014 Jiang et al. published a work discussinghow a phone’s magnetic compass can be used forlow-rate communication purposes [7]. Their workis similar to ours since both use a mobile phone’ssensors for short range communications. However,the work of Jiang et al. did not consider the ad-versarial setting we discuss in this work, wherea malicious party is using the sensor to commu-nicate without the victim’s awareness or permis-sion; in fact, due to the Android permission model,the magnetometer cannot be used for this purposesince using it requires additional app permissions.In general, the modulating magnetic field can begenerated from a greater distance from the phone’ssensor. Conversely, if the magnetic field modulatoris placed in close proximity to the phone’s magne-tometer it can be made much smaller than a piezo-electric transducer. However, the signal to noise ra-tio of the magnetic channel is considerably lowerthan that of the gyroscope-based channel, result-ing in a lower potential bit rate. The magnetometeris also more sensitive to noise generated by powersupplies, engines, and other similar devices.

The use of ultrasonic audio as a covert commu-

nications method was suggested and evaluated byHanspach and Goetz in 2013 [6]. Also in 2013, se-curity researcher Dragos Ruiu reported on a typeof malware named BADBIOS which uses ultra-sonic communications as a command and controlchannel. In 2014 Deshotels demonstrated a covertchannel between two mobile devices based on au-dio waves in the 18 kHz - 19 kHz frequency range,using the phone’s internal speaker and microphone[3]. This covert channel achieved a bit rate of over300 bits per second at distances of over 10 meters.We note that the iOS security model does not al-low untrusted web pages to play audio unless theuser performs some action first (such as touchingthe screen), while untrusted applications are by de-fault prevented from using the microphone at all.

4.6 Conclusion

In this work we demonstrated and evaluated a low-cost exfiltration method based on intentional acous-tic vibration. This method allows an implant to takeadvantage of the gyroscope sensor of an adjacentmobile device to exfiltrate secrets to a commandand control center. This method has the potentialof reducing the operational risk involved in operat-ing implants, a fact that may dramatically expandtheir use by malicious state agencies. Security-conscious users should not allow questionable ac-cessories, such as phone cases, to be in close phys-ical contact with their phones.

References

[1] APPELBAUM, J., GIBSON, A., GUARNIERI,C., MÜLLER-MAGUHN, A., POITRAS, L.,ROSENBACH, M., RYGE, L., SCHMUNDT,H., AND SONTHEIMER, M. The digital armsrace: NSA preps america for future battle.Der Spiegel 1, 17 (Jan 2015).

[2] CHROMIUM SECURITY TEAM.Deprecating powerful featureson insecure origins. Online athttps://www.chromium.org/Home/chromium-security/deprecating-powerful-features-on-insecure-origins.

[3] DESHOTELS, L. Inaudible sound as a covertchannel in mobile devices. In 8th USENIXWorkshop on Offensive Technologies, WOOT’14, San Diego, CA, USA, August 19, 2014.(2014), S. Bratus and F. F. X. Lindner, Eds.,USENIX Association.

[4] GENKIN, D., PACHMANOV, L., PIPMAN, I.,TROMER, E., AND YAROM, Y. ECDSA keyextraction from mobile devices via nonintru-sive physical side channels. IACR CryptologyePrint Archive 2016 (2016), 230.

9

Page 10: How to Phone Home with Someone Else's Phone: Information ... · mobile phone to exfiltrate arbitrary secrets across the Internet at a data rate of hundreds to thousands of bits per

[5] HAAGSMA, L. Deep dive into QUAN-TUM INSERT. Online at https://blog.fox-it.com/2015/04/20/deep-dive-into-quantum-insert/.

[6] HANSPACH, M., AND GOETZ, M. On covertacoustical mesh networks in air. JCM 8, 11(2013), 758–767.

[7] JIANG, W., FERREIRA, D., YLIOJA, J.,GONÇALVES, J., AND KOSTAKOS, V. Pulse:low bitrate wireless magnetic communicationfor smartphones. In The 2014 ACM Con-ference on Ubiquitous Computing, UbiComp’14, Seattle, WA, USA, September 13-17, 2014(2014), A. J. Brush, A. Friday, J. A. Kientz,J. Scott, and J. Song, Eds., ACM, pp. 261–265.

[8] MARCZAK, B., WEAVER, N., DALEK, J.,ENSAFI, R., FIFIELD, D., MCKUNE, S.,REY, A., SCOTT-RAILTON, J., DEIBERT, R.,AND PAXSON, V. An analysis of china’s“great cannon”. In Free and Open Com-munications on the Internet (FOCI) (2015),USENIX.

[9] MICHALEVSKY, Y., BONEH, D., ANDNAKIBLY, G. Gyrophone: Recognizingspeech from gyroscope signals. In Proceed-ings of the 23rd USENIX Security Symposium,San Diego, CA, USA, August 20-22, 2014.(2014), K. Fu and J. Jung, Eds., USENIX As-sociation, pp. 1053–1067.

[10] SANGER, D. E., AND SHANKER, T. NSAdevises radio pathway into computers. TheNew York Times 1, 15 (Jan 2014).

[11] SON, Y., SHIN, H., KIM, D., PARK, Y.,NOH, J., CHOI, K., CHOI, J., AND KIM,Y. Rocking drones with intentional soundnoise on gyroscopic sensors. In 24th USENIXSecurity Symposium, USENIX Security 15,Washington, D.C., USA, August 12-14, 2015.(2015), J. Jung and T. Holz, Eds., USENIXAssociation, pp. 881–896.

[12] UNITED STATES DEPARTMENT OF STATEBUREAU OF DIPLOMATIC SECURITY. His-tory of the Bureau of Diplomatic Security ofthe United States Department of State. GlobalPublishing Solutions, 2011.

[13] WORLD WIDE WEB CONSORTIUM.The iframe element. Online athttps://www.w3.org/TR/html5/embedded-content-0.html#attr-iframe-sandbox.

[14] ZARRAS, A., KAPRAVELOS, A., STRINGH-INI, G., HOLZ, T., KRUEGEL, C., ANDVIGNA, G. The dark alleys of madisonavenue: Understanding malicious advertise-ments. In Proceedings of the 2014 Internet

Measurement Conference, IMC 2014, Van-couver, BC, Canada, November 5-7, 2014(2014), C. Williamson, A. Akella, and N. Taft,Eds., ACM, pp. 373–380.

[15] ZHOU, W., ZHOU, Y., JIANG, X., ANDNING, P. Detecting repackaged smartphoneapplications in third-party android market-places. In Second ACM Conference on Dataand Application Security and Privacy, CO-DASPY 2012, San Antonio, TX, USA, Febru-ary 7-9, 2012 (2012), E. Bertino and R. S.Sandhu, Eds., ACM, pp. 317–326.

10