Skip to content

YARA · ditekSHen detection

DITEKSHEN_MALWARE_Win_Breakstaf

Detects BreakStaf ransomware

MalwareBreakstafditekSHen 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 BreakStaf ransomware

Associated malware family: Breakstaf.

Targets: Windows PE.

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

Summary generated from the rule's metadata and condition.

Rule source

malware-win-breakstaf.yarBSD 2-Clause License
rule DITEKSHEN_MALWARE_Win_Breakstaf : FILE
{
	meta:
		description = "Detects BreakStaf ransomware"
		author = "ditekSHen"
		id = "3c8ca485-2cb4-56fd-a1f5-16b43515cec9"
		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#L4807-L4827"
		license_url = "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/LICENSE.txt"
		logic_hash = "56078b797c64ce77398f9b92e5677f7159d8357eafb03cf62bb30f06d4f3b2e3"
		score = 75
		quality = 73
		tags = "FILE"

	strings:
		$s1 = "C:\\Program files" wide
		$s2 = "C:\\Program files (x86)" wide
		$s3 = "C:\\System Volume Information" wide
		$s4 = "C:\\$Recycle.Bin" wide
		$s5 = "C:\\Windows" wide
		$s6 = ".?AVRandomNumberGenerator@Crypto" ascii
		$s7 = ".?AV?$SymmetricCipherFinal@" ascii
		$s8 = ".breakstaf" fullword wide nocase
		$s9 = "readme.txt" fullword wide nocase
		$s10 = ".VHD" fullword wide nocase
		$s11 = ".vhdx" fullword wide nocase
		$s12 = ".BAK" fullword wide nocase
		$s13 = ".BAC" fullword wide nocase

	condition:
		uint16( 0 ) == 0x5a4d and 12 of them
}

Strings (13 patterns)

IdentifierTypeValueModifiers
$s1text"C:\\Program files"wide
$s2text"C:\\Program files (x86)"wide
$s3text"C:\\System Volume Information"wide
$s4text"C:\\$Recycle.Bin"wide
$s5text"C:\\Windows"wide
$s6text".?AVRandomNumberGenerator@Crypto"ascii
$s7text".?AV?$SymmetricCipherFinal@"ascii
$s8text".breakstaf"fullword wide nocase
$s9text"readme.txt"fullword wide nocase
$s10text".VHD"fullword wide nocase
$s11text".vhdx"fullword wide nocase
$s12text".BAK"fullword wide nocase
$s13text".BAC"fullword wide nocase

Condition

uint16( 0 ) == 0x5a4d and 12 of them

In plain words (Heuristic)

  • The file must start with “MZ” — a Windows executable (PE).
  • At least 12 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: 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: 3c8ca485-2cb4-56fd-a1f5-16b43515cec9

Tags:FILE