YARA · Mandiant red team tool countermeasures
FIREEYE_RT_APT_Loader_Win_MATRYOSHKA_1
matryoshka_process_hollow.rs
- Author
- FireEye
- Date
- 2020-12-02
- Modified
- 2020-12-09
- Score / Quality
- 75 / 75
What this rule detects
matryoshka_process_hollow.rs
Targets: Windows PE.
It defines 8 patterns (8 text, 0 hex, 0 regex).
YARA-X says: warning[duplicate_pattern_value]: duplicate pattern value
Summary generated from the rule's metadata and condition.
Rule source
rule FIREEYE_RT_APT_Loader_Win_MATRYOSHKA_1 : FILE
{
meta:
= "matryoshka_process_hollow.rs"
= "FireEye"
= "c07fb67e-ded5-593d-b5dc-d0e2c3b5a352"
= "2020-12-02"
= "2020-12-02"
= "2020-12-09"
= "https://github.com/mandiant/red_team_tool_countermeasures/"
= "https://github.com/mandiant/red_team_tool_countermeasures//blob/3561b71724dbfa3e2bb78106aaa2d7f8b892c43b/rules/MATRYOSHKA/production/yara/APT_Loader_Win_MATRYOSHKA_1.yar#L4-L24"
= "https://github.com/mandiant/red_team_tool_countermeasures//blob/3561b71724dbfa3e2bb78106aaa2d7f8b892c43b/LICENSE.txt"
= "44887551a47ae272d7873a354d24042d"
= "8f762684ffd3984630bf41ededa78b8993b53b22591a59912cabfe635775de53"
= 75
= 75
= "FILE"
= 1
strings:
$s1 = "ZwQueryInformationProcess" fullword
$s2 = "WriteProcessMemory" fullword
$s3 = "CreateProcessW" fullword
$s4 = "WriteProcessMemory" fullword
$s5 = "\x00Invalid NT Signature!\x00"
$s6 = "\x00Error while creating and mapping section. NTStatus: "
$s7 = "\x00Error no process information - NTSTATUS:"
$s8 = "\x00Error while erasing pe header. NTStatus: "
condition:
( uint16( 0 ) == 0x5A4D ) and ( uint32( uint32( 0x3C ) ) == 0x00004550 ) and ( uint16( uint32( 0x3C ) + 0x18 ) == 0x020B ) and all of them
}
Strings (8 patterns)
| Identifier | Type | Value | Modifiers |
|---|---|---|---|
| $s1 | text | "ZwQueryInformationProcess" | fullword |
| $s2 | text | "WriteProcessMemory" | fullword |
| $s3 | text | "CreateProcessW" | fullword |
| $s4 | text | "WriteProcessMemory" | fullword |
| $s5 | text | "\x00Invalid NT Signature!\x00" | |
| $s6 | text | "\x00Error while creating and mapping section. NTStatus: " | |
| $s7 | text | "\x00Error no process information - NTSTATUS:" | |
| $s8 | text | "\x00Error while erasing pe header. NTStatus: " |
Condition
( uint16( 0 ) == 0x5A4D ) and ( uint32( uint32( 0x3C ) ) == 0x00004550 ) and ( uint16( uint32( 0x3C ) + 0x18 ) == 0x020B ) and all of themIn plain words (Heuristic)
- The file must start with “MZ” — a Windows executable (PE).
- 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.
Sample hashes
Hashes of samples the author lists in the rule's meta (look them up in your threat-intelligence platform).
- 44887551a47ae272d7873a354d24042d
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
Mirrored via YARA Forge 20260927, which prefixes rule names with the source and adds normalised meta fields.
Rule id: c07fb67e-ded5-593d-b5dc-d0e2c3b5a352
Metadata
| rev | 1 |
|---|
Tags:FILE
Related rules
- APT / threat actorMandiant red team tool countermeasures· FireEye· 2020-12-08
- APT / threat actorMandiant red team tool countermeasures· FireEye· 2020-12-08
- APT / threat actorMandiant red team tool countermeasures· FireEye· 2020-12-02
- APT / threat actorMandiant red team tool countermeasures· FireEye· 2020-12-02
- APT / threat actorMandiant red team tool countermeasures· FireEye· 2020-11-27
- APT / threat actorMandiant red team tool countermeasures· FireEye· 2020-12-02
- APT / threat actorMandiant red team tool countermeasures· FireEye· 2020-12-02
- APT / threat actorMandiant red team tool countermeasures· FireEye· 2020-11-27