When to Use
User needs to understand something opaque, undocumented, legacy, or partially broken. Agent handles behavioral tracing, artifact mapping, hypothesis testing, and concise documentation for binaries, APIs, file formats, protocols, devices, and human workflows.
Architecture
Memory lives in ~/reverse-engineering/. If ~/reverse-engineering/ does not exist, run setup.md. See memory-template.md for structure.
CODEBLOCK0
Quick Reference
Use these files on demand instead of loading the whole method every time.
| Topic | File |
|---|
| Setup guide | INLINECODE4 |
| Memory template |
memory-template.md |
| TRACE protocol |
protocol.md |
| Confidence model |
evidence-ladder.md |
| Surface mapping |
interface-map.md |
| Deliverable templates |
deliverables.md |
| Safety boundaries |
boundaries.md |
Requirements
- - Authorized access to the target, samples, and environment being analyzed
- A clear statement of whether the target is production, staging, or an offline copy
- Explicit user approval before any invasive, destructive, or credential-bearing step
Core Rules
1. Bound the job before probing
- - Name the target, desired outcome, available artifacts, and operational boundary first.
- Ask what is allowed: read-only inspection, replay, instrumentation, decompilation, fuzzing, or patching.
- If the boundary is unclear, default to the safest read-only path.
- Before the first persistent write, state what will be stored locally and ask for permission.
2. Run the TRACE loop from protocol.md
- - Triage the target.
- Record observable behavior.
- Abstract hypotheses.
- Challenge each hypothesis with the smallest useful test.
- Explain the result in user-facing language.
3. Separate evidence, inference, and guess
- - Tag every claim using the ladder in
evidence-ladder.md. - Never blur "observed" with "likely" or "possible."
- When certainty is low, say what would raise confidence instead of pretending to know.
4. Map surfaces before internals
- - Build the interface inventory from
interface-map.md before writing an implementation story. - Start from inputs, outputs, states, side effects, and trust boundaries.
- Reverse engineering is faster when the outer contract is stable before diving deeper.
5. Prefer minimal, reproducible probes
- - Use the smallest sample, trace, packet, call, or binary slice that can prove or disprove a hypothesis.
- Keep every probe replayable and attributable.
- If a result cannot be reproduced, it is a clue, not a conclusion.
6. Deliver models, not raw notes
- - Every session should end with concrete outputs from
deliverables.md: target brief, interface map, hypothesis ledger, reproduction note, and remaining unknowns. - Optimize for what the user can act on next: debug, reimplement, migrate, document, or secure.
- Good reverse engineering compresses complexity without hiding uncertainty.
Common Traps
These failures usually waste the most time or create false confidence.
| Trap | Why It Fails | Better Move |
|---|
| Jumping straight to decompilation | You lose the external contract and context | Start with behavior, interfaces, and captured artifacts |
| Treating logs as truth |
Logs reflect one code path and one viewpoint | Cross-check with traces, outputs, and controlled inputs |
| Reverse engineering the whole system | Scope explodes and confidence drops | Pick one question, one layer, and one target surface |
| Confusing correlation with mechanism | Similar timings or names can mislead | Design a falsifiable probe before concluding |
| Keeping findings in loose notes | Knowledge becomes untestable and unreusable | Convert findings into deliverables with evidence tags |
| Poking live systems casually | You create risk and destroy signal | Prefer offline copies, captures, and explicit approvals |
Security & Privacy
Data that leaves your machine:
- - Nothing by default.
- Only user-approved samples or public documentation if the task explicitly requires external lookup.
Data that stays local:
- - Preferences and engagement notes in INLINECODE15
- Captured traces, decoded notes, and reproduction snippets kept in the workspace or the local reverse-engineering folder
This skill does NOT:
- - Steal credentials, bypass authorization, or hide activity
- Run exploit chains on production targets by default
- Claim certainty without evidence
- Persist sensitive data outside the documented local folder
- Create durable local memory without first telling the user what will be stored
Related Skills
Install with
clawhub install <slug> if user confirms:
- -
analysis — structure ambiguous problems and turn raw evidence into decisions - INLINECODE18 — reason about endpoints, payloads, contracts, and integration behavior
- INLINECODE19 — model system boundaries, components, and data flow once the target is understood
- INLINECODE20 — build small inspection and replay loops for traces, logs, and artifacts
- INLINECODE21 — evaluate trust boundaries, attack surface, and safe handling of sensitive targets
Feedback
- - If useful: INLINECODE22
- Stay updated: INLINECODE23
技能名称: 逆向工程
详细描述:
使用时机
用户需要理解不透明、无文档、遗留或部分损坏的内容。智能体负责对二进制文件、API、文件格式、协议、设备和人工工作流进行行为追踪、工件映射、假设测试和简洁文档编写。
架构
记忆存储在 ~/reverse-engineering/ 目录中。如果 ~/reverse-engineering/ 不存在,则运行 setup.md。结构参见 memory-template.md。
text
~/reverse-engineering/
├── memory.md # 持久偏好、授权和常见目标类型
├── current-target.md # 当前活动快照
├── targets/ # 每个目标或系统一个文件
└── artifacts/ # 追踪记录、解码笔记和复现片段
快速参考
按需使用这些文件,无需每次都加载完整方法。
memory-template.md |
| TRACE 协议 | protocol.md |
| 置信度模型 | evidence-ladder.md |
| 表面映射 | interface-map.md |
| 交付物模板 | deliverables.md |
| 安全边界 | boundaries.md |
要求
- - 对正在分析的目标、样本和环境拥有授权访问权限
- 明确说明目标是生产环境、预发布环境还是离线副本
- 在进行任何侵入性、破坏性或涉及凭证的步骤前,需获得用户明确批准
核心规则
1. 在探测前界定任务范围
- - 首先明确目标名称、期望结果、可用工件和操作边界。
- 询问允许的操作:只读检查、重放、插桩、反编译、模糊测试或补丁修改。
- 如果边界不明确,默认采用最安全的只读路径。
- 在首次持久写入前,说明将在本地存储的内容并请求许可。
2. 执行 protocol.md 中的 TRACE 循环
- - 对目标进行分类。
- 记录可观察行为。
- 抽象出假设。
- 用最小有效测试挑战每个假设。
- 用面向用户的语言解释结果。
3. 区分证据、推断和猜测
- - 使用 evidence-ladder.md 中的阶梯标记每个声明。
- 切勿混淆“观察到”与“很可能”或“可能”。
- 当确定性较低时,说明哪些因素会提高置信度,而不是假装知道。
4. 先映射表面,再分析内部
- - 在编写实现说明之前,根据 interface-map.md 构建接口清单。
- 从输入、输出、状态、副作用和信任边界入手。
- 当外部契约稳定后再深入分析,逆向工程效率更高。
5. 优先使用最小、可复现的探针
- - 使用能够证明或反驳假设的最小样本、追踪记录、数据包、调用或二进制片段。
- 确保每个探针可重放且可归因。
- 如果结果无法复现,则视为线索而非结论。
6. 交付模型,而非原始笔记
- - 每次会话应以 deliverables.md 中的具体输出结束:目标简报、接口映射、假设台账、复现笔记和剩余未知项。
- 优化用户下一步可操作的内容:调试、重新实现、迁移、文档编写或安全加固。
- 优秀的逆向工程能压缩复杂性,同时不隐藏不确定性。
常见陷阱
这些失败通常最浪费时间或造成虚假信心。
| 陷阱 | 失败原因 | 更优做法 |
|---|
| 直接跳入反编译 | 丢失外部契约和上下文 | 从行为、接口和捕获的工件入手 |
| 将日志视为真相 |
日志只反映一条代码路径和一个视角 | 与追踪记录、输出和受控输入交叉验证 |
| 逆向整个系统 | 范围扩大,置信度下降 | 选择一个具体问题、一个层级和一个目标表面 |
| 混淆相关性与机制 | 相似的时间或名称可能误导 | 在得出结论前设计可证伪的探针 |
| 将发现保留在松散笔记中 | 知识变得不可测试和不可复用 | 将发现转化为带有证据标签的交付物 |
| 随意探测在线系统 | 制造风险并破坏信号 | 优先使用离线副本、捕获记录和明确授权 |
安全与隐私
离开您机器的数据:
- - 默认不发送任何数据。
- 仅限用户批准的样本或公共文档(如果任务明确需要外部查询)。
保留在本地数据:
- - ~/reverse-engineering/ 中的偏好和活动笔记
- 捕获的追踪记录、解码笔记和复现片段保存在工作区或本地逆向工程文件夹中
此技能不会:
- - 窃取凭证、绕过授权或隐藏活动
- 默认在生产目标上运行漏洞利用链
- 在没有证据的情况下声称确定性
- 将敏感数据持久化到文档规定的本地文件夹之外
- 在未告知用户将存储什么内容的情况下创建持久本地记忆
相关技能
如果用户确认,使用 clawhub install
安装:
- - analysis — 结构化模糊问题,将原始证据转化为决策
- api — 分析端点、负载、契约和集成行为
- architecture — 在理解目标后建模系统边界、组件和数据流
- bash — 为追踪记录、日志和工件构建小型检查和重放循环
- cybersecurity — 评估信任边界、攻击面和安全处理敏感目标
反馈
- - 如果觉得有用:clawhub star reverse-engineering
- 保持更新:clawhub sync