Skip to content

YARA · SEKOIA.IO Community

SEKOIA_Apt_Gamaredon_Stealer_Obfuscation_2

Matches the Gamaredon Stealer obfuscation

APT / threat actorSEKOIA.IO CommunityDetection Rule License 1.1Compiles with YARA-X
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 1 patterns (0 text, 1 hex, 0 regex).

Summary generated from the rule's metadata and condition.

Rule source

apt-gamaredon-stealer-obfuscation-2.yarDetection Rule License 1.1
rule SEKOIA_Apt_Gamaredon_Stealer_Obfuscation_2 : FILE
{
	meta:
		description = "Matches the Gamaredon Stealer obfuscation"
		author = "Sekoia.io"
		id = "fd278a90-537b-4c67-9421-01c9f2416b60"
		date = "2022-02-04"
		modified = "2024-12-19"
		reference = "https://github.com/SEKOIA-IO/Community"
		source_url = "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/yara_rules/apt_gamaredon_stealer_obfuscation_2.yar#L1-L17"
		license_url = "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/LICENSE.md"
		logic_hash = "6ffd8504ba8ca614d3941bd46b944d85e0ad4b9d8d2960d508f50550497d2852"
		score = 75
		quality = 80
		tags = "FILE"
		version = "1.0"
		classification = "TLP:CLEAR"

	strings:
		$s1 = { 3d 20 6e 65 77 20 73 74 72 69 6e 67 5b 5d 20 7b 20 [50-200] 20 7d 3b }

	condition:
		uint16be( 0 ) == 0x4d5a and filesize > 100MB and #s1 > 40
}

Strings (1 patterns)

IdentifierTypeValueModifiers
$s1hex{ 3d 20 6e 65 77 20 73 74 72 69 6e 67 5b 5d 20 7b 20 [50-200] 20 7d 3b }

Condition

uint16be( 0 ) == 0x4d5a and filesize > 100MB and #s1 > 40

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 > 40 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.

Open in editor

References

Licence & attribution

Author: Sekoia.io

Source repository: SEKOIA.IO Community @ a438a5901a

Licence: Detection Rule License 1.1 (repository licence)

Original rule

Mirrored via YARA Forge 20260927, which prefixes rule names with the source and adds normalised meta fields.

Rule id: fd278a90-537b-4c67-9421-01c9f2416b60

Metadata

version1.0
classificationTLP:CLEAR

Tags:FILE