Ruledger: Ensuring Execution Integrity in Trigger-Action IoT Platforms

Jingwen Fan, Yi He, Bo Tang, Qi Li, Ravi S. SandhuINFOCOM 2021

Abstract

Trigger-Action Platforms (TAPs) enable seamless automation across diverse IoT devices but introduce significant security risks due to a lack of end-to-end execution integrity. This paper presents Ruledger, a decentralized, ledger-based framework that brings accountability to IoT automation. By utilizing a distributed ledger to store cryptographically signed rules and verify triggering events through smart contracts, Ruledger ensures that actions are only executed in response to authentic, user-defined triggers. Evaluation of a real-world prototype demonstrates that Ruledger effectively mitigates common attack vectors, such as event spoofing and platform compromise, with a negligible impact on system latency.

Introduction

Modern smart homes rely on Trigger-Action Platforms (TAPs) like IFTTT, Zapier, or Microsoft Flow to connect devices from different vendors. While convenient, this ecosystem has a massive security gap: Execution Integrity. Currently, if an attacker leaks an OAuth token or compromises a device gateway, they can spoof a "trigger" (e.g., faking a GPS location to show you are home) or directly inject an "action" (e.g., telling the smart lock to open).

Common attack vectors in current IoT ecosystems including event spoofing and API attacks.

Existing defenses are often siloed—some protect tokens, others verify physical sensor data—but none provide an end-to-end guarantee that a rule was triggered by a real event and executed according to the user's original intent. Ruledger addresses this by introducing a distributed ledger as a "source of truth" between users, IoT gateways, and TAPs.

System Architecture

Ruledger introduces a distributed ledger (using the pBFT consensus algorithm) to mediate interactions. The system consists of three main modules designed to ensure that the logic of a rule is decoupled from the execution of the action.

The Ruledger system architecture showing the interaction between IoT devices, gateways, the ledger service, and the Trigger-Action Platform.
  1. Rule Commits: Users define rules through a "User Agent" (a ledger wallet). These rules are cryptographically signed and stored on the ledger, preventing unauthorized modifications even if the IoT platform itself is compromised.
  2. Triggering Event Verification: When a sensor detects an event, an "Execution Agent" in the IoT gateway generates a unique log query key pair (eid, log_key). This is sent to the device's cloud log. The ledger then verifies the event by checking these logs, ensuring the trigger is authentic and not a spoofed request.
  3. Action Verification: Before a "Task Agent" executes an action (like opening a lock), a smart contract checks the ledger to confirm that a valid, verified trigger event actually occurred.

Implementation and Evaluation

The authors evaluated Ruledger using a real-world prototype integration. The platform utilized IFTTT via the Maker Webhooks channel, with Samsung SmartThings (simulated via WebIDE) and physical IoT edge devices. The infrastructure consisted of seven elastic cloud servers running Ubuntu 20.04 to simulate blockchain nodes and agents.

Key Results

The evaluation demonstrated that security does not have to come at the cost of usability:

  • Latency: Ruledger adds an average end-to-end delay of 12.53%. In practical terms, a rule that took 1.403 seconds to execute in a standard setup took 1.604 seconds with Ruledger—a 200ms difference that is negligible for most home automation.
  • Throughput: The system handles roughly 40.57 requests per second, a minor 6.5% decrease from the baseline.
  • Security: The security analysis proves Ruledger effectively blocks API-level attacks, event spoofing, and platform compromise attacks.

Security and Privacy Insights

Ruledger treats third-party TAPs as untrusted executors whose requests must be validated against the ledger. Unlike previous stateless solutions, Ruledger records action requests and events as stateful transaction logs, which prevents "replay attacks" where an attacker tries to reuse an old, valid trigger.

To preserve privacy, Ruledger uses "Execution Agents" to process raw data locally. For example, sensitive GPS coordinates are processed at the gateway, and only the resulting boolean (e.g., "IsHome") is committed to the ledger, preventing sensitive data from leaking to the ledger or TAPs.

Conclusion and Future Work

While Ruledger significantly improves IoT security, it assumes no collusion between the device gateway, the log server, and the blockchain nodes. Future work may address the security of the user's private keys within their ledger wallet, perhaps through Trusted Execution Environments (TEEs). Additionally, while Ruledger ensures integrity, it does not currently address Denial of Service (DoS) attacks that could impact system availability.

Summary updated

BibTeX
@inproceedings{fan2021ruledger,
  author = {Jingwen Fan and Yi He and Bo Tang and Qi Li and Ravi S. Sandhu},
  title = {{Ruledger: Ensuring Execution Integrity in Trigger-Action IoT Platforms}},
  booktitle = {INFOCOM},
  year = {2021},
}
Figure