Handling malware samples safely

From meltedinhex/analyst-ai-pack · View interactive version

Handling malware samples safely is an AI agent skill from the GitHub repository meltedinhex/analyst-ai-pack. Establishes 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 ar

How to use this skill

Skill file

Handling Malware Samples Safely

When to Use

execution or contamination.

and tickets.

Do not use these conventions as a substitute for an isolated detonation environment; safe

storage prevents accidents but analysis still requires an isolated lab.

Prerequisites

Safety & Handling

executable extension on a working machine.

password infected.

sample.exe_) so the OS will not execute it on a stray click.

Workflow

Step 1: Identify the sample by hash

A sample's identity is its SHA-256, not its filename. Compute hashes immediately:

python scripts/analyst.py hash sample.exe
# md5, sha1, sha256, size, ssdeep-like size bucket

Rename the working copy to its SHA-256 so identity travels with the file:

mv sample.exe 9f86d0818...<sha256>.bin

Step 2: Store in an encrypted archive

7z a -p"infected" -mhe=on <sha256>.7z <sha256>.bin
# -mhe=on encrypts filenames too

Keep the loose, neutralized copy only inside the lab; the archive is the storage/transfer

form.

Step 3: Record provenance

Capture where the sample came from, when, and who handled it. The script can emit a JSON

metadata record:

python scripts/analyst.py record <sha256>.bin --source "MalwareBazaar" --case CASE-001

Step 4: Defang before sharing

When pasting URLs/IPs into a report or ticket, defang them:

python scripts/analyst.py defang ioc.txt
# http://evil.com/x -> hxxp://evil[.]com/x

Validation

Pitfalls

recipients risk accidental execution. Always password-encrypt.

scheme.

References

provenance, and defang tooling.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.