YARA · BlackBerry Research & Intelligence (via Open-Source-YARA-rules)
BLACKBERRY_Mal_Win32_Chaosransomware_2022
Detects Ransomware Built by Chaos Ransomware Builder
- Author
- BlackBerry Threat Research
- Date
- 2022-05-10
- Modified
- 2022-07-07
- Score / Quality
- 75 / 83
What this rule detects
Detects Ransomware Built by Chaos Ransomware Builder
Targets: Windows PE.
It defines 7 patterns (5 text, 2 hex, 0 regex). YARA modules used: pe.
YARA-X says: warning[text_as_hex]: hex pattern could be written as text literal
Summary generated from the rule's metadata and condition.
Rule source
Includes the imports needed to compile it on its own.
import "pe"
rule BLACKBERRY_Mal_Win32_Chaosransomware_2022 : FILE
{
meta:
= "Detects Ransomware Built by Chaos Ransomware Builder"
= "BlackBerry Threat Research"
= "1fc57dd4-f020-5eb6-8e60-2bce3edfc512"
= "2022-05-10"
= "2022-07-07"
= "https://blogs.blackberry.com/en/2022/05/yashma-ransomware-tracing-the-chaos-family-tree"
= "https://github.com/mikesxrs/Open-Source-YARA-rules/blob/ec0056f767db98bf6d5fd63877ad51fb54d350e9/Blackberry/Mal_Win32_ChaosRansomware_2022.yar#L3-L45"
= "N/A"
= "d466570965e22b1bb0f1ca30c725d553d7ccf9e25ce2b546f105002260b1d526"
= 75
= 83
= "FILE"
= "This Yara rule is provided under the Apache License 2.0 (https://www.apache.org/licenses/LICENSE-2.0) and open to any user or organization, as long as you use it under this license and ensure originator credit in any derivative to The BlackBerry Research & Intelligence Team"
strings:
$x1 = "Encrypt" ascii wide
$x2 = "(?:[13]{1}[a-km-zA-HJ-NP-Z1-9]{26,33}|bc1[a-z0-9]{39,59})" ascii wide
$x3 = "read" ascii wide
$r1 = { 20 76 69 72 75 73 }
$r2 = { 72 00 61 00 6e 00 73 00 6f 00 6d 00 77 00 61 00 72 00 65 }
$z0 = "deleteShadowCopies" ascii wide
$z1 = "shadowcopy" ascii wide
condition:
uint16( 0 ) == 0x5a4d and filesize < 35KB and pe.imphash ( ) == "f34d5f2d4577ed6d9ceec516c1f5a744" and pe.number_of_sections == 3 and ( ( all of ( $x* ) ) and ( 1 of ( $r* ) ) and ( 1 of ( $z* ) ) )
}
Strings (7 patterns)
| Identifier | Type | Value | Modifiers |
|---|---|---|---|
| $x1 | text | "Encrypt" | ascii wide |
| $x2 | text | "(?:[13]{1}[a-km-zA-HJ-NP-Z1-9]{26,33}|bc1[a-z0-9]{39,59})" | ascii wide |
| $x3 | text | "read" | ascii wide |
| $r1 | hex | { 20 76 69 72 75 73 } | |
| $r2 | hex | { 72 00 61 00 6e 00 73 00 6f 00 6d 00 77 00 61 00 72 00 65 } | |
| $z0 | text | "deleteShadowCopies" | ascii wide |
| $z1 | text | "shadowcopy" | ascii wide |
Condition
uint16( 0 ) == 0x5a4d and filesize < 35KB and pe.imphash ( ) == "f34d5f2d4577ed6d9ceec516c1f5a744" and pe.number_of_sections == 3 and ( ( all of ( $x* ) ) and ( 1 of ( $r* ) ) and ( 1 of ( $z* ) ) )In plain words (Heuristic)
- The file must start with “MZ” — a Windows executable (PE).
- The file must be smaller than 35KB (a cheap guard that skips large files).
- All patterns in ( $x* ) must match.
- At least 1 patterns in ( $r* ) must match.
- At least 1 patterns in ( $z* ) must match.
- Uses the pe module.
- Checks the PE import hash (imphash).
- Checks PE sections (names, count or properties).
Test this rule in your browser
Drop a file to scan it with this rule using YARA-X compiled to WebAssembly. Nothing is uploaded.
Licence & attribution
Author: BlackBerry Threat Research
Source repository: BlackBerry Research & Intelligence (via Open-Source-YARA-rules) @ ec0056f767
Licence: Apache License 2.0 (stated in the rule's own meta)
“This Yara rule is provided under the Apache License 2.0 (https://www.apache.org/licenses/LICENSE-2.0) and open to any user or organization, as long as you use it under this license and ensure originator credit in any derivative to The BlackBerry Research & Intelligence Team”
Mirrored via YARA Forge 20260927, which prefixes rule names with the source and adds normalised meta fields.
Rule id: 1fc57dd4-f020-5eb6-8e60-2bce3edfc512
Tags:FILE
Related rules
- MalwareBlackBerry Research & Intelligence (via Open-Source-YARA-rules)· BlackBerry Threat Research· 2022-05-10
- MalwareBlackBerry Research & Intelligence (via Open-Source-YARA-rules)· BlackBerry Threat Research· 2022-05-10