Skip to content

meltedinhex/analyst-ai-pack / skills/analyzing-loaders-and-droppers

analyzing-loaders-and-droppers

Verified

Analyzes loader and dropper samples by identifying staging behavior — embedded or downloaded next-stage payloads, decode/decrypt routines, and the execution mechanism used to run the next stage. Activates for requests to analyze a loader or dropper, find a staged payload, or map multi-stage delivery behavior.

FileKindSize
LICENSEother340 B
SKILL.mdskill md2.8 KB
references/api-reference.mdmarkdown1.4 KB
scripts/analyst.pyscript2.9 KB

references/api-reference.md

View on GitHub
# API Reference: Analyzing Loaders and Droppers

## Overview

`scripts/analyst.py` analyzes a loader/dropper: it finds embedded PE/archive signatures (skipping
the loader's own header), counts high-entropy windows (packed/encrypted stages), and scans strings
for download, decode, and execution APIs plus URLs. It reads bytes statically, defangs URLs, and
executes nothing.

## Dependencies

| Package | Version | Purpose |
|---------|---------|---------|
| (stdlib) | — | math, regex, Counter, JSON, file IO |

## Core functions

### `stage(path)`
Returns embedded signatures, high-entropy window count, download/decode/execution API hits,
defanged URLs, and a loader likelihood flag.

### `_entropy(chunk)`
Shannon entropy (bits/byte) over a window; >7.2 suggests compressed/encrypted data.

## API categories

- **download**: `URLDownloadToFile`, `InternetReadFile`, WinHTTP/WinINet.
- **decode**: `CryptDecrypt`, `CryptStringToBinary`, base64/RC4/XOR.
- **execution**: `CreateProcess`, `ShellExecute`, `WinExec`, `CreateRemoteThread`, `LoadLibrary`.

## Usage

```bash
python scripts/analyst.py stage sample.bin
```

## Sources

- MITRE ATT&CK T1105 Ingress Tool Transfer — https://attack.mitre.org/techniques/T1105/
- MITRE ATT&CK T1140 Deobfuscate/Decode Information — https://attack.mitre.org/techniques/T1140/
- Shannon entropy definition; overlay/staging patterns from public loader analyses
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: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report.Stars: 194kUpdated 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: 194kUpdated Claude CodeCodexVerifiedInstall