Skip to content

YARA · SEKOIA.IO Community

SEKOIA_Apt_Nobelium_Nativezone_Gen

Detects NativeZone used in 2022

APT / threat actorSEKOIA.IO CommunityDetection Rule License 1.1Compiles with YARA-X (with warnings)
Author
Sekoia.io
Date
2022-02-25
Modified
2024-12-19
Score / Quality
75 / 80

What this rule detects

Detects NativeZone used in 2022

Targets: Windows PE.

It defines 3 patterns (0 text, 3 hex, 0 regex). YARA modules used: pe.

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

Summary generated from the rule's metadata and condition.

Rule source

Includes the imports needed to compile it on its own.

apt-nobelium-nativezone-gen.yarDetection Rule License 1.1
import "pe"

rule SEKOIA_Apt_Nobelium_Nativezone_Gen : FILE
{
	meta:
		description = "Detects NativeZone used in 2022"
		author = "Sekoia.io"
		id = "e16cac97-38dd-4145-95f5-cf641940a19b"
		date = "2022-02-25"
		modified = "2024-12-19"
		reference = "https://github.com/SEKOIA-IO/Community"
		source_url = "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/yara_rules/apt_nobelium_nativezone_gen.yar#L3-L31"
		license_url = "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/LICENSE.md"
		logic_hash = "63ad9fc510541f98237fa5b254dc4a147539cbf485b2889d97bf3b619c3db3ae"
		score = 75
		quality = 80
		tags = "FILE"
		version = "1.0"
		classification = "TLP:CLEAR"

	strings:
		$rich = { 52 69 63 68 [4] 00 }
		$obs = { C7 85 [8] C7 85 }
		$nobs = { C7 85 [6] 00 00 C7 85 }

	condition:
		pe.DLL and filesize < 2500KB and pe.number_of_exports > 20 and pe.number_of_imports < 30 and ( pe.imports ( "kernel32.dll" , "VirtualAlloc" ) and pe.imports ( "kernel32.dll" , "VirtualProtect" ) ) and for any i in ( 0 .. pe.number_of_sections - 1 ) : ( pe.sections [ i ] . name == ".rdata" and pe.sections [ i ] . raw_data_size > 300000 ) and #obs > 300 and #nobs < 150 and not $rich
}

Strings (3 patterns)

IdentifierTypeValueModifiers
$richhex{ 52 69 63 68 [4] 00 }
$obshex{ C7 85 [8] C7 85 }
$nobshex{ C7 85 [6] 00 00 C7 85 }

Condition

pe.DLL and filesize < 2500KB and pe.number_of_exports > 20 and pe.number_of_imports < 30 and ( pe.imports ( "kernel32.dll" , "VirtualAlloc" ) and pe.imports ( "kernel32.dll" , "VirtualProtect" ) ) and for any i in ( 0 .. pe.number_of_sections - 1 ) : ( pe.sections [ i ] . name == ".rdata" and pe.sections [ i ] . raw_data_size > 300000 ) and #obs > 300 and #nobs < 150 and not $rich

In plain words (Heuristic)

  • The file must be smaller than 2500KB (a cheap guard that skips large files).
  • Pattern $obs must occur > 300 times.
  • Pattern $nobs must occur < 150 times.
  • A for-loop checks a property over several matches or items.
  • Pattern $rich must NOT be present.
  • Uses the pe module.
  • Checks imported functions or libraries.
  • Checks exported functions or the DLL name.
  • Checks PE sections (names, count or properties).

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: Sekoia.io

Source repository: SEKOIA.IO Community @ a438a5901a

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: e16cac97-38dd-4145-95f5-cf641940a19b

Metadata

version1.0
classificationTLP:CLEAR

Tags:FILE