Skip to content

YARA · Trellix Advanced Research Center

TRELLIX_ARC_Snake_Ransomware

Rule to detect Snake ransomware

MalwareEKANSTrellix Advanced Research CenterApache License 2.0Compiles with YARA-X
Author
McAfee ATR Team
Date
2020-02-20
Modified
2020-10-12
Score / Quality
75 / 70

What this rule detects

Rule to detect Snake ransomware

Associated malware family: EKANS.

Targets: Windows PE.

It defines 1 patterns (0 text, 1 hex, 0 regex).

Summary generated from the rule's metadata and condition.

Rule source

snake-ransomware.yarApache License 2.0
rule TRELLIX_ARC_Snake_Ransomware : RANSOMWARE FILE
{
	meta:
		description = "Rule to detect Snake ransomware"
		author = "McAfee ATR Team"
		id = "b8f50af5-5568-5676-93a1-e818f08df0ce"
		date = "2020-02-20"
		modified = "2020-10-12"
		reference = "https://dragos.com/blog/industry-news/ekans-ransomware-and-ics-operations/"
		source_url = "https://github.com/advanced-threat-research/Yara-Rules//blob/1919562a59f190bda60c982424f6a24c542ee3e0/ransomware/RANSOM_snake_ransomware.yar#L1-L26"
		license_url = "https://github.com/advanced-threat-research/Yara-Rules//blob/1919562a59f190bda60c982424f6a24c542ee3e0/LICENSE"
		hash = "e5262db186c97bbe533f0a674b08ecdafa3798ea7bc17c705df526419c168b60"
		logic_hash = "3ae64fbacbf886b8d09abc3f5f8eb9c8bff809909a251f2d055056e6d12217a2"
		score = 75
		quality = 70
		tags = "RANSOMWARE, FILE"
		rule_version = "v1"
		malware_type = "ransomware"
		malware_family = "Ransom:W32/EKANS"
		actor_type = "Cybercrime"
		actor_group = "Unknown"

	strings:
		$snake = { 43 3A 2F 55 73 ?? 72 ?? 2F 57 49 4E 31 2F 67 6F 2F 73 ?? 63 2F 6A 6F 62 6E 68 62 67 6E 6E 69 66 70 6F 64 68 68 70 ?? 6D 66 2F 6E 66 64 6C 68 6F 70 68 6B 65 69 6A 61 64 67 66 64 64 69 6D 2F 6E 66 64 6C 68 6F 70 68 6B 65 69 6A 61 64 67 66 64 64 69 6D 2F 76 74 5F 73 74 ?? 69 6E 67 2E 67 6F 00 }

	condition:
		( uint16( 0 ) == 0x5a4d and filesize < 11000KB ) and all of them
}

Strings (1 patterns)

IdentifierTypeValueModifiers
$snakehex{ 43 3A 2F 55 73 ?? 72 ?? 2F 57 49 4E 31 2F 67 6F 2F 73 ?? 63 2F 6A 6F 62 6E 68 62 67 6E 6E 69 66 70 6F 64 68 68 70 ?? 6D 66 2F 6E 66 64 6C 68 6F 70 68 6B 65 69 …

Condition

( uint16( 0 ) == 0x5a4d and filesize < 11000KB ) and all of them

In plain words (Heuristic)

  • The file must start with “MZ” — a Windows executable (PE).
  • The file must be smaller than 11000KB (a cheap guard that skips large files).
  • All patterns in the rule must match.

Test this rule in your browser

Drop a file to scan it with this rule using YARA-X compiled to WebAssembly. Nothing is uploaded.

Drop a file here or click to chooseScanned locally with YARA-X. Files up to 200 MB.

Open in editor

References

Sample hashes

Hashes of samples the author lists in the rule's meta (look them up in your threat-intelligence platform).

  • e5262db186c97bbe533f0a674b08ecdafa3798ea7bc17c705df526419c168b60

Licence & attribution

Author: McAfee ATR Team

Source repository: Trellix Advanced Research Center @ 1919562a59

Licence: Apache License 2.0 (repository licence)

Original rule

Mirrored via YARA Forge 20260927, which prefixes rule names with the source and adds normalised meta fields.

Rule id: b8f50af5-5568-5676-93a1-e818f08df0ce

Metadata

rule_versionv1
malware_typeransomware
malware_familyRansom:W32/EKANS
actor_typeCybercrime
actor_groupUnknown

Tags:RANSOMWAREFILE