Independent learning for embedded-systems engineersHardware · Firmware · Software
TEA-110CORE EMBEDDED SYSTEMS TOPICFOUNDATION

Secure embedded development

Protect the product from first boot to final retirement: define trust, minimise attack paths, verify controls and retain the ability to update and recover safely.

After this module, you should be able to:

  • Model assets, threats and trust boundaries
  • Select controls appropriate to embedded constraints
  • Design secure boot, update and recovery paths
  • Maintain security evidence and vulnerability response

Study guide · Updated · About 9 minutes reading + 20–30 minutes practice

Before you start: Read TEA-101 and TEA-104. Understand product modes, communications and software update concepts.

01 / SECURITY MODEL

Security protects dependable behaviour against intentional misuse.

Embedded security begins with the system: what must be protected, from whom, through which access paths and with what consequence if protection fails. Safety and security analyses should connect where a malicious action can create hazardous physical behaviour.

ASSETSWhat matters?Control authority, firmware, keys, configuration, measurements, identity and availability
ATTACK PATHSHow can trust be crossed?Networks, debug ports, update media, suppliers, service tools and physical access
CONSEQUENCESWhat can an attacker cause?Unauthorised control, disclosure, corruption, denial of service or unsafe operation
Security requirements need an adversary and a boundary.“Use encryption” is a mechanism, not a complete requirement. State what data or command is protected, across which interface, against which threat and how failure is handled.
02 / ARCHITECTURE

Establish trust before granting authority.

Control areaPurposeEmbedded design questions
Identity and roots of trustAnchor decisions in protected device, signer or service identities.Where are keys created, stored, used, rotated, revoked and destroyed?
Secure bootExecute only authorised code from a known chain of trust.Which stages verify the next, and what happens when verification fails?
Least privilegeLimit the authority and impact of each component.Can privilege levels, an MPU, separated tasks or dedicated controllers contain compromise?
Interface protectionValidate origin, permission, integrity, freshness and structure.Are commands authenticated, authorised, bounded and safe in the current state?
Secret protectionPrevent extraction or unauthorised use of credentials.Can secrets be unique per device and kept out of source, logs and test images?
Update and recoveryCorrect vulnerabilities without creating an easier attack path.How are packages signed, versions controlled, failures recovered and rollback governed?
Debug and serviceRetain necessary support while controlling powerful access.Who may unlock access, how is it audited and how is production state restored?

Layer controls so that one defect does not grant complete authority. A signed image protects authenticity, but memory protection, input validation, safe command rules and independent physical protections still limit what vulnerable code can do.

03 / LIFECYCLE

Build security into every engineering decision.

  1. Prepare the organisation. Define roles, secure environments, protected repositories, approved tools and supplier expectations.
  2. Model threats early. Identify assets, entry points, trust boundaries, abuse cases and safety consequences.
  3. Specify and design controls. Make security behaviour, failure handling and verification criteria explicit.
  4. Develop defensively. Apply coding rules, reviews, static analysis, dependency control and protected build practices.
  5. Verify adversarially. Challenge malformed input, privilege, replay, downgrade, resource exhaustion and fault recovery.
  6. Release a known product. Retain binary identity, provenance, SBOM, configuration, signing and approval evidence.
  7. Monitor and respond. Receive vulnerability reports, assess exploitability and impact, communicate and deliver controlled updates.

Worked example: resilient firmware update

A service tool installs firmware while power can be removed at any point. The design must prevent both unauthorised code and an unrecoverable device.

Authenticate service actionVerify signed manifestCheck product + versionWrite inactive slotVerify imageTrial bootCommit or recover

The bootloader remains separately protected. Anti-rollback rules prevent installation of a vulnerable release, but an authorised recovery image remains available. A failed trial boot returns to a known-good version, records the reason and never bypasses signature verification.

04 / EVIDENCE

Maintain a defensible security case as the product changes.

Threat model

Assets, actors, interfaces, trust boundaries, threats, misuse cases and risk decisions.

Security requirements

Testable prevention, detection, response, recovery, update and logging behaviour.

Controls report

Implemented mechanisms, assumptions, residual exposure and verification references.

SBOM and provenance

Software components, versions, suppliers, build identity and known-vulnerability assessment.

Security verification

Analysis, scanning, code review, penetration, fuzz, update and recovery results.

Response records

Intake, triage, exploitability, impact, remediation, disclosure and release decisions.

Common failure patterns

Shared product secret

One extracted credential compromises every manufactured device and is difficult to rotate.

Signed but unsafe update

Authenticity is checked, but interruption, downgrade, compatibility and recovery are not controlled.

Permanent debug exposure

Development access remains available in production without strong authorisation or audit.

SBOM without response

Components are listed, but nobody monitors vulnerabilities or decides whether the product is affected.

05 / DEEPER LEARNING

Model authority across the complete product

List assets that influence behaviour: executable images, configuration, calibration, commands, results, credentials and availability of essential functions. Trace who can read or change each asset during manufacture, installation, use, service and retirement. A local service port is still a trust boundary.

Separate identity from permission. Authenticating a technician does not mean every command is permitted in every operating state. A service action may require a stopped mechanism, an authorised role and a bounded parameter range. Validate these conditions at the component that owns the physical effect.

Consider attacks on resources as well as data. Valid but excessive traffic can consume CPU, queues, storage or battery. Bound parsing and cryptographic work, and preserve essential control under load. Test the interaction between security controls and safety responses, including lockout and loss of connectivity.

06 / DEEPER LEARNING

Design update integrity and recoverability together

An update package needs a trustworthy origin and integrity check, but a valid signature alone does not establish hardware compatibility or safe installation. Define image identity, permitted target, version policy and required configuration migration. Do not enable the new application until its installation state is coherent.

Plan power interruption at each durable step. The device should recover to an approved image or a controlled service state through a mechanism whose trust is preserved. Anti-rollback policy must coexist with a legitimate recovery route; a broken new image should not force acceptance of an arbitrary old vulnerable image.

Control signing and device-identity keys separately. Their compromise has different consequences. Define access, rotation, revocation and the procedure for devices that remain offline. NIST SP 800-193 provides a useful protect, detect and recover perspective for platform firmware; applicability to a specific embedded architecture needs explicit assessment.

07 / DEEPER LEARNING

Close the loop from a vulnerability to field status

A component inventory should identify the version and build configuration actually shipped. When a vulnerability is reported, establish whether affected functionality is present, reachable and able to violate a product security property. A package-name match is a starting point, not the complete assessment.

Track remediation through verification, release, installation and remaining exposure. Offline devices, incompatible hardware and end-of-support products need a defined disposition. Learn from root cause so the next release improves the development process as well as removing the immediate defect.

Asset or boundaryEngineering question
CalibrationCan an unauthorised change alter a physical decision?
UpdateWho can authorise an image and how is interruption recovered?
Service portWhich operations remain possible without normal user access?
Device identityCan one compromised credential affect the whole fleet?
08 / APPLY THE LEARNING

Practical exercise

An illustrative engineering exercise; values are assumptions for this lesson.

Review an update that passes signature verification

A signed update is compatible with board revision C but can be installed on revision B. Power loss during configuration migration leaves the application unable to start.

  1. Explain why signature verification does not resolve either defect.
  2. Specify compatibility checks and a recoverable migration sequence.
  3. Define negative tests and the evidence needed before release.
Show the worked answer

The signature establishes that a package was authorised by a trusted signer and was not altered under the chosen scheme. It does not prove suitability for this board or atomic migration. Bind the approved hardware and prerequisite versions to authenticated package metadata and check them before any destructive action.

Design migration so interruption cannot leave the only usable configuration irrecoverable. Depending on the architecture, use versioned records, validated staging and a durable commit indication, with a trusted recovery path. Test wrong hardware, altered metadata, obsolete images and power cuts across migration stages. Verify physical output defaults during recovery and retain the final software, configuration and board compatibility evidence.

Review criteria

  • Authenticity, compatibility and installation safety are distinct checks.
  • Recovery preserves trust and valid configuration.
  • Tests include interrupted and rejected updates.
09 / SELF-REVIEW

Check your understanding

Does a signed image prove it contains no vulnerabilities?

No. Signing supports provenance and integrity. Security assurance also needs design, implementation, verification and lifecycle response.

Why assess fleet-wide effects?

Shared keys, common remote services or identical weaknesses can make one compromise affect many devices, changing impact and response priorities.

11 / REFERENCES

Further learning

KEY TAKEAWAY

Trust must be established, limited and renewable.

Secure embedded development joins threat-informed architecture, controlled authority, resilient updates and active vulnerability management across the entire product life.