Skip to content

meltedinhex/analyst-ai-pack / skills/analyzing-ransomware-encryption-behavior

analyzing-ransomware-encryption-behavior

Verified

Analyzes how a ransomware sample encrypts files: identifying the crypto scheme (symmetric/asymmetric/hybrid), key handling, file targeting and extension/marker changes, shadow-copy deletion, and ransom-note artifacts. Activates for requests to analyze ransomware encryption, assess decryptability, or study ransomware behavior.

FileKindSize
LICENSEother340 B
SKILL.mdskill md3.8 KB
references/api-reference.mdmarkdown1.2 KB
scripts/analyst.pyscript2.7 KB

references/api-reference.md

View on GitHub
# API Reference: Analyzing Ransomware Encryption Behavior

## Overview

`scripts/analyst.py` compares original test files against their encrypted counterparts to
extract the appended extension, measure entropy change, and recover a common trailing footer
(where families often store a wrapped key or IV). It runs on disposable test files only.

## Dependencies

| Package | Version | Purpose |
|---------|---------|---------|
| (stdlib) | — | Entropy, file IO |

## External tools

| Tool | Purpose |
|------|---------|
| Ghidra / radare2 | Identify crypto routines and key handling |
| Detect-It-Easy / capa | Crypto-constant detection |

## Core functions

### `compare(plain_dir, enc_dir)`
Returns added extensions, a common encrypted footer, per-file entropy, size deltas, and an
encryption-coverage estimate (full vs partial).

### `_common_suffix(blobs)`
Finds the longest shared trailing bytes across encrypted files (candidate footer/marker).

## Usage

```bash
python scripts/analyst.py compare ./plain ./encrypted
```

## Sources

- No More Ransom project — https://www.nomoreransom.org/
- NIST cryptographic standards (AES, RSA) — https://csrc.nist.gov/
- Hybrid-encryption ransomware design (per-file AES + RSA-wrapped key), widely documented
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: 197kUpdated 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