embedded-protocol-reconstruction
Recover embedded binary packet formats, protocol crypto, integrity checks, dispatch tables, and source-to-sink behavior from firmware and captures. Use for UDP/TCP/IPC management protocols.
SKILL.mdfirmware-reverse-eng-skill/embedded-protocol-reconstruction/SKILL.md
GitHubEmbedded Protocol Reconstruction
Use this skill when a native service must be reconstructed from parsers, crypto primitives, tables, strings, disassembly, and packet captures.
Workflow
- Identify service initialization, socket creation, bind/interface policy, receive loop, and callback registration.
- Recover header offsets, widths, endianness, lengths, sequence fields, command/category fields, checksums, and payload boundaries.
- Trace validation in order: framing, bounds, source state, decode, integrity, authentication, category selection, command lookup, handler.
- Decode command tables and classify each handler read-only, configuration-changing, reboot/reset, or unknown. Resolve metadata through field consumers rather than names.
- Identify crypto algorithms from operations/constants and trace every key to provenance: packet, fixed firmware, configuration, hardware, or runtime state.
- Build an offline parser/builder and deterministic self-tests before any live traffic.
- Perform at most one narrowly scoped read-only validation request; never fuzz or transmit a state-changing command without explicit authorization.
Authentication distinction
Protocol version checks, encoding/obfuscation, checksums, unkeyed hashes, and source-IP locks are not authentication unless a private secret is required and verified. Document this distinction at each gate.
Reporting
Provide a receive-to-sink call graph, packet schema, command inventory,
key-material provenance, authorization gates, runtime limitations, and
evidence links. Label findings PROVEN FROM CODE, VERIFIED BY PCAP,
VERIFIED ON DEVICE, HIGH-CONFIDENCE INFERRED, or UNKNOWN.