Skip to content

YARA · Trellix Advanced Research Center

TRELLIX_ARC_Nefilim_Signed

Rule to detect Nefilim samples digitally signed

MalwareNefilimTrellix Advanced Research CenterApache License 2.0Compiles with YARA-X (with warnings)
Author
Marc Rivero | McAfee ATR Team
Date
2020-04-02
Modified
2020-08-14
Score / Quality
75 / 70

What this rule detects

Rule to detect Nefilim samples digitally signed

Associated malware family: Nefilim.

Targets: Windows PE.

It has no patterns: the condition alone decides (modules, file properties or other rules). YARA modules used: pe.

YARA-X says: warning[deprecated_field]: field `number_of_signatures` is deprecated

Summary generated from the rule's metadata and condition.

Rule source

Includes the imports needed to compile it on its own.

nefilim-signed.yarApache License 2.0
import "pe"

rule TRELLIX_ARC_Nefilim_Signed : RANSOMWARE FILE
{
	meta:
		description = "Rule to detect Nefilim samples digitally signed"
		author = "Marc Rivero | McAfee ATR Team"
		id = "a9a5daf0-4cfb-556a-b20a-72283fb1a0f9"
		date = "2020-04-02"
		modified = "2020-08-14"
		reference = "https://www.bleepingcomputer.com/news/security/new-nefilim-ransomware-threatens-to-release-victims-data/"
		source_url = "https://github.com/advanced-threat-research/Yara-Rules//blob/1919562a59f190bda60c982424f6a24c542ee3e0/ransomware/RANSOM_NEFILIM.yar#L50-L72"
		license_url = "https://github.com/advanced-threat-research/Yara-Rules//blob/1919562a59f190bda60c982424f6a24c542ee3e0/LICENSE"
		hash = "353ee5805bc5c7a98fb5d522b15743055484dc47144535628d102a4098532cd5"
		logic_hash = "7625eb7de1ebb2f5410552b8983379f213d639f5e146a5d951975b69eb8111d3"
		score = 75
		quality = 70
		tags = "RANSOMWARE, FILE"
		rule_version = "v1"
		malware_type = "ransomware"
		malware_family = "Ransom:W32/Nefilim"
		actor_type = "Cybercrime"
		actor_group = "Unknown"

	condition:
		uint16( 0 ) == 0x5a4d and for any i in ( 0 .. pe.number_of_signatures ) : ( pe.signatures [ i ] . subject contains "Red GmbH/CN=Red GmbH" and pe.signatures [ i ] . serial == "00:b8:81:a7:2d:41:17:bb:c3:8b:81:d3:c6:5c:79:2c:1a" or pe.signatures [ i ] . thumbprint == "5b:19:58:8b:78:74:0a:4c:5d:08:41:99:dc:0f:52:a6:1f:38:00:99" )
}

Condition

uint16( 0 ) == 0x5a4d and for any i in ( 0 .. pe.number_of_signatures ) : ( pe.signatures [ i ] . subject contains "Red GmbH/CN=Red GmbH" and pe.signatures [ i ] . serial == "00:b8:81:a7:2d:41:17:bb:c3:8b:81:d3:c6:5c:79:2c:1a" or pe.signatures [ i ] . thumbprint == "5b:19:58:8b:78:74:0a:4c:5d:08:41:99:dc:0f:52:a6:1f:38:00:99" )

In plain words (Heuristic)

  • The file must start with “MZ” — a Windows executable (PE).
  • A for-loop checks a property over several matches or items.
  • Uses the pe module.
  • Checks the Authenticode signature.

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

  • 353ee5805bc5c7a98fb5d522b15743055484dc47144535628d102a4098532cd5

Licence & attribution

Author: Marc Rivero | McAfee ATR 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: a9a5daf0-4cfb-556a-b20a-72283fb1a0f9

Metadata

rule_versionv1
malware_typeransomware
malware_familyRansom:W32/Nefilim
actor_typeCybercrime
actor_groupUnknown

Tags:RANSOMWAREFILE

More Nefilim rules