YARA · SEKOIA.IO Community
SEKOIA_Apt_Gamaredon_Stealer_Obfuscation_1
Matches the Gamaredon Stealer obfuscation
- Author
- Sekoia.io
- Date
- 2022-02-04
- Modified
- 2024-12-19
- Score / Quality
- 75 / 80
What this rule detects
Matches the Gamaredon Stealer obfuscation
Targets: Windows PE.
It defines 2 patterns (0 text, 2 hex, 0 regex).
Summary generated from the rule's metadata and condition.
Rule source
apt-gamaredon-stealer-obfuscation-1.yarDetection Rule License 1.1
rule SEKOIA_Apt_Gamaredon_Stealer_Obfuscation_1 : FILE
{
meta:
= "Matches the Gamaredon Stealer obfuscation"
= "Sekoia.io"
= "a6197d16-8ed1-410b-8814-d7eff9a8096c"
= "2022-02-04"
= "2024-12-19"
= "https://github.com/SEKOIA-IO/Community"
= "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/yara_rules/apt_gamaredon_stealer_obfuscation_1.yar#L1-L18"
= "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/LICENSE.md"
= "7f6a5f8af73c4eb7debbadfd22232ad4e3f44e3aae36c3d624ce7a1a050e8782"
= 75
= 80
= "FILE"
= "1.0"
= "TLP:CLEAR"
strings:
$s1 = { 76 61 72 20 [5-30] 3d 20 6e 65 77 20 6f 62 6a 65 63 74 5b 5d 20 7b 20 [2-10] 2c 20 [2-10] 2c 20 [2-10] 2c 20 [2-10] 2c 20 [2-10] 2c 20 [2-10] 20 7d 3b }
$s2 = { 66 6f 72 28 69 6e 74 20 [5-30] 20 3d 20 30 3b 20 [5-30] 20 3c 20 31 30 3b 20 [5-30] 2b 2b 29 }
condition:
uint16be( 0 ) == 0x4d5a and filesize > 100MB and ( #s1 > 100 or #s2 > 100 )
}
Strings (2 patterns)
| Identifier | Type | Value | Modifiers |
|---|---|---|---|
| $s1 | hex | { 76 61 72 20 [5-30] 3d 20 6e 65 77 20 6f 62 6a 65 63 74 5b 5d 20 7b 20 [2-10] 2c 20 [2-10] 2c 20 [2-10] 2c 20 [2-10] 2c 20 [2-10] 2c 20 [2-10] 20 7d 3b } | |
| $s2 | hex | { 66 6f 72 28 69 6e 74 20 [5-30] 20 3d 20 30 3b 20 [5-30] 20 3c 20 31 30 3b 20 [5-30] 2b 2b 29 } |
Condition
uint16be( 0 ) == 0x4d5a and filesize > 100MB and ( #s1 > 100 or #s2 > 100 )In plain words (Heuristic)
- The file must start with “MZ” — a Windows executable (PE).
- The file must be larger than 100MB.
- Pattern $s1 must occur > 100 times.
- Pattern $s2 must occur > 100 times.
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: Sekoia.io
Source repository: SEKOIA.IO Community @ a438a5901a
Licence: Detection Rule License 1.1 (repository licence)
Mirrored via YARA Forge 20260927, which prefixes rule names with the source and adds normalised meta fields.
Rule id: a6197d16-8ed1-410b-8814-d7eff9a8096c
Metadata
| version | 1.0 |
|---|---|
| classification | TLP:CLEAR |
Tags:FILE
Related rules
- APT / threat actorSEKOIA.IO Community· Sekoia.io· 2024-09-10
- APT / threat actorSEKOIA.IO Community· Sekoia.io· 2024-10-21
- APT / threat actorSEKOIA.IO Community· Sekoia.io· 2024-10-21
- APT / threat actorSEKOIA.IO Community· Sekoia.io· 2024-09-27
- APT / threat actorSEKOIA.IO Community· Sekoia.io· 2024-09-27
- APT / threat actorSEKOIA.IO Community· Sekoia.io· 2024-09-23
- APT / threat actorSEKOIA.IO Community· Sekoia.io· 2024-06-11
- APT / threat actorSEKOIA.IO Community· Sekoia.io· 2024-03-06