meltedinhex/analyst-ai-pack / skills/reverse-engineering-custom-c2-protocols
reverse-engineering-custom-c2-protocols
VerifiedReverses proprietary command-and-control protocols: locating send/recv routines, recovering the message framing and encryption/encoding, and reconstructing the command set to build a decoder or emulator. Activates for requests to reverse a custom C2 protocol, decode beacon traffic, or document a malware command structure.
| File | Kind | Size |
|---|---|---|
| LICENSE | other | 340 B |
| SKILL.md | skill md | 3.3 KB |
| references/api-reference.md | markdown | 1.1 KB |
| scripts/analyst.py | script | 2.0 KB |
references/api-reference.md
View on GitHub# API Reference: Reverse Engineering Custom C2 Protocols
## Overview
`scripts/analyst.py` is a configurable reference decoder for a length-prefixed, XOR-obfuscated
framing (`[magic][len][opcode][flags][payload]`). Adapt the field sizes and crypto to the
protocol you reversed. It only parses a capture file and makes no network connections.
## Dependencies
| Package | Version | Purpose |
|---------|---------|---------|
| (stdlib) | — | struct parsing, file IO |
## Core functions
### `decode(stream, key, magic)`
Walks the byte stream, locates framed messages by magic, parses length/opcode/flags, and
XOR-decrypts each payload; returns parsed messages.
### `xor(data, key)`
Single-byte XOR helper used as the example payload transform.
## Usage
```bash
python scripts/analyst.py decode capture.bin --key 0x5a --magic 4d5a4331
```
## Sources
- MITRE ATT&CK T1071 Application Layer Protocol — https://attack.mitre.org/techniques/T1071/
- MITRE ATT&CK T1573 Encrypted Channel — https://attack.mitre.org/techniques/T1573/
- Common C2 framing patterns (magic + length prefix + opcode dispatch), general RE practice
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 197k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |