Hardware, IoT, firmware and embedded systems
Treat hardware research as a versioned product and attacker-access investigation. A firmware image, a physical device, its radio interface and its cloud service can have different owners and different bounty eligibility. A weakness visible after dismantling a device may fall outside a program that only accepts remote or closed-chassis attacks.
Investigation modules#
Use these procedures with this playbook's setup and scope. Each contains the full testing sequence, command cheat sheet, interpretation, and checklist; open its canonical page for cross-target references.
Libraries and parsers: bounded fuzzing to a minimal reproducerBuild a realistic local harness, instrument the target, bound fuzzing resources, and turn unique faults into defensible library or consumer reports.
Open canonical module and reverse references
- 01Choose contract
- 02Build harness
- 03Instrument target
- 04Fuzz within bounds
- 05Minimize root cause
- 06Verify consumer impact
At each step: retain the control → record the observation → continue only while the next boundary is understood.
Choose an attacker-relevant parser contract#
Select a public API and a realistic input boundary: imported image, archive, document, packet, model file, project metadata, or CLI input file. Record who supplies bytes, the consumer's preprocessing, format limits, parser options, and the privilege of the process. Fuzzing an internal helper with impossible arguments may reveal a harness defect rather than a violated library contract.
Keep the first harness narrow: one parse operation, deterministic configuration, fresh state for each input, bounded allocations, and cleanup on both success and failure. Remove network and uncontrolled filesystem side effects. Seed with a few valid, small representative samples to reach deeper code; an all-random corpus may spend every iteration failing the magic-header check.
Harness and build cheat sheet#
The following is a template: product_parser.h, ProductDocument, and the parser functions are placeholders to replace with the target's documented API. Return/error ownership must follow that API. The commands have not been executed here.
#include <cstddef>
#include <cstdint>
#include "product_parser.h"
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
if (size > 65536) return 0;
ProductDocument* doc = product_parse(data, size);
if (doc != nullptr) product_document_free(doc);
return 0;
}
Build the target library itself with compatible sanitizer and coverage instrumentation; instrumenting only the harness misses much of the parser's behavior. Replace the source list with its reviewed build recipe. The example assumes Clang and a compatible C++ project. AddressSanitizer build guidance.
clang++ -g -O1 -fno-omit-frame-pointer \
-fsanitize=fuzzer,address,undefined -fno-sanitize-recover=undefined \
./fuzz_parser.cc ./parser.cc -o ./fuzz_parser
mkdir -p ./corpus ./artifacts ./evidence
./fuzz_parser ./corpus -max_total_time=120 -timeout=2 \
-rss_limit_mb=512 -max_len=65536 -artifact_prefix=./artifacts/
Add reviewed seed files before running. libFuzzer's time, input-length, timeout, and RSS settings bound the campaign; they are not a VM resource boundary. Run inside your local disposable environment with external memory/CPU limits appropriate for the workload. Track new coverage and distinct root causes rather than raw executions. libFuzzer reference.
Interpret the failure precisely#
| Observation | Immediate question | Defensible first claim |
|---|---|---|
| ASan heap read overflow | Does the public API permit this byte sequence? | Out-of-bounds read in the tested build |
| ASan write overflow | Which length check and allocation disagree? | Out-of-bounds write; execution impact unproven |
| Use-after-free | Did the harness violate ownership rules? | Lifetime defect if public usage is valid |
| UBSan arithmetic finding | Does overflow reach an unsafe allocation/index? | Undefined operation plus traced consequence |
| Timeout or RSS limit | Is it reproducible at modest input sizes? | Bounded evidence of resource exhaustion |
-fno-sanitize-recover=undefined makes the selected UBSan failures terminate instead of allowing a fuzzing run to continue after a diagnostic, which helps preserve reproducible failing inputs. UBSan checks selected undefined behaviors, not every arithmetic error. Unsigned integer wrap is defined in C/C++ and is not part of the default undefined group; choose additional checks when the target's threat model requires them. UndefinedBehaviorSanitizer.
Minimize and verify the consumer#
Copy one candidate into ./artifacts/repro.bin, then minimize with a unique output path. Preserve the original input, toolchain, build flags, revision, and symbolized trace.
./fuzz_parser -timeout=2 -rss_limit_mb=512 ./artifacts/repro.bin
./fuzz_parser -minimize_crash=1 -max_total_time=60 -timeout=2 -rss_limit_mb=512 \
-exact_artifact_path=./artifacts/minimized.bin ./artifacts/repro.bin
Replay the minimized bytes through a supported consumer in the pinned OSS lab. If the consumer rejects them before calling the library, report the library contract separately and leave consumer exposure unproven. A sanitizer crash is not proof of remote code execution, and its absence in an optimized build does not erase a confirmed memory-safety defect.
Hypothetical root cause: a header count is multiplied into a narrow allocation size, then a wider loop trusts the original count. Preserve the values, allocation site, failing access, and missing bound. The fix should bind accepted count to available input and checked allocation size; merely suppressing the crash is insufficient.
- Public API and ownership contract respected.
- Target code, not only harness, instrumented.
- Resources, seeds, revision, and toolchain recorded.
- Minimal input reproduces the same root cause.
- Normal input succeeds in affected and fixed builds.
- Library impact and real consumer exposure are stated separately.
Replay timeout and memory artifacts under the same resource limits as discovery. A minimized crash must retain the original root cause; a shorter input that fails differently is not equivalent evidence.
Firmware update and boot trust: signed bytes, product binding and rollbackSeparate download trust, update authorization, image verification, rollback policy and boot enforcement using local artifacts.
Open canonical module and reverse references
- 01Identify image and board
- 02Trace acceptance gates
- 03Compare artifact variants
- 04Inspect boot and recovery
- 05Record bounded result
At each step: retain the control → record the observation → continue only while the next boundary is understood.
Setup and security invariant#
Obtain an authentic image and record product/SKU, board revision, SoC revision, firmware version, source and SHA-256. Use an isolated non-root workspace with no device attached for initial review. Prepare an original and disposable copies, the relevant verification code if available, and a recoverable owned lab device only if later needed. The invariant is: only authorized, correctly targeted software at an allowed security version reaches execution.
Separate five gates: who can request an update, how metadata is authenticated, which payload bytes are verified, whether that image fits this product, and what the boot path enforces. TLS does not replace image authenticity. An encrypted package is not automatically signed. OWASP treats update authorization, signature verification and rollback as distinct tests. OWASP firmware update tests
Controlled procedure#
- Map the container. Identify headers, manifest, payload, signatures and any bootloader/recovery component. Locate verification before extraction, writing and execution. If source is available, follow length and offset calculations using source dataflow. Keep extraction confined because the archive parser is itself exposed to untrusted input.
- Establish the acceptance baseline. Feed an unchanged vendor image into the actual local verifier, emulator or documented validation-only path. Confirm it accepts the correct product and rejects a genuinely malformed sample. A checker that rejects every file provides no useful security comparison.
- Change one field or byte. On disposable copies, alter one non-executable payload marker, remove the signature, change a target identifier or alter a signed manifest field. Record both package parsing and signature decisions. Use a vendor-accurate container parser: an arbitrary byte flip that destroys compression only demonstrates malformed-input rejection.
- Test version policy. Compare an allowed current image with an authentic older signed image that has a known lower security version. Inspect whether the permitted caller can lower the stored security counter or select an alternate recovery path. A lower marketing version is not necessarily a lower security version. Espressif's OTA documentation distinguishes application rollback after failed validation from anti-rollback based on security version. Espressif OTA
- Inspect execution trust. Map ROM → bootloader → selected application, including alternate slots and recovery. Determine whether an update accepted into storage would still fail at boot. For supported ESP32 revisions, Secure Boot v2 verifies bootloader and application signatures; applicability depends on chip revision and enabled configuration. Espressif Secure Boot v2
Local inspection cheat sheet#
mkdir -p evidence
sha256sum firmware.bin > evidence/firmware.sha256
file firmware.bin > evidence/firmware-format.txt
binwalk firmware.bin > evidence/firmware-layout.txt
rg -n -i 'signature|rollback|secure_version|board_id|verify' ./source
Binwalk's default file argument identifies embedded content; extraction requires a format-appropriate, separately reviewed procedure. These commands do not flash, boot or rewrite firmware. Binwalk README
Create this reusable acceptance matrix before modifying any copy:
| Variant | Expected verifier result | Record separately |
|---|---|---|
| Authentic current image | Accept for correct product | Parser, signature, model and version |
| Altered protected payload | Reject | Verified byte range and error stage |
| Wrong product | Reject if product binding is required | Target identifier and compatibility |
| Older security version | Enforce documented downgrade policy | Counter and recovery behavior |
Evidence, false positives and completion#
Report precisely where the candidate crosses a boundary: parse acceptance, staging, installation or actual execution. Do not turn acceptance by a standalone inspection tool into a device execution claim. Debug builds, an administrator's explicitly supported downgrade, unsigned non-executable padding and a vendor checksum mismatch alone are common false positives.
- Authentic baseline and every modified copy are hashed.
- Parser rejection and authentication rejection are distinguished.
- Security-version policy and attacker update privilege are stated.
- Boot/recovery enforcement limits the claimed impact appropriately.
- No fuse, bootloader or production-device write was needed for this procedure.
Hardware interfaces: production debug access and protected dataDistinguish diagnostic output from privileged UART, JTAG/SWD and firmware-secret boundary failures on an owned lab unit.
Open canonical module and reverse references
- 01Document access model
- 02Observe baseline
- 03Classify interface
- 04Check protected capability
- 05Confirm production state
At each step: retain the control → record the observation → continue only while the next boundary is understood.
Setup and security invariant#
Record exact retail SKU, board revision, installed firmware, provisioning state and whether the case must be opened. Distinguish unauthenticated nearby access, opened-case access and already privileged administrator access. Use a recoverable owned bench device, its matching documentation and a passive capture first. The invariant is: the documented physical access level does not expose a protected command, memory region or reusable credential without the required authorization.
Use the shared authorization matrix for local service roles and identity/session checks when the device also has app/cloud identities. Network callbacks or downloaded configuration belong in the shared SSRF boundary procedure; permission to inspect a purchased device does not extend to unrelated cloud services.
Controlled procedure#
- Preserve the retail baseline. Photograph configuration and interface locations without unnecessary serial numbers. Record whether secure boot, flash encryption and debug locks are configured, using read-only vendor diagnostics when available. A development board or previously unlocked unit cannot establish behavior on a locked retail device.
- Observe UART without transmitting. Verify pinout, ground and logic voltage before connecting a receive-only capture adapter or logic analyzer. Keep transmit and power pins disconnected for passive observation. Record baud/framing from documentation or the capture, startup stage and visible data. Do not assume that an RS-232 adapter and a TTL UART use compatible electrical levels.
- Classify the capability. Separate boot logs, an authenticated console, an unauthenticated restricted monitor and a privileged shell. A prompt string proves neither interactivity nor privilege. If a console is within the lab scope, use a benign identity query or read a synthetic fixture after documenting why that access should be restricted. Compare logged-out versus correctly authenticated behavior. OWASP's internal-interface tests distinguish exposed functionality and authorization. OWASP internal interfaces
- Assess JTAG/SWD conservatively. Start from documented lock state and allowed read-only diagnostics. Prove a specific protected capability only on a suitable lab unit; avoid unlock, erase, fuse and flash commands. Finding pads or a debug identifier is weaker than reading a protected synthetic memory region. CWE-1191 specifically covers access control for on-chip debug and test interfaces. CWE-1191
- Classify recovered secrets. In offline firmware, distinguish public certificates, password hashes, test credentials, per-device private keys and fleet-wide credentials. Compare two authentic owned-device images if available. Demonstrate a candidate credential's function on a local service, with redacted output; do not try it against vendor infrastructure. Installed-firmware review includes exposed authentication material and configuration. OWASP installed firmware
- Confirm and restore. Reproduce after a supported clean reset if needed and safe for the unit. Record what access survived, what was configured during testing and whether recovery succeeded. State emulation or missing hardware limitations explicitly.
Offline command cheat sheet#
rg -n -i 'login|console|debug|jtag|swd|password|private.key' extracted-rootfs
readelf -hW extracted-rootfs/usr/sbin/example-daemon
readelf -lW extracted-rootfs/usr/sbin/example-daemon
sha256sum evidence/uart-capture.bin
These commands inspect an already extracted filesystem and saved UART capture. Replace the daemon with an identified ELF; readelf is not useful for arbitrary compressed firmware. -h shows the ELF header, -l program headers and -W wide output. GNU readelf
Evidence and completion#
Capture access level, wiring diagram, voltage, tool version, production lifecycle state, before/after decisions and protected capability. A verbose boot log, root access granted to an intended administrator, generic missing hardening, or readable public key is not automatically a vulnerability.
- Retail and debug configurations are distinguished.
- Passive observation precedes any authorized interaction.
- Prompt visibility and protected capability are separate findings.
- Secret classification is supported without exposing usable values.
- No irreversible debug unlock or device write was performed.
Vulnerability reference#
Out-of-bounds memory read · Out-of-bounds memory write · Use after free in a public API or parser lifecycle · Integer overflow affecting allocation or bounds · Predictable temporary files and unsafe creation · Untrusted executable, library, or module search path · Updater accepts an artifact outside its publisher trust policy · Firmware verifier accepts unauthenticated protected bytes · Firmware security-version state can be lowered · Firmware verification fails to enforce required product binding · Boot or recovery path executes an unverified component · Production UART exposes an unauthenticated privileged console · On-chip debug interface exposes protected memory or control · Firmware contains a reusable shared authentication credential · Encrypted data accepted without integrity authentication
Roadmap and entry criteria#
| Stage | Work product | Exit criterion |
|---|---|---|
| Firmware literacy | Architecture map, image inventory and recovered filesystem where present | Explain boot, update, persistence and service startup without executing unknown binaries on the workstation |
| Device observation | Own-device baseline, controlled network capture and interface inventory | Distinguish provisioning, normal operation and recovery behavior |
| Boundary research | One reachable parser, authorization or update-trust hypothesis | Demonstrate a security consequence in a recoverable local setup |
| Specialist research | Versioned hardware/firmware findings with reproducible evidence | Match the program’s physical-access model and show affected production configuration |
Build confidence using intentionally vulnerable images or owned development hardware before using expensive production equipment. Buying a device is not itself evidence that its vendor rewards firmware findings or permits testing related infrastructure. Intel’s current program illustrates the distinction: it explicitly excludes open-chassis physical attacks from bounty rewards. Intel program terms
Scope and laboratory gate#
Create a target card with vendor, exact product/SKU, board revision, SoC revision, bootloader, firmware version and image hash, region/carrier variant, enabled features, lifecycle state and acquisition source. Record whether the device is retail, engineering/debug, previously rooted or already modified. Compare results with an unmodified baseline; a debug unit cannot establish behavior on locked retail hardware.
Document the required access: remote internet, same network/proximity, physical access without opening, or access to internal components. Record digital privileges independently: unauthenticated, ordinary user, administrator or manufacturer. OWASP ISTG distinguishes physical and authorization access, including non-invasive and invasive access. These distinctions determine applicable tests and prevent overstating a bench-only result as a remote vulnerability. ISTG attacker model
Use a segregated lab network with synthetic accounts and no route to ordinary home/work devices. Observe expected destinations before selectively allowing connectivity. Keep a power and recovery plan, original firmware, configuration backup and known-good device state. A local firmware emulator still needs containment: embedded startup scripts can contact vendor services or alter the host environment if executed carelessly. Treat extraction tools and package parsers as attack surfaces too.
For UART/JTAG and other probes, establish pinout, voltage levels, ground reference and power ownership from reliable device documentation and measurement. Begin with passive observation. Do not make fuse changes, overwrite bootloaders, desolder components, glitch power or permanently unlock production hardware as a generic first step. Such operations require an explicitly suitable device, recovery capability and scope; their omission should be recorded as a test limitation.
Operational playbook#
1. Acquire authentic inputs. Prefer vendor downloads, authorized source releases, program-provided images or read-only acquisition from owned in-scope devices. Preserve the original bytes and hash before unpacking. Record how the image relates to the installed version; a downloaded update container may omit the bootloader, calibration data or secrets stored on the device. Do not assume an image found on an unrelated sharing service is authentic or covered.
2. Inventory the image and startup paths. Identify format, compression, partitions, architecture, endianness, executable ABI, filesystem and init mechanism. Bare-metal or RTOS images may not contain a Linux filesystem at all. Map network listeners, CGI/web handlers, configuration import/export, update agents, privileged helpers and inter-process messaging. Firmware methodology separates acquisition, unpacking, static review and dynamic validation; extraction alone is not an audit result. OWASP FSTM
3. Establish the normal trust model. Trace provisioning to first ownership, adding a second user, local/cloud control, account removal, ownership transfer and reset. Mark which operations require physical presence and which are authenticated remotely. Build at least two owned test identities where the product supports them. A report about cross-owner access should demonstrate a boundary using those identities rather than a third party’s device.
4. Follow external input into privileged behavior. Prioritize reachable parsers: HTTP, binary control messages, configuration archives, media/file imports and update metadata. Map decoding, length checks, integer arithmetic and privilege changes. For native code, distinguish a controlled parser crash, memory corruption and demonstrated execution; they have different evidentiary strength. A missing stack canary or an outdated library version is a lead until reachability and applicable impact are shown.
5. Validate with the least invasive faithful environment. Extracted-process emulation can isolate a parser; full-system emulation can recover service interactions; the owned device confirms hardware-dependent behavior. Record divergences such as mocked peripherals, absent secure elements or different kernel versions. Use bounded inputs and synthetic data. Stop at a reproducible boundary violation rather than escalating to persistence, uncontrolled radio traffic or damage.
6. Reproduce after reset and prepare disclosure. Verify the issue survives a clean supported configuration, document exact preconditions, and capture evidence of the protected action or data access. Preserve recovery steps and device health. Report confirmed versions separately from suspected related products; matching strings or reused libraries do not prove a shared exploitable condition.
Technical investigation checklist#
| Area | Investigation | Evidence that advances a report |
|---|---|---|
| Firmware identity | Model, revision, update package, installed build, hashes | Exact affected product and reproducible baseline |
| Provisioning | Initial ownership, pairing, reset, reassignment and local presence | An unauthorized identity obtains a protected role or capability |
| Update trust | Signature verification, trusted keys, authenticated metadata, target compatibility | A harmless unauthorized artifact crosses the actual acceptance boundary |
| Rollback | Version counters, signed old images and recovery paths | An allowed attacker can restore a vulnerable security state |
| Boot chain | ROM-to-bootloader-to-application verification and recovery trust | A gap in the claimed chain under the eligible access model |
| Secrets | Per-device versus shared keys, credentials, debug logs and persistent storage | Protected capability established without publishing usable secrets |
| Debug interfaces | UART console, JTAG/SWD, test modes and privilege separation | Unexpected access on the production configuration |
| Local services | Authentication, authorization, command construction and configuration import | Reachable low-privilege input causes a protected operation |
| Memory safety | Length fields, parsers, allocation/free patterns and signedness | Minimized input, crash location, reachability and bounded consequence |
| Wireless | Pairing/bonding, identity, replay, sequencing and encrypted transport | Own-device controlled capture shows an authentication or integrity failure |
| Cloud/app coupling | Device claims, token scoping, ownership transfer and command routing | Reproduction only against separately authorized API/app assets |
| Recovery | Reboot, factory reset, watchdog and supported restore procedures | Device restored and test limitations documented |
Update transport encryption, update authentication and secure boot are separate checks. HTTPS can protect download transport while leaving a local update path insufficiently authenticated. A signed image may still be unsuitable for the model or permit a security downgrade. Examine what bytes and metadata are verified and what executes afterward. ISTG firmware update mechanism
Vendor details matter. On ESP32, Secure Boot v2 support depends on chip revision, and Espressif documents interactions with JTAG and flash encryption. Its security guidance separately describes anti-rollback controls. Do not infer the presence or absence of a production control from a generic SoC feature list; inspect the target configuration and matching vendor documentation. Espressif Secure Boot v2, Security overview
Classify discovered secrets before testing them: public certificate, local password hash, per-device private key, shared fleet credential or build-time sample. Demonstrating a secret’s role on an owned lab device is stronger than indiscriminate credential trials against cloud endpoints. For storage, distinguish attacker-accessible contents from intended administrator/debug access; note encryption-key placement, deletion behavior and residual data after reset. ISTG installed firmware, ISTG memory
Internal interfaces deserve their own boundary assessment. A UART that prints boot diagnostics differs from an unauthenticated privileged console; accessible JTAG differs from a demonstrated ability to extract protected secrets. Record physical effort and whether opening the case is required. Radio observations likewise differ from active tests: perform replay or malformed-message experiments only between owned devices in a controlled setup, and evaluate pairing and message authentication in the relevant protocol. ISTG internal interfaces, ISTG wireless interfaces
Command cheat sheet#
Use an offline copy of a vendor image in an isolated non-root analysis environment. These commands inspect local files; they do not acquire firmware from an unknown device or authorize testing any embedded endpoint.
mkdir -p evidence
sha256sum firmware.bin > evidence/firmware.sha256
file firmware.bin > evidence/firmware-type.txt
binwalk firmware.bin > evidence/firmware-layout.txt
strings -a -n 8 firmware.bin > evidence/firmware-strings.txt
# After an appropriate extractor has produced an owned local filesystem:
rg --files extracted-rootfs > evidence/file-inventory.txt
rg -n -i 'password|token|private.key|update|signature' \
extracted-rootfs > evidence/review-leads.txt
# For an identified ELF binary, not for every firmware format:
readelf -hW extracted-rootfs/usr/sbin/example-daemon
readelf -lW extracted-rootfs/usr/sbin/example-daemon
Select the extractor for the detected format, verify its current syntax and inspect archive contents before extraction. Keep unknown images away from host mounts and privileged analysis processes. Binwalk identifies embedded content and can support extraction workflows; high entropy alone does not distinguish encryption from compression. The rg matches above are review leads, not confirmed credentials or findings. Binwalk, OWASP FSTM
Evidence bundle: product/revision photo with unnecessary identifiers redacted; firmware and extracted-file hashes; access model; wiring/interface notes where applicable; synthetic account roles; minimal input; serial or packet logs; observed versus expected behavior; reproducibility count; device recovery status; and exact affected versions. Include proof that emulation assumptions also hold on the claimed product, or clearly limit the claim to the emulated component.
Specialist boundaries#
Vehicles, industrial equipment, medical devices, energy systems and safety-related controls require a dedicated bench or simulator, disconnected actuators and a product-specific safety plan. Do not run generic active probes on deployed equipment or moving vehicles. Fault injection, invasive chip extraction, RF transmission and physical access are separate research capabilities with separate permissions and operational requirements. Tesla’s product-security page and each vendor’s actual program terms should be checked before planning vehicle work; device ownership alone does not settle every condition. Tesla product security
Submission gate: eligible model and access level; supported configuration; a demonstrated security boundary; secrets minimized; no unrelated cloud assets tested; no physical damage required for the proof; clean reproduction; limitations explicit. Prefer one reproducible issue with measured impact over a long inventory of absent hardening flags.
Sources#
All sources accessed 2026-09-11. Undated pages are live references. OWASP citations point to the guide’s official maintained source files.
- Intel / Intigriti. Intel Bug Bounty Program. Undated, current program terms.
- OWASP. ISTG: Attacker Model. Undated.
- OWASP / Aaron Guzman. Firmware Security Testing Methodology. Undated, maintained repository.
- OWASP. ISTG: Firmware Update Mechanism. Undated.
- Espressif. Secure Boot v2. ESP-IDF stable, ESP32; undated.
- Espressif. Security Overview. ESP-IDF stable, ESP32; undated.
- OWASP. ISTG: Installed Firmware. Undated.
- OWASP. ISTG: Memory. Undated.
- OWASP. ISTG: Internal Interfaces. Undated.
- OWASP. ISTG: Wireless Interfaces. Undated.
- ReFirm Labs. Binwalk. Undated, maintained repository.
- Tesla. Product Security. Undated, current policy.