$npx -y skills add zhaoxuya520/reverse-skill --skill competition-firmware-layoutInternal downstream skill for ctf-sandbox-orchestrator. CTF-sandbox workflow for firmware images, partition tables, boot chains, update packages, extracted filesystems, embedded configs, and device-facing trust boundaries. Use when the user asks to unpack firmware, map partition
| 1 | # Competition Firmware Layout |
| 2 | |
| 3 | Use this skill only as a downstream specialization after `$ctf-sandbox-orchestrator` is already active and has established sandbox assumptions, node ownership, and evidence priorities. If that has not happened yet, return to `$ctf-sandbox-orchestrator` first. |
| 4 | |
| 5 | Use this skill when the hard part is understanding how a firmware image is structured, booted, updated, and turned into reachable device behavior. |
| 6 | |
| 7 | Reply in Simplified Chinese unless the user explicitly requests English. |
| 8 | |
| 9 | ## Quick Start |
| 10 | |
| 11 | 1. Preserve the original image, extracted partitions, unpacked filesystems, and patched copies as separate artifacts. |
| 12 | 2. Map outer container, partition table, bootloader, kernel, rootfs, config, and update metadata before editing anything. |
| 13 | 3. Track the boot or update chain in order instead of jumping straight to the most interesting file. |
| 14 | 4. Record keys, signatures, offsets, partition boundaries, and init entrypoints in one compact evidence chain. |
| 15 | 5. Reproduce the decisive secret, branch, or reachable service from the smallest extracted path. |
| 16 | |
| 17 | ## Workflow |
| 18 | |
| 19 | ### 1. Establish Image Layout |
| 20 | |
| 21 | - Identify container type, partition headers, compression, filesystem type, and any appended or nested images. |
| 22 | - Record offsets, sizes, hashes, mount points, and partition names before extraction mutates anything. |
| 23 | - Separate bootloader, kernel, initramfs, rootfs, config blobs, and update metadata as different layers. |
| 24 | |
| 25 | ### 2. Trace Boot Or Update Flow |
| 26 | |
| 27 | - Map how control moves from bootloader to kernel to init to services, or from update package to verifier to installer. |
| 28 | - Note which credentials, certificates, passwords, seeds, or config files are consumed at each stage. |
| 29 | - Distinguish checked-in firmware intent from the live behavior the extracted files actually support. |
| 30 | |
| 31 | ### 3. Reduce To The Decisive Path |
| 32 | |
| 33 | - Show the smallest chain from image boundary to service exposure, auth bypass, debug interface, credential recovery, or flag artifact. |
| 34 | - Keep extracted filesystems, derived configs, and patch experiments separate from pristine inputs. |
| 35 | - If the challenge becomes mostly about native crash behavior or exploit primitives after extraction, switch back to the broader reverse skill. |
| 36 | |
| 37 | ## Read This Reference |
| 38 | |
| 39 | - Load `references/firmware-layout.md` for the layout checklist, boot-chain checklist, and evidence packaging. |
| 40 | |
| 41 | ## What To Preserve |
| 42 | |
| 43 | - Partition offsets, hashes, filesystem types, mount paths, boot entrypoints, and update metadata |
| 44 | - Extracted secrets, config paths, init scripts, service units, and credentials tied to the stage that consumes them |
| 45 | - Original images, extracted layers, mounted views, and patched copies as separate artifacts |