reverse-engineering-custom-c2-protocols
Reverses proprietary command-and-control protocols: locating send/recv routines,
v1.0.03 instalaciones+3 en 7 días24 EstrellasApache-2.0sincronizado hace 10 horas
Instalar
¿Aún no tienes la CLI de NotHoly? Instálala primero.
$ curl -fsSL https://notholy.com/install.sh | sh$ notholy skills install meltedinhex/reverse-engineering-custom-c2-protocolsEscribe en ~/.notholy/skills después de comprobar la firma y el SHA-256.
FirmaFirmado, ed25519
Paquete4c8f5b9e…ff36300e
4c8f5b9e949c…c705ff36300e4 archivos · 3.1 KBEscaneoMedio2 hallazgos
- Script ejecutable incluido con la skillscripts/analyst.py
- Enlaces a dominios externos
Fuentegithub.com/meltedinhex/analyst-ai-pack/tree/main/skills/reverse-engineering-custom-c2-protocols@da7600a
Esta entrada todavía no está escrita en tu idioma, así que aparece en English.
En esta página
When to Use
- A sample uses a non-standard protocol (or a custom layer over HTTP/TCP) and you must decode its traffic.
- You need to recover message framing, the encryption/encoding scheme, and the command set.
- You want to build a standalone decoder or emulator to parse captured beacon traffic.
Do not use this for documented protocols handled by existing dissectors — use the protocol analyzer directly instead of reversing from scratch.
Prerequisites
- A disassembler/debugger and a network capture (PCAP) of the sample's traffic where possible.
- The crypto/obfuscation skills for recovering keys and encodings.
Workflow
Step 1: Locate the network routines
Find send/recv/WSASend/WinHTTP calls (or the framework wrappers) and the buffers they
operate on. These bracket the serialization and crypto.
Step 2: Recover framing
Trace how outbound buffers are built: magic bytes, length prefixes, sequence/ID fields, and type/opcode fields. Document the header layout.
[ magic(4) ][ len(4 LE) ][ opcode(1) ][ flags(1) ][ payload(len) ]Step 3: Recover crypto/encoding
Identify the transform applied before send / after recv (XOR with embedded key, RC4, AES, base64). Recover keys from the binary or from the key-setup routine.
Step 4: Reconstruct the command set
Map opcodes to handlers (shell, download, upload, sleep/jitter, exit) by following the dispatch switch. Build a table of command → behavior.
Step 5: Build a decoder and validate
Implement a parser/decryptor and run it against captured traffic; confirm it yields coherent commands and recovers the beacon's config.
python scripts/analyst.py decode capture.bin --key 0x5a --magic 4d5a4331Validation
- The decoder parses every message in a real capture without desync.
- Decrypted payloads are coherent (printable commands / structured config).
- The opcode table matches the dispatch logic observed in the binary.
Pitfalls
- Assuming fixed keys when the protocol negotiates a session key in the first exchange.
- Missing a length/sequence field and desynchronizing after the first message.
- Confusing transport (TLS) with the inner custom layer; decode the inner layer.
References
- See
references/api-reference.mdfor the framing decoder. - MITRE ATT&CK T1071 and T1573 (linked in frontmatter).
Archivos de esta versión
references/11.1 KB
- api-reference.md1.1 KB
scripts/12.0 KB
- analyst.py2.0 KB
- LICENSE340 B
- SKILL.md3.3 KB
Permisos
| Permiso | Declarado | Hallado en el escaneo |
|---|---|---|
| Lee archivos | No | No |
| Escribe archivos | No | No |
| Ejecuta comandos de shell | Sí | Sí |
| Usa la red | Sí | Sí |
| Usa conectores | No | No |
| Controla un navegador | No | No |
Hallazgos del escaneo
Revisado el 13 nov 2026
- MediaArchivo · Script ejecutable incluido con la skillscripts/analyst.py
- InfoEnlace · Enlaces a dominios externos
Un escaneo limpio baja el riesgo, pero no prueba que el paquete sea seguro. Lee lo que instalas.
| Versión | Publicada | Commit | SHA-256 | Firma | Cambio de permisos |
|---|---|---|---|---|---|
| v1.0.0 | 13 nov 2026 | da7600a | 4c8f5b9e | Firmada | – |
Más de meltedinhex
Todo de este publicador- writing-yara-rules-from-reversed-codemeltedinhex/writing-yara-rules-from-reversed-code4
- validating-detections-with-atomic-testsmeltedinhex/validating-detections-with-atomic-tests4
- writing-suricata-and-snort-rulesmeltedinhex/writing-suricata-and-snort-rules3
- writing-sigma-detection-rulesmeltedinhex/writing-sigma-detection-rules3
Más en Ingeniería inversa y fuzzing
Ver la categoríaPregunta todo lo que tu alcance permite.
Crea la cuenta, añade créditos y haz la primera pregunta en el chat o en la terminal.
- 1/3
Crea la cuenta
Individual o empresa. Puedes pasar a empresa después sin perder saldo ni claves.
IndividualEmpresa - 2/3
Añade créditos
Con tarjeta. Pagas por token, sin suscripción.
$5.00recarga mínima - 3/3
Pregunta
En el chat, o instala el CLI y ejecuta notholy login en tu terminal.
$ notholy login