meltedinhex/analyst-ai-pack / skills/hunting-ransomware-precursor-behavior
hunting-ransomware-precursor-behavior
FlaggedHunts for ransomware precursor behavior that precedes encryption — shadow-copy and backup deletion, recovery disabling, security-tool tampering, and mass file modification — so the attack can be stopped before payload detonation. Activates for requests to hunt ransomware precursors, detect shadow-copy deletion, or find pre-encryption recovery sabotage.
| File | Kind | Size |
|---|---|---|
| LICENSE | other | 340 B |
| SKILL.md | skill md | 3.0 KB |
| references/api-reference.md | markdown | 1.4 KB |
| scripts/analyst.py | script | 3.1 KB |
references/api-reference.md
View on GitHub# API Reference: Hunting Ransomware Precursor Behavior
## Overview
`scripts/analyst.py` parses process-creation telemetry (CSV or JSON-lines) and flags
recovery-inhibition commands and security/backup service tampering that precede encryption,
correlating co-occurrence per host to prioritize. It parses telemetry only and executes nothing.
## Dependencies
| Package | Version | Purpose |
|---------|---------|---------|
| (stdlib) | — | csv, json, defaultdict, file IO |
## Core functions
### `hunt(path)`
Returns recovery-inhibition events, service-tampering events, high-priority hosts (≥2 signal types),
and a precursor-suspected flag.
## Detection logic
- **Recovery inhibition**: `vssadmin delete shadows`, `wmic shadowcopy delete`, `Win32_ShadowCopy`,
`wbadmin delete catalog`, `bcdedit /set recoveryenabled no`, `wevtutil cl`.
- **Service tampering**: `net stop`/`sc stop`/`taskkill`/`Stop-Service` targeting backup/AV/DB
services (Veeam, SQL, Defender, Sophos, …).
- **High priority**: a host showing both signal types in the dataset.
## Usage
```bash
python scripts/analyst.py hunt events.csv
```
## Sources
- MITRE ATT&CK T1490 Inhibit System Recovery; T1489 Service Stop; T1486 Data Encrypted for Impact
— https://attack.mitre.org/
- Shadow-copy deletion and recovery-disabling command syntax from Windows admin documentation
- Pre-encryption sabotage sequences from public ransomware incident reporting
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |