meltedinhex/analyst-ai-pack / skills/performing-static-pe-analysis
performing-static-pe-analysis
VerifiedExtracts structure and indicators from a Windows PE file without executing it: headers, sections, imports/exports, resources, entropy, and embedded strings to infer capability and packing. Activates for requests to statically analyze a PE, EXE, or DLL, or inspect imports and headers.
| File | Kind | Size |
|---|---|---|
| LICENSE | other | 340 B |
| SKILL.md | skill md | 3.5 KB |
| references/api-reference.md | markdown | 1.4 KB |
| scripts/analyst.py | script | 4.1 KB |
references/api-reference.md
View on GitHub# API Reference: Performing Static PE Analysis
## Overview
`scripts/analyst.py` parses a PE file and reports headers, sections with per-section entropy,
imports grouped into behavioral buckets, and TLS-callback presence. It prefers `pefile` and
falls back to a minimal built-in header walk when `pefile` is unavailable.
## Dependencies
| Package | Version | Purpose |
|---------|---------|---------|
| pefile | >= 2023.2 | Full PE parsing (optional but recommended) |
| (stdlib) | — | struct/entropy fallback parser |
## External tools
| Tool | Purpose |
|------|---------|
| capa | Capability identification from disassembly |
| PEStudio | Interactive static PE triage |
## Core functions
### `analyze(path)`
Dispatches to `analyze_with_pefile` or the `analyze_minimal` fallback. Returns headers,
sections, entropy, and classified imports.
### `_classify(imports)`
Groups imported API names into `injection`, `network`, `crypto`, `persistence`, `evasion`.
### `entropy(data)`
Byte-level Shannon entropy (0–8).
## Usage
```bash
pip install pefile # optional, enables full analysis
python scripts/analyst.py analyze sample.bin
```
## Sources
- Microsoft PE Format specification — https://learn.microsoft.com/windows/win32/debug/pe-format
- pefile library — https://github.com/erocarrera/pefile
- Windows API behavioral groupings (standard malware-analysis import categories)
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 |