본문으로 건너뛰기
cccskills
무료GitHub에 공개

handling-malware-samples-safely

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 artifacts.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(4)

  • SKILL.md4.0 KB
  • LICENSE340 B
  • references/api-reference.md1.4 KB
  • scripts/analyst.py2.8 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Handling Malware Samples Safely

When to Use

  • You are receiving, storing, or sharing a malicious file and need to prevent accidental execution or contamination.
  • You need a consistent naming and identity scheme so a sample can be tracked across tools and tickets.
  • You are packaging a sample to send to another analyst or a sandbox.

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

  • An archive tool that supports password-protected, encrypted archives (7-Zip).
  • A hashing utility (sha256sum, certutil, or the bundled script).
  • A defined storage location with restricted access, separate from general file shares.

Safety & Handling

  • Treat every sample as live. Never double-click; never leave it with its original executable extension on a working machine.
  • Store samples inside an encrypted, password-protected archive with the conventional password infected.
  • Neutralize the extension on disk (e.g. sample.exe → sample.exe.bin or sample.exe_) so the OS will not execute it on a stray click.
  • Defang indicators in any text leaving the lab: hxxp://, 1.2.3[.]4, evil[.]com.

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

  • 7z l -slt <sha256>.7z shows encrypted headers (filenames not visible without password).
  • The on-disk working copy has a neutralized extension and matches the recorded SHA-256.
  • The provenance record contains source, timestamp, case ID, and all three hashes.
  • No raw clickable URLs/IPs remain in any artifact destined to leave the lab.

Pitfalls

  • Sharing a sample in a plain zip — mail gateways and AV will quarantine or mangle it, and recipients risk accidental execution. Always password-encrypt.
  • Trusting the filename or first-seen label as identity; only the hash is authoritative.
  • Forgetting filename encryption (-mhe=on), which leaks the sample name and your naming scheme.
  • Defanging only URLs but leaving live IPs or email addresses in the report.

References

  • See references/api-reference.md for the hashing, provenance, and defang tooling.
  • MalwareBazaar and NIST SP 800-86 (linked in frontmatter).

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Reverses Android malware: unpacking APKs, decompiling DEX bytecode to readable Java, auditing the manifest for abused permissions and components, and locating dynamically loaded or native payloads. Activates for requests to analyze an APK, decompile DEX, or investigate a suspicious Android app.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

meltedinhex/analyst-ai-pack222026년 7월 7일 업데이트

Analyzes API call traces from a sandbox or API monitor (JSON) to group calls by category, reconstruct high-level behaviors (process injection, file drops, network, crypto), and flag suspicious call sequences. Activates for requests to analyze an API trace, interpret sandbox API logs, or identify behavior from Win32/Native API calls.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

meltedinhex/analyst-ai-pack222026년 7월 7일 업데이트

Analyzes Windows Authenticode signatures on PE files: checking for a signature, reading the signer certificate chain, detecting revoked/expired/stolen certs, and recognizing signature-stripping and catalog-signing abuse. Activates for requests to analyze a code signature, verify Authenticode, or assess signer trust on a PE.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

meltedinhex/analyst-ai-pack222026년 7월 7일 업데이트

Analyzes banking trojan webinject configurations to extract targeted institutions, injected JavaScript/HTML, and data-theft hooks, mapping the fraud workflow. Activates for requests to analyze banking trojan webinjects, parse a webinject config, or map targeted banks and credential-theft injections.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

meltedinhex/analyst-ai-pack222026년 7월 7일 업데이트

Analyzes Python-based malware packaged as PyInstaller/py2exe executables by detecting the packer, locating the embedded archive, and identifying bundled .pyc modules for extraction and decompilation. Activates for requests to analyze compiled Python malware, unpack a PyInstaller binary, or extract pyc modules from a frozen Python executable.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

meltedinhex/analyst-ai-pack222026년 7월 7일 업데이트

Analyzes cryptojacking/coinminer malware by extracting mining pool endpoints (stratum), wallet addresses, algorithm and miner identifiers (XMRig and forks), and persistence or resource-control settings from static strings and config. Activates for requests to analyze a cryptominer, extract mining pool and wallet IOCs, or identify coinminer configuration.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

meltedinhex/analyst-ai-pack222026년 7월 7일 업데이트

meltedinhex의 스킬 모두 보기

이 스킬의 문제 신고