Security Analysis of Emerging Smart Home Applica6ons
Earlence Fernandes, Jaeyeon Jung, Atul Prakash
Presented by: Gohar Irfan Chaudhry
IEEE Security and Privacy 24 May 2016
Security Analysis of Emerging Smart Home Applica6ons Earlence - - PowerPoint PPT Presentation
Security Analysis of Emerging Smart Home Applica6ons Earlence Fernandes, Jaeyeon Jung, Atul Prakash Presented by: Gohar Irfan Chaudhry IEEE Security and Privacy 24 May 2016 Smart Door Locks nsors Connected Ovens Plugs IP Cameras Emerging
Earlence Fernandes, Jaeyeon Jung, Atul Prakash
Presented by: Gohar Irfan Chaudhry
IEEE Security and Privacy 24 May 2016
nsors Connected Ovens art TVs Plugs IP Cameras Smart Door Locks
2
3
Flooding [1] Remotely determine e Ome for Burglary [1,2] OR Denning et al., Computer Security and the Modern Home, CACM’13 FTC Internet of Things Report’15
4
Access Control
5
Trigger-AcOon Programmin
SmartThings API
Security Analysis Area Finding Overprivilege in Apps Two Types of AutomaOc Overprivilege Event System Security Event Snooping and Spoofing Third-party IntegraOon Safety Incorrect OAuth Can Lead to AUacks External Input SaniOzaOon Groovy Command InjecOon AUacks API Access Control No Access Control around SMS/Internet API Empirical Analysis of 499 Apps > 40% of apps exhibit overprivilege of atleast one type Proof of Concept AIacks
6
Pincode InjecLon and Snooping, Disablin VacaLon Mode, Fake Fire Alarms
WiFi ZWave
SmartThings Companion App
Configure Control
SmartThings Cloud Plagorm SmartApp SmartDevice Groovy-Based Sandbox Groovy-Based Sandbox Capability System [Cmd/AUr] [Events]
HTTPS GET/PUT
Internet API SMS API
7
Untrusted SmartApp ZWave Lock SmartDevice
capability.lock capability.lockCodes capability.baFery … Send commands Read/set aUributes Receive events ility Commands AIributes lity.lock lock(), unlock() lock (lock status) lity.baUery N/A baUery (baUery status)
Usability Simpler Coarser CapabiliOes Security Very Granular CapabiliOes Ease of Development Expressive FuncOonality
8
Device EnumeraOon
ni6on(name: “DemoApp”, espace: “com.tes6ng”, category: “U6lity”) uery the user for capabili6es ferences { sec6on(“BaFery-Powered Devices”) { input “dev”, “capability.baFery”, 6tle: “Select baFery powered devices you wish to authorize”, mul6ple: true }
9
ZWave WiFi
SmartThings Companion App
Configure Control
SmartThings Cloud Plagorm SmartApp SmartDevice Groovy-Based Sandbox Groovy-Based Sandbox Capability System [Cmd/AUr] [Events]
HTTPS GET/PUT
Internet API SMS API
10
Coarse SmartApp-SmartDevice Binding
SmartApp input “dev”, “capability.baFery” SmartDevice1 [ZWave Lock] capability.battery capability.lock capability.refresh SmartDevice2 [Smoke Sensor] capability.battery capability.smoke capability.refresh Physical Lock Physical Smoke Sensor
Coarse-Grained CapabiliOes
can also issue “unlock”
Overprivilege Increases AUack Surface of the Home
11
ZWave WiFi
SmartThings Companion App
Configure Control
SmartThings Cloud Plagorm SmartApp SmartDevice Capability System [Cmd/AUr] [Events]
HTTPS GET/PUT
Internet API SMS API
Groovy-Based Sandbox Groovy-Based Sandbox
12
SmartApp ZWave Door Lock 71c9344e-6bea-4ae8-993a-28a7817a7d9e subscribe dev, “door.unlock”, handler
13
handler(EventData: {unlocked, Ome: 9AM})
any event that device generates
that device without gaining any of the capabiliOes the device supports
SmartApp ZWave Door Lock 71c9344e-6bea-4ae8-993a-28a7817a7d9e subscribe dev, “door.unlock”, handler
14
handler(EventData: {unlocked, Ome: 9AM})
15
SmartThings Cloud Plagorm SmartApp SmartDevice Capability System [Cmd/AUr] [Events]
HTTPS GET/PUT
Internet API SMS API
[1] Chen et al., OAuth DemysOfied for Mobile ApplicaOon Developers, CCS’14
HTTP endpoints protected by OAuth; Incorrect implementaOon can lead to remote aUacks [1]
Groovy-Based Sandbox Groovy-Based Sandbox
SmartThings Cloud Plagorm SmartApp SmartDevice Capability System [Cmd/AUr] [Events]
HTTPS GET/PUT
Internet API SMS API
Unsafe use of Groovy Dynamic Method InvocaOon: Apps can be tricked into performing unintended acOons
16
def foo() { … } def str = “foo”
“$str”() Groovy-Based Sandbox Groovy-Based Sandbox
SmartThings Cloud Plagorm SmartApp SmartDevice Capability System [Cmd/AUr] [Events]
HTTPS GET/PUT
Internet API SMS API
17
Can be used to leak data arbitrarily
Groovy-Based Sandbox Groovy-Based Sandbox
Coarse-Grained CapabiliOes
Requested Cmds/Attrs
Coarse SmartApp-SmartDevice Binding
Granted CapabiliOes
18
Used Cmds/ AUrs Used CapabiliOes
19
can’t do instrumentaOon
Bytecode uses reflecOon (Groovy Meta Object Protocol)
(commands/aUributes)
endpoint, which, if given a device returns capability details
20
Documented Completed Commands 65 93 AUributes 60 85 Reason for Overprivilege Number of Apps Coarse-grained Capability 276 (55%) Coarse SmartApp-SmartDevice Binding 213 (43%) Overprivilege Usage Prevalence (Coarse Binding) 68 (14%)
21
Total number of SmartDevices 132 Number of SmartDevices raising events using createEvent and sendEvent. Such events can be snooped on by SmartApps 111 Total number of SmartApps 499 Number of apps using potenOally unsafe Groovy dynamic method invocaOon 26 Number of OAuth-enabled apps, whose security depends on correct implementaOon of OAuth 27 Number of apps using unrestricted SMS APIs 131 Number of apps using unrestricted Internet APIs 36
22
AIack DescripLon AIack Vectors Physical World Impact Backdoor Pincode InjecOon AUack Command injecOon into exisOng WebService SmartApp; Overprivilege; OAuth impl. flaws Enabling physical entry; Thep Door Lock Pincode Snooping AUack Stealthy baUery-level monitoring app; Overprivilege; leak data using SMS Enabling physical entry; Thep Disabling VacaOon Mode AUack AUack app with no capabiliOes; Misusing logic of benign app; Event Spoofing Thep; Vandalism Fake Alarm AUack AUack app with no capabiliOes; Event spoofing; Misusing logic of benign app MisinformaOon; Annoyance
Overprivilege Command InjecOon OAuth Compromise Event Spoofing Unrestricted SMS API Pincode InjecOon Pincode Snooping Disabling VacaOon Mode Fake CO Alarm
lar ExisOng SmartApp Android companion Unintended acOon of tCode() on lock Stealthy malware SmartApp; ONLY requests capability.baUery Malware SmartApps with no capabiliOes; Misuses logic of exisOng SmartApps with fake events
21
24
[1] Felt et al., I’ve got 99 problems, but vibraOon ain’t one: A survey of smartphone users’ concerns, SPSM’12
28
WebService SmartApp
HTTP PUT HTTP GET client_id client_secret
mappings { path(“/devices/:id”) { ac6on: [ PUT: “updateDevice” ] } def updateDevice() { def cmd = request.JSON.command def args = request.JSON.arguments // code truncated device.”$cmd”(*args) } { command: setCode, arguments: [3, ‘5500’] }
hUps://graph.api.smarUhings.com/oauth/authorize?response type=code&client_id=REDACTED&scope=app& irect_uri=hUp%3A%2F%2FssmarUhings.appspot.com
Open Redirector
29
39
Lock Code Manager App ZWave Lock Device Handler SmartThings Hub BaUery Monitor App setCode(‘5500’)
28
codeReport event zwave.userCodeV1.userCodeSet zwave.userCodeV1.userCodeGet subscribe(‘codeReport’) [Possible due to overprivilege] ZWave commands and reports
29
Samsung SmartThings; Challenge: Blackbox Cloud System
Binding
imply; 43% get capabiliOes they did not explicitly request
in vezng process and developer best pracOces for Groovy Strings (Apr 2016); Discussion on improvements to capability system (May 2016)
Samsung SmartThings
Binding
imply; 43% get capabiliOes they did not explicitly request
in vezng process and developer best pracOces for Groovy Strings (Apr 2016); Discussion on improvements to capability system (May 2016)
24
hIps://iotsecurity.eecs.umich.edu Earlence Fernandes