YARA · SEKOIA.IO Community
SEKOIA_Apt_Nobelium_Nativezone_Gen
Detects NativeZone used in 2022
- 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.
import "pe"
rule SEKOIA_Apt_Nobelium_Nativezone_Gen : FILE
{
meta:
= "Detects NativeZone used in 2022"
= "Sekoia.io"
= "e16cac97-38dd-4145-95f5-cf641940a19b"
= "2022-02-25"
= "2024-12-19"
= "https://github.com/SEKOIA-IO/Community"
= "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/yara_rules/apt_nobelium_nativezone_gen.yar#L3-L31"
= "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/LICENSE.md"
= "63ad9fc510541f98237fa5b254dc4a147539cbf485b2889d97bf3b619c3db3ae"
= 75
= 80
= "FILE"
= "1.0"
= "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)
| Identifier | Type | Value | Modifiers |
|---|---|---|---|
| $rich | hex | { 52 69 63 68 [4] 00 } | |
| $obs | hex | { C7 85 [8] C7 85 } | |
| $nobs | hex | { 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 $richIn 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.
References
Licence & attribution
Author: Sekoia.io
Source repository: SEKOIA.IO Community @ a438a5901a
Licence: Detection Rule License 1.1 (repository licence)
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
| version | 1.0 |
|---|---|
| classification | TLP:CLEAR |
Tags:FILE
Related rules
- APT / threat actorSEKOIA.IO Community· Sekoia.io· 2024-09-10
- APT / threat actorSEKOIA.IO Community· Sekoia.io· 2024-10-21
- APT / threat actorSEKOIA.IO Community· Sekoia.io· 2024-10-21
- APT / threat actorSEKOIA.IO Community· Sekoia.io· 2024-09-27
- APT / threat actorSEKOIA.IO Community· Sekoia.io· 2024-09-27
- APT / threat actorSEKOIA.IO Community· Sekoia.io· 2024-09-23
- APT / threat actorSEKOIA.IO Community· Sekoia.io· 2024-06-11
- APT / threat actorSEKOIA.IO Community· Sekoia.io· 2024-03-06