Skip to content
  • 0 Votes
    1 Posts
    99 Views
    A
    Knowing your threat model is half the job. This companion post is the other half: the concrete mechanisms that keep a deployed fleet trustworthy for years — identity, storage, boot integrity, and updates that can't brick everything at once. One device, one credential Fleet-wide passwords and hardcoded API keys are a supply-chain vulnerability — one leak compromises every unit ever shipped. Each device gets unique credentials issued at provisioning, with expiry and rotation planned from day one. Certificates beat passwords where the hardware allows it: a client certificate in protected storage is harder to phish, share, or guess than any string a human invents. → Certificate-based auth and device tokens Secrets live in protected storage, not source code On-device credentials belong in NVS with proper access control plus a provisioning flow — never as string literals in firmware. Assume anyone can dump your flash; design so a dump alone isn't enough. Work through what happens when a unit is returned, resold, or stolen: wipe procedures and revocation lists are part of the design, not an afterthought. The general principle — shrink what the device exposes — applies far beyond storage: → Credential storage on the device → Device security: shrinking the attack surface Trust the code you run Secure boot stops modified firmware from executing on your hardware. → The secure boot concept Signed OTA with hash verification stops tampered images from installing. Automatic rollback on failure stops one bad release from becoming a fleet-wide outage — an update path without rollback is a disaster waiting for a trigger. The full identity-to-update story, end to end: → Secure OTA with signed firmware → Identity, authorisation and secure updates What "passing review" looks like Unique per-device credentials (never hardcoded), TLS with proper certificate validation and clock sync, secure boot plus signed OTA with rollback, and a tested incident routine. That's the bar that separates professional firmware from hobbyist firmware. Finish with IoT security engineering — threat modelling to incident response in one track. Post what you've hardened, your provisioning flow, or your OTA rollback story. Tag with security.
  • šŸ”’ How IoT devices get owned

    IoT Security Concepts security tls firmware
    1
    0 Votes
    1 Posts
    82 Views
    A
    Insecure firmware has taken down chunks of the internet — hundreds of thousands of cameras, routers and DVRs running default credentials, herded into a botnet overnight. Similar flaws have reached into industrial plants. Your device ships into an adversarial network, so security is a set of decisions from the first line of firmware, not a feature added at the end. Think like an attacker first Ask four questions about your own device: what is valuable here (data? compute? a foothold into the LAN?), who wants it, how do they reach it (open ports? UART header? cloud API?), and what happens if they succeed? That threat model decides everything else — a soil sensor and a door lock do not deserve the same budget, and the model tells you where the budget goes. → Threat modelling and security foundations The transport layer: where most devices fail open TLS with both sides proving identity. Server-only TLS leaves devices talking to impostors; mutual auth means the device verifies the server and the server verifies the device. Two field gotchas: actually validate the CA chain (skipping verification "temporarily" becomes permanent), and sync the clock first — certificates look invalid on a device that thinks it's 1970. → Device-side practice: TLS auth and secure boot Network posture. Close what you don't use, assume the local network is hostile, and treat every byte arriving over the air as untrusted input until validated. Most Mirai-class compromises weren't exotic crypto breaks — they were default passwords on open remote-access ports. → Network and communication security Continue with the IoT security deep track — identity, firmware and incident response. Post your device, your threat model, and where you think you're exposed. Tag with security or tls. For identity, secure boot and updates, see the companion post below.
  • 0 Votes
    1 Posts
    208 Views
    A
    A connected device without security is a loaded gun pointed at your own network — and MQTT isn't the answer to every device-side problem either. This companion post covers the two things that turn a working prototype into shippable firmware: locking it down, and reaching beyond MQTT where it fits. Lock it down Mutual TLS, done right. Server-only TLS leaves devices talking to impostors. Both sides prove identity — the device verifies the server, the server verifies the device. Two field gotchas: actually validate the CA chain (skipping verification "temporarily" becomes permanent), and sync the clock first — certificates look invalid on a device that thinks it's 1970. → Why security matters — real attacks → Certificate-based auth and device tokens Trust the code you run. Secure boot stops modified firmware from executing; signed OTA with hash verification plus automatic rollback stops a bad or malicious update from bricking the fleet. Credentials live in protected on-device storage with a provisioning flow — never as string literals in source. Assume anyone can dump your flash; design so a dump alone isn't enough. → The secure boot concept → Credential storage on the device → Secure OTA with signed firmware Reach beyond MQTT HTTP/REST for on-device APIs and cloud calls, WebSocket for local dashboards, Modbus RTU for industrial sensors on RS-485 that isn't going away, and BLE provisioning so users can configure WiFi credentials without hardcoding them. → HTTP and REST from the device → WebSocket basics for local dashboards → Modbus RTU for industrial devices → BLE provisioning of WiFi credentials Capstone A fully connected, secure IoT device — TLS-authenticated MQTT link to GrapesIoT, a clean topic schema, LWT-based presence detection, and offline buffering that survives a broker outage. Share your build in the lab submissions area when it's done. Post questions here and tag with security, tls or ble. For the device-to-cloud path (networking, MQTT, patterns), see the companion post above.
  • 0 Votes
    1 Posts
    97 Views
    A
    What is IoT & Connectivity? A device that only blinks an LED is not an IoT device. IoT starts the moment your firmware opens a socket, sends data somewhere, and receives a command back. That sounds simple. In practice it means dealing with unstable WiFi, broker authentication, encrypted connections, dropped packets, industrial sensors that speak 30-year-old protocols, and devices that must keep working even when the internet doesn't. Block 3 is about building firmware that connects to the real world — reliably, securely, and in a way that doesn't fall apart the moment something goes wrong in the field. What you'll be able to do after this Read a Wireshark capture of an MQTT session and know exactly what's happening at every step Design a topic schema that works for a single device today and a fleet of thousands tomorrow Write WiFi + MQTT reconnection logic that actually handles every failure case Implement TLS mutual auth and store credentials correctly on the device Get data out of a Modbus RTU sensor and route it to the cloud Build firmware that buffers data locally during outages and syncs when connectivity returns What's covered 3.1 Networking The foundation everything else builds on. Most firmware engineers treat the network stack as a black box and then can't debug it when it misbehaves. This section fixes that — TCP/IP mechanics, how WiFi events actually fire on ESP32, and what TLS is doing before your first MQTT packet is sent. → 3.1 Networking sessions 3.2 MQTT Deep Dive MQTT looks simple until you hit production. This goes inside the protocol — packet structure, what QoS actually guarantees, topic schema design that scales, retained messages and LWT for device presence, connecting to EMQX and GrapesIoT, and a systematic debugging method for when things break. → 3.2 MQTT sessions 3.3 Communication Patterns Knowing the protocol isn't enough — you need to know how to use it well. Pub-sub vs request-response, command-acknowledge patterns, the difference between a telemetry reading and an alarm, and how to buffer data in a ring buffer so a WiFi outage doesn't lose sensor history. → 3.3 Communication Pattern sessions 3.4 Security Real IoT devices have been used to take down the internet (Mirai botnet) and physically destroy industrial equipment. Security here is not theoretical — real attack case studies, secure boot, certificate-based auth, correct credential storage in NVS, and signed OTA updates. This is the section that separates hobbyist firmware from production firmware. → 3.4 Security sessions 3.5 Protocols Beyond MQTT MQTT isn't the answer to everything. HTTP/REST for on-device APIs, WebSocket for local dashboards, Modbus RTU for industrial sensors on RS-485 (which isn't going away), and BLE provisioning so users can configure WiFi credentials without hardcoding them. → 3.5 Protocols sessions Capstone A fully connected, secure IoT device — TLS-authenticated MQTT connection to GrapesIoT, proper topic schema, LWT-based presence detection, and offline buffering that survives a broker outage. Submitted to the lab forum and reviewed against a checklist. → Block 3 Labs — submit here Start at embiq.grapesiot.com/embedded-iot/block3 — each section links to its sessions from there. Post questions in this category and tag with the section number (e.g. 3.2) so the right people see it.