SECURING EMBEDDED FIRMWARE FOR IoT APPLICATIONS

Balaji K S
30. September 2019
Categories:Technology,  IoT,  Embedded Software,  System Safety

The number of IoT devices connected to the internet is increasing rapidly and is expected to reach 75.44 billion by the end of 2025 — a fivefold increase within a decade. As connectivity expands, so does the attack surface. IoT devices have become a major target for malware, and even in 2019, approximately 26% of all cyber-attacks were IoT-related. From automobiles and medical implants to casino networks, IoT-related breaches are now prominent across industries.

Effective custom embedded firmware development for IoT must embed security from the ground up — not as an afterthought. Embien's product engineering services cover the full spectrum of IoT security design, and our IoT product development services help teams ship hardened, production-ready firmware. This blog covers four critical areas of custom embedded firmware development for IoT:

  • Securing Boot Firmware
  • Secure Firmware Update
  • Secure Data Storage
  • IoT Product Physical Security

Securing Boot Firmware — The First Line of Custom Firmware for IoT Devices

The foremost step in custom embedded firmware development for IoT is protecting the processor — the heart of the system. Modern MCUs and MPUs offer security-specific features such as HAB (High Assurance Boot) and TPM (Trusted Platform Module). Many silicon vendors provide a Secure Boot mechanism in which the processor validates the integrity of the boot code before executing it, a cornerstone of robust Custom firmware for IoT devices.

Some silicon vendors provide mechanisms where the hash of the boot code can be stored in One Time Programmable (OTP) memory. Once the boot code is prepared, its hash is created and stored. Upon bootup, the processor reads the complete boot code, calculates the hash, and compares it with the pre-programmed value — execution proceeds only on a match.

On more powerful systems, it is possible to encrypt the hashes with a private key. The public keys are programmed alongside the boot code. The system calculates the hash and compares it against the hash decrypted with the public key. To authenticate the veracity of the public key, its hash is stored in OTP memory — ensuring a hardware root of trust for Custom firmware for IoT devices.

On simpler devices where reprogramming of the boot code is anticipated, microcontrollers offer fuse-blow mechanisms that permanently lock out the code area in flash, preventing external reads or writes. Such mechanisms make it difficult to reverse-engineer the firmware and identify potential weaknesses.

Once the boot code is authenticated by the system, it validates the next level of firmware and applications by maintaining the chain of trust — a foundational principle of Secure IoT device firmware development.

Secure Firmware Update — Essential to Secure IoT Device Firmware Development

Throughout a product's lifecycle it is often necessary to update the firmware — to add features, fix defects, or patch vulnerabilities. Secure IoT device firmware development demands that every update path is hardened. The new firmware can be delivered either remotely Over The Air (OTA) or physically via a memory card, but in both cases the image must be authenticated before it is applied in a fail-safe manner.

Modern Secure IoT device firmware development typically uses asymmetric cryptographic algorithms: the private key is stored securely at the vendor facility while the public key resides in a secured location within the end-product. The firmware is signed with the private key and shared over a secure channel. The device validates the downloaded image using its stored public key.

Where protection against reverse engineering is also required, the entire image can be encrypted with the private key so that only the end device can decrypt and program itself. A critical design consideration for custom embedded firmware development for IoT is key revocation — if the server is compromised, the system must be capable of revoking existing keys and replacing them with a fresh set, without bricking deployed devices.

Secure Data Storage

IoT Device Security for Stored Sensitive Information

Deployed IoT products often collect sensitive data that must be protected against unauthorized access — a core requirement of IoT device security. Mechanisms such as full-disk encryption render storage content unusable to anyone who does not hold the correct decryption keys. The key storage itself must be equally well protected: dedicated cryptographic chips can store keys in tamper-resistant hardware so that even wafer-level probing cannot retrieve them. The marginal cost of a few tens of cents per unit is negligible compared to the liability of a data breach.

Data Encryption Solutions for Smart Devices Across Product Lines

A robust approach to data encryption solutions for smart devices requires that different encryption keys are used for each product line. If one product is compromised, the impact is contained and does not cascade to other products. Additionally, all communication with external devices — cloud backends, mobile apps, peripheral sensors — must be encrypted to prevent interception. Strong data encryption solutions for smart devices, when combined with proper key management, form the backbone of a resilient custom embedded firmware development for IoT strategy.

IoT Product Physical Security

Digital measures alone are insufficient. Physically securing the IoT device is equally important, and it must be accounted for early in the design cycle of any Custom firmware for IoT devices project.

Closing Debug Ports — Serial debug ports, USB interfaces, and similar access points are indispensable during development but must be disabled in production releases. In bootloaders such as U-Boot, the break-on-input feature must be disabled to prevent manipulation of boot images. Reducing the attack surface is a fundamental tenet of IoT device security.

JTAG/SWD Connectors — Debugging tools and emulators that aid board bring-up must be inaccessible in deployed hardware. Physical connectors should be removed or permanently disabled.

Firewall and Closing Ports — Network-enabled products must run at least a minimal firewall. Unused TCP/IP and UDP ports should be closed, and using non-standard port numbers adds an additional layer of obscurity.

Passwords — Many Linux-based systems ship with well-known default credentials such as root, admin, or password123. These must be hardened and validated as part of pre-production testing.

Mechanicals — Physical enclosure designs should incorporate tamper-evident mechanisms and tamper-detection circuitry that triggers alerts or wipes sensitive data when the device is opened.

Building Truly Secure IoT Products

As the saying goes — a chain is as strong as its weakest link. Every stage of the product's operation must be carefully reviewed and scrutinized. Security audits help profile the effectiveness of the design, and standards such as ISO/IEC 27001 provide a solid baseline. However, these are high-level guidelines; device-specific and domain-related threat models must be built on top of them.

Custom embedded firmware development for IoT is not a one-time exercise. It demands continuous vigilance — from architecture review through production deployment and beyond. When all four pillars (boot security, update security, data security, and physical security) are addressed holistically, the result is a resilient product that protects users and preserves brand trust.

Embien has over a decade of experience in embedded product design and Secure IoT device firmware development. Whether you need end-to-end custom embedded firmware development for IoT or a focused security audit of your existing design, our engineering team is ready to help.

Related Pages

DIGITAL TRANSFORMATION SERVICES

Discover how secure IoT transformation strategies can modernize your business operations with connected, firmware-hardened embedded solutions.

Read More

EMBEDDED SYSTEMS SECURITY SERVICES

Explore Embien's embedded security services for threat modeling, secure boot implementation, and end-to-end firmware vulnerability assessments.

Read More

QUANTUM-SAFE SERVER DEVELOPMENT FOR HIGH SECURITY APPLICATION

See how Embien engineered quantum-safe, high-security firmware for a server application demanding the strongest cryptographic protections.

Read More

Subscribe to our Blog