meltedinhex/analyst-ai-pack / skills/building-config-extractors
building-config-extractors
VerifiedBuilds reusable malware configuration extractors by applying a declarative JSON spec (offsets, decode layers, field definitions) to a sample to produce structured, defanged config. Activates for requests to build a config extractor, write a reusable family config parser, or run a spec-driven configuration extraction.
| File | Kind | Size |
|---|---|---|
| LICENSE | other | 340 B |
| SKILL.md | skill md | 2.7 KB |
| references/api-reference.md | markdown | 1.5 KB |
| scripts/analyst.py | script | 3.4 KB |
references/api-reference.md
View on GitHub# API Reference: Building Config Extractors
## Overview
`scripts/analyst.py` is a declarative config-extraction engine: given a JSON spec describing the
config blob location, ordered decode layers, and field definitions, it extracts a structured,
defanged config from a sample. It reads bytes statically and executes nothing.
## Dependencies
| Package | Version | Purpose |
|---------|---------|---------|
| (stdlib) | — | base64, struct, JSON, file IO |
## Spec format
```json
{
"blob": {"marker": "CFG0", "length": 256},
"decode": [{"type": "xor", "key": "0x5a"}, {"type": "base64"}],
"fields": [
{"name": "c2", "offset": 0, "length": 64, "type": "str"},
{"name": "port", "offset": 64, "type": "u16"},
{"name": "ip", "offset": 66, "type": "ipv4"}
]
}
```
- **blob**: `offset`+`length` or `marker`+`length` (searches for the marker).
- **decode**: ordered `xor` (single-byte `0x..` or multi-byte string key) and `base64` layers.
- **fields**: `str`, `u16`, `u32` (little-endian), `ipv4`. URL/IP fields are defanged.
## Core functions
### `extract(path, spec)`
Locates the blob, applies decode layers, parses fields, returns the config.
## Usage
```bash
python scripts/analyst.py extract sample.bin --spec family.json
```
## Sources
- MITRE ATT&CK T1140 Deobfuscate/Decode Information — https://attack.mitre.org/techniques/T1140/
- Declarative config-extractor design (DC3-MWCP, CAPE parsers) — https://github.com/Defense-Cyber-Crime-Center/DC3-MWCP
- XOR/base64 layered config encoding from public family teardowns
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: 198k | 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 |