Skip to content

YARA · ditekSHen detection

DITEKSHEN_MALWARE_Win_Blackmatter

Detects BlackMatter ransomware

MalwareBlackmatterditekSHen 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 BlackMatter ransomware

Associated malware family: Blackmatter.

Targets: Windows PE.

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

Summary generated from the rule's metadata and condition.

Rule source

malware-win-blackmatter.yarBSD 2-Clause License
rule DITEKSHEN_MALWARE_Win_Blackmatter : FILE
{
	meta:
		description = "Detects BlackMatter ransomware"
		author = "ditekSHen"
		id = "8883e652-edab-5cbf-a4fa-963b437447d9"
		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#L7748-L7767"
		license_url = "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/LICENSE.txt"
		logic_hash = "4558002b424f7102f67fc44dfc37ac20f6013e25ae827c6aee0fc37231e2fa72"
		score = 75
		quality = 75
		tags = "FILE"

	strings:
		$s1 = "C:\\Windows\\System32\\*.drv" fullword wide
		$s2 = "NYbr-Vk@" fullword ascii
		$s3 = ":7:=:H:Q:W:\\:b:&;O;^;v;" fullword ascii
		$o1 = { b0 34 aa fe c0 e2 fb b9 03 }
		$o2 = { fe 00 ff 75 08 ff 75 0c ff b5 d8 fe ff ff ff b5 }
		$o3 = { 6a 00 ff 75 0c ff b5 d8 fe ff ff ff b5 dc fe ff }
		$o4 = { ff 75 08 ff 75 0c ff b5 d8 fe ff ff ff b5 dc fe }
		$o5 = { 53 56 57 8d 85 70 ff ff ff 83 c0 0f 83 e0 f0 89 }
		$o6 = { c7 85 68 ff ff ff 00 04 00 00 8b 85 6c ff ff ff }

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

Strings (9 patterns)

IdentifierTypeValueModifiers
$s1text"C:\\Windows\\System32\\*.drv"fullword wide
$s2text"NYbr-Vk@"fullword ascii
$s3text":7:=:H:Q:W:\\:b:&;O;^;v;"fullword ascii
$o1hex{ b0 34 aa fe c0 e2 fb b9 03 }
$o2hex{ fe 00 ff 75 08 ff 75 0c ff b5 d8 fe ff ff ff b5 }
$o3hex{ 6a 00 ff 75 0c ff b5 d8 fe ff ff ff b5 dc fe ff }
$o4hex{ ff 75 08 ff 75 0c ff b5 d8 fe ff ff ff b5 dc fe }
$o5hex{ 53 56 57 8d 85 70 ff ff ff 83 c0 0f 83 e0 f0 89 }
$o6hex{ c7 85 68 ff ff ff 00 04 00 00 8b 85 6c ff ff ff }

Condition

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

In plain words (Heuristic)

  • The file must start with “MZ” — a Windows executable (PE).
  • All patterns in ( $s* ) must match.
  • All patterns in ( $o* ) 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: 8883e652-edab-5cbf-a4fa-963b437447d9

Tags:FILE

More Blackmatter rules