Skip to content

YARA · SEKOIA.IO Community

SEKOIA_Apt_Mustangpanda_Zpakage

Detect obfuscation seen in ZPAKAGE

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

What this rule detects

Detect obfuscation seen in ZPAKAGE

Targets: Windows PE, Linux ELF.

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

Summary generated from the rule's metadata and condition.

Rule source

apt-mustangpanda-zpakage.yarDetection Rule License 1.1
rule SEKOIA_Apt_Mustangpanda_Zpakage : FILE
{
	meta:
		description = "Detect obfuscation seen in ZPAKAGE"
		author = "Sekoia.io"
		id = "a4767d12-5058-4a26-be62-0cec685917bd"
		date = "2023-03-27"
		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_zpakage.yar#L1-L31"
		license_url = "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/LICENSE.md"
		hash = "711c0e83f4e626a7b54e3948b281a71915a056c5341c8f509ecba535bc199bee"
		logic_hash = "52ad51589ca154fbf6e5829a2c80a9b811809288bed6995820a0ca8aa218d8ef"
		score = 75
		quality = 80
		tags = "FILE"
		version = "1.0"
		classification = "TLP:CLEAR"

	strings:
		$chunk_1 = {
        88 94 1D ?? ?? ?? ??
        8A 84 1D ?? ?? ?? ??
        83 ?? ??
        88 84 1D ?? ?? ?? ??
        8A 84 1D ?? ?? ?? ??
        83 ?? ??
        88 84 1D ?? ?? ?? ??
        8A 84 1D ?? ?? ?? ??
        83 ?? ??
        88 84 1D ?? ?? ?? ??
        0F BE 8C 1D ?? ?? ?? ??
        0F BE 84 1D ?? ?? ?? ??
        }

	condition:
		( uint32be( 0 ) == 0x7f454c46 or uint16be( 0 ) == 0x4d5a ) and filesize < 1MB and filesize < 11MB and #chunk_1 > 20
}

Strings (1 patterns)

IdentifierTypeValueModifiers
$chunk_1hex{ 88 94 1D ?? ?? ?? ?? 8A 84 1D ?? ?? ?? ?? 83 ?? ?? 88 84 1D ?? ?? ?? ?? 8A 84 1D ?? ?? ?? ?? 83 ?? ?? …

Condition

( uint32be( 0 ) == 0x7f454c46 or uint16be( 0 ) == 0x4d5a ) and filesize < 1MB and filesize < 11MB and #chunk_1 > 20

In plain words (Heuristic)

  • The file must start with “MZ” — a Windows executable (PE).
  • The file must start with the ELF header — a Linux/Unix executable.
  • The file must be smaller than 1MB (a cheap guard that skips large files).
  • The file must be smaller than 11MB (a cheap guard that skips large files).
  • Pattern $chunk_1 must occur > 20 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

Sample hashes

Hashes of samples the author lists in the rule's meta (look them up in your threat-intelligence platform).

  • 711c0e83f4e626a7b54e3948b281a71915a056c5341c8f509ecba535bc199bee

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: a4767d12-5058-4a26-be62-0cec685917bd

Metadata

version1.0
classificationTLP:CLEAR

Tags:FILE