Sensi&ve Informa&on Tracking in Commodity IoT · Path-sensivity ‣ Collects the evaluaon results...

18
Sensi&ve Informa&on Tracking in Commodity IoT Z. Berkay Celik , Leonardo Babun, Amit K. Sikder, Hidayet Aksu, Gang Tan, Patrick McDaniel, and Selcuk Uluagac August 17 th , 2018 @ USENIX Security

Transcript of Sensi&ve Informa&on Tracking in Commodity IoT · Path-sensivity ‣ Collects the evaluaon results...

Page 1: Sensi&ve Informa&on Tracking in Commodity IoT · Path-sensivity ‣ Collects the evaluaon results of the predicates ‣ Discards infeasible paths Context-sensi&vity ‣ Implements

Sensi&ve Informa&on Tracking in Commodity IoT

Z. Berkay Celik, Leonardo Babun, Amit K. Sikder, Hidayet Aksu, Gang Tan, Patrick McDaniel, and Selcuk Uluagac

August 17th, 2018 @ USENIX Security

Page 2: Sensi&ve Informa&on Tracking in Commodity IoT · Path-sensivity ‣ Collects the evaluaon results of the predicates ‣ Discards infeasible paths Context-sensi&vity ‣ Implements

2

Internet of Things (IoT) enables the future

Smart Homes

Healthcare

Smart Energy

Smart Farms

Page 3: Sensi&ve Informa&on Tracking in Commodity IoT · Path-sensivity ‣ Collects the evaluaon results of the predicates ‣ Discards infeasible paths Context-sensi&vity ‣ Implements

IoT is not magic

3

IoT applica&on

Mobile app Connected devices

Automa&on

Page 4: Sensi&ve Informa&on Tracking in Commodity IoT · Path-sensivity ‣ Collects the evaluaon results of the predicates ‣ Discards infeasible paths Context-sensi&vity ‣ Implements

4

IoT enables the future (and a whole lot of problems)

When you live home … Whether the door is locked or not…

Page 5: Sensi&ve Informa&on Tracking in Commodity IoT · Path-sensivity ‣ Collects the evaluaon results of the predicates ‣ Discards infeasible paths Context-sensi&vity ‣ Implements

Sensi&ve data in IoT apps

5

•  Look inside of IoT apps to determine how they use privacy sensi&ve data

‣ Device states

‣ Device informa&on

‣ User inputs

‣ Loca&on (physical and geo-loca&on)

Problem: Users lack visibility into who sees their sensi&ve informa&on

Saint

Page 6: Sensi&ve Informa&on Tracking in Commodity IoT · Path-sensivity ‣ Collects the evaluaon results of the predicates ‣ Discards infeasible paths Context-sensi&vity ‣ Implements

Sta&c taint analysis

6

•  Sta&c taint analysis is a technique that tracks informa&on dependencies from an origin

•  Conceptual idea: ‣ Taint source

‣ Taint propaga&on

‣ Taint sink

Saint

Goal: Analyze app source code to determine when privacy sensi&ve informa&on leaves the IoT app

Page 7: Sensi&ve Informa&on Tracking in Commodity IoT · Path-sensivity ‣ Collects the evaluaon results of the predicates ‣ Discards infeasible paths Context-sensi&vity ‣ Implements

Challenges

7

•  Current data tracking tools are insufficient to address these challenges

Saint

‣ IoT programming pla^orms are diverse ‣ Iden&fying sensi&ve sources in IoT apps is quite subtle ‣ Each IoT pla^orm has its idiosyncrasies that require special treatment

Page 8: Sensi&ve Informa&on Tracking in Commodity IoT · Path-sensivity ‣ Collects the evaluaon results of the predicates ‣ Discards infeasible paths Context-sensi&vity ‣ Implements

Saint ●  Saint is integra&on of sta&c taint

tracking into the IoT apps

8

SainT

IoT App

source code

Perform data flow analysis

Obtain IR

(source, sink and entry point detec&on)

Saint analyzer

Report discovered data flows

Saint’s taint sources/

sinks

Saint

SaintAnalysisConsole

hdp://saint-project.appspot.com/

def ini&alize() { ecobee.poll() subscribe(app, appTouch) }

Taintsink:Internet --- hdpPUT() in Line 123 Dataflowpath1:sendSms --> $DeviceName [Device Informa&on] Finding#:Device Informa&on transmided [Developer-defined URL]

AnalysisOutput Stacktrace

1

2 3 4

Page 9: Sensi&ve Informa&on Tracking in Commodity IoT · Path-sensivity ‣ Collects the evaluaon results of the predicates ‣ Discards infeasible paths Context-sensi&vity ‣ Implements

h1(){s.on()d.unlock()defbetween=y()if(between){z() }}

y(){returntimeOfDayIsBetween(fromTime,toTime)}

z(){sendSms(c,“...”) } 9

input(p,presenceSensor,type:device)input(s,switch,type:device)input(d,door,type:device)input(toTime,time,type:user_defined)input(fromTime,time,type:user_defined)input(c,contact,type:user_defined)

subscribe(p,“present”,h1)

Devices

z

y

h1

Events

Computa&on

Saint

Saint Analyzer

IR

IoT pla^orm programming language

Groovy DSL Python …

From app source code to IR

Page 10: Sensi&ve Informa&on Tracking in Commodity IoT · Path-sensivity ‣ Collects the evaluaon results of the predicates ‣ Discards infeasible paths Context-sensi&vity ‣ Implements

input(ther,thermostat,device)input(thld,number,user_defined) definitialize(){subscribe(app,appHandler)}

defappHandler(evt){foo()}

deffoo(){temp=ther.latestValue("temperature")tempCel=convert(temp)+thldbar(tempCel)}

defconvert(t){return((t-32)*5)/9)}

defbar(t){ther.setHeatingSetpoint(t) sendSMS(adversary,“setto${t}”)}

1:2:3:4:5:

6:7:8:

13:14:15:16:17:

18:19:20:

21:22:23:24:

Backward taint tracking

‣ Iden&fy sensi&ve data flow paths

23:t

(23:t,16:[tempCel])

(16: tempCel, 15: [temp, thld])

(15: temp, 14:[ ther.latestValue])

Dependence rela&on

10

Saint

1

2

3

4

Page 11: Sensi&ve Informa&on Tracking in Commodity IoT · Path-sensivity ‣ Collects the evaluaon results of the predicates ‣ Discards infeasible paths Context-sensi&vity ‣ Implements

●  Path-sensi&vity ‣ Collects the evalua&on results of the predicates ‣ Discards infeasible paths

●  Context-sensi&vity ‣ Implements depth-one call-site sensi&vity ‣ Discards paths not matching calls and returns

●  Implicit flows ‣ Determines whether predicates at condi&onal branches depends on a tainted value ‣ Taints all elements in the condi&onal branch

Saint

Analysis Sensi&vity and Implicit Flows

Page 12: Sensi&ve Informa&on Tracking in Commodity IoT · Path-sensivity ‣ Collects the evaluaon results of the predicates ‣ Discards infeasible paths Context-sensi&vity ‣ Implements

Algorithms for IoT-specific idiosyncrasies

12

counter=state.switchCounter//state variable if(counter){deviceactions}

"$methodName"()//call by reflec&on deffoo(){//add as possible call target }defbar(){//add as possible call target }

‣ State variables ‣ Field-sensi&ve analysis

‣ Web service apps ‣ Allows external en&&es to access devices

‣ Call by reflec&on ‣ Add all methods as possible call targets

•  On-demand algorithms for analysis precision

mappings{//web-service apps path("/switches"){action:[GET:"listSwitches"]}deflistSwitches(){returnit.currentValue("switch”)}

Saint

Page 13: Sensi&ve Informa&on Tracking in Commodity IoT · Path-sensivity ‣ Collects the evaluaon results of the predicates ‣ Discards infeasible paths Context-sensi&vity ‣ Implements

•  Implemented Saint for SmartThings IoT pla^orm •  Selected 168 official and 62 third-party market apps •  92 official and 46 third-party apps expose at least one kind of sensi&ve data

13

Saint

Applica&on Study

Apps Internet SMS Both Total

Official 24 63 5 92

Third-party 10 36 - 46

Page 14: Sensi&ve Informa&on Tracking in Commodity IoT · Path-sensivity ‣ Collects the evaluaon results of the predicates ‣ Discards infeasible paths Context-sensi&vity ‣ Implements

14

Saint

What type of privacy-sensi&ve informa&on leaves IoT apps?

Applica&on Study

0102030405060708090

100

%Ap

ps

Device state Device info. User input Location State variable

1. 2. 1.3. 3.2. 4.4. 5.

#57 #29 #28

#4

#34#76

5.Offical apps

#60

#10#9

Third-party apps

#12

3. 4. 5.2.1.

Official apps Third-party apps

% A

pps

Page 15: Sensi&ve Informa&on Tracking in Commodity IoT · Path-sensivity ‣ Collects the evaluaon results of the predicates ‣ Discards infeasible paths Context-sensi&vity ‣ Implements

15

Who sees privacy-sensi&ve informa&on?

Recipient defined by Content defined by

Taint Sinks Apps User Developer External User Developer External

Messaging Official 154 0 0 5 149 0

Third-party 67 0 0 4 63 0

Internet Official 2 48 44 0 54 40

Third-party 0 13 12 0 13 12

sendSMS(phoneNumber, “kids $presence ’’) hdpPost(URL, “kids $presence”)

Recipient Content

Saint

Page 16: Sensi&ve Informa&on Tracking in Commodity IoT · Path-sensivity ‣ Collects the evaluaon results of the predicates ‣ Discards infeasible paths Context-sensi&vity ‣ Implements

Summary

16

‣ Introduced Saint, a sta&c analysis tool that iden&fies sensi&ve data flows in IoT apps ‣ Evaluated Saint on 230 SmartThings apps ‣ Found %60 of the analyzed apps includes sensi&ve data flows ‣ Consumers and developers can use Saint to iden&fy poten&al privacy risks ‣ Saint console is available: hdp://saint-project.appspot.com/

Saint

Page 17: Sensi&ve Informa&on Tracking in Commodity IoT · Path-sensivity ‣ Collects the evaluaon results of the predicates ‣ Discards infeasible paths Context-sensi&vity ‣ Implements

17

V.1.0.1 Released May 2018

27 data leaks

28 security/safety viola&ons

15 adacks migrated from mobile phone

security

500+ official and third party apps

IoTBench

hdps://github.com/IoTBench/

Page 18: Sensi&ve Informa&on Tracking in Commodity IoT · Path-sensivity ‣ Collects the evaluaon results of the predicates ‣ Discards infeasible paths Context-sensi&vity ‣ Implements

Thank you for listening!

18

hdps://beerkay.github.io

berkaycelik @ZBerkayCelik

?

hdps://github.com/LeoBabun

leonardo-babun @BabunLeo