meltedinhex/analyst-ai-pack / skills/reverse-engineering-nim-and-other-exotic-binaries
reverse-engineering-nim-and-other-exotic-binaries
VerifiedReverse engineers malware written in less-common compiled languages (Nim, Crystal, V, Zig, D) by detecting language-specific runtime signatures, name-mangling, and runtime strings to orient analysis. Activates for requests to reverse Nim malware, identify the source language of an exotic binary, or analyze Crystal/V/Zig/D compiled samples.
| File | Kind | Size |
|---|---|---|
| LICENSE | other | 340 B |
| SKILL.md | skill md | 2.8 KB |
| references/api-reference.md | markdown | 1.2 KB |
| scripts/analyst.py | script | 1.9 KB |
scripts/analyst.py
View on GitHub#!/usr/bin/env python3
"""Detect the source language of an exotic compiled binary (Nim/Crystal/V/Zig/D).
Scans printable strings for language-specific runtime signatures and scores each language by the
number of corroborating markers. Reads bytes statically; executes nothing.
"""
from __future__ import annotations
import argparse
import json
import re
import sys
from pathlib import Path
ASCII_RE = re.compile(rb"[\x20-\x7e]{3,}")
SIGNATURES = {
"Nim": ["nimrtl", "fatal.nim", "@m..nim", "/nim/", "system.nim", "ioselectors",
"nimframe", "nimcopy"],
"Crystal": ["crystal-lang", "crystal::", "raise_overflow", "__crystal_main",
"crystal/once"],
"V": ["vlib/", "_vinit", "_vcleanup", "v_panic", "tos3(", "builtin.v"],
"Zig": ["std.builtin", "panic: ", "zig_panic", "std/", "/zig/", "@panic"],
"D": ["_dmain", "core.runtime", "typeinfo_", "druntime", "rt.lifetime",
"object.error"],
}
def detect(path: str) -> dict:
data = Path(path).read_bytes()
blob = "\n".join(m.decode("latin-1", "ignore") for m in ASCII_RE.findall(data)).lower()
scores = {}
evidence = {}
for lang, markers in SIGNATURES.items():
hits = sorted({m for m in markers if m in blob})
if hits:
scores[lang] = len(hits)
evidence[lang] = hits
best = max(scores, key=scores.get) if scores else None
return {
"detected_language": best if best and scores[best] >= 2 else "uncertain",
"scores": scores,
"evidence": evidence,
}
def main(argv: list[str] | None = None) -> int:
parser = argparse.ArgumentParser(description="Detect exotic source language")
sub = parser.add_subparsers(dest="cmd", required=True)
p = sub.add_parser("detect")
p.add_argument("file")
args = parser.parse_args(argv)
print(json.dumps(detect(args.file), indent=2))
return 0
if __name__ == "__main__":
sys.exit(main())
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 |