How to Threat Model an IoT Device: Device, App and Cloud

An IoT product is three systems sold as one: a small computer in someone's home or factory, a phone app that talks to it, and a cloud service that talks to every unit at once. Most threat models of connected devices spend their time on the first and wave at the other two. The incidents that make the news usually come from the other two, or from the factory, because that's where one mistake reaches every device at the same time.

This guide walks through a complete IoT threat model on one fictional product: the Latchwell smart lock. A lock is a good teaching example because the outcome that matters is physical. "Someone opens the door who shouldn't" is easy to reason about, and every layer of the product can cause it.

The short version: to threat model an IoT device, draw the whole product, not just the device: the hardware and firmware, its radio links, any gateway or hub, the companion app, the cloud (broker, device shadow, API), the over-the-air update service and the factory that gives each device its identity. Put a trust boundary around anything an attacker can physically touch. Walk each element with STRIDE plus four IoT questions: what if someone opens the case, what happens when power or connectivity is lost, what does one compromise give you across the fleet, and who has access after the device changes hands. Score the threats, then check your register against a baseline such as ETSI EN 303 645 and the OWASP IoT Top 10.

What makes IoT different

The method is the same as for any system: a data flow diagram, threats per element, attack trees for the outcomes that matter, and a scored risk register. Five things change what you find:

  • Attackers can touch the hardware. Anyone can buy a unit, open it, read its flash memory and probe its debug pins. Assume every secret stored on a device without hardware protection will be extracted, and design so that one extracted secret opens one device, not all of them.
  • It's a fleet. A web vulnerability is fixed once on your servers. A device vulnerability exists in every unit you've sold, and stays there until each one updates. The update mechanism is therefore both your best control and your most dangerous component.
  • It lives for years and changes hands. Devices outlast phones, apps and staff. They get sold, rented out and passed on with the house, so "who still has access?" is a real threat, not an edge case.
  • Failures are physical. A lock that opens, a heater that stays on, an alarm that stays silent. Safety and security meet here, and "fail safe" has to be decided per function.
  • Devices are constrained. No endpoint agent, little memory, sometimes no reliable clock. Controls you take for granted on servers, such as monitoring and certificate checks, have to be designed in.

The example: the Latchwell smart lock

Latchwell is a fictional company selling a smart lock for front doors. It's battery powered and has a keypad. The owner unlocks it with the phone app over Bluetooth Low Energy (BLE) when standing at the door, or remotely through the cloud. A small Wi-Fi bridge plugged in near the door relays between the lock's BLE radio and the cloud, because the lock's battery can't power Wi-Fi.

  • Cloud: AWS IoT Core as the MQTT broker, a device shadow holding each lock's desired and reported state, the Latchwell API for the app, and a store of accounts, guest keys and the access log.
  • Lifecycle: an over-the-air (OTA) update service for lock and bridge firmware, and a provisioning service. At the factory, each lock gets its own certificate; at home, the buyer "claims" it into their account.
  • Sharing: owners give guests keys in the app, for a cleaner, a dog walker or a holiday rental guest, permanent or on a schedule.

Step 1: Draw the whole product

Data flow diagram of the Latchwell smart lock. Trust boundaries: owner's and guests' phones (owner or guest, companion app); front door, where anyone can touch the lock (Latchwell lock firmware, which drives the motor and door sensor); customer's home network (Latchwell bridge, a Wi-Fi gateway); Latchwell cloud on AWS (Latchwell API; store of accounts, guest keys and access log; MQTT broker on AWS IoT Core; device shadow with desired and reported state; OTA update service; provisioning and claim service); Latchwell factory and build (firmware build and signing, device identity injection). Flows crossing boundaries: BLE between the app and the lock for unlock, pairing and Wi-Fi setup; BLE between lock and bridge; MQTT over TLS between bridge and broker for commands and state; HTTPS between app and API for remote unlock and guest keys. Inside the cloud, the API sets the shadow's desired state, the shadow syncs with the broker, the OTA service sends update jobs through the broker, and the provisioning service handles claims for the API. From the factory, signed images go to the OTA service and per-device certificates to the provisioning service.
The Latchwell smart lock as a data flow diagram. The lock is one element of fourteen. Red flows cross a trust boundary; the factory boundary is purple because it's where every device's trust starts.

Three choices in this diagram matter more than the rest:

  1. The front door is its own trust boundary. Anything outside the house can be touched, opened and probed by anyone, so the lock sits in a zone of its own, separate from the home network. The bridge, inside the house, is harder to reach physically but sits on a network full of other people's devices.
  2. Radio links are elements, not lines. BLE between phone and lock, and between lock and bridge, carry the unlock command itself. Draw them as flows that cross boundaries and give them their own threats: pairing, replay, relay, jamming.
  3. The factory and the update pipeline are on the diagram. They're where trust in every device comes from. A threat model that stops at the cloud edge can't see the fleet-wide risks, which are usually the worst ones.

If you've modeled the device's mobile app or its cloud infrastructure separately before, link those models rather than redrawing them. Here, the app and cloud appear only with the parts that touch the device.

Step 2: Threats per element

Walk each element with STRIDE, as in STRIDE per element, and add the four IoT questions from the short version: physical access, loss of power or connectivity, fleet-wide reach, and change of ownership. The table lists what that finds on Latchwell, grouped by layer.

ElementWhat can go wrongFirst controls
Lock hardwareDebug or serial ports left enabled; flash memory read out after opening the case; the motor reached directly from outsideDebug interfaces disabled or locked in production units; secrets in a secure element; motor and wiring on the inside of the door
Lock firmwareUnsigned or downgradeable images accepted; hard-coded keys or passwords; old third-party libraries; malformed BLE input crashes or takes over the lockSecure boot with signature checks and anti-rollback; no shared secrets in images; a software bill of materials (SBOM) watched for vulnerabilities; input fuzzing
BLE linksWeak pairing modes; an unlock command captured and replayed; a relay that makes the phone seem to be at the door; jamming; advertising that reveals the lock and its owner's habitsAuthenticated, encrypted pairing; a fresh challenge per unlock; a user action on the phone to unlock, not only proximity; rotating identifiers
Bridge (gateway)Compromise reaches the lock and the home network; a local web page with no password; one flat network shared with laptops and other devicesNo listening services on the home network; unique credentials per unit; outbound connections only
MQTT brokerAnonymous or shared-credential connections; topic permissions that let one device read or command another; message floodsEach device authenticates with its own certificate; a policy that limits each device to its own topics; per-device rate limits
Device shadowOne customer reads or changes another's lock state; a "desired: unlocked" written by something other than an authorized unlock; reported state trusted without checkingWrites to desired state only from the API, after an authorization check; the lock confirms the command's origin; state changes logged
Latchwell API and guest keysAccount takeover leading to remote unlock; guest keys that never expire; broken object level authorization on lock IDs (the API Security Top 10 applies here in full)Two-factor authentication and fresh sign-in for remote unlock; guest keys with an expiry by default; ownership checked on every lock ID
OTA update serviceSigning key or pipeline compromised, so a malicious update reaches every lock; a failed update leaves locks unusable; no view of which units are patchedSigning key in a hardware security module, separate from the build system; A/B partitions with automatic rollback to the last good image; staged rollouts; a patch dashboard
Provisioning and claimCredentials injected insecurely at the factory; one fleet-wide key; anyone can claim a lock that isn't theirs; a resold lock keeps the previous owner's access; no way to revoke a stolen unitPer-device keys generated in the secure element; claiming requires proof of physical possession; factory reset clears keys and the cloud binding; a revocation list
Companion appWi-Fi password exposed during setup; cloud tokens stored insecurely on the phone; more personal data collected than the lock needsSetup over an encrypted, authenticated channel; tokens in the phone's secure storage; data minimization

Two of these deserve a closer look. Relay attacks are why "unlock when the phone is near" is a design decision with risk attached: a relay doesn't break the cryptography, it extends the distance, so the fix is asking the user to act, not stronger encryption. And change of ownership is a threat nobody draws, because the diagram shows one owner. Real locks have a second owner, a tenant, an ex-partner, a cleaner from last year.

Step 3: An attack tree for the outcome that matters

A per-element list is complete but flat. It doesn't show that the door can be opened four different ways, and that fixing the BLE protocol does nothing about guest keys. An attack tree with the outcome as its goal does:

Attack tree with the goal: open a Latchwell door without the owner's permission. An OR gate splits it into four branches, each with its own OR gate. At the door: replay or relay a captured BLE unlock (L1); debug port or shared setup code on the lock (L2). Through an account: guest access that was never revoked (L4); take over the owner's account and unlock remotely (L5). Through the cloud: topic permissions let one lock get another's commands (L3); claim a lock that isn't yours (L7). Across the whole fleet: steal the signing key and push a malicious update (L6); extract one fleet-wide key from one lock (L8).
One goal, four routes. The two branches on the right open one door or every door, which is why their impact scores are the highest.

Notice the split between the branches. "At the door" and "through an account" open one door, and the attacker needs to be there or to know the owner. "Through the cloud" and "across the fleet" can open many doors from anywhere. That difference is what the impact score has to capture.

Step 4: Score it and build the register

Each leaf becomes a register row, scored likelihood × impact on a 1 to 5 scale, with ThreatTree's default bands: 16 and above Critical, 10 to 15 High, 5 to 9 Medium. Impact 5 means doors opened at scale or a safety risk; 4 means one home entered.

IDThreatL × ILevelTreatment
L4Guest access is never revoked: a former cleaner or tenant still opens the door4 × 4 = 16CriticalMitigate: guest keys expire by default, the app lists active keys every month, revocation reaches the lock even when it's offline
L1A BLE unlock is replayed, or relayed so the owner's phone seems to be at the door3 × 5 = 15HighMitigate: fresh challenge per unlock, short command lifetime, a tap in the app to unlock instead of proximity alone
L3Broker topic permissions let one lock subscribe to, or receive, another lock's commands3 × 5 = 15HighMitigate: per-device IoT policy scoped to the lock's own topics, no wildcards; a test that tries it with a second device
L5The owner's account is taken over and the door unlocked remotely3 × 5 = 15HighMitigate: two-factor authentication, fresh sign-in before remote unlock, alerts on remote unlocks
L7Someone claims a lock that isn't theirs, or a resold lock keeps the previous owner's access3 × 4 = 12HighMitigate: claim needs a code from inside the box and a button press on the lock; factory reset removes keys and the cloud binding
L6The firmware signing key or OTA pipeline is compromised and a malicious update goes to every lock2 × 5 = 10HighMitigate: key in a hardware security module, two-person release approval, staged rollout, anti-rollback on the device
L8One key shared by every lock is extracted from a single unit2 × 5 = 10HighMitigate: per-device keys from the factory, stored in the secure element; nothing shared in the firmware image
L2A debug port or shared setup code gives control of the lock in front of you2 × 4 = 8MediumMitigate: debug locked in production, unique setup codes, tamper detection that alerts the owner
L9A bridge or cloud outage stops remote unlock and remote alerts3 × 2 = 6MediumAccept: BLE, keypad and the mechanical key keep working without the cloud; the door always opens from inside

The highest score isn't a clever hack. It's a guest key nobody revoked, because it needs no skill and happens all the time. Threat models of devices often rank radio and firmware attacks highest because they're the most interesting. The register should rank what's likely.

L9 is the honest row. Latchwell accepts that remote features stop during an outage, and says why that's acceptable: the lock's essential function doesn't depend on the cloud. Writing that decision down, with the reason, is part of the threat model. It's also where safety enters: the lock fails secure from outside and always opens from inside, whatever the battery, bridge or cloud are doing.

Step 5: Check it against an IoT baseline

Once the register exists, compare it with a published baseline to find what you missed. Three are worth knowing:

  • ETSI EN 303 645, the European baseline for consumer IoT, with thirteen provisions such as no universal default passwords, a vulnerability disclosure policy, keeping software updated and securely storing security parameters. The current edition is V3.1.3 (September 2024). The UK and EU rules below build on it.
  • NIST IR 8259A, six capabilities a device should have: device identification, device configuration, data protection, logical access to interfaces, software update and cybersecurity state awareness.
  • The OWASP IoT Top 10 (2018), a short awareness list from weak passwords (I1) to lack of physical hardening (I10). Useful as threat labels, like the OWASP Top 10 for web applications.
ETSI EN 303 645 provisionWhere Latchwell covers it
5.1 No universal default passwordsL2 (unique setup codes)
5.2 Manage reports of vulnerabilitiesNot a threat: a process. Latchwell publishes a disclosure policy and a contact
5.3 Keep software updatedL6, and the patch dashboard on the OTA service
5.4 Securely store sensitive security parametersL8 (per-device keys in a secure element)
5.5 Communicate securelyL1 (BLE), MQTT over TLS with device certificates
5.6 Minimize exposed attack surfacesL2 (debug locked); no listening services on the bridge
5.7 Ensure software integrityL6 (secure boot, signed updates, anti-rollback)
5.8 Ensure that personal data is secureAccess log and guest data in the cloud store; BLE identifiers rotate
5.9 Make systems resilient to outagesL9 (accepted, with local unlock)
5.10 Examine system telemetry dataAlerts on remote unlocks and unusual claim or command patterns (L3, L5)
5.11 Make it easy for users to delete user dataL7 (factory reset clears keys and the cloud binding)
5.12 Make installation and maintenance easySetup over authenticated BLE in the app
5.13 Validate input dataFirmware input fuzzing (lock firmware row in step 2)

The rules behind the baselines, as of 20 November 2026. In the UK, the product security regime under the PSTI Act has applied to consumer connectable products since 29 April 2024: no default passwords, a way to report vulnerabilities, and a stated minimum period of security updates (the 2023 regulations). In the EU, radio equipment has had to meet the cybersecurity requirements of the Radio Equipment Directive since 1 August 2025, with the EN 18031 standards, until the Cyber Resilience Act takes over on 11 December 2027. The CRA's duty to report actively exploited vulnerabilities and severe incidents already applies since 11 September 2026 (European Commission). Smart door locks are listed as important products under the CRA, so the conformity route is stricter than for a thermostat. Our CRA risk assessment guide works through the Act's requirements on a device, point by point.

Step 6: Keep it alive for the product's life

A device threat model has to last as long as the support period you promise, often five to ten years. Revisit it when:

  • a new hardware revision changes the chip, radio or secure element;
  • a feature adds a new way in, such as voice assistant integration, a new guest-key type or remote access for installers;
  • a component in the SBOM gets a serious vulnerability, or the cloud provider changes a default;
  • you get a vulnerability report, especially one you didn't expect: it means the model missed something;
  • the support period ends: decide, and tell customers, what happens to devices still in use.

Our guide on when to re-threat model has the general triggers; for devices, hardware revisions and end of support are the two teams forget.

What threat modeling can't do for a device

  • It doesn't test the hardware. Whether the debug port is really locked, or the flash really encrypted, is something a hardware security assessment checks on real units. The threat model says which of those checks matter most.
  • It doesn't replace firmware testing. Fuzzing, static analysis and penetration testing find the bugs; the threat model tells you where to aim them. See threat modeling vs. penetration testing.
  • It doesn't make a product compliant. A register mapped to ETSI EN 303 645 is evidence for an assessment, not a pass. Conformity under the PSTI regime, the Radio Equipment Directive or the CRA follows their own procedures.
  • It doesn't secure your suppliers. Chip vendors, contract manufacturers and module firmware are part of the product; they appear on the diagram as the factory zone, but assessing them is a separate job, covered in our supply chain threat modeling guide.

A checklist for your IoT threat model

  • The diagram includes device, radio links, gateway, app, cloud broker and shadow, API, OTA service, provisioning and the factory.
  • Anything an attacker can touch has its own trust boundary.
  • No secret is shared across devices; every device has its own identity.
  • Updates are signed, verified on the device, protected against rollback and recoverable when they fail.
  • Each device can only reach its own topics and its own state in the cloud.
  • Claiming, sharing, reselling and factory reset are modeled as threats, not just features.
  • Every function has a decided failure state for loss of power and loss of connectivity.
  • The register ranks likely threats first, and fleet-wide impact is scored higher than single-device impact.
  • The register has been checked against ETSI EN 303 645 and the OWASP IoT Top 10, with gaps explained.
  • The model has an owner and a review date that covers the support period.

Frequently asked questions

How do you threat model an IoT device?

Draw the whole product as a data flow diagram: the device and its firmware, radio links, any gateway, the companion app, the cloud broker, device shadow and API, the update service, provisioning and the factory. Put a trust boundary around anything an attacker can touch. Find threats per element with STRIDE plus four IoT questions (physical access, loss of power or connectivity, fleet-wide reach, change of ownership), build attack trees for the outcomes that matter, score the threats in a risk register, and check it against a baseline such as ETSI EN 303 645.

What are the biggest security risks in IoT devices?

The OWASP IoT Top 10 starts with weak, guessable or hard-coded passwords, insecure network services and insecure ecosystem interfaces such as the cloud API and app, followed by the lack of a secure update mechanism. In practice, the worst risks are the ones that reach the whole fleet: a key shared by every device, a compromised update signing key, or cloud permissions that let one device act as another.

Which standards cover IoT device security?

ETSI EN 303 645 (current edition V3.1.3, September 2024) is the main baseline for consumer IoT, and NIST IR 8259A lists six core device capabilities. As of 20 November 2026, the UK's PSTI regime has applied since 29 April 2024, EU radio equipment has had to meet the Radio Equipment Directive's cybersecurity requirements (EN 18031) since 1 August 2025, and the EU Cyber Resilience Act applies in full from 11 December 2027, with its vulnerability reporting duty already in force since 11 September 2026.

Is STRIDE suitable for IoT threat modeling?

Yes, applied per element as with any system, but on its own it misses things specific to devices. Add explicit questions for physical access to the hardware, behavior when power or connectivity is lost, fleet-wide impact of a single compromise, and access after the device changes owner. Safety-relevant failures need their own decision about whether the device fails open or closed.

Do I need to include the cloud and the app in an IoT threat model?

Yes. The cloud and the app are where remote attacks happen, and where one flaw can affect every device at once: broker permissions, device shadows, account takeover and guest access. The EU Cyber Resilience Act also treats the manufacturer's remote data processing as part of the product when the device can't perform one of its functions without it.

Threat model your connected product in ThreatTree

Draw the device, its radio links, gateway, app, cloud, update service and factory with the IoT & Devices palette, and start from more than 60 suggested IoT threats. Draft attack trees from them, score each threat, and track the fixes in a risk register with owners, free on every plan.

Start your free model Or open a finished example →

Mapping to ETSI EN 303 645 and NIST IR 8259A is part of the Pro subscription.

Not ready to sign up? Get new threat-modeling guides by email instead.