The Update Channel Is the Most Attractive Attack Surface You Ship.

A device that can update itself can be updated by someone else. Secure OTA is less about pushing bytes than about who is allowed to decide what runs next.

Field Notes · 8 min read

The most valuable thing an adversary can take from a connected device is not the firmware it runs today. It is the ability to choose the firmware it runs tomorrow. An over-the-air update mechanism is, by construction, a sanctioned channel for replacing the code a device executes — and anyone who can speak that channel convincingly inherits the single most powerful capability the product has. That is why the updater, far more than the application, is the part of an embedded system a serious attacker most wants to own.

Teams tend to approach OTA as a delivery problem: get the bytes to the device reliably, resume interrupted downloads, keep the payload small. Those concerns are real, but they are logistics. The security question is narrower and sharper, and it hides behind all the logistics: when a device is handed an image and told "run this next," what exactly convinces it to say yes? Everything that matters about secure OTA is the quality of that one answer.

Why the updater is the prize

An update channel is a remote-code-execution feature you shipped on purpose. That framing is uncomfortable and it is accurate. Compromise it once and you do not get a single device — you potentially get every device that trusts the same source, through a mechanism specifically designed to be trusted. The payload is persistent in a way most attacks are not: malicious firmware installed through the legitimate channel survives reboots, presents as authentic, and can quietly disable the very update path that might have remediated it.

For all of that, the updater usually receives less scrutiny than the features around it, because it demonstrably "works" in testing — images go up, devices come back on the new version, the demo succeeds. Working and being hard to subvert are different properties, and only the first one shows up in a sprint review.

Transport security is not image security

The most common OTA design error is a single sentence: "updates go over TLS, so they are secure." TLS protects the pipe. It authenticates the server to the client and encrypts the bytes in transit. It says nothing whatsoever about whether the thing at the far end of that pipe should be trusted to decide what firmware your device runs.

If image authenticity rests on the transport, then whoever controls the distribution point controls the fleet — a breached update server, a malicious node in a content-delivery network, a contractor with push access. TLS will faithfully, confidentially deliver their malicious image, padlock and all. The device therefore has to verify the image itself, on its own, independently of how the image arrived. Transport security and image trust are different guarantees, and treating the first as if it provided the second is how well-funded products ship with an open door behind an encrypted one.

Build + sign — key in HSMUpdate servertransport trust ≠ image trustDownload → inactive slotVerify signature + versionAtomic switch — boot new slotboot fails →revert toknown-good slot
Every arrow is a hand-off of trust; the accented step is the only one the fleet's safety actually rests on.

Signing, verifying, and where the key lives

Image trust comes from a signature. The image is signed by the vendor, and the device verifies that signature against a public key anchored in its root of trust before it executes a single byte. The private signing key is therefore the asset the whole scheme depends on, and it does not live on any device — it lives in your build pipeline, which is exactly where it is most often mishandled. A signing key sitting on a build server or unprotected in continuous integration makes the fleet's security equal to that host's security. The key belongs in an HSM, used for signing by reference and never exported to a filesystem.

One distinction is worth stating plainly because it is so often blurred: a checksum is not a signature. A CRC or a hash embedded next to the image catches accidental corruption in transit; it does nothing against a forger, who simply recomputes it. Authenticity requires a cryptographic signature verified over the entire image, on the device, before the commit to run it. Integrity checking and authenticity checking look superficially similar in code and protect against completely different adversaries.

Transport security answers "did these bytes arrive intact from the server?" Image signing answers "should this device agree to run them at all?" Only the second question protects the fleet, and only the device itself can answer it.

Anti-rollback and version policy

A valid signature is necessary and not sufficient. An attacker who can trigger an update — or simply reflash — takes a genuinely signed older image with a known, unpatched vulnerability and installs it. The signature is valid because you really did sign that version once; the device is exploitable because you patched the flaw in a later one. The chain happily verifies its own undoing.

Anti-rollback closes this with a monotonic version counter, backed by fuses or secure storage, below which the device refuses to boot; successful updates advance it. This introduces the same tension secure boot has: a counter that can never move backward means a bad batch can strand devices with no path home, while a counter an attacker can bypass "for recovery" is a counter they will bypass for exactly that. The resolution is a version policy tied to the release process — one that distinguishes a harmless functional downgrade from a security-relevant one — combined with staged rollout, so that a bad version is caught on a small population before it can reach the whole fleet.

A/B slots and atomicity

The failure every OTA design must survive is the update that does not boot: power lost halfway through a write, or an image that passes signature verification and then hangs on first run. The standard answer is dual-bank, or A/B, updating. The new image is downloaded and verified into the slot that is not currently running while the active slot keeps the device alive; the device switches to the new slot only after verification succeeds; and a watchdog reverts to the known-good slot if the new one fails to come up healthy within a defined window.

The property that makes this safe is atomicity: at no instant is there a half-written image that the device might try to boot. The switch is a single commit — either the new slot is completely present and valid and becomes active, or the device is still cleanly on the old one. And the recovery path itself has to be authenticated to the same standard as a normal update. A "recovery mode" that will accept any image to get a bricked unit working again is simply the OTA bypass wearing a hard-hat; an attacker will walk through it the moment they find it.

A defensible OTA pipeline

None of these controls are advanced research. They are a sequence of decisions that have to be made deliberately, because an update channel assembled from reasonable-looking defaults tends to be trustworthy in exactly the conditions you tested and nowhere else.

  • Sign in hardware, verify on the device — an HSM-held key, a full-image signature checked against the root of trust before execution, never a bare checksum standing in for authenticity.
  • Trust the image, not the server — authenticity independent of TLS, designed so that a fully compromised distribution server costs the fleet nothing.
  • Enforce anti-rollback with a real policy — a monotonic counter wired to the release process, distinguishing a functional downgrade from a security-relevant one rather than blocking both or neither.
  • Update into an inactive slot and switch atomically — A/B banks and a single commit, with no window in which a partially written image is bootable.
  • Make failure recover itself — a watchdog that reverts to the known-good slot, and a recovery path that authenticates its image exactly like a normal update.
  • Rehearse the compromise — assume the signing key, the distribution server, and a lab unit on a bench are each in scope, and work out what every one of them buys an attacker.

A secure OTA pipeline is the mechanism by which a vendor keeps its promise to patch — and, if the design is weak, the mechanism by which an attacker keeps a fleet compromised through every patch shipped afterward. When 6QURE reviews an update system, the question is never "is the download encrypted." It is "walk me from the signing key to the instant a device commits to new code, and show me every point where someone who is not you could substitute their decision for yours." The strength of the whole channel is the strength of its weakest answer to that walk.

Facing something like this in your own environment?