Last active
June 14, 2026 22:16
-
-
Save rjzak/5fc7280c22841da09400c46edce2d956 to your computer and use it in GitHub Desktop.
Use similarity hashes to find potentially related samples
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| select sha1_a, sha1_b, ssdeep_sim, lzjd_sim, tlsh_sim | |
| from ( | |
| select | |
| fileA.sha1 as sha1_a, | |
| fileB.sha1 as sha1_b, | |
| fuzzy_hash_compare(fileA.ssdeep, fileB.ssdeep) as ssdeep_sim, | |
| lzjd_compare(fileA.lzjd, fileB.lzjd) as lzjd_sim, | |
| tlsh_compare(fileA.tlsh, fileB.tlsh) as tlsh_sim | |
| from file as fileA | |
| join file as fileB on fileA.id != fileB.id | |
| ) sims | |
| where ssdeep_sim > 20 or lzjd_sim > 20 | |
| or (tlsh_sim < 100 and tlsh_sim > 0) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment