11.4 IoT Incident Handling and Firmware Investigation
Key Takeaways
IoT evidence spans the device, local gateway, network, vendor cloud, management platform, and companion application; responders preserve identifiers and time context across all of them.
Containment choices must account for physical function, safety, shared credentials, fleet scale, intermittent connectivity, and whether disconnecting a sensor or actuator creates operational harm.
Firmware acquisition may use vendor images, update caches, logical export, UART or bootloader access, JTAG, or direct flash reads; each method has different alteration and authorization risks.
MQTT and CoAP are not automatically insecure: exposure depends on authentication, authorization, transport protection, topic or resource design, broker configuration, and key management.
Recovery includes rotating device and backend secrets, removing persistence, validating signed firmware and secure boot where supported, correcting fleet-wide configuration, and monitoring re-enrollment.
IoT Incident Handling and Firmware Investigation
Internet of Things (IoT) incidents rarely live on one device. A camera, sensor, badge reader, medical peripheral, or building controller may depend on a local gateway, mobile companion application, message broker, vendor cloud, identity service, and fleet-management console. The incident handler must reconstruct this system of systems while recognizing that the endpoint may have little storage, no reliable clock, and a physical function that cannot be interrupted casually.
Build the Evidence Map
Start with an inventory tied to observed identifiers rather than a product label alone:
- manufacturer, model, hardware revision, serial number, asset tag, MAC addresses, radio identifiers, and installed firmware version;
- IP address and DHCP history, switch port, wireless association, VLAN or segment, gateway, DNS and NTP configuration;
- device certificate, client ID, service account, broker topics, API tokens, and fleet or tenant identifiers without exposing secret values in general tickets;
- management console, vendor cloud region, mobile application, update service, local hub, and accounts authorized to administer the device;
- physical process or business function, approved maintenance window, owner, vendor support path, and safety consequence of disconnection.
Record time sources carefully. Low-cost devices often reset clocks after reboot, drift substantially, or log local time without a zone. Correlate device records with DHCP, wireless controllers, gateways, broker logs, packet captures, cloud audit events, and physical observations.
Detection and Triage
Common signals include outbound scanning, repeated DNS lookups, unexpected broker connections, new administrator accounts, configuration changes, disabled updates, abnormal power or sensor behavior, and traffic to known command infrastructure. A device sending high-volume UDP traffic may be a botnet node, but first rule out a legitimate firmware update, telemetry burst, or misconfigured discovery protocol.
Scope the fleet. Shared factory credentials, cloned certificates, a vulnerable update package, or one exposed management API can turn a single alert into a product-wide incident. Query management platforms for devices with the same model, firmware, certificate issuer, configuration template, or external destination.
Safety-Aware Containment
Containment can occur at several layers:
| Layer | Example action | Key caution |
|---|---|---|
| Network | Move the device to a quarantine VLAN or restrict broker and internet destinations | Confirm that blocking traffic will not disable alarms, access control, or a physical safeguard |
| Identity | Revoke a device certificate, token, or tenant session | Shared credentials may disconnect an entire fleet |
| Gateway | Filter a malicious topic, API route, or command at the hub | Preserve gateway logs and avoid breaking unrelated devices |
| Device | Disable a service, isolate radio, or power down | Power loss may erase volatile logs or create unsafe physical state |
| Cloud | Disable a compromised account or integration | Preserve control-plane events and understand delayed offline commands |
Coordinate with the device owner, facilities or clinical engineering where applicable, safety personnel, vendor, and legal team. If the device controls a physical process, containment authority belongs in the approved operational playbook—not solely with the SOC.
Firmware Acquisition
Prefer the least invasive source that answers the investigative question. Possible sources include a vendor-published signed firmware image, update server cache, management-console export, device backup, mounted file system, bootloader or UART console, JTAG interface, and a direct SPI or eMMC read. Hardware methods can alter state, trip tamper controls, void support, or damage components; use trained personnel, photograph connections, preserve the original chip when feasible, and hash each acquired image.
Tools such as binwalk can identify embedded file-system and compression signatures and extract supported formats such as SquashFS. Extraction is not proof of compromise. Analysts inspect startup scripts, web interfaces, update verification, hardcoded credentials, certificates, scheduled tasks, kernel modules, and differences from a known vendor image. Architecture matters: ARM, MIPS, and other binaries require the correct disassembler or controlled emulation environment.
Protocol and Backend Analysis
MQTT commonly uses a broker and hierarchical topics; CoAP exposes resources over UDP and can use Datagram Transport Layer Security (DTLS) or other protection profiles. Neither protocol is inherently an incident. Investigate:
- anonymous broker access, broad wildcard topic permissions, retained malicious messages, unexpected publisher client IDs, and credentials reused across devices;
- cleartext transport where sensitive data or commands require protection, weak certificate validation, exposed management ports, and unauthenticated firmware endpoints;
- command provenance: which identity published the instruction, from what address, through which gateway, and whether the device acknowledged it;
- backend compromise, because a validly signed command from a stolen cloud administrator session may look normal to the endpoint.
Eradication and Recovery
Preserve evidence before reimaging. Replace unauthorized firmware with a vendor-validated image, verify digital signatures and secure-boot state where supported, remove rogue accounts and startup entries, rotate unique device certificates and backend tokens, patch the gateway and management plane, and eliminate default or shared credentials. Re-enroll devices in stages, confirm expected telemetry and physical behavior, and watch for repeated outbound destinations or configuration rollback.
The final report separates confirmed device compromise, backend account compromise, vulnerable configuration, and suspected but unverified behavior. Fleet-wide corrective actions—certificate rotation, broker authorization, signed updates, segmentation, asset inventory, and end-of-support replacement—often matter more than cleaning one endpoint.
A fleet of cameras begins scanning the internet. All affected devices share one client certificate and firmware version. What scoping action is most important?
Analyze only the first camera because IoT incidents cannot cross devices
Factory-reset every camera before collecting logs
Query the fleet manager, broker, network, and certificate inventory for all devices sharing the firmware, credential, configuration, and destinations
Disable the building network without consulting the owner
Which statement about firmware extraction with binwalk is accurate?
A successful extraction proves the firmware is malicious
Binwalk can safely replace firmware on a live medical device
High entropy always proves a hidden command channel
Binwalk can identify and extract supported embedded formats, but analysts still need provenance, hashes, architecture-aware analysis, and comparison with a trusted image
An MQTT-connected sensor accepts commands published by any authenticated device to a wildcard topic. Which control most directly limits lateral command abuse?
Increase the sensor screen brightness
Enforce per-device identities and least-privilege topic authorization at the broker, then rotate exposed credentials
Disable all logging on the broker
Convert the payload from JSON to XML
Sections you finish are checked off in the contents.