Skip to main content

protocol-reverse

Use for authorized reverse engineering of custom binary protocols, Protobuf/gRPC, WebSocket frames, and PCAP-driven protocol recovery.

来源信息

仓库
coco-research/coco
最近来源活动
2026年9月14日 16:04
检测到的 SKILL.md 语言
英语
星标
628
Forks
14

安装方式

默认使用会先检查来源的 Prompt;你也可以切换为直接命令,或下载本地副本。

检查来源文件

决定是否安装前,请先阅读 SKILL.md,以及 SkillsMP 当前展示的配套文件。

文件资源管理器
2 个文件

正在显示 SKILL.md

SKILL.md
来源说明 · 只读预览
name
protocol-reverse
description
Use for authorized reverse engineering of custom binary protocols, Protobuf/gRPC, WebSocket frames, and PCAP-driven protocol recovery.
user-invocable
true
# Protocol Reverse Engineering ## 适用场景 - 自定义 TCP/UDP 二进制协议 - Protobuf / gRPC / FlatBuffers / MessagePack - WebSocket / MQTT / 私有 RPC - PCAP / PCAPNG 还原字段与状态机 - 客户端-服务端校验、序列号、加密帧头 ## 不走本 skill | 情况 | 去哪 | |------|------| | 仅 HTTP 参数签名 / JS 加密 | `js-reverse/` | | 仅 TLS 证书问题 | `pentest-tools/` 或浏览器代理 | | 固件内协议栈深挖 + 仿真 | `firmware-pentest/` 后再回本 skill | ## 工作流 ### Phase 1 — 采集与分诊 ```text □ 拿到样本:PCAP / 代理导出 / 客户端日志 / 二进制 □ 标记方向:C→S / S→C;是否有握手、心跳、重连 □ 固定头?魔数?长度字段?TLV?定长? □ 是否压缩(zlib/gzip/lz4)或加密(AES/ChaCha 帧内) □ tshark -r cap.pcap -T fields -e frame.number -e ip.src -e tcp.payload ``` ### Phase 2 — 帧布局还原 ```text □ 对齐多个同类消息,找不变字节 / 自增序列号 □ 长度字段:大端/小端、含头/不含头 □ 校验:CRC16/32、checksum、HMAC 位置 □ 画出状态机:Connect → Auth → Ready → Request/Response → Close □ 工具:Wireshark 自定义 dissector 草稿 / ImHex / 010 Editor 模板 / Kaitai Struct ``` ### Phase 3 — 序列化与加密 ```text □ Protobuf:.proto 恢复(blackboxprotobuf / pbtk / protoc --decode_raw) □ gRPC:HTTP/2 headers + protobuf body □ 加密:找密钥派生(客户端 so/dll/JS)→ 联合 ida-reverse / js-reverse / apk-reverse □ 重放:仅在授权 scope 内;先无害字段再敏感操作 ``` ### Phase 4 — 产物 ```text MUST 产出: - 消息类型表(name / opcode / fields) - 至少 1 条可复现的解码命令或脚本 - Evidence:原始 hex 摘录 + 解码结果(脱敏) ``` ## 工具链 | 工具 | 必需 | 用途 | |------|------|------| | tshark / Wireshark | 强烈建议 | PCAP 解析 | | Python3 | 是 | 解码脚本 | | blackboxprotobuf | 可选 | 未知 protobuf | | ImHex / 010 | 可选 | 结构模板 | | IDA / r2 / Ghidra | 按需 | 客户端序列化函数,见对应 skill | ## 参考 - `references/protocol-workflow.md` — 帧布局与 Protobuf 速查 - 相关:`../ida-reverse/` `../js-reverse/` `../firmware-pentest/` `../pentest-tools/`
在 GitHub 查看