meltedinhex/analyst-ai-pack / skills/handling-malware-samples-safely
handling-malware-samples-safely
VerifiedEstablishes safe practices for acquiring, storing, transferring, and disposing of malware samples: password-protected archives, neutralized extensions, hashing for identity, and chain-of-custody. Activates for requests about safely storing or sharing malware, sample handling hygiene, or defanging artifacts.
| File | Kind | Size |
|---|---|---|
| LICENSE | other | 340 B |
| SKILL.md | skill md | 4.0 KB |
| references/api-reference.md | markdown | 1.4 KB |
| scripts/analyst.py | script | 2.8 KB |
references/api-reference.md
View on GitHub# API Reference: Handling Malware Samples Safely
## Overview
`scripts/analyst.py` provides three safe, read-only operations: computing a sample's hash
identity, emitting a provenance record, and defanging IOCs before sharing. It never executes
a sample.
## Dependencies
| Package | Version | Purpose |
|---------|---------|---------|
| (stdlib) | — | Hashing, JSON, regex |
## External tools
| Tool | Purpose |
|------|---------|
| 7-Zip | Encrypted, password-protected sample archives (`-p`, `-mhe=on`) |
| certutil / sha256sum | Hashing outside Python where convenient |
## Core functions
### `compute_hashes(filepath)`
Returns `md5`, `sha1`, `sha256`, `size` for identification.
### `make_record(filepath, source, case)`
Returns a provenance dict: case, source, filename, UTC timestamp, and hashes.
### `defang(text)`
Rewrites `http(s)://` to `hxxp(s)://` and brackets dots in URLs/IPs so indicators are not
clickable.
## Usage
```bash
python scripts/analyst.py hash sample.bin
python scripts/analyst.py record sample.bin --source MalwareBazaar --case CASE-001
python scripts/analyst.py defang iocs.txt
```
## Sources
- MalwareBazaar (abuse.ch) sample-sharing conventions — https://bazaar.abuse.ch/
- NIST SP 800-86, Guide to Integrating Forensic Techniques into Incident Response —
https://csrc.nist.gov/pubs/sp/800/86/final
- 7-Zip command-line documentation (vendor)
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 |