Skip to content

YARA · Signature Base (Florian Roth / Nextron)

SIGNATURE_BASE_MAL_APT_NK_Andariel_Cutiedrop_Magicrat

Detects the MagicRAT variant used by Andariel

MalwareSignature Base (Florian Roth / Nextron)Detection Rule License 1.1Compiles with YARA-X
Author
CISA.gov (modified by Florian Roth, Nextron Systems)
Date
2024-07-25
Modified
2026-01-29
Score / Quality
80 / 85

What this rule detects

Detects the MagicRAT variant used by Andariel

Targets: Windows PE.

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

Summary generated from the rule's metadata and condition.

Rule source

mal-apt-nk-andariel-cutiedrop-magicrat.yarDetection Rule License 1.1
rule SIGNATURE_BASE_MAL_APT_NK_Andariel_Cutiedrop_Magicrat : FILE
{
	meta:
		description = "Detects the MagicRAT variant used by Andariel"
		author = "CISA.gov (modified by Florian Roth, Nextron Systems)"
		id = "104244de-83fb-5112-a2b6-e20d38a6ced6"
		date = "2024-07-25"
		modified = "2026-01-29"
		reference = "https://www.cisa.gov/news-events/cybersecurity-advisories/aa24-207a"
		source_url = "https://github.com/Neo23x0/signature-base/blob/94a1c48d7ab499879287ff611dfe7f9c56376030/yara/apt_nk_andariel_jul24.yar#L61-L85"
		license_url = "https://github.com/Neo23x0/signature-base/blob/94a1c48d7ab499879287ff611dfe7f9c56376030/LICENSE"
		logic_hash = "f289bbd71bdeaf2c42063642454679ec26de5ed24c020af40db694a0ced54884"
		score = 80
		quality = 85
		tags = "FILE"

	strings:
		$config_os_w = "os/windows" ascii
		$config_os_l = "os/linux" ascii
		$config_os_m = "os/mac" ascii
		$config_comp_msft = "company/microsoft" ascii
		$config_comp_orcl = "company/oracle" ascii
		$POST_field_1 = "session=" ascii
		$POST_field_2 = "type=" ascii
		$command_misspelled = "renmae" ascii

	condition:
		uint16( 0 ) == 0x5a4d and 7 of them
}

Strings (8 patterns)

IdentifierTypeValueModifiers
$config_os_wtext"os/windows"ascii
$config_os_ltext"os/linux"ascii
$config_os_mtext"os/mac"ascii
$config_comp_msfttext"company/microsoft"ascii
$config_comp_orcltext"company/oracle"ascii
$POST_field_1text"session="ascii
$POST_field_2text"type="ascii
$command_misspelledtext"renmae"ascii

Condition

uint16( 0 ) == 0x5a4d and 7 of them

In plain words (Heuristic)

  • The file must start with “MZ” — a Windows executable (PE).
  • At least 7 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: CISA.gov (modified by Florian Roth, Nextron Systems)

Source repository: Signature Base (Florian Roth / Nextron) @ 94a1c48d7a

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: 104244de-83fb-5112-a2b6-e20d38a6ced6

Tags:FILE