Skip to content

rhaist/marq / skills/malware/malware-dynamic

malware-dynamic

Verified

Guides deciding when a sample needs dynamic analysis, handing it to an off-box sandbox (CAPE, Triage, ANY.RUN, Joe Sandbox) without leaking it, reading the report (process tree, network, drops, config), spotting sandbox evasion, and turning results into IOCs and YARA. Use when static analysis stalls on a packed or evasive sample, or the user asks to detonate a sample or interpret a sandbox report.

FileKindSize
SKILL.mdskill md5.9 KB
---
name: malware-dynamic
description: Guides deciding when a sample needs dynamic analysis, handing it to an off-box sandbox (CAPE, Triage, ANY.RUN, Joe Sandbox) without leaking it, reading the report (process tree, network, drops, config), spotting sandbox evasion, and turning results into IOCs and YARA. Use when static analysis stalls on a packed or evasive sample, or the user asks to detonate a sample or interpret a sandbox report.
license: Apache-2.0
metadata:
  verified: "2026-11-17"
---

# Dynamic analysis (off-box sandbox hand-off)

**marq never detonates.** Nothing here runs a sample on this box or on an engagement
host. Dynamic analysis happens in a separate sandbox; the static work happens in your own sandbox (`load_skill malware-triage`, `malware-static`, `malware-maldoc`, `malware-scripts`).

## When static isn't enough

- Packed/crypted (entropy >7, tiny import table, capa packer warning) and you can't unpack.
- Strings/config encrypted; capa flags anti-analysis or runtime decryption.
- Loaders and script lures whose next stage is fetched or keyed at runtime.
- You need runtime IOCs (resolved C2, DGA output, dropped payloads) or proof of behaviour for an IR call.

## Before uploading: privacy first

- **Search by sha256 first** on Triage, ANY.RUN, Joe Sandbox and VirusTotal. An existing
  report costs nothing and leaks nothing.
- **Free/public tiers publish the sample:**
  - Triage (tria.ge): all public submissions are visible to everyone and can't be deleted. verify: https://recordedfuture.tria.ge/docs/faq
  - ANY.RUN Community: tasks are public; private analyses are paid only. verify: https://any.run/plans/
  - Joe Sandbox Cloud Basic: sample and full results published to anyone. verify: https://www.joesandbox.com/pdpp
  - VirusTotal: shared with the community and partners, and premium users can download it.
    Private Scanning is a paid add-on. verify: https://docs.virustotal.com/docs/private-scanning
- **Don't upload publicly** when the file holds victim data (a real internal document,
  embedded credentials, internal hostnames, email PII). Same for a targeted sample in a quiet
  IR (actors watch VirusTotal and sandboxes for their hashes), or anything the sender marked
  TLP:AMBER, AMBER+STRICT or RED. Use a self-hosted CAPE or a paid private tier instead. Client
  data needs the IR lead's or client's OK; label your own report with TLP. verify: https://www.first.org/tlp/

## Hand-off safely

- Record the sha256 (`sha256sum`), then pull the file from the `/work` bind
  mount on the host. Wrap it in a password archive
  (`infected` by convention) and defang the extension. Check the hash again on arrival. Never
  open or detonate it on an engagement or production box.
- Log the hand-off (hash, sandbox, public/private, time, report URL) for chain of custody.

## Pick the sandbox

- **CAPE** (CAPEv2, open source, self-host = private; public demo at capesandbox.com):
  automated unpacking, payload/memory dumps, family config extraction, YARA-driven debugger,
  Windows 10/11 guests. verify: https://github.com/kevoreilly/CAPEv2
- **Triage** (Recorded Future Sandbox): fast, broad family config extraction, multi-OS.
  Public free tier; private on the enterprise sandbox.
- **ANY.RUN**: interactive VM, so you can click through installers, CAPTCHAs, ClickFix pages
  and "enable content" prompts. Free tier: 60 s, Windows 10/7, Ubuntu, Android. macOS is on
  higher tiers or in beta. verify: https://any.run/plans/
- **Joe Sandbox**: very deep reports, strong on evasive samples and phishing docs/URLs.

## Read the report

- **Process tree**: parent → child chains (`winword`→`cmd`→`powershell`, `explorer`→`mshta`,
  `wscript`), full decoded command lines, injection into `explorer`/`svchost`/`RegAsm`, LOLBins.
- **Network**: DNS, HTTP host/URI/User-Agent, SNI, JA3/JA4, IDS alerts. Separate C2 from
  connectivity checks (`ip-api`, `msftconnecttest`) and sandbox noise.
- **Drops & dumps**: hashes of dropped, downloaded and unpacked payloads. Bring them back to
  `/work` as inert files and analyze statically (capa, YARA, rabin2). `capa` also
  reads a CAPE report JSON directly (`capa report.json`) and maps behaviour to ATT&CK.
  verify: https://github.com/mandiant/capa
- **Persistence**: Run keys, scheduled tasks, services, startup folder, WMI subscriptions.
- **Config extraction**: family, C2 list, campaign/botnet id, keys, mutex. A parser-extracted
  config is the strongest attribution signal. Signature names and scores are claims, not facts.

## Evasion: a clean report doesn't mean benign

- Exits at once, or long sleeps/timers, with nothing past the first process.
- Checks for VM artefacts (VBox/VMware strings, MAC, CPUID), uptime, RAM/CPU/disk size,
  user activity, username/hostname, locale/keyboard (CIS exclusion), geofenced IP, debuggers.
  capa anti-analysis hits predict this.
- Server-side gating: stage-2 returns 404/benign to sandbox IPs, needs a UA/referrer/cookie,
  one-time links already used, CAPTCHA gates.
- Missing pieces: required arguments, a DLL export (`rundll32 x.dll,Export`), an archive
  password, user interaction (ClickFix: the payload sits in the clipboard, not the page).
- Rerun with a longer timeout, another OS/locale/egress region, interactive mode, or the right
  argument/export. Still nothing → verdict **unknown**, not benign.

## Results → IOCs & detections

- Atomic IOCs: hashes (sample, drops, unpacked), C2 domains/IPs/URLs, mutexes, paths,
  registry keys, task names, User-Agents. Defang them in reports (`hxxp`, `[.]`).
- Enrich and pivot: `load_skill indicator-enrichment`, `load_skill ioc-pivoting`.
- Durable detection: YARA on unpacked payloads and memory-dump strings (`load_skill malware-yara`,
  test with `yara`); process-chain/command-line rules → `load_skill detection-engineering`.
- `report_finding`: title = family/behaviour; evidence = report ID/URL (public or private), key
  process chain, extracted config, IOCs. Mark sandbox verdicts as third-party claims.
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: 198kUpdated Claude CodeCodexVerifiedInstall
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: 196kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report.Stars: 196kUpdated Claude CodeCodexVerifiedInstall
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: 196kUpdated Claude CodeCodexVerifiedInstall