Skip to content

YARA · Mandiant red team tool countermeasures

FIREEYE_RT_APT_Trojan_Win_REDFLARE_4

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-01
Modified
2020-12-09
Score / Quality
75 / 75

What this rule detects

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

Targets: Windows PE.

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

Summary generated from the rule's metadata and condition.

Rule source

apt-trojan-win-redflare-4.yarBSD 2-Clause License
rule FIREEYE_RT_APT_Trojan_Win_REDFLARE_4 : FILE
{
	meta:
		description = "No description has been set in the source file - FireEye-RT"
		author = "FireEye"
		id = "6e8621b0-a0ee-5fc7-a2b8-1973a42d6e37"
		date = "2020-12-01"
		date = "2020-12-01"
		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/REDFLARE/production/yara/APT_Trojan_Win_REDFLARE_4.yar#L4-L19"
		license_url = "https://github.com/mandiant/red_team_tool_countermeasures//blob/3561b71724dbfa3e2bb78106aaa2d7f8b892c43b/LICENSE.txt"
		hash = "a8b5dcfea5e87bf0e95176daa243943d, 9dcb6424662941d746576e62712220aa"
		logic_hash = "d027e98ad8fa6d03a49ceffd81fba6a621173e2dbabae652bee2f4e8489bb378"
		score = 75
		quality = 75
		tags = "FILE"
		rev = 2

	strings:
		$s1 = "LogonUserW" fullword
		$s2 = "ImpersonateLoggedOnUser" fullword
		$s3 = "runCommand" fullword
		$user_logon = { 22 02 00 00 [1-10] 02 02 00 00 [0-4] E8 [4-40] ( 09 00 00 00 [1-10] 03 00 00 00 | 6A 03 6A 09 ) [4-30] FF 15 [4] 85 C0 7? }

	condition:
		( uint16( 0 ) == 0x5A4D ) and ( uint32( uint32( 0x3C ) ) == 0x00004550 ) and all of them
}

Strings (4 patterns)

IdentifierTypeValueModifiers
$s1text"LogonUserW"fullword
$s2text"ImpersonateLoggedOnUser"fullword
$s3text"runCommand"fullword
$user_logonhex{ 22 02 00 00 [1-10] 02 02 00 00 [0-4] E8 [4-40] ( 09 00 00 00 [1-10] 03 00 00 00 | 6A 03 6A 09 ) [4-30] FF 15 [4] 85 C0 7? }

Condition

( uint16( 0 ) == 0x5A4D ) and ( uint32( uint32( 0x3C ) ) == 0x00004550 ) and all of them

In 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.

Drop a file here or click to chooseScanned locally with YARA-X. Files up to 200 MB.

Open in editor

References

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: 6e8621b0-a0ee-5fc7-a2b8-1973a42d6e37

Metadata

rev2

Tags:FILE