Skip to content

YARA · Trellix Advanced Research Center

TRELLIX_ARC_Nionspy

Triggers on old and new variants of W32/NionSpy file infector

MalwareNionSpyTrellix Advanced Research CenterApache License 2.0Compiles with YARA-X
Author
Trellix ARC Team
Date
2026-09-01
Modified
2020-08-14
Score / Quality
75 / 70

What this rule detects

Triggers on old and new variants of W32/NionSpy file infector

Associated malware family: NionSpy.

Targets: Windows PE.

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

Summary generated from the rule's metadata and condition.

Rule source

nionspy.yarApache License 2.0
rule TRELLIX_ARC_Nionspy : FILEINFECTOR FILE
{
	meta:
		description = "Triggers on old and new variants of W32/NionSpy file infector"
		author = "Trellix ARC Team"
		id = "86051ef8-a18b-553c-b06c-490f8d6df5cf"
		date = "2026-09-01"
		modified = "2020-08-14"
		reference = "https://blogs.mcafee.com/mcafee-labs/taking-a-close-look-at-data-stealing-nionspy-file-infector"
		source_url = "https://github.com/advanced-threat-research/Yara-Rules//blob/1919562a59f190bda60c982424f6a24c542ee3e0/malware/MALW_NionSpy.yar#L1-L25"
		license_url = "https://github.com/advanced-threat-research/Yara-Rules//blob/1919562a59f190bda60c982424f6a24c542ee3e0/LICENSE"
		logic_hash = "982ba52f39352aee9e2d2dcadfb0816c439e92d0e5947afa7860630720913742"
		score = 75
		quality = 70
		tags = "FILEINFECTOR, FILE"
		malware_type = "fileinfector"
		malware_family = "FileInfector:W32/NionSpy"
		actor_type = "Cybercrime"
		actor_group = "Unknown"

	strings:
		$variant2015_infmarker = "aCfG92KXpcSo4Y94BnUrFmnNk27EhW6CqP5EnT"
		$variant2013_infmarker = "ad6af8bd5835d19cc7fdc4c62fdf02a1"
		$variant2013_string = "%s?cstorage=shell&comp=%s"

	condition:
		uint16( 0 ) == 0x5A4D and uint32( uint32( 0x3C ) ) == 0x00004550 and 1 of ( $variant* )
}

Strings (3 patterns)

IdentifierTypeValueModifiers
$variant2015_infmarkertext"aCfG92KXpcSo4Y94BnUrFmnNk27EhW6CqP5EnT"
$variant2013_infmarkertext"ad6af8bd5835d19cc7fdc4c62fdf02a1"
$variant2013_stringtext"%s?cstorage=shell&comp=%s"

Condition

uint16( 0 ) == 0x5A4D and uint32( uint32( 0x3C ) ) == 0x00004550 and 1 of ( $variant* )

In plain words (Heuristic)

  • The file must start with “MZ” — a Windows executable (PE).
  • At least 1 patterns in ( $variant* ) 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: Trellix ARC Team

Source repository: Trellix Advanced Research Center @ 1919562a59

Licence: Apache License 2.0 (repository licence)

Original rule

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

Rule id: 86051ef8-a18b-553c-b06c-490f8d6df5cf

Metadata

malware_typefileinfector
malware_familyFileInfector:W32/NionSpy
actor_typeCybercrime
actor_groupUnknown

Tags:FILEINFECTORFILE