Skip to content
Back to skills

Diffing Malware Samples To Find Changes

ASecurity

'Compares two related malware samples to surface what changed between variants using

  • 22 stars
  • 0 votes
  • 0 copies
  • 5 views
  • Added September 11, 2026
securitypythonbashgitapisecurity

Works with

  • api

Security analysis

A100/100

Pro scans all 4 files and shows the line behind each finding

Scanned September 11, 2026

npx -y skills add meltedinhex/analyst-ai-pack --skill diffing-malware-samples-to-find-changes --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Diffing Malware Samples To Find Changes?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Diffing Malware Samples To Find Changes
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/meltedinhex-diffing-malware-samples-to-find-changes/badge)](https://www.skillsdirectory.com/skills/meltedinhex-diffing-malware-samples-to-find-changes)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: diffing-malware-samples-to-find-changes
description: 'Compares two related malware samples to surface what changed between variants using
  section-level hashing, import-set differences, and fuzzy similarity scoring. Activates for
  requests to diff two samples, compare malware variants, or measure similarity between two binaries
  for variant tracking.'
domain: cybersecurity
subdomain: reverse-engineering
tags:
  - reverse-engineering
  - bindiff
  - variant-analysis
  - similarity
  - triage
version: 1.0.0
author: analyst-ai-pack
license: Apache-2.0
mitre_attack:
  - T1587.001
  - T1027
  - T1588.001
d3fend:
  - D3-FA
  - D3-DA
references:
  - 'PE Format — https://learn.microsoft.com/windows/win32/debug/pe-format'
  - 'ssdeep fuzzy hashing (CTPH) — https://ssdeep-project.github.io/ssdeep/'
---

# Diffing Malware Samples to Find Changes

## When to Use

- You have two related samples (suspected variants of one family) and want a fast, structural diff
  before a full BinDiff.
- You need to quantify similarity and pinpoint changed sections/imports for variant tracking.

**Do not use** this as authoritative function-level diffing — that requires BinDiff/Diaphora on
disassembly. This skill does structural/statistical diffing and executes nothing.

## Prerequisites

- Two sample files (read inertly). Optional: `ssdeep`/`tlsh` for fuzzy scores (degrade gracefully).

## Workflow

### Step 1: Structural diff

```bash
python scripts/analyst.py diff a.bin b.bin
```

Compares file size, per-section SHA-256 and entropy, and the import name sets, reporting added/
removed/changed sections and imports.

### Step 2: Similarity score

Reports a byte-level similarity ratio and, if available, ssdeep/tlsh fuzzy-hash comparison scores.

### Step 3: Prioritize changed regions

Changed sections (same name, different hash) and new imports are the high-value targets for deeper
disassembly diffing.

### Step 4: Document

Record what changed and the similarity score to support variant/lineage tracking.

## Validation

- Section comparison keys on section name; identical sections report equal hashes.
- Import diff lists are accurate (added vs removed vs common).
- Fuzzy-hash scores are reported only when the library is available, else clearly omitted.

## Pitfalls

- Recompilation shifting addresses makes raw byte diff noisy — rely on section/import structure.
- Packers making both samples look similar (packed) while the payloads differ — unpack first.
- Treating a high byte-similarity as proof of same author without corroboration.

## References

- See [`references/api-reference.md`](references/api-reference.md) for the differ.
- PE format and ssdeep references (linked in frontmatter).

Files in this skill

  • LICENSE340 B
  • SKILL.md2.7 KB
  • references/api-reference.md1.3 KB
  • scripts/analyst.py3.6 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.