Skip to content

YARA · Mandiant red team tool countermeasures

FIREEYE_RT_APT_Builder_PY_MATRYOSHKA_1

No description has been set in the source file - FireEye-RT

APT / threat actorMandiant red team tool countermeasuresBSD 2-Clause LicenseCompiles with YARA-X
Author
FireEye
Date
2020-12-02
Modified
2020-12-09
Score / Quality
75 / 75

What this rule detects

No description has been set in the source file - FireEye-RT

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

Summary generated from the rule's metadata and condition.

Rule source

apt-builder-py-matryoshka-1.yarBSD 2-Clause License
rule FIREEYE_RT_APT_Builder_PY_MATRYOSHKA_1
{
	meta:
		description = "No description has been set in the source file - FireEye-RT"
		author = "FireEye"
		id = "0135f3bb-28b3-5fc4-85a2-b12c46c8bc45"
		date = "2020-12-02"
		date = "2020-12-02"
		modified = "2020-12-09"
		reference = "https://github.com/mandiant/red_team_tool_countermeasures/"
		source_url = "https://github.com/mandiant/red_team_tool_countermeasures//blob/3561b71724dbfa3e2bb78106aaa2d7f8b892c43b/rules/MATRYOSHKA/production/yara/APT_Builder_PY_MATRYOSHKA_1.yar#L4-L22"
		license_url = "https://github.com/mandiant/red_team_tool_countermeasures//blob/3561b71724dbfa3e2bb78106aaa2d7f8b892c43b/LICENSE.txt"
		hash = "25a97f6dba87ef9906a62c1a305ee1dd"
		logic_hash = "71b26f4b319429ac356b55d22bccd1da85894d61f8c96452422de78d2d893420"
		score = 75
		quality = 75
		tags = ""
		rev = 1

	strings:
		$s1 = ".pop(0)])"
		$s2 = "[1].replace('unsigned char buf[] = \"'"
		$s3 = "binascii.hexlify(f.read()).decode("
		$s4 = "os.system(\"cargo build {0} --bin {1}\".format("
		$s5 = "shutil.which('rustc')"
		$s6 = "~/.cargo/bin"
		$s7 = /[\x22\x27]\\\\x[\x22\x27]\.join\(\[\w{1,64}\[\w{1,64}:\w{1,64}[\x09\x20]{0,32}\+[\x09\x20]{0,32}2\]/

	condition:
		all of them
}

Strings (7 patterns)

IdentifierTypeValueModifiers
$s1text".pop(0)])"
$s2text"[1].replace('unsigned char buf[] = \"'"
$s3text"binascii.hexlify(f.read()).decode("
$s4text"os.system(\"cargo build {0} --bin {1}\".format("
$s5text"shutil.which('rustc')"
$s6text"~/.cargo/bin"
$s7regex/[\x22\x27]\\\\x[\x22\x27]\.join\(\[\w{1,64}\[\w{1,64}:\w{1,64}[\x09\x20]{0,32}\+[\x09\x20]{0,32}2\]/

Condition

all of them

In plain words (Heuristic)

  • All 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

Sample hashes

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

  • 25a97f6dba87ef9906a62c1a305ee1dd

Licence & attribution

Author: FireEye

Source repository: Mandiant red team tool countermeasures @ 3561b71724

Licence: BSD 2-Clause License (repository licence)

Copyright notice: Copyright (c) 2023, MANDIANT

Original rule

Mirrored via YARA Forge 20260927, which prefixes rule names with the source and adds normalised meta fields.

Rule id: 0135f3bb-28b3-5fc4-85a2-b12c46c8bc45

Metadata

rev1