Skip to content

YARA · SEKOIA.IO Community

SEKOIA_Apt_Mustangpanda_Windows_Remoteshell

Detects Remote Shell of Mustang Panda by detecting internal structure intialization

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

What this rule detects

Detects Remote Shell of Mustang Panda by detecting internal structure intialization

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

Summary generated from the rule's metadata and condition.

Rule source

apt-mustangpanda-windows-remoteshell.yarDetection Rule License 1.1
rule SEKOIA_Apt_Mustangpanda_Windows_Remoteshell : FILE
{
	meta:
		description = "Detects Remote Shell of Mustang Panda by detecting internal structure intialization"
		author = "Sekoia.io"
		id = "cffdd11e-9700-462e-a965-f9f51db63f0b"
		date = "2022-12-06"
		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_windows_remoteshell.yar#L1-L121"
		license_url = "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/LICENSE.md"
		logic_hash = "4a72ae1574022d6454e29a6b05a0279f2e774f8218d24a3a866721d958c52e1a"
		score = 75
		quality = 80
		tags = "FILE"
		version = "1.0"
		classification = "TLP:CLEAR"

	strings:
		$chunk_1 = {
        C7 45 ?? 0C 00 00 00
        8D 4E ??
        C6 01 03
        8B 87 ?? ?? ?? ??
        89 41 ??
        66 8B 87 ?? ?? ?? ??
        66 89 41 ??
        }
		$chunk_2 = {
        C7 45 ?? 0C 00 00 00
        8D 4E ??
        C6 01 02
        8B 87 ?? ?? ?? ??
        89 41 ??
        66 8B 87 ?? ?? ?? ??
        66 89 41 ??
        8B 45 ??
        83 E8 05
        50
        51
        E8 ?? ?? ?? ??
        }
		$chunk_3 = {
        C7 87 ?? ?? ?? ?? 01 00 00 00
        8D 4E ??
        C7 45 ?? 0C 00 00 00
        C6 01 04
        8B 87 ?? ?? ?? ??
        89 41 ??
        66 8B 87 ?? ?? ?? ??
        66 89 41 ??
        8B 45 ??
        83 E8 05
        50
        51
        E8 ?? ?? ?? ??
        }
		$chunk_4 = {
        83 65 ?? ??
        EB ??
        8B 45 ??
        40
        89 45 ??
        8B 45 ??
        3B 45 ??
        7D ??
        8B 45 ??
        03 45 ??
        0F B6 08
        8B 45 ??
        33 D2
        6A ??
        5E
        F7 F6
        0F B6 84 15 ?? ?? ?? ??
        33 C8
        8B 45 ??
        03 45 ??
        88 08
        EB ??
        83 65 ?? ??
        EB ??
        8B 45 ??
        40
        89 45 ??
        8B 45 ??
        }

	condition:
		filesize < 8MB and 3 of them
}

Strings (4 patterns)

IdentifierTypeValueModifiers
$chunk_1hex{ C7 45 ?? 0C 00 00 00 8D 4E ?? C6 01 03 8B 87 ?? ?? ?? ?? 89 41 ?? 66 8B 87 ?? ?? ?? ?? 66 89 41 ?? …
$chunk_2hex{ C7 45 ?? 0C 00 00 00 8D 4E ?? C6 01 02 8B 87 ?? ?? ?? ?? 89 41 ?? 66 8B 87 ?? ?? ?? ?? 66 89 41 ?? …
$chunk_3hex{ C7 87 ?? ?? ?? ?? 01 00 00 00 8D 4E ?? C7 45 ?? 0C 00 00 00 C6 01 04 8B 87 ?? ?? ?? ?? 89 41 ?? 66 8B …
$chunk_4hex{ 83 65 ?? ?? EB ?? 8B 45 ?? 40 89 45 ?? 8B 45 ?? 3B 45 ?? 7D ?? 8B 45 ?? 03 45 …

Condition

filesize < 8MB and 3 of them

In plain words (Heuristic)

  • The file must be smaller than 8MB (a cheap guard that skips large files).
  • At least 3 patterns in the rule 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: cffdd11e-9700-462e-a965-f9f51db63f0b

Metadata

version1.0
classificationTLP:CLEAR

Tags:FILE