Skip to content

YARA · SEKOIA.IO Community

SEKOIA_Apt_Muddywater_Powgoop_Decoded

Detects decoded PowGoop malware

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

What this rule detects

Detects decoded PowGoop malware

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

Summary generated from the rule's metadata and condition.

Rule source

apt-muddywater-powgoop-decoded.yarDetection Rule License 1.1
rule SEKOIA_Apt_Muddywater_Powgoop_Decoded : FILE
{
	meta:
		description = "Detects decoded PowGoop malware"
		author = "Sekoia.io"
		id = "194cb9ef-da96-42b6-a3b5-b0aee7495f2c"
		date = "2022-01-13"
		modified = "2024-12-19"
		reference = "https://github.com/SEKOIA-IO/Community"
		source_url = "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/yara_rules/apt_muddywater_powgoop_decoded.yar#L1-L26"
		license_url = "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/LICENSE.md"
		logic_hash = "6654d8107bb2ad6344f1fa03c6525ed9a0b8e49627787355efe857e80a02eca4"
		score = 75
		quality = 80
		tags = "FILE"
		version = "1.0"
		classification = "TLP:CLEAR"

	strings:
		$h1 = "[System.Net.WebRequest]::Create(" ascii wide
		$h2 = "Headers.Add('Authorization'" ascii wide
		$h3 = "Headers.Add('Cookie',('value=' + $ec + ';')" ascii wide
		$h4 = ".GetResponse()" ascii wide
		$h5 = "GetResponseStream()" ascii wide
		$c1 = "return (65..90) + (97..122) | Get-Random -Count" ascii wide
		$c2 = "% {[char]$_}" ascii wide

	condition:
		filesize > 1KB and filesize < 1MB and ( $h2 in ( @h1 .. @h5 ) and $h3 in ( @h1 .. @h5 ) and $h4 in ( @h1 .. @h5 ) ) or ( $c2 in ( @c1 .. @c1 + 50 ) ) and true
}

Strings (7 patterns)

IdentifierTypeValueModifiers
$h1text"[System.Net.WebRequest]::Create("ascii wide
$h2text"Headers.Add('Authorization'"ascii wide
$h3text"Headers.Add('Cookie',('value=' + $ec + ';')"ascii wide
$h4text".GetResponse()"ascii wide
$h5text"GetResponseStream()"ascii wide
$c1text"return (65..90) + (97..122) | Get-Random -Count"ascii wide
$c2text"% {[char]$_}"ascii wide

Condition

filesize > 1KB and filesize < 1MB and ( $h2 in ( @h1 .. @h5 ) and $h3 in ( @h1 .. @h5 ) and $h4 in ( @h1 .. @h5 ) ) or ( $c2 in ( @c1 .. @c1 + 50 ) ) and true

In plain words (Heuristic)

  • The file must be smaller than 1MB (a cheap guard that skips large files).
  • The file must be larger than 1KB.
  • Pattern $h2 must be found within the range @h1 .. @h5.
  • Pattern $h3 must be found within the range @h1 .. @h5.
  • Pattern $h4 must be found within the range @h1 .. @h5.
  • Pattern $c2 must be found within the range @c1 .. @c1 + 50.

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: 194cb9ef-da96-42b6-a3b5-b0aee7495f2c

Metadata

version1.0
classificationTLP:CLEAR

Tags:FILE