Skip to content

rhaist/marq / skills/malware/malware-static

malware-static

Verified

Guides deep static analysis of a PE, ELF or .NET binary without running it, using rabin2 for structure and packing, capa for capabilities, strings, and IOC extraction for pivoting. Use when the user asks to reverse or analyze an executable, DLL or ELF, check if a binary is packed, identify what malware can do, or pull IOCs from a sample. (Quick first look: malware-triage.)

FileKindSize
SKILL.mdskill md2.5 KB
---
name: malware-static
description: "Guides deep static analysis of a PE, ELF or .NET binary without running it, using rabin2 for structure and packing, capa for capabilities, strings, and IOC extraction for pivoting. Use when the user asks to reverse or analyze an executable, DLL or ELF, check if a binary is packed, identify what malware can do, or pull IOCs from a sample. (Quick first look: malware-triage.)"
license: Apache-2.0
metadata:
  verified: "2026-11-17"
---

# Static binary analysis

Static only: nothing here executes the sample. Stage it under `/work` first.
This is the deep-dive arm of the `malware-triage` loop; triage sends you here
when a binary needs depth.

## 1. Structure (rabin2)

- `-I` info: format, arch, bits, compiler/linker, `canary`/`nx`/`pic` flags.
- `-i` imports, `-E` exports, `-S` sections, `-z` strings.
- **Packing check:** section entropy >7.0, very few imports (a packer resolves
  them at runtime), odd section names (`.UPX0`, `.aspack`), raw size ≫ virtual.
  Packed → static yields little, and capa stops at a packer warning with no
  results unless you pass `-v`; unpack off-box (e.g. `upx -d`) before capa, or hand off for dynamic analysis (`load_skill malware-dynamic`).

## 2. Capabilities (capa)

- Maps code to ATT&CK techniques + MBC behaviours: persistence, process
  injection, C2, anti-debug, crypto. Add `-v` for the matched evidence
  (addresses/strings) when you need to justify a verdict.
- .NET / shellcode: capa handles both; tell it the format if autodetect fails.
- capa v10 no longer auto-loads a `<sample>.viv` workspace (pickle → code exec
  in ≤9.4); never set `CAPA_LOAD_VIV_WORKSPACE=1` for a `.viv` shipped with a sample.

## 3. Strings (`rabin2 -z`)

- `rabin2 -z` dumps embedded strings; grep for `http`, `\\`,
  `.onion`, IPs, mutex/registry paths. Fast first signal for C2 and config.
- This catches plain strings only. Stack/tight/XOR-decoded strings stay hidden:
  if capa flags obfuscation/encryption and the strings look empty, the real IOCs
  are encoded: note it and pull the sample to a dedicated deobfuscator/sandbox
  off-box (marq runs none of these tools; use your own isolated sandbox).

## Extract IOCs → pivot

- Hashes (sha256), C2 URLs/IPs/domains, mutexes, file paths, certificate CNs.
- Run each through `load_skill ioc-pivoting`: `hashlookup` + `ORKL`
  (`security-apis` skill) to name the family and find existing reporting.
- `report_finding`: evidence = capa rule names + the IOCs. Turn distinctive
  strings/byte patterns into a YARA rule; see the `malware-yara` skill.
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