meltedinhex/analyst-ai-pack / skills/detecting-sandbox-evasion-behavior
detecting-sandbox-evasion-behavior
VerifiedDetects sandbox and analysis evasion techniques in a sample by scanning static strings, imports, and API traces for VM artifact checks, timing/sleep stalls, anti-debug calls, and environment fingerprinting. Activates for requests to detect sandbox evasion, find anti-VM or anti-debug checks, or explain why a sample did not detonate.
| File | Kind | Size |
|---|---|---|
| LICENSE | other | 340 B |
| SKILL.md | skill md | 2.7 KB |
| references/api-reference.md | markdown | 1.3 KB |
| scripts/analyst.py | script | 2.3 KB |
scripts/analyst.py
View on GitHub#!/usr/bin/env python3
"""Scan a sample's printable strings for sandbox/VM/anti-debug evasion indicators.
Extracts ASCII/UTF-16LE strings and matches them against curated evasion artifact lists. Reports
hits grouped by category. 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]{4,}")
UTF16_RE = re.compile(rb"(?:[\x20-\x7e]\x00){4,}")
INDICATORS = {
"anti_vm": ["vmware", "vbox", "virtualbox", "vmtoolsd", "vboxservice", "qemu", "xen",
"red hat virtio", "vmci", "prl_", "hyperv", "innotek"],
"anti_sandbox": ["sbiedll", "sandboxie", "cuckoo", "wireshark", "procmon", "vmsrvc",
"sample.exe", "malware", "maltest", "john doe"],
"anti_debug": ["isdebuggerpresent", "checkremotedebuggerpresent",
"ntqueryinformationprocess", "outputdebugstring", "ntsetinformationthread",
"dbghelp", "blockinput"],
"timing": ["gettickcount", "queryperformancecounter", "rdtsc",
"timegettime", "sleep"],
"fingerprint": ["getusername", "getcomputername", "getsystemmetrics", "globalmemorystatus",
"getdiskfreespace", "cpuid", "getadaptersinfo"],
}
def _strings(data: bytes) -> set[str]:
out = {m.decode("ascii", "ignore").lower() for m in ASCII_RE.findall(data)}
out |= {m.decode("utf-16-le", "ignore").lower() for m in UTF16_RE.findall(data)}
return out
def scan(path: str) -> dict:
blob = " ".join(_strings(Path(path).read_bytes()))
results = {}
for cat, needles in INDICATORS.items():
hits = sorted({n for n in needles if n in blob})
if hits:
results[cat] = hits
return {
"categories_found": sorted(results.keys()),
"indicators": results,
"evasion_suspected": bool(results),
}
def main(argv: list[str] | None = None) -> int:
parser = argparse.ArgumentParser(description="Scan for sandbox/anti-debug evasion indicators")
sub = parser.add_subparsers(dest="cmd", required=True)
p = sub.add_parser("scan")
p.add_argument("file")
args = parser.parse_args(argv)
print(json.dumps(scan(args.file), indent=2))
return 0
if __name__ == "__main__":
sys.exit(main())
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the work | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixes | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation code | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |