A physical Raspberry Pi 5 gateway where an unsupervised machine learning layer catches what cryptographic checks cannot — behavioural anomalies. Underneath it sit TLS transport, HMAC message integrity and replay protection, all running from boot.
The 2016 Mirai botnet took over hundreds of thousands of IoT devices — cameras, thermostats, routers — because those devices had no serious defence at the edge. Nearly a decade later, most IoT deployments still trust the network and hope for the best.
The scope was to build a layered defence running on a real edge device: firewall, encrypted transport, message integrity, replay protection, intrusion detection and anomaly detection — together, and reproducibly.
The attack drill runs clean. Replay attempts are rejected in under a second, with an audit record. Data with a tampered HMAC never reaches the database. The anomaly injection is deliberately subtle: the HMAC is correct, signal strength is flat, only the packet rate rises — and the Isolation Forest catches it. The affected sensor's anomaly score falls from about 0.26 to about 0.11 while the other sensors stay in their normal band. All of it is visible in the Grafana panels, matched by timestamp.
The value of the project is not in any single component; these are all known techniques. It is in the composition: showing that an 80-dollar board, configured correctly, can enforce all of these guarantees at once, from boot, in a way that survives the field.
All source code and the project site.
GitHub Project site →