YARA · BlackBerry Research & Intelligence (via Open-Source-YARA-rules)
BLACKBERRY_Mal_Infostealer_Win32_Blackguard
Detects W32 BlackGuard Infostealer
- Author
- BlackBerry Threat Research team
- Date
- 2022-04-14
- Modified
- 2022-07-06
- Score / Quality
- 75 / 85
What this rule detects
Detects W32 BlackGuard Infostealer
Targets: Windows PE.
It defines 15 patterns (14 text, 1 hex, 0 regex). YARA modules used: pe.
YARA-X says: warning[deprecated_field]: field `number_of_sections` is deprecated
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_Infostealer_Win32_Blackguard : FILE
{
meta:
= "Detects W32 BlackGuard Infostealer"
= "BlackBerry Threat Research team "
= "e079de0f-c607-5089-b385-ba67ed2cb73e"
= "2022-04-14"
= "2022-07-06"
= "https://blogs.blackberry.com/en/2022/04/threat-thursday-blackguard-infostealer"
= "https://github.com/mikesxrs/Open-Source-YARA-rules/blob/ec0056f767db98bf6d5fd63877ad51fb54d350e9/Blackberry/Mal_Infostealer_Win32_BlackGuard.yar#L3-L39"
= "N/A"
= "6ab3b21fa7cb638ed68509be1ed6302284e8a9cd1a10f9b6837c057154aa6162"
= "6e819ee656b6d696be1e818eeb8a545e7934c1f5a1171a1192422d8c74c0caa2"
= 75
= 85
= "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:
$a1 = { 06 91 06 61 20 AA 00 00 00 61 D2 9C 06 17 58 0A }
$a2 = "System.Data.SQLite"
$a3 = "FromBase64String"
$a4 = "BlockInput"
$a5 = "UploadFile"
$a6 = "Passwords"
$a7 = "Discord"
$a8 = "GetVolumeInformationA"
$a9 = "NordVPN"
$a10 = "OpenVPN"
$a11 = "ProtonVPN"
$a12 = "OperaCookies"
$a13 = "EdgeCookies"
$a14 = "ChromeCookies"
$b1 = "upche" wide
condition:
uint16( 0 ) == 0x5a4d and pe.imphash ( ) == "f34d5f2d4577ed6d9ceec516c1f5a744" and pe.number_of_sections == 3 and pe.section_index ( ".text" ) == 0 and pe.section_index ( ".rsrc" ) == 1 and pe.section_index ( ".reloc" ) == 2 and ( ( all of ( $a* ) ) or ( ( 12 of ( $a* ) and all of ( $b* ) ) ) )
}
Strings (15 patterns)
| Identifier | Type | Value | Modifiers |
|---|---|---|---|
| $a1 | hex | { 06 91 06 61 20 AA 00 00 00 61 D2 9C 06 17 58 0A } | |
| $a2 | text | "System.Data.SQLite" | |
| $a3 | text | "FromBase64String" | |
| $a4 | text | "BlockInput" | |
| $a5 | text | "UploadFile" | |
| $a6 | text | "Passwords" | |
| $a7 | text | "Discord" | |
| $a8 | text | "GetVolumeInformationA" | |
| $a9 | text | "NordVPN" | |
| $a10 | text | "OpenVPN" | |
| $a11 | text | "ProtonVPN" | |
| $a12 | text | "OperaCookies" | |
| $a13 | text | "EdgeCookies" | |
| $a14 | text | "ChromeCookies" | |
| $b1 | text | "upche" | wide |
Condition
uint16( 0 ) == 0x5a4d and pe.imphash ( ) == "f34d5f2d4577ed6d9ceec516c1f5a744" and pe.number_of_sections == 3 and pe.section_index ( ".text" ) == 0 and pe.section_index ( ".rsrc" ) == 1 and pe.section_index ( ".reloc" ) == 2 and ( ( all of ( $a* ) ) or ( ( 12 of ( $a* ) and all of ( $b* ) ) ) )In plain words (Heuristic)
- The file must start with “MZ” — a Windows executable (PE).
- All patterns in ( $a* ) must match.
- All patterns in ( $b* ) must match.
- At least 12 patterns in ( $a* ) 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.
Sample hashes
Hashes of samples the author lists in the rule's meta (look them up in your threat-intelligence platform).
- 6ab3b21fa7cb638ed68509be1ed6302284e8a9cd1a10f9b6837c057154aa6162
Licence & attribution
Author: BlackBerry Threat Research team
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: e079de0f-c607-5089-b385-ba67ed2cb73e
Tags:FILE