Reversing Network Protocols logo

Reversing Network Protocols

Community
trilwu
reversing-network-protocols

Reverse engineer undocumented binary network protocols from packet captures and the client that speaks them — recovering framing and field structure, identifying length prefixes, opcodes, checksums and encryption, and building a Wireshark/Kaitai/scapy parser to replay or fuzz. Use when analyzing a proprietary TCP/UDP protocol, a game or IoT or C2 protocol with no spec, or traffic that Wireshark shows only as raw bytes.

Overview

Publishertrilwu
Repositorysecskills
Skill namereversing-network-protocols
Stars
144
Forks
15
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by trilwu on GitHub. Read the source before you install it.

Installation

Install the Reversing Network Protocols AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/trilwu/secskills.git /tmp/secskills
mkdir -p .claude/skills
cp -r /tmp/secskills/secskills-core/skills/reversing-network-protocols .claude/skills/reversing-network-protocols
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Reversing Network Protocols in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Reversing Network Protocols on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Reversing Network Protocols is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Reversing Network Protocols

An undocumented binary protocol is reverse-engineered from two sides at once: the wire, which shows you the bytes that actually flow, and the client, which shows you the code that produced them. Neither alone is enough — the capture tells you what varies, the client tells you why — and the deliverable is a parser precise enough to decode, replay, and eventually fuzz the protocol.

When to Use

  • A proprietary or custom TCP/UDP protocol with no public specification
  • Traffic Wireshark displays as raw Data bytes because no dissector matches
  • Game, IoT, industrial, or C2 protocols you must decode from captures plus the client binary
  • Building a Wireshark dissector, a Kaitai Struct spec, or a scapy layer to parse and replay a protocol

When NOT to Use

  • A known/structured protocol — Protobuf or gRPC specifically is attacking-grpc-protobuf; standard protocols have dissectors already.
  • Defensive PCAP investigation — hunting, IOC extraction, incident triage — is analyzing-network-traffic.
  • Reversing the client binary itself (disassembly, decompilation) is analyzing-binaries; do that in service of the protocol, then structure it here.
  • Identifying or breaking the crypto once you find the protocol is encrypted — reviewing-cryptography.

Work Both Sides

From the capture, establish structure by comparing many messages:

  • Framing — how a message knows where it ends: a length prefix (a field that tracks payload size across messages), a delimiter, or fixed-size records. Finding the length field is usually the first breakthrough.
  • Constants and magic — bytes identical across every message mark headers, version fields, or type tags.
  • Opcode / message type — a small field that correlates with different message shapes; group captures by it.
  • Counters and sequence numbers — fields that increment monotonically.
  • Checksums — a trailing field that changes unpredictably with the payload; test CRC variants against the message body.
  • TLV — many custom protocols are type-length-value triplets once you see the pattern.
  • Endianness — confirm from a known length: does a 260-byte message carry 04 01 or 01 04?

From the client, resolve what the capture cannot:

  • Find the serialization/parsing code by reversing the binary (analyzing- binaries), and read how it builds and consumes a message.
  • Hook send/recv (or the app's socket wrapper) with Frida to capture the buffer before encryption and after decryption — this is how you read an encrypted protocol without breaking the crypto.
  • If the protocol is encrypted, hook the plaintext side; identify the cipher and key handling with reviewing-cryptography only if you must operate off-client.

Build a Parser

Turn the recovered structure into something executable, because a parser is both the proof you understood the protocol and the tool for everything after:

  • Wireshark dissector (Lua) to decode live captures field by field — the fastest way to validate a hypothesis against more traffic.
  • Kaitai Struct to describe the binary format declaratively and generate parsers in several languages.
  • scapy custom layers to both parse and craft messages for replay and fuzzing.

Iterate: decode a batch, find the message that does not parse, refine the spec. The malformed message is where your model is wrong, not noise.

Then What

A working parser enables the security work: replay to test whether the server validates sequence, session, and authentication; fuzz individual fields (lengths, type tags, counts) to find parser bugs; and reason about protocol-level auth — whether nonces, session tokens, or MACs actually prevent replay and tampering, or are decorative.

Rationalizations to Reject

  • "Wireshark shows it as raw data, so there's nothing to see." No dissector matched — that is the starting point, not a dead end. Diff messages to find framing and fields, or write a dissector.
  • "It's encrypted, so I can't reverse it." Hook the client's send/recv to read plaintext before encryption. You rarely need to break the cipher to understand the protocol.
  • "I'll just eyeball the hex." Structure emerges from comparison across many messages — the field that tracks length, the byte that selects type. One message in isolation hides all of it.
  • "The parser mostly works, one message fails — close enough." The failing message is the counterexample that corrects your model. Chase it; it is where the real structure is.
  • "Replaying it is harmless." Replay against a live service acts on that service. Treat it as testing that needs authorization, and reason about what a replayed message does before sending it.

References

  • analyzing-binaries — reversing the client to read its serialization code
  • attacking-grpc-protobuf — when the protocol is Protobuf/gRPC, not custom
  • analyzing-network-traffic — defensive PCAP investigation, not protocol RE
  • reviewing-cryptography — identifying and assessing the protocol's crypto

Frequently asked questions

What does the Reversing Network Protocols AI skill do?

Reverse engineer undocumented binary network protocols from packet captures and the client that speaks them — recovering framing and field structure, identifying length prefixes, opcodes, checksums and encryption, and building a Wireshark/Kaitai/scapy parser to replay or fuzz. Use when analyzing a proprietary TCP/UDP protocol, a game or IoT or C2 protocol with no spec, or traffic that Wireshark shows only as raw bytes.

Why use Reversing Network Protocols on TypingMind?

Because you install it once and use it with any model. Reversing Network Protocols is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Reversing Network Protocols in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/trilwu/secskills/tree/main/secskills-core/skills/reversing-network-protocols. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Reversing Network Protocols?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Reversing Network Protocols?

As many as you like. As long as a model supports skills, you can use Reversing Network Protocols with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Reversing Network Protocols AI skill free?

Yes. It is published on GitHub by trilwu under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇