Building config extractors

From meltedinhex/analyst-ai-pack · View interactive version

Building config extractors is an AI agent skill from the GitHub repository meltedinhex/analyst-ai-pack. Builds 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 configu

How to use this skill

Skill file

Building Config Extractors

When to Use

one-off scripts.

structured, defanged config.

Do not use a spec built for one variant blindly on another — re-verify offsets/keys per

variant. This skill reads samples statically and executes nothing.

Prerequisites

spec.

Safety & Handling

Workflow

Step 1: Write the extraction spec

Define a JSON spec: blob offset/length (or a marker to search), ordered decode layers

(xor with key, base64), and fields (name, offset, length, type: str/u16/u32/ipv4).

Step 2: Run the extractor

python scripts/analyst.py extract sample.bin --spec family.json

Locates the blob, applies decode layers, parses fields, and defangs URL/IP fields.

Step 3: Validate output

Confirm fields are plausible (valid hosts, ports, IDs); adjust the spec as needed.

Step 4: Reuse

Store the spec per family and apply across the corpus.

Validation

Pitfalls

References

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.