YARA · dr4k0nia yara-rules
DR4K0NIA_MAL_Msil_Net_Niximports_Loader
Detects NixImports .NET loader
- Author
- dr4k0nia
- Date
- 2023-05-21
- Modified
- 2023-05-22
- Score / Quality
- 75 / 85
What this rule detects
Detects NixImports .NET loader
Targets: Windows PE.
It defines 6 patterns (4 text, 2 hex, 0 regex).
Summary generated from the rule's metadata and condition.
Rule source
mal-msil-net-niximports-loader.yarDetection Rule License 1.1
rule DR4K0NIA_MAL_Msil_Net_Niximports_Loader : FILE
{
meta:
= "Detects NixImports .NET loader"
= "dr4k0nia"
= "ba0d072d-674a-5790-9381-4dac98204268"
= "2023-05-21"
= "2023-05-22"
= "https://github.com/dr4k0nia/NixImports"
= "https://github.com/dr4k0nia/yara-rules/blob/4b10f9b79a4cfb3ec9cb5675f32cc7ee6885fbd8/dotnet/msil_mal_niximports_loader.yar#L1-L21"
= "https://github.com/dr4k0nia/yara-rules/blob/4b10f9b79a4cfb3ec9cb5675f32cc7ee6885fbd8/LICENSE.md"
= "79421b2677705852f893fa53478deb2e4aa8bd354ac05cbf5438a3a2a15d70bf"
= 75
= 85
= "FILE"
strings:
$op_pe = {C2 95 C2 97 C2 B2 C2 92 C2 82 C2 82 C2 8E C2 82 C2 82 C2 82 C2 82 C2 86 C2 82}
$op_delegate = {20 F0 C7 FF 80 20 83 BF 7F 1F 14 14}
$a1 = "GetRuntimeProperties" ascii fullword
$a2 = "GetTypes" ascii fullword
$a3 = "GetRuntimeMethods" ascii fullword
$a4 = "netstandard" ascii fullword
condition:
uint16( 0 ) == 0x5a4d and filesize < 3MB and all of ( $a* ) and 2 of ( $op* )
}
Strings (6 patterns)
| Identifier | Type | Value | Modifiers |
|---|---|---|---|
| $op_pe | hex | {C2 95 C2 97 C2 B2 C2 92 C2 82 C2 82 C2 8E C2 82 C2 82 C2 82 C2 82 C2 86 C2 82} | |
| $op_delegate | hex | {20 F0 C7 FF 80 20 83 BF 7F 1F 14 14} | |
| $a1 | text | "GetRuntimeProperties" | ascii fullword |
| $a2 | text | "GetTypes" | ascii fullword |
| $a3 | text | "GetRuntimeMethods" | ascii fullword |
| $a4 | text | "netstandard" | ascii fullword |
Condition
uint16( 0 ) == 0x5a4d and filesize < 3MB and all of ( $a* ) and 2 of ( $op* )In plain words (Heuristic)
- The file must start with “MZ” — a Windows executable (PE).
- The file must be smaller than 3MB (a cheap guard that skips large files).
- All patterns in ( $a* ) must match.
- At least 2 patterns in ( $op* ) 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.
References
Licence & attribution
Author: dr4k0nia
Source repository: dr4k0nia yara-rules @ 4b10f9b79a
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: ba0d072d-674a-5790-9381-4dac98204268
Tags:FILE
Related rules
- Malwaredr4k0nia yara-rules· dr4k0nia· 2023-11-07
- Suspicious / huntingdr4k0nia yara-rules· dr4k0nia· 2023-12-03
- Suspicious / huntingdr4k0nia yara-rules· dr4k0nia· 2023-03-26