Lion Cipher Lab

Fingerprint SSH with HASSH and pivot

Why it matters

A great deal of threat-intelligence work is not about one malicious IP -- it is about finding every OTHER host the same attacker tool touched, so you can pre-empt it. On the SSH surface, HASSH is one of the cleanest ways in. SSH (Secure Shell, the encrypted remote-login and file-transfer protocol that runs on TCP port 22) begins every connection with a handshake, and the very first substantive message each side sends -- the SSH_MSG_KEXINIT -- travels UNENCRYPTED and lists, in a specific order, every algorithm that side supports: the key-exchange methods (how the two sides agree on a shared…

What you'll learn

Steps in this lab

  1. The idea: fingerprint the SSH handshake, not the address
  2. HASSH vs the TLS fingerprints -- the distinction that keeps this from being a JARM/JA4 rerun
  3. What is inside a KEXINIT, and exactly which fields feed the fingerprint
  4. Set the scope, then generate your OWN SSH handshake in Docker
  5. Read the KEXINIT out of the capture
  6. Compute the HASSH by hand -- a few lines of stdlib Python
  7. Pivot: a second handshake, and watch the fingerprint cluster (or not)
  8. The judgment: common vs rare, and what HASSH does NOT tell you
  9. What you built, and where it plugs in

Open the full interactive lab →