The IoT Threat Model, Default Passwords and the Law
In autumn 2016 the Mirai botnet took over hundreds of thousands of cameras and video recorders by logging in over Telnet with a list of about sixty factory usernames and passwords, then used them to flood a DNS provider and knock major websites offline for hours. No exploit was needed: the devices shipped with the same password, an open remote-login service and no way to update. A decade later, UK and EU law are closing those shortcuts for products on their markets: universal default passwords are banned in the UK since 2024, and the EU's Cyber Resilience Act requires secure defaults and security updates from December 2027. This lesson builds a threat model for an IoT device, examines the default-password problem in code, and maps the product to the new rules.
What makes IoT different
An IoT product is a system, not a box: the device (cheap hardware, embedded Linux or an RTOS, radios), the companion app, the cloud that relays commands, the local network it joins, and the supply chain that built its firmware from SDKs and open-source parts. Compared with a laptop it typically has:
- a long life (10+ years on a wall) but short vendor support;
- no screen or keyboard, so setup and updates happen through an app or not at all;
- physical exposure: anyone can buy one and open it;
- many units with the same firmware, so one finding applies to all of them.
A threat model for the LabHome Hub
Using STRIDE-style questions per entry point (threat modelling):
| Entry point | Example threats | Typical controls |
|---|---|---|
| Local network (Wi-Fi/Ethernet) | open Telnet/SSH with default credentials, unauthenticated local web API, UPnP exposing ports to the Internet | no debug services in production, unique credentials, authenticated local API, segmentation |
| Radio (BLE, Zigbee, Thread) | unauthenticated pairing, writable GATT characteristics, replayed commands | authenticated pairing, permissions, nonces |
| Cloud and app | weak account security, insecure direct object references to other users' devices, leaked API keys in the app | MFA, per-device credentials, server-side authorisation |
| Firmware and updates | unsigned or unencrypted-in-transit updates, rollback to old versions, secrets inside the image | signed updates, anti-rollback, no shared secrets in firmware |
| Physical | UART/JTAG consoles, readable flash chips | locked debug ports, secure boot, encrypted storage |
| Supply chain | vulnerable SDKs and libraries, backdoored components | SBOMs, vendor advisories, update capability |
The rest of this section works through the firmware, debug ports, secure boot, updates, protocols and segmentation. First, the oldest problem.
Default passwords, three ways
A factory must give each device some initial credential. The program audits three production batches (synthetic):
import hashlib
from collections import Counter
# Factory-provisioning records of one production batch (synthetic): serial -> admin password set at the factory
batch_a = {f"LH-A-{i:04d}": "admin" for i in range(1, 6)} # one password for all
batch_b = {f"LH-B-{i:04d}": hashlib.sha256(f"lab-factory-secret/LH-B-{i:04d}".encode()).hexdigest()[:8]
for i in range(1, 6)} # derived from the serial
batch_c = {f"LH-C-{i:04d}": pw for i, pw in enumerate(["q7Rk2pXv", "mW4tZ9aL", "Hc3nB8yE", "pT6sJ2vR", "xN5gK7dQ"], 1)}
KNOWN_DEFAULTS = {"admin", "root", "1234", "12345", "password", "default"}
def audit(name, batch, derivation_secret_in_firmware):
counts = Counter(batch.values())
universal = max(counts.values()) > 1
known = any(pw in KNOWN_DEFAULTS for pw in batch.values())
verdict = []
if universal: verdict.append("universal default password")
if known: verdict.append("on public default lists")
if derivation_secret_in_firmware: verdict.append("derivable from the serial by anyone with the firmware")
print(f"{name}: {len(batch)} devices, {len(counts)} distinct passwords -> "
+ ("FAIL: " + "; ".join(verdict) if verdict else "PASS (unique per device)"))
audit("batch A", batch_a, False)
audit("batch B", batch_b, True) # unique, but computed from the serial with a secret stored in every device
audit("batch C", batch_c, False) # unique values from a secure generator, printed on each device's labelbatch A: 5 devices, 1 distinct passwords -> FAIL: universal default password; on public default lists
batch B: 5 devices, 5 distinct passwords -> FAIL: derivable from the serial by anyone with the firmware
batch C: 5 devices, 5 distinct passwords -> PASS (unique per device)
- Batch A is the Mirai pattern: one password for every unit, and a well-known one.
- Batch B looks unique, but each password is computed from the serial number with a secret stored in every firmware image. Anyone who extracts the firmware (next lesson) can compute the password of every device from its serial, which is often printed on the box or even advertised over BLE. Several real router families have been broken this way.
- Batch C has independent values from a secure generator, stored at the factory and printed on each device's label: unique and not derivable. Better still is no factory password at all: the owner sets one, or the device is claimed through the app with a per-device certificate.
The rules
- ETSI EN 303 645 (first published 2020, updated since) is the European baseline standard for consumer IoT security, with 13 provision areas: no universal default passwords (5.1), a vulnerability-disclosure policy (5.2), keep software updated (5.3), store sensitive parameters securely (5.4), communicate securely (5.5), minimise exposed attack surfaces (5.6), ensure software integrity (5.7), protect personal data (5.8), resilience to outages (5.9), examine telemetry (5.10), make deleting user data easy (5.11), make installation and maintenance easy (5.12) and validate input data (5.13).
- UK: the Product Security and Telecommunications Infrastructure Act 2022 (PSTI) and its 2023 regulations, in force since 29 April 2024, make three of those mandatory for consumer connectable products sold in the UK: no universal default passwords, a published way to report vulnerabilities, and a stated minimum period of security updates.
- EU: the Cyber Resilience Act, Regulation (EU) 2024/2847, in force since 10 December 2024. Manufacturers must report actively exploited vulnerabilities and severe incidents from 11 September 2026, and the full set of essential requirements (secure by default, no known exploitable vulnerabilities at release, security updates for the support period, vulnerability handling, an SBOM, and more) applies from 11 December 2027 to products with digital elements placed on the EU market. Radio equipment already has cybersecurity requirements under the Radio Equipment Directive's delegated act, applying since 1 August 2025.
- Elsewhere: California's SB-327 (in force 2020) requires a unique password or a forced change at first use; the US FCC's voluntary U.S. Cyber Trust Mark (adopted in 2024, paused in 2025 and still being rolled out in 2026) is to label products that meet NIST-based criteria; Singapore and others run labelling schemes.
These are summaries for engineering planning; check the current legal texts and guidance for a real product.
Mapping a product to the rules
The LabHome Hub 1.4.2 as it ships, checked against the three PSTI requirements and some ETSI provisions:
product = { # the LabHome Hub 1.4.2 as shipped (synthetic)
"unique_default_password": False,
"vuln_disclosure_contact": "security@lab.test", "support_period_published": False,
"signed_updates": True, "automatic_updates": False, "telnet_enabled": True,
"tls_to_cloud": True, "secrets_in_firmware": True, "user_data_erase": True,
}
REQUIREMENTS = [ # (regime, requirement, check)
("UK PSTI", "no universal default passwords", lambda p: p["unique_default_password"]),
("UK PSTI", "a published way to report vulnerabilities", lambda p: bool(p["vuln_disclosure_contact"])),
("UK PSTI", "minimum security-update period stated", lambda p: p["support_period_published"]),
("ETSI 5.3", "keep software updated (secure, timely)", lambda p: p["signed_updates"] and p["automatic_updates"]),
("ETSI 5.4", "securely store sensitive parameters", lambda p: not p["secrets_in_firmware"]),
("ETSI 5.5", "communicate securely", lambda p: p["tls_to_cloud"]),
("ETSI 5.6", "minimise exposed attack surfaces", lambda p: not p["telnet_enabled"]),
("ETSI 5.11", "make it easy to delete user data", lambda p: p["user_data_erase"]),
]
fails = 0
for regime, req, check in REQUIREMENTS:
ok = check(product)
fails += not ok
print(f"{'PASS' if ok else 'FAIL'} {regime:9} {req}")
print(f"{fails} of {len(REQUIREMENTS)} checks fail")FAIL UK PSTI no universal default passwords
PASS UK PSTI a published way to report vulnerabilities
FAIL UK PSTI minimum security-update period stated
FAIL ETSI 5.3 keep software updated (secure, timely)
FAIL ETSI 5.4 securely store sensitive parameters
PASS ETSI 5.5 communicate securely
FAIL ETSI 5.6 minimise exposed attack surfaces
PASS ETSI 5.11 make it easy to delete user data
5 of 8 checks fail
Five failures, each with an obvious engineering task: unique per-device credentials, a published support period, automatic signed updates, no secrets in the firmware image, and Telnet removed from production builds.
How IoT risks are detected
- Product security testing before release and after each firmware: port scans of a unit in the lab (Nmap inventories), firmware analysis, BLE/GATT review, app review.
- Fleet-side: internet-wide scanning services and honeypots show default-credential and Telnet exposure; your own telemetry shows login failures and unexpected outbound connections.
- Network-side: IoT devices talking to unexpected destinations, scanning their neighbours or opening Telnet are classic botnet signs (segmentation).
- Supply chain: SBOMs matched against vulnerability feeds.
How it is fixed
- Secure by default: unique credentials or owner-set ones, no debug services, minimal open ports.
- Updates: signed, automatic or one-tap, for a published support period.
- A vulnerability-disclosure policy with a contact, and a process behind it (Responsible Disclosure).
- Defence in depth on the network: IoT on its own segment with only the traffic it needs.
Pitfalls
- "Unique" passwords derived from public data (serial, MAC address) with a secret shared by all devices.
- Forcing a password change in the app while Telnet still accepts the old factory password.
- Treating compliance as security: the laws set a floor, not a design.
Practice
1. Why is batch B a failure even though every device has a different password?
Each password is a function of the serial number and a secret that is identical in every firmware image. Extracting the secret once gives the password of every device; the serial is not secret.
2. Which of the hub's failures would also have made it a Mirai victim?
The universal default password and the enabled Telnet service together: Mirai logged in over Telnet with factory credentials.
3. A vendor says "we have no vulnerabilities, so we don't need a disclosure policy". What do the rules say?
Both PSTI and ETSI EN 303 645 require a published way to report vulnerabilities regardless, and the CRA requires vulnerability handling and, from September 2026, reporting of actively exploited ones. Researchers need a channel before anyone knows a vulnerability exists.
Test yourself
How did Mirai take over devices in 2016?
- A zero-day exploit
- Logging in over Telnet with factory default credentials
- Bluetooth attacks
- Phishing the owners
Which three requirements does the UK PSTI regime impose?
- Encryption, MFA, logging
- No universal default passwords, a way to report vulnerabilities, a stated support period
- Secure boot, SBOM, pen tests
- WPA3, PMF, SAE
Since when must manufacturers report actively exploited vulnerabilities under the EU CRA?
- 10 December 2024
- 11 September 2026
- 11 December 2027
- 1 August 2025
Why are passwords derived from the serial number with a firmware secret a bad design?
- They are too long
- Extracting the secret from one firmware image yields every device's password
- Serial numbers change
- They are not printable