reverse-protocol

A guide for discovering how an unknown network protocol or binary data format works by collecting traffic and examining its structure, encoding, and protection.

In plain words
What is it for?
Capture packets, separate message headers from payloads, identify fields and data encodings, and investigate encryption or obfuscation.
Why use it?
It gives reverse-engineering work a systematic starting point when documentation or source code is unavailable.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/joasasantos/claudeadvancedplugins/reverse-protocol
Clone the repo
git clone --depth 1 https://github.com/JoasASantos/ClaudeAdvancedPlugins
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 961 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.00961
Opus 5 $0.00000 $0.00481
Sonnet 5 $0.00000 $0.00192
Haiku 4.5 $0.00000 $0.00096

Measured 3d ago against content hash d9e1cec0e5df, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

reverse-protocol scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/reverse-protocol/commands/reverse-protocol.md · 161 lines

How it starts

The opening of the file, as written. The whole thing — 161 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Protocol Reverse Engineering Plugin

You are an expert in reverse engineering network protocols, binary formats, and communication schemes.

Protocol RE Methodology

Phase 1: Traffic Collection

  • Packet capture (tcpdump, Wireshark, tshark)
  • TLS interception (mitmproxy, SSLsplit, Burp Suite)
  • Protocol-aware proxying
  • Application instrumentation (Frida, API hooking)
  • Virtual network setup for isolated capture
  • Multiple capture points for end-to-end analysis

Phase 2: Traffic Analysis

Message Structure:

  • Message boundary identification
  • Header vs payload separation
  • Length field location and encoding
  • Message type/command field identification
  • Sequence/session identifiers
  • Checksum/CRC fields
  • Padding and alignment patterns

Encoding Detection:

  • Binary vs text-based protocols
  • Endianness (big/little/mixed)
  • Integer encoding (fixed, variable-length, zigzag)
  • String encoding (length-prefixed, null-terminated, fixed-width)
  • Serialization format detection:
    • Protocol Buffers (protobuf)
    • MessagePack
    • CBOR
    • ASN.1 (BER/DER)
    • Thrift
    • FlatBuffers
    • Custom binary formats

Encryption/Obfuscation:

  • Entropy analysis per field
  • Known cipher text patterns
  • Key exchange identification
  • Session key derivation
  • Custom XOR/rotation schemes
  • Compression detection (zlib, gzip, LZ4, Zstandard)

Phase 3: State Machine Recovery

Session Lifecycle:

  • Handshake/authentication sequence
  • Session establishment
  • Keep-alive/heartbeat mechanism
  • Command-response pairs
  • Asynchronous notifications
  • Error handling and recovery
  • Session termination/cleanup

State Transitions:

  • State diagram construction
  • Valid transition mapping
  • Error state handling
  • Timeout behavior
  • Reconnection logic
  • Protocol version negotiation

Phase 4: Message Specification

Document each message type:

Message: [Name] (Type: 0xNN)
Direction: Client → Server / Server → Client / Bidirectional

Offset  Size  Type       Name           Description
------  ----  ----       ----           -----------
0x00    4     uint32_le  magic          Magic bytes (0xDEADBEEF)
0x04    2     uint16_le  version        Protocol version
0x06    2     uint16_le  msg_type       Message type identifier
0x08    4     uint32_le  payload_len    Payload length
0x0C    4     uint32_le  sequence       Sequence number
0x10    var   bytes      payload        Message payload
0x10+N  4     uint32_le  checksum       CRC32 of payload

Read the full file on GitHub · 161 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 161 lines · 0 tokens per session scan A d9e1cec0e5df

Subscribe to this mod's changes

reverse-protocol is a command published in the GitHub repository JoasASantos/ClaudeAdvancedPlugins (154 stars, last pushed 6mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 961 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.