Skip to content

YARA · ditekSHen detection

DITEKSHEN_MALWARE_Win_Doejocrypt

Detects DoejoCrypt / DearCry ransomware

MalwareDoejocryptditekSHen detectionBSD 2-Clause LicenseCompiles with YARA-X
Author
ditekSHen
Date
2020-11-06
Modified
2024-11-01
Score / Quality
75 / 75

What this rule detects

Detects DoejoCrypt / DearCry ransomware

Associated malware family: Doejocrypt.

Targets: Windows PE.

It defines 9 patterns (6 text, 3 hex, 0 regex).

Summary generated from the rule's metadata and condition.

Rule source

malware-win-doejocrypt.yarBSD 2-Clause License
rule DITEKSHEN_MALWARE_Win_Doejocrypt : FILE
{
	meta:
		description = "Detects DoejoCrypt / DearCry ransomware"
		author = "ditekSHen"
		id = "2c90f8e7-ced4-56da-ab8d-61b5ba63dacd"
		date = "2020-11-06"
		modified = "2024-11-01"
		reference = "https://github.com/ditekshen/detection"
		source_url = "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/yara/malware.yar#L4977-L4993"
		license_url = "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/LICENSE.txt"
		logic_hash = "f8a3897de9522340799a59e3e755c323b0defaab73a9030b6b69a1a82c05dcd0"
		score = 75
		quality = 75
		tags = "FILE"

	strings:
		$s1 = "DEARCRY!" fullword ascii
		$s2 = ".CRYPT" fullword ascii
		$s3 = "\\EncryptFile -svcV2\\" ascii
		$s4 = "please send me the following hash!" ascii
		$s5 = "dear!!!" fullword ascii
		$s6 = "/readme.txt" fullword ascii
		$o1 = { c3 8b 65 e8 c7 45 fc fe ff ff ff 8b b5 f4 e9 ff }
		$o2 = { 0f 8c 27 ff ff ff 33 db 57 e8 7b 36 00 00 eb 0a }
		$o3 = { 0f 8c 2a ff ff ff 53 57 e8 b7 42 00 00 8b 4c 24 }

	condition:
		uint16( 0 ) == 0x5a4d and 4 of ( $s* ) or ( all of ( $o* ) and ( 2 of ( $s* ) ) )
}

Strings (9 patterns)

IdentifierTypeValueModifiers
$s1text"DEARCRY!"fullword ascii
$s2text".CRYPT"fullword ascii
$s3text"\\EncryptFile -svcV2\\"ascii
$s4text"please send me the following hash!"ascii
$s5text"dear!!!"fullword ascii
$s6text"/readme.txt"fullword ascii
$o1hex{ c3 8b 65 e8 c7 45 fc fe ff ff ff 8b b5 f4 e9 ff }
$o2hex{ 0f 8c 27 ff ff ff 33 db 57 e8 7b 36 00 00 eb 0a }
$o3hex{ 0f 8c 2a ff ff ff 53 57 e8 b7 42 00 00 8b 4c 24 }

Condition

uint16( 0 ) == 0x5a4d and 4 of ( $s* ) or ( all of ( $o* ) and ( 2 of ( $s* ) ) )

In plain words (Heuristic)

  • The file must start with “MZ” — a Windows executable (PE).
  • All patterns in ( $o* ) must match.
  • At least 4 patterns in ( $s* ) must match.
  • At least 2 patterns in ( $s* ) 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

Licence & attribution

Author: ditekSHen

Source repository: ditekSHen detection @ e76c93dcde

Licence: BSD 2-Clause License (repository licence)

Copyright notice: Copyright 2021 by ditekSHen (https://github.com/ditekshen/detection).

Original rule

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

Rule id: 2c90f8e7-ced4-56da-ab8d-61b5ba63dacd

Tags:FILE