Skip to content

YARA · ditekSHen detection

DITEKSHEN_MALWARE_Win_Purge

Detects Purge ransomware

MalwarePurgeditekSHen 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 Purge ransomware

Associated malware family: Purge.

Targets: Windows PE.

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

Summary generated from the rule's metadata and condition.

Rule source

malware-win-purge.yarBSD 2-Clause License
rule DITEKSHEN_MALWARE_Win_Purge : FILE
{
	meta:
		description = "Detects Purge ransomware"
		author = "ditekSHen"
		id = "b3fb9f38-ce12-5e0e-8908-3379b5da3497"
		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#L5178-L5201"
		license_url = "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/LICENSE.txt"
		logic_hash = "83d13eca69bc99539e47d6d29689edf2a4fcd2260c6e909582126a490eef8115"
		score = 75
		quality = 75
		tags = "FILE"

	strings:
		$n1 = "imagesave/imagesize.php" ascii
		$n2 = "imageinfo.html" ascii
		$n3 = "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)" ascii
		$n4 = "Content-Type: application/x-www-form-urlencoded" ascii
		$m1 = "YOUR_ID: %x%x" wide
		$m2 = "Specially for your PC was generated personal" wide
		$m3 = "which is on our Secret Server" wide
		$m4 = "wait for a miracle and get your price" wide
		$s1 = "%s\\SpyHunter Remove Ransomware" wide
		$s2 = "$recycle.bin" fullword wide
		$s3 = "TheEnd" fullword wide
		$s4 = "%s\\HELP_DECRYPT_YOUR_FILES.TXT" fullword wide
		$s5 = "%s.id_%x%x_email_" wide
		$s6 = "scmd" fullword wide
		$s7 = "process call create \"%s\"" wide
		$s8 = "FinishEnds" fullword ascii

	condition:
		uint16( 0 ) == 0x5a4d and ( all of ( $s* ) or all of ( $n* ) or 2 of ( $m* ) or ( 3 of ( $s* ) and ( 1 of ( $n* ) or 1 of ( $m* ) ) ) )
}

Strings (16 patterns)

IdentifierTypeValueModifiers
$n1text"imagesave/imagesize.php"ascii
$n2text"imageinfo.html"ascii
$n3text"Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)"ascii
$n4text"Content-Type: application/x-www-form-urlencoded"ascii
$m1text"YOUR_ID: %x%x"wide
$m2text"Specially for your PC was generated personal"wide
$m3text"which is on our Secret Server"wide
$m4text"wait for a miracle and get your price"wide
$s1text"%s\\SpyHunter Remove Ransomware"wide
$s2text"$recycle.bin"fullword wide
$s3text"TheEnd"fullword wide
$s4text"%s\\HELP_DECRYPT_YOUR_FILES.TXT"fullword wide
$s5text"%s.id_%x%x_email_"wide
$s6text"scmd"fullword wide
$s7text"process call create \"%s\""wide
$s8text"FinishEnds"fullword ascii

Condition

uint16( 0 ) == 0x5a4d and ( all of ( $s* ) or all of ( $n* ) or 2 of ( $m* ) or ( 3 of ( $s* ) and ( 1 of ( $n* ) or 1 of ( $m* ) ) ) )

In plain words (Heuristic)

  • The file must start with “MZ” — a Windows executable (PE).
  • All patterns in ( $s* ) must match.
  • All patterns in ( $n* ) must match.
  • At least 2 patterns in ( $m* ) must match.
  • At least 3 patterns in ( $s* ) must match.
  • At least 1 patterns in ( $n* ) must match.
  • At least 1 patterns in ( $m* ) 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: b3fb9f38-ce12-5e0e-8908-3379b5da3497

Tags:FILE