# A Lightweight IDS Based on Blockchain and Machine Learning for Detecting Physical Attacks in Wireless Sensor Networks

**Authors:** Maytham S. Jabor, Aqeel S. Azez, José Carlos Campelo, Alberto Bonastre

PMC · DOI: 10.3390/s26061961 · Sensors (Basel, Switzerland) · 2026-03-20

## TL;DR

This paper introduces a lightweight intrusion detection system for wireless sensor networks that combines blockchain and machine learning to detect physical attacks efficiently.

## Contribution

The novel contribution is a two-layer IDS integrating blockchain and machine learning for physical attack detection in resource-constrained WSNs.

## Key findings

- The system achieves 97.42% accuracy and 98.35% recall in detecting physical attacks.
- It sustains detection rates above 99.98% even with 30 simultaneous attackers and up to 10% packet loss.

## Abstract

Wireless sensor networks (WSNs) are vulnerable to physical attacks in which adversaries gain partial or full control of sensor nodes, compromising the integrity of the network. Conventional security mechanisms impose excessive computational overhead and are not well suited to resource-constrained WSN devices. This paper proposes a lightweight, two-layer intrusion detection system (IDS) that integrates blockchain (BC) technology with machine learning for physical attack detection in WSNs. The first layer employs a lightweight BC protocol among cluster heads (CHs) and the base station (BS) to detect data integrity violations through hash-based consensus. The second layer applies an artificial neural network (ANN) at the base station to detect attacks that bypass blockchain verification, without imposing any processing load on sensor nodes. Simulation experiments on a 100-node WSN demonstrate that the combined system achieves 97.42% accuracy and 98.35% recall, outperforming five established classifiers and both standalone components. The system sustains detection rates above 99.98% under 30 simultaneous attackers and maintains reliable operation under packet loss conditions up to 10%.

## Full text

_Full body text omitted from this summary view._ Fetch the complete paper as Markdown: https://tomesphere.com/paper/PMC13030592/full.md

## Figures

11 figures with captions in the complete paper: https://tomesphere.com/paper/PMC13030592/full.md

## References

43 references — full list in the complete paper: https://tomesphere.com/paper/PMC13030592/full.md

---
Source: https://tomesphere.com/paper/PMC13030592