Created
January 15, 2022 05:35
-
-
Save shellcromancer/da08abd6e254c83c12dd9f69512ea872 to your computer and use it in GitHub Desktop.
YARA rule to detect the SHA1 hashing algorithm.
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
rule alg_crypto_sha1 { | |
meta: | |
description = "Identify constants for the SHA1 hashing algorithm." | |
author = "@shellcromancer <[email protected]>" | |
version = "0.1" | |
date = "2022-01-14" | |
reference = "https://en.wikipedia.org/wiki/SHA-1" | |
implementation = "https://cs.opensource.google/go/go/+/master:src/crypto/sha1/sha1block_amd64.s" | |
strings: | |
$init0 = { 67452301 } | |
$init1 = { efcdcb89 } | |
$init2 = { 98Badcfe } | |
$init3 = { 10325476 } | |
$init4 = { c3d2e1f0 } | |
$k0 = { 5a827999 } | |
$k1 = { 6ed9eba1 } | |
$k2 = { 8f1bbcdc } | |
$k3 = { ca62c1d6 } | |
condition: | |
2 of ($init*) or 2 of ($k*) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment