Lion Cipher Lab

Cluster and attribute malware with fuzzy hashing (ssdeep, TLSH, and imphash)

Why it matters

A SHA-256 hash answers exactly one question: is this the identical file, yes or no? Change a single byte — recompile with a new build tag, flip a flag, repack — and the hash is completely different, so a threat actor gets a 'new' file for free and your blocklist of hashes is instantly stale. That is why hunting on cryptographic hashes alone is a treadmill. Fuzzy and similarity hashes break the treadmill: ssdeep and TLSH produce hashes whose SIMILARITY reflects how alike two files are, and imphash fingerprints a Windows program's import table so builds from the same source or toolchain cluster…

What you'll learn

Steps in this lab

  1. The problem SHA-256 cannot solve
  2. Safety first: there is no malware in this lab
  3. Install the three hashers: ssdeep, py-tlsh, pefile
  4. Build a benign sample set — and watch SHA-256 fail
  5. The reveal: ssdeep and TLSH cluster what SHA-256 could not
  6. imphash: fingerprint the toolchain, not the bytes
  7. This matrix IS how you cluster a family — and where it is used
  8. The limits, and how a pro does it better

Open the full interactive lab →