Skip to content

YARA · ditekSHen detection

DITEKSHEN_MALWARE_Win_Cryptolocker

Detects Cryptolocker ransomware variants (Betarasite)

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

What this rule detects

Detects Cryptolocker ransomware variants (Betarasite)

Associated malware family: Cryptolocker.

Targets: Windows PE.

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

Summary generated from the rule's metadata and condition.

Rule source

malware-win-cryptolocker.yarBSD 2-Clause License
rule DITEKSHEN_MALWARE_Win_Cryptolocker : FILE
{
	meta:
		description = "Detects Cryptolocker ransomware variants (Betarasite)"
		author = "ditekSHen"
		id = "4c6d714d-1fb1-55ce-8022-40f6f634e2cd"
		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#L4730-L4752"
		license_url = "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/LICENSE.txt"
		logic_hash = "e1700e8ace338c25119305878e8bc52210506bd42183007985ba9601abdab87b"
		score = 75
		quality = 73
		tags = "FILE"

	strings:
		$x1 = "CryptoLocker" fullword wide
		$x2 = ".betarasite" fullword wide
		$x3 = "CMSTPBypass" fullword ascii
		$s1 = "CommandToExecute" fullword ascii
		$s2 = "SetInfFile" fullword ascii
		$s3 = "SchoolPrject1" ascii
		$s4 = "$730d5f64-bd57-47c1-9af4-d20aec714d02" fullword ascii
		$s5 = "Encrypt" fullword ascii
		$s6 = "Invalide Key! Please Try Again." fullword wide
		$s7 = "RegAsm" fullword wide
		$s8 = "Your key will be destroyed" wide
		$s9 = "encrypted using RC4 and RSA-2048" wide
		$c1 = "https://coinbase.com" fullword wide
		$c2 = "https://localbictoins.com" fullword wide
		$c3 = "https://bitpanda.com" fullword wide

	condition:
		uint16( 0 ) == 0x5a4d and ( all of ( $x* ) or all of ( $s* ) or ( 2 of ( $x* ) and 5 of ( $s* ) ) or ( all of ( $c* ) and 1 of ( $x* ) and 2 of ( $s* ) ) )
}

Strings (15 patterns)

IdentifierTypeValueModifiers
$x1text"CryptoLocker"fullword wide
$x2text".betarasite"fullword wide
$x3text"CMSTPBypass"fullword ascii
$s1text"CommandToExecute"fullword ascii
$s2text"SetInfFile"fullword ascii
$s3text"SchoolPrject1"ascii
$s4text"$730d5f64-bd57-47c1-9af4-d20aec714d02"fullword ascii
$s5text"Encrypt"fullword ascii
$s6text"Invalide Key! Please Try Again."fullword wide
$s7text"RegAsm"fullword wide
$s8text"Your key will be destroyed"wide
$s9text"encrypted using RC4 and RSA-2048"wide
$c1text"https://coinbase.com"fullword wide
$c2text"https://localbictoins.com"fullword wide
$c3text"https://bitpanda.com"fullword wide

Condition

uint16( 0 ) == 0x5a4d and ( all of ( $x* ) or all of ( $s* ) or ( 2 of ( $x* ) and 5 of ( $s* ) ) or ( all of ( $c* ) and 1 of ( $x* ) and 2 of ( $s* ) ) )

In plain words (Heuristic)

  • The file must start with “MZ” — a Windows executable (PE).
  • All patterns in ( $x* ) must match.
  • All patterns in ( $s* ) must match.
  • All patterns in ( $c* ) must match.
  • At least 2 patterns in ( $x* ) must match.
  • At least 5 patterns in ( $s* ) must match.
  • At least 1 patterns in ( $x* ) 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: 4c6d714d-1fb1-55ce-8022-40f6f634e2cd

Tags:FILE