Skip to content

YARA · SEKOIA.IO Community

SEKOIA_Apt_Gamaredon_Flash_Infostealer

Detects the Gamaredon's Flash InfoStealer

APT / threat actorSEKOIA.IO CommunityDetection Rule License 1.1Compiles with YARA-X
Author
Sekoia.io
Date
2023-01-24
Modified
2024-12-19
Score / Quality
75 / 80

What this rule detects

Detects the Gamaredon's Flash InfoStealer

Targets: Windows PE.

It defines 6 patterns (5 text, 1 hex, 0 regex).

Summary generated from the rule's metadata and condition.

Rule source

apt-gamaredon-flash-infostealer.yarDetection Rule License 1.1
rule SEKOIA_Apt_Gamaredon_Flash_Infostealer : FILE
{
	meta:
		description = "Detects the Gamaredon's Flash InfoStealer"
		author = "Sekoia.io"
		id = "f060fe4b-74fd-4ef3-ac86-916e2113ff24"
		date = "2023-01-24"
		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_flash_infostealer.yar#L1-L21"
		license_url = "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/LICENSE.md"
		logic_hash = "5a3ee8c2c3c377bea7de1993e5ef744796130643575bcce1b6181d68190aafb7"
		score = 75
		quality = 80
		tags = "FILE"
		version = "1.0"
		classification = "TLP:CLEAR"

	strings:
		$a1 = "Content-Type: multipart/form-data; boundary=----%s" ascii
		$a2 = "Content-Disposition: form-data; name=\"p\"" ascii
		$a3 = "Content-Type: application/octet-stream"
		$w1 = "%s||%s||%s||%s" wide
		$w2 = "Pragma: no-cache" wide
		$w3 = { 64 00 6F 00 63 00 00 00 00 00 2E 00 64 00 6F 00 63 00 78 00 }

	condition:
		uint16be( 0 ) == 0x4d5a and filesize < 500KB and 2 of ( $a* ) and 2 of ( $w* )
}

Strings (6 patterns)

IdentifierTypeValueModifiers
$a1text"Content-Type: multipart/form-data; boundary=----%s"ascii
$a2text"Content-Disposition: form-data; name=\"p\""ascii
$a3text"Content-Type: application/octet-stream"
$w1text"%s||%s||%s||%s"wide
$w2text"Pragma: no-cache"wide
$w3hex{ 64 00 6F 00 63 00 00 00 00 00 2E 00 64 00 6F 00 63 00 78 00 }

Condition

uint16be( 0 ) == 0x4d5a and filesize < 500KB and 2 of ( $a* ) and 2 of ( $w* )

In plain words (Heuristic)

  • The file must start with “MZ” — a Windows executable (PE).
  • The file must be smaller than 500KB (a cheap guard that skips large files).
  • At least 2 patterns in ( $a* ) must match.
  • At least 2 patterns in ( $w* ) 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.

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: f060fe4b-74fd-4ef3-ac86-916e2113ff24

Metadata

version1.0
classificationTLP:CLEAR

Tags:FILE