Abstract
The rapid proliferation of Internet of Things (IoT) devices has created complex ecosystems where multiple third-party applications interact with various sensors and actuators. These interactions often lead to unforeseen safety violations that cannot be detected by analyzing individual components in isolation. We present IoTSan, a formal verification framework that utilizes model checking to identify interaction-level flaws in IoT systems. By translating high-level app code into verifiable Promela models, IoTSan uncovers vulnerabilities caused by app-to-app interference and physical failures. Evaluation on 150 SmartThings apps identified 147 vulnerabilities across 20 safety properties, demonstrating the framework's effectiveness and practicality.
Introduction
Modern smart homes are rarely homogeneous; they are composed of a diverse array of devices and apps from different developers. This heterogeneity introduces a critical security gap: interaction-level flaws. A safety violation may occur not because a single app is malicious or "broken," but because the combined logic of multiple legitimate apps leads to an unsafe state. For example, a lighting app might trigger a mode change that an automated lock app misinterprets, potentially leaving a home unsecured. Furthermore, physical failures, such as a sensor failing to report a state change, can leave the system in a "stale" but dangerous condition.
IoTSan addresses these challenges by modeling the entire IoT installation as a single, unified system. It explicitly accounts for the physical-cyber loop, where physical events trigger cyber events that result in actuator commands, which in turn affect the physical environment.
Methodology
IoTSan (IoT Sanitizer) leverages the SPIN model checker to perform formal verification. The framework is structured into five primary modules designed to automate the verification process while managing computational complexity.
- App Dependency Analyzer: To mitigate the "state explosion" problem inherent in model checking, this module constructs a dependency graph to group only interacting apps and devices. This reduces the search space by an average of 3.4x.
- Translator (G2J): IoTSan features a custom pipeline that translates Groovy-based IoT apps into Promela, the modeling language for SPIN. This involves static type inference and the generation of Java ASTs.
- Configuration Extractor: The system pulls real-world device mappings from the user’s cloud account to ensure the model accurately reflects the physical deployment.
- Model Generator: This module creates the final system model. IoTSan utilizes a sequential design, modeling events one-by-one rather than concurrently. This approach captures relevant bugs significantly faster than full concurrency modeling.
- Output Analyzer: When a violation is detected, a heuristic-based analyzer determines whether the cause is a malicious app, a design flaw, or a user misconfiguration.
Evaluation and Results
The framework was evaluated using a dataset of 150 Samsung SmartThings apps, 76 manual configurations, and real-world data from a user study. Key findings include:
- Vulnerability Discovery: IoTSan detected 147 vulnerabilities across 76 test systems, covering 20 distinct safety properties.
- Complex Interaction Detection: The system successfully identified flaws requiring the interaction of up to four separate apps, a task nearly impossible for manual testing or isolated analysis.
- Malicious Attribution: IoTSan achieved 100% accuracy in identifying malicious apps within a benchmark of 25 apps, distinguishing them from benign misconfigurations by analyzing violation ratios.
- Performance: Verification for a system with 10 events took approximately 5 hours on standard hardware, making it a viable background service for smart home management.
Conclusion
IoTSan demonstrates that safety in IoT is an emergent property that must be verified holistically. By modeling the physical-cyber loop and employing efficient sequential modeling, IoTSan provides a robust solution for identifying complex interaction-level vulnerabilities. Future work will focus on improving support for dynamic device discovery and incorporating more sophisticated environmental feedback loops to further enhance verification accuracy.
Summary updated