Skip to content

YARA · ditekSHen detection

DITEKSHEN_MALWARE_Win_Blackcat

Detects BlackCat ransomware

MalwareBlackcatditekSHen 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 BlackCat ransomware

Associated malware family: Blackcat.

Targets: Windows PE.

It defines 13 patterns (11 text, 0 hex, 2 regex).

Summary generated from the rule's metadata and condition.

Rule source

malware-win-blackcat.yarBSD 2-Clause License
rule DITEKSHEN_MALWARE_Win_Blackcat : FILE
{
	meta:
		description = "Detects BlackCat ransomware"
		author = "ditekSHen"
		id = "b6831d84-40d7-52ae-8c4d-30b087b0007b"
		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#L9267-L9289"
		license_url = "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/LICENSE.txt"
		logic_hash = "cd76e5b87f33d91c17fd032417583c3f68d0e310aaf6f08e26ec5d53844ed9d2"
		score = 75
		quality = 75
		tags = "FILE"

	strings:
		$x1 = "{\"config_id\":\"\",\"public_key\":\"MIIBIjANBgkqhkiG9w0BAQEFAAO" ascii
		$x2 = "C:\\Users\\Public\\All Usersdeploy_note_and_image_for_all_users=" fullword ascii
		$s1 = "encrypt_app::windows" ascii
		$s2 = /locker::core::os::windows::(desktop_note|self_propagation|privilege_escalation|psexec|shadow_copy)/ ascii
		$s3 = "uac_bypass::shell_exec=" ascii
		$s4 = "-u-p-s-d-f-cpropagate::attempt=" ascii
		$s5 = "masquerade_peb" ascii
		$s6 = "RECOVER-${EXTENSION}-FILES.txt" ascii
		$s7 = ".onion/?access-key=${ACCESS_KEY}" ascii
		$s8 = "-vm-killno-vm-snapshot-killno-vm-kill-" ascii
		$s9 = "esxi_vm_killenable_esxi_vm_snapshot_killstrict_" ascii
		$s10 = /enum_(shares|servers)_sync::ok/ fullword ascii
		$s11 = "hidden_partitions::mount_all::mounting=" ascii

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

Strings (13 patterns)

IdentifierTypeValueModifiers
$x1text"{\"config_id\":\"\",\"public_key\":\"MIIBIjANBgkqhkiG9w0BAQEFAAO"ascii
$x2text"C:\\Users\\Public\\All Usersdeploy_note_and_image_for_all_users="fullword ascii
$s1text"encrypt_app::windows"ascii
$s2regex/locker::core::os::windows::(desktop_note|self_propagation|privilege_escalation|psexec|shadow_copy)/ascii
$s3text"uac_bypass::shell_exec="ascii
$s4text"-u-p-s-d-f-cpropagate::attempt="ascii
$s5text"masquerade_peb"ascii
$s6text"RECOVER-${EXTENSION}-FILES.txt"ascii
$s7text".onion/?access-key=${ACCESS_KEY}"ascii
$s8text"-vm-killno-vm-snapshot-killno-vm-kill-"ascii
$s9text"esxi_vm_killenable_esxi_vm_snapshot_killstrict_"ascii
$s10regex/enum_(shares|servers)_sync::ok/fullword ascii
$s11text"hidden_partitions::mount_all::mounting="ascii

Condition

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

In plain words (Heuristic)

  • The file must start with “MZ” — a Windows executable (PE).
  • All patterns in ( $x* ) must match.
  • At least 5 patterns in ( $s* ) must match.
  • At least 1 patterns in ( $x* ) must match.
  • At least 3 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: b6831d84-40d7-52ae-8c4d-30b087b0007b

Tags:FILE

More Blackcat rules