YARA · ditekSHen detection
DITEKSHEN_MALWARE_Win_Sapphirestealer
Detects SapphireStealer
- Author
- ditekSHen
- Date
- 2020-11-06
- Modified
- 2024-11-01
- Score / Quality
- 75 / 75
What this rule detects
Detects SapphireStealer
Associated malware family: Sapphirestealer.
Targets: Windows PE.
It defines 11 patterns (11 text, 0 hex, 0 regex).
Summary generated from the rule's metadata and condition.
Rule source
malware-win-sapphirestealer.yarBSD 2-Clause License
rule DITEKSHEN_MALWARE_Win_Sapphirestealer : FILE
{
meta:
= "Detects SapphireStealer"
= "ditekSHen"
= "ed6cffe4-23f1-5791-b07d-75abb698c899"
= "2020-11-06"
= "2024-11-01"
= "https://github.com/ditekshen/detection"
= "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/yara/malware.yar#L11172-L11190"
= "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/LICENSE.txt"
= "97088c0decf158d45a02571bd50b5f370c139339c19b8071f38c0f9816232d1f"
= 75
= 75
= "FILE"
strings:
$s1 = "Sapphire.Modules." ascii
$s2 = "sapphire\\" wide
$s3 = "by r3vengerx0" wide
$s4 = "Sapphire\\obj\\" ascii
$s5 = "[ERROR_GETSECRETKEY_METHOD]" fullword wide
$s6 = "[ERROR_CANT_GET_PASSWORD]" fullword wide
$s7 = "<h2>------NEW LOGS------</h2>" wide
$s8 = "[ERROR] can't create grab directory" wide
$s9 = "<UploadToTelegram>d__" ascii
$s10 = "UploadToTelegram" ascii
$s11 = ".SendLog+<UploadToTelegram>d__" ascii
condition:
uint16( 0 ) == 0x5a4d and 5 of them
}
Strings (11 patterns)
| Identifier | Type | Value | Modifiers |
|---|---|---|---|
| $s1 | text | "Sapphire.Modules." | ascii |
| $s2 | text | "sapphire\\" | wide |
| $s3 | text | "by r3vengerx0" | wide |
| $s4 | text | "Sapphire\\obj\\" | ascii |
| $s5 | text | "[ERROR_GETSECRETKEY_METHOD]" | fullword wide |
| $s6 | text | "[ERROR_CANT_GET_PASSWORD]" | fullword wide |
| $s7 | text | "<h2>------NEW LOGS------</h2>" | wide |
| $s8 | text | "[ERROR] can't create grab directory" | wide |
| $s9 | text | "<UploadToTelegram>d__" | ascii |
| $s10 | text | "UploadToTelegram" | ascii |
| $s11 | text | ".SendLog+<UploadToTelegram>d__" | ascii |
Condition
uint16( 0 ) == 0x5a4d and 5 of themIn plain words (Heuristic)
- The file must start with “MZ” — a Windows executable (PE).
- At least 5 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.
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).
Mirrored via YARA Forge 20260927, which prefixes rule names with the source and adds normalised meta fields.
Rule id: ed6cffe4-23f1-5791-b07d-75abb698c899
Tags:FILE
Related rules
- MalwareditekSHen detection· ditekSHen· 2034-02-17
- MalwareditekSHen detection· ditekSHen· 2020-11-06
- MalwareditekSHen detection· ditekSHen· 2020-11-06
- MalwareditekSHen detection· ditekSHen· 2020-11-06
- MalwareditekSHen detection· ditekSHen· 2020-11-06
- MalwareditekSHen detection· ditekSHen· 2020-11-06
- MalwareditekSHen detection· ditekSHen· 2020-11-06
- MalwareditekSHen detection· ditekSHen· 2020-11-06