Skip to content

YARA · SEKOIA.IO Community

SEKOIA_Apt_Mustangpanda_Xoreddll

Detects xored DLL from MustangPanda embedding a document

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

What this rule detects

Detects xored DLL from MustangPanda embedding a document

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

Summary generated from the rule's metadata and condition.

Rule source

apt-mustangpanda-xoreddll.yarDetection Rule License 1.1
rule SEKOIA_Apt_Mustangpanda_Xoreddll : FILE
{
	meta:
		description = "Detects xored DLL from MustangPanda embedding a document"
		author = "Sekoia.io"
		id = "73d13624-01df-41ab-b449-86db43dc6c55"
		date = "2022-07-19"
		modified = "2024-12-19"
		reference = "https://github.com/SEKOIA-IO/Community"
		source_url = "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/yara_rules/apt_mustangpanda_xoreddll.yar#L1-L20"
		license_url = "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/LICENSE.md"
		logic_hash = "685be191cf187c0d5bfd00354400c47a961c9d047aa7e65e4cfc2201ec5eb1bc"
		score = 75
		quality = 80
		tags = "FILE"
		version = "1.0"
		classification = "TLP:CLEAR"

	strings:
		$clear = "This program cannot be run in DOS mode"
		$stub = "This program cannot be run in DOS mode" xor
		$res1 = "5w>w9wR'31Z" xor
		$res2 = "r0y0~0KlBD" xor
		$res3 = "d&o&h&öé7Æ" xor
		$res4 = "9{2{5{+0" xor

	condition:
		$stub and any of ( $res* ) and not $clear and filesize < 3MB
}

Strings (6 patterns)

IdentifierTypeValueModifiers
$cleartext"This program cannot be run in DOS mode"
$stubtext"This program cannot be run in DOS mode"xor
$res1text"5w>w9wR'31Z"xor
$res2text"r0y0~0KlBD"xor
$res3text"d&o&h&öé7Æ"xor
$res4text"9{2{5{+0"xor

Condition

$stub and any of ( $res* ) and not $clear and filesize < 3MB

In plain words (Heuristic)

  • The file must be smaller than 3MB (a cheap guard that skips large files).
  • At least one pattern in ( $res* ) must match.
  • Pattern $clear must NOT be present.
  • Pattern $stub 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: 73d13624-01df-41ab-b449-86db43dc6c55

Metadata

version1.0
classificationTLP:CLEAR

Tags:FILE