Skip to content

YARA · SEKOIA.IO Community

SEKOIA_Ransomware_Win_Blackcat

Detect the BlackCat ransomware (Windows version)

MalwareBlackcatSEKOIA.IO CommunityDetection Rule License 1.1Compiles with YARA-X
Author
Sekoia.io
Date
2022-01-19
Modified
2024-12-19
Score / Quality
75 / 80

What this rule detects

Detect the BlackCat ransomware (Windows version)

Associated malware family: Blackcat.

Targets: Windows PE.

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

Summary generated from the rule's metadata and condition.

Rule source

ransomware-win-blackcat.yarDetection Rule License 1.1
rule SEKOIA_Ransomware_Win_Blackcat : FILE
{
	meta:
		description = "Detect the BlackCat ransomware (Windows version)"
		author = "Sekoia.io"
		id = "873355f7-3942-4171-9df7-f524bb6b6903"
		date = "2022-01-19"
		modified = "2024-12-19"
		reference = "https://github.com/SEKOIA-IO/Community"
		source_url = "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/yara_rules/ransomware_win_blackcat.yar#L1-L31"
		license_url = "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/LICENSE.md"
		logic_hash = "8a60fd14835f9e8683c3e60a19f23bc00020ccd22e74bffbc8ed19fcb8d0e39a"
		score = 75
		quality = 80
		tags = "FILE"
		classification = "TLP:CLEAR"
		version = "1.1"

	strings:
		$s1 = "desktop_image::set_desktop_wallpaper=" ascii
		$s2 = "C:\\Users\\Public\\All Usersdeploy_note_and_image_for_all_users=" ascii
		$s3 = "propagate::none" ascii
		$s4 = "propagate::failed=" ascii
		$s5 = "propagate::ok=" ascii
		$s6 = "query_status_process::ok=" ascii
		$s7 = "enum_dependent_services::ok=" ascii
		$s8 = "enum_dependent_services::error=" ascii
		$s9 = "try_stop=" ascii
		$s10 = "try_stop::ok=" ascii
		$s11 = "try_stop::failed=" ascii
		$s12 = "stop=" ascii
		$s13 = "dependent_service_name=" ascii
		$s14 = "kill_all=" ascii
		$s15 = "detach=" ascii

	condition:
		uint16( 0 ) == 0x5A4D and filesize > 2MB and filesize < 4MB and all of them
}

Strings (15 patterns)

IdentifierTypeValueModifiers
$s1text"desktop_image::set_desktop_wallpaper="ascii
$s2text"C:\\Users\\Public\\All Usersdeploy_note_and_image_for_all_users="ascii
$s3text"propagate::none"ascii
$s4text"propagate::failed="ascii
$s5text"propagate::ok="ascii
$s6text"query_status_process::ok="ascii
$s7text"enum_dependent_services::ok="ascii
$s8text"enum_dependent_services::error="ascii
$s9text"try_stop="ascii
$s10text"try_stop::ok="ascii
$s11text"try_stop::failed="ascii
$s12text"stop="ascii
$s13text"dependent_service_name="ascii
$s14text"kill_all="ascii
$s15text"detach="ascii

Condition

uint16( 0 ) == 0x5A4D and filesize > 2MB and filesize < 4MB and all of them

In plain words (Heuristic)

  • The file must start with “MZ” — a Windows executable (PE).
  • The file must be smaller than 4MB (a cheap guard that skips large files).
  • The file must be larger than 2MB.
  • All 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

Licence & attribution

Author: Sekoia.io

Source repository: SEKOIA.IO Community @ a438a5901a

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: 873355f7-3942-4171-9df7-f524bb6b6903

Metadata

classificationTLP:CLEAR
version1.1

Tags:FILE

More Blackcat rules