Skip to content

YARA · Signature Base (Florian Roth / Nextron)

SIGNATURE_BASE_MAL_CRIME_RANSOM_Dearcry_Mar21_1

Detects DearCry Ransomware affecting Exchange servers

MalwareSignature Base (Florian Roth / Nextron)Detection Rule License 1.1Compiles with YARA-X
Author
Florian Roth (Nextron Systems)
Date
2021-03-12
Modified
2023-12-05
Score / Quality
75 / 85

What this rule detects

Detects DearCry Ransomware affecting Exchange servers

Targets: Windows PE.

It defines 8 patterns (5 text, 3 hex, 0 regex).

Summary generated from the rule's metadata and condition.

Rule source

mal-crime-ransom-dearcry-mar21-1.yarDetection Rule License 1.1
rule SIGNATURE_BASE_MAL_CRIME_RANSOM_Dearcry_Mar21_1 : FILE
{
	meta:
		description = "Detects DearCry Ransomware affecting Exchange servers"
		author = "Florian Roth (Nextron Systems)"
		id = "96cd2fe8-8bb9-5a3b-9bf1-c63a1148a817"
		date = "2021-03-12"
		modified = "2023-12-05"
		reference = "https://twitter.com/phillip_misner/status/1370197696280027136"
		source_url = "https://github.com/Neo23x0/signature-base/blob/94a1c48d7ab499879287ff611dfe7f9c56376030/yara/crime_dearcry_ransom.yar#L29-L53"
		license_url = "https://github.com/Neo23x0/signature-base/blob/94a1c48d7ab499879287ff611dfe7f9c56376030/LICENSE"
		hash = "2b9838da7edb0decd32b086e47a31e8f5733b5981ad8247a2f9508e232589bff"
		hash = "e044d9f2d0f1260c3f4a543a1e67f33fcac265be114a1b135fd575b860d2b8c6"
		hash = "feb3e6d30ba573ba23f3bd1291ca173b7879706d1fe039c34d53a4fdcdf33ede"
		logic_hash = "c4af7c29e917078f8658aca68ec95f8a03934f42c81fdd421639437e24f304bc"
		score = 75
		quality = 85
		tags = "FILE"

	strings:
		$s1 = "dear!!!" ascii fullword
		$s2 = "EncryptFile.exe.pdb" ascii fullword
		$s3 = "/readme.txt" ascii fullword
		$s4 = "C:\\Users\\john\\" ascii
		$s5 = "And please send me the following hash!" ascii fullword
		$op1 = { 68 e0 30 52 00 6a 41 68 a5 00 00 00 6a 22 e8 81 d0 f8 ff 83 c4 14 33 c0 5e }
		$op2 = { 68 78 6a 50 00 6a 65 6a 74 6a 10 e8 d9 20 fd ff 83 c4 14 33 c0 5e }
		$op3 = { 31 40 00 13 31 40 00 a4 31 40 00 41 32 40 00 5f 33 40 00 e5 }

	condition:
		uint16( 0 ) == 0x5a4d and filesize < 4000KB and 3 of them or 5 of them
}

Strings (8 patterns)

IdentifierTypeValueModifiers
$s1text"dear!!!"ascii fullword
$s2text"EncryptFile.exe.pdb"ascii fullword
$s3text"/readme.txt"ascii fullword
$s4text"C:\\Users\\john\\"ascii
$s5text"And please send me the following hash!"ascii fullword
$op1hex{ 68 e0 30 52 00 6a 41 68 a5 00 00 00 6a 22 e8 81 d0 f8 ff 83 c4 14 33 c0 5e }
$op2hex{ 68 78 6a 50 00 6a 65 6a 74 6a 10 e8 d9 20 fd ff 83 c4 14 33 c0 5e }
$op3hex{ 31 40 00 13 31 40 00 a4 31 40 00 41 32 40 00 5f 33 40 00 e5 }

Condition

uint16( 0 ) == 0x5a4d and filesize < 4000KB and 3 of them or 5 of them

In plain words (Heuristic)

  • The file must start with “MZ” — a Windows executable (PE).
  • The file must be smaller than 4000KB (a cheap guard that skips large files).
  • At least 3 patterns in the rule must match.
  • At least 5 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).

  • 2b9838da7edb0decd32b086e47a31e8f5733b5981ad8247a2f9508e232589bff
  • e044d9f2d0f1260c3f4a543a1e67f33fcac265be114a1b135fd575b860d2b8c6
  • feb3e6d30ba573ba23f3bd1291ca173b7879706d1fe039c34d53a4fdcdf33ede

Licence & attribution

Author: Florian Roth (Nextron Systems)

Source repository: Signature Base (Florian Roth / Nextron) @ 94a1c48d7a

Licence: Detection Rule License 1.1 (repository licence)

Original rule

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

Rule id: 96cd2fe8-8bb9-5a3b-9bf1-c63a1148a817

Tags:FILE