IoTBlockSec is a lightweight, software-only blockchain framework that secures zero-trust IoT ecosystems end-to-end — a custom SHA-256 Proof-of-Work ledger, HMAC-SHA256 device authentication and encrypted, replay-proof channels, with 100% detection across five live cyberattack simulations.
By 2030, over 30 billion IoT devices will stream telemetry that drives industrial, medical and logistical decisions — yet most IoT protocols transmit sensor data in plaintext, with weak or no device authentication and no way to detect modification mid-transit.
Attackers extract legitimate device IDs from observed traffic and impersonate trusted nodes with forged credentials.
Intercepted telemetry is altered in transit — a 99× value spike can falsify environmental state and trigger wrong decisions.
Stale but perfectly valid packets are retransmitted to deceive backends into acting on outdated readings.
On-path adversaries eavesdrop and mutate ciphertext bit-by-bit — invisible without envelope integrity signatures.
A lightweight blockchain-based framework securing IoT communication end-to-end — no heavy external blockchain infrastructure.
A SHA-256 Proof-of-Work blockchain ledger providing tamper-evident, hash-chained data storage with continuous validation.
HMAC-SHA256 device authentication and per-device payload encryption for confidentiality and identity verification.
The framework against live simulated cyberattacks — spoofing, tampering, replay, unauthorized access and MitM.
Every reading flows from simulated perception hardware through cryptographic fortification, PoW consensus and smart-contract access control, up to a live SOC monitoring plane.
This is the exact worked example from the paper — a temperature reading is encoded, hashed with real SHA-256 (WebCrypto), "mined", then verified. Flip the tamper switch to see why a one-degree forgery is computationally infeasible to hide.
An isolated AttackSimulator launches real attack logic against the running pipeline. Every vector is detected, logged and blocked — live, in the SOC dashboard.
Forged token for a real device ID hits the registry — constant-time HMAC comparison rejects it before it touches the queue.
A 99× value spike is injected into a legitimate transaction — the recomputed SHA-256 integrity hash no longer matches.
An exact copy of an authorized packet is retransmitted — its UUID nonce is already indexed in the 30-second sliding window.
A rogue node attempts a direct ledger write — the whitelist lookup fails before any cryptographic work executes.
4 bytes of ciphertext are bit-flipped on-path — the envelope's HMAC signature invalidates instantly; packet dropped pre-decryption.
The SOC dashboard's Attack Lab lets you fire each vector — or the full five-attack barrage — against the live system and watch detection happen in milliseconds.
⚔ Open Attack LabEvaluated over extended operational polling runs — every block satisfies the PoW difficulty target, every payload round-trips the encrypt/decrypt path, and every attack is caught.
| Block | Nonce | Txns | Difficulty | Hash prefix |
|---|---|---|---|---|
| Genesis | 0 | 0 | 000 | 0004ef48… |
| #1 | 7710 | 5 | 000 | 000fbdaf… |
| #2 | 1359 | 1 | 000 | 000ce1be… |
| #3 | 232 | 1 | 000 | 000b4267… |
| #4 | 1412 | 1 | 000 | 000efa5a… |
| #5 | 4223 | 1 | 000 | 000964d1… |
| Device | Modality | Location | Value |
|---|---|---|---|
| TEMP-879AE4 | Temperature | Factory Floor A | 22.82 °C |
| HUMI-0E2541 | Humidity | Server Room B | 58.21 % |
| PRES-E23C37 | Pressure | Warehouse C | 1014.03 hPa |
| MOTI-5E6FF2 | Motion | Office Wing D | 0 (none) |
| CO2-2C7F9B | CO₂ | Lab Section E | 433.77 ppm |
| Attack modality | Detection mechanism | Rate |
|---|---|---|
| Device Spoofing | HMAC-SHA256 token mismatch | 100% |
| Data Tampering | SHA-256 payload hash mismatch | 100% |
| Protocol Replay | Sliding-window nonce rejection | 100% |
| Unauthorized Access | Device registry whitelist check | 100% |
| Man-in-the-Middle | Envelope signature integrity drop | 100% |
The smart-contract layer was formally validated with IoTSecure.sol on Remix IDE + Ganache (gas-profiled per transaction), while the production pipeline runs the zero-dependency Python backend.
Register devices, mine blocks, stream encrypted telemetry, tamper with the ledger and launch all five attacks — then watch the framework catch every single one.
⚡ Launch the SOC DashboardVI Semester PBL · 21EC63 Computer Networks & Protocols · Department of Electronics & Communication Engineering, Bengaluru