The Pennsylvania State University the Graduate
Total Page:16
File Type:pdf, Size:1020Kb
THE PENNSYLVANIA STATE UNIVERSITY THE GRADUATE SCHOOL STATE ENDORSEMENT IN THE SMART HOME IOTIVITY FRAMEWORK A Thesis in Computer Science and Engineering by Kirti Jagtap © 2020 Kirti Jagtap Submitted in Partial Fulfillment of the Requirements for the Degree of Master of Science August 2020 The thesis of Kirti Jagtap was reviewed and approved by the following: Trent Jaeger Professor of Computer Science and Engineering Thesis Advisor Mahanth Gowda Assistant Professor of Computer Science and Engineering Chitaranjan Das Distinguished Professor of Computer Science and Engineering Head of the Department of Computer Science and Engineering ii Abstract The increasing use of smart home devices has resulted in the emergence of software frameworks and automation platforms that provide scripts and Application Programming Interface (API) to develop different apps for these smart devices. Open-source platforms such as IoTivity make it easier to develop applications by providing Application Program- ming Interface. As the Internet of Things (IoT) and its applications in various domains have emerged only in the last few decades, the technology is relatively new; the developers are lacking experience and above all the complexity of Smart Home environment result in an increased number of bugs, security loopholes, and safety-critical issues leaving Smart Homes vulnerable to attacks. Since home automation is based on routines and triggers, using third-party applications or user-defined routines and custom automation [26] can lead to an unsafe and inconsistent home environment that is vulnerable to attacks thereby compromising user security and safety. These triggers and routines are dependent on the state of devices and the current home environment. Commonly used triggers for automation are user Home/Away mode, vacation mode, sleep mode. The complex environment makes it difficult to track different situations and make context-based decisions in Smart Homes. All the factors discussed above lead to inconsistent, vulnerable implementations and third-party apps with several security loopholes. I intend to provide a new approach to endorse a global state that enhances the security of the Smart Home. The main contribution would be the introduction of an endorsement framework in the Home Automation ecosystem that uses the information regarding relevant devices in the home network, builds policies, and endorses the global state change based on these policies. Each global state requires relevant device attribute values, an endorsement function, and a goal-based integrity lattice to endorse the global state change. This implementation supports a consistent global state based on the endorsement framework. Maintaining this global state will eliminate the problem of inconsistent implementation and context deficient partially designed policies thereby providing a foundation for a secure smart home. iii Table of Contents List of Figures vi List of Tables viii Acknowledgments ix Chapter 1 Introduction 1 Chapter 2 Related Work 4 Chapter 3 Design 6 3.1 Open Connectivity Foundation (OCF) and IoTivity . 6 3.1.1 Open Connectivity Foundation (OCF) . 6 3.1.1.1 OCF Resource Model . 6 3.1.1.2 OCF Interaction Model . 7 3.1.1.3 OCF Roles . 7 3.1.2 IoTivity . 7 3.1.2.1 Functional Units . 7 3.1.2.2 IoTivity Resource API stack . 8 3.2 Overview . 10 3.3 Design Approach . 12 3.3.1 Ground-Truth Data Collection . 12 3.3.2 OCF Resources Collection . 12 3.3.3 Security Goal . 12 3.3.4 Integrity Lattice . 13 3.3.5 Global State for endorsement . 15 3.3.6 Policy Generation for Endorser . 16 3.3.6.1 Factors affecting Policies . 16 3.3.6.2 Policy Generation . 17 iv Chapter 4 Implementation 19 4.1 Global Home State in IoTivity . 19 4.2 Endorser Module and Global State Configuration . 19 4.3 Home/Away Mode in IoTivity . 20 4.4 Endorser Module . 21 4.4.1 Functions . 21 4.4.2 Procedure . 22 4.4.3 Client-Server Request Flow . 23 4.4.3.1 Sequence Flow: PUT request for global state server . 23 4.4.3.2 Sequence Flow: PUT request for other device resources . 24 Chapter 5 Results and Evaluation 25 5.1 Experimental setup . 25 5.1.1 Smart Home Simulation . 25 5.1.2 Global Home State . 27 5.1.3 Client Application . 27 5.1.4 Device Attribute Map . 28 5.1.5 Policies . 28 5.1.6 Attack Scenario and Threat Model . 28 5.1.7 Test Scenarios . 29 5.1.7.1 Scenario I . 29 5.1.7.2 Scenario II . 30 5.1.7.3 Scenario III . 30 5.1.7.4 Scenario IV . 30 5.1.8 Results . 31 5.1.8.1 Approved Request . 31 5.1.8.2 Rejected Request . 31 5.1.8.3 Scenario I . 32 5.1.8.4 Scenario II . 37 5.1.8.5 Scenario III . 37 5.1.8.6 Scenario IV . 38 5.2 Other Global States . 38 5.3 Challenges and Limitations . 40 Chapter 6 Conclusion 41 Appendix A OCF Device Type Overview 42 Appendix B Device-resource attribute pairs 51 v List of Figures 3.1 IoTivity Resource API Stack . 8 3.2 Server example for smart light . 9 3.3 Overview of the Smart Home with virtual resource implementation . 10 3.4 Building Blocks of Global Home State Server . 11 3.5 Integrity Lattice . 13 3.6 Device Attribute Pairs . 17 3.7 Selected Policies . 18 4.1 Building Blocks of Endorsement Framework . 20 4.2 Endorsement flow diagram . 22 4.3 Client-Server Request Flow . 23 4.4 Sequence Flow: PUT request for global state server . 23 4.5 Sequence Flow: PUT request for other device resources . 24 5.1 Home Simulation Environment Scenario . 25 5.2 Policies . 28 5.3 Sample Approved Request . 31 5.4 Sample Rejected Request . 31 vi 5.5 Door current state . 32 5.6 Security Panel current state . 33 5.7 Presence sensor current state . 34 5.8 Global State Server PUT request (REJECTED) . 34 5.9 Client application request response (REJECTED) . 35 5.10 Global State Server PUT request (APPROVED) . 36 5.11 Client application request response (APPROVED) . 37 vii List of Tables 3.1 Example of Device, Resource and Properties . 14 3.2 Factors affecting policies . 16 5.1 Security Panel . 26 5.2 Door . 26 5.3 Motion Sensor . 26 5.4 Thermostat . 27 5.5 Presense Sensor . 27 5.6 Global Home State . 27 5.7 Device Attribute Value Map . 28 5.8 Fire Alarm State . 38 5.9 Vacation Mode . 39 viii Acknowledgments I express my sincere gratitude to Prof. Trent Jaeger for his continuous support, guidance, and motivation while working on the Master’s Thesis. I would also like to thank Dr. Adwait Nadkarni, Kaushal Kafle, and Mansoor Ahmed for their continued support and contribution. I would like to thank my family and friends for their support. ix Chapter 1 | Introduction A smart home is a home setup in which various appliances and devices are connected to the home network and can be controlled remotely using a mobile or other devices. It consists of different types of device categories such as lighting, space conditioning, infrastructure, appliances, and electronic devices [3]. These devices can be classified into two categories namely large devices (security panel, smart air conditioner, smart TV, etc.) and small devices (smart switch, smart plugs, sensors, actuators, etc.). Several software frameworks provide APIs to build applications to communicate, operate, and control these devices in Smart Home. The software applications build automation and scenes for different situations to make user life easier and comfortable along with improving the energy-efficiency of smart homes and also the security of physical environment. Automation can be as simple as “switch on the light when motion is sensed” or as complex and context-aware as “enable thermostat eco-temperatures, switch on the indoor camera and close the window when I leave home”. Situations are usually tracked and inferred by asking the user or through inference logic which can be different for different applications. Google Nest provides users with a Home/Away mode but this is not available for all devices. Unavailability of this feature across all devices in the smart home may give rise to inconsistent inference of home state and security flaws as there is no method to validate the state. Infrastructural devices such as doors, windows, locks, security panels and cameras are responsible for user privacy and security; unsupervised use of appliances like cooktop, oven, water heater, etc. can compromise user-safety. Hence maintaining a global home state is of paramount importance and endorsing global state changes in the platform framework is necessary. A recent research paper surveyed IFTTT (If This Then That) applets confirmed that Home/Away state change is among the top three triggers and notify, email, log are among top actions [2]. Very few Smart Home frameworks/apps provide Home/Away 1 mode with custom automations. Kaushal Kafle [9] argues that while widely available home automation platforms facilitate automation, they also expose security flaws affecting integrity of user’s physical environment. His research broadly categorized these platforms into API-based Smart Home Managers and Data Store-Based (DSB) Smart Home Platforms and carried out a systematic security analysis of some data store-based (DSB) smart home platforms namely Nest and Hue. This security analysis exposes the gaps in the security of home automation platforms which implement centralized data stores. The centralized data store meant to enhance communication among apps and devices via home state variable is also prone to situations where low-integrity devices/apps can indirectly modify the home state variable which both high and low-integrity devices/apps rely on. The research and its findings expressed the need of strong integrity guarantees of home state variables which reflect the state of the smart home in case of DSB platforms.