Skip to content

YARA · SEKOIA.IO Community

SEKOIA_Apt_Gamaredon_Subtle_Paws

SUBTLE-PAWS powershell backdoor used by Gamaredon

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

What this rule detects

SUBTLE-PAWS powershell backdoor used by Gamaredon

It defines 4 patterns (4 text, 0 hex, 0 regex).

Summary generated from the rule's metadata and condition.

Rule source

apt-gamaredon-subtle-paws.yarDetection Rule License 1.1
rule SEKOIA_Apt_Gamaredon_Subtle_Paws : FILE
{
	meta:
		description = "SUBTLE-PAWS powershell backdoor used by Gamaredon"
		author = "Sekoia.io"
		id = "1950f886-97d2-4aa1-8f13-2947eba706e4"
		date = "2024-02-09"
		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_subtle_paws.yar#L1-L18"
		license_url = "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/LICENSE.md"
		logic_hash = "2fcebcf3401912e06ca4a34bf4e8d5318c6b2e08b00c4939ab932f3fb94cbc89"
		score = 75
		quality = 80
		tags = "FILE"
		version = "1.0"
		classification = "TLP:CLEAR"

	strings:
		$s1 = "$splitter" ascii wide
		$s2 = "[System.Convert]::FromBase64String" ascii wide
		$s3 = "$_;$var2 =\"var1\";$var3" ascii wide
		$s4 = "foreach-object{$_|powershell -noprofile -}" ascii wide

	condition:
		$s1 and $s2 and ( $s3 or $s4 ) and filesize < 100KB
}

Strings (4 patterns)

IdentifierTypeValueModifiers
$s1text"$splitter"ascii wide
$s2text"[System.Convert]::FromBase64String"ascii wide
$s3text"$_;$var2 =\"var1\";$var3"ascii wide
$s4text"foreach-object{$_|powershell -noprofile -}"ascii wide

Condition

$s1 and $s2 and ( $s3 or $s4 ) and filesize < 100KB

In plain words (Heuristic)

  • The file must be smaller than 100KB (a cheap guard that skips large files).
  • Pattern $s1 must be present.
  • Pattern $s2 must be present.
  • Pattern $s3 must be present.
  • Pattern $s4 must be present.

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: 1950f886-97d2-4aa1-8f13-2947eba706e4

Metadata

version1.0
classificationTLP:CLEAR

Tags:FILE