YARA · dr4k0nia yara-rules
DR4K0NIA_Msil_Susp_Obf_Xorstringsnet
Detects XorStringsNET string encryption, and other obfuscators derived from it
- Author
- dr4k0nia
- Date
- 2023-03-26
- Score / Quality
- 65 / 85
What this rule detects
Detects XorStringsNET string encryption, and other obfuscators derived from it
Targets: Windows PE, .NET assembly.
It defines 1 patterns (0 text, 1 hex, 0 regex). YARA modules used: dotnet.
Summary generated from the rule's metadata and condition.
Rule source
Includes the imports needed to compile it on its own.
import "dotnet"
rule DR4K0NIA_Msil_Susp_Obf_Xorstringsnet : FILE
{
meta:
= "Detects XorStringsNET string encryption, and other obfuscators derived from it"
= "dr4k0nia"
= "0bea654d-9244-5320-a815-691384decc74"
= "2023-03-26"
= "2023-03-26"
= "https://github.com/dr4k0nia/yara-rules"
= "https://github.com/dr4k0nia/yara-rules/blob/4b10f9b79a4cfb3ec9cb5675f32cc7ee6885fbd8/dotnet/msil_susp_obf_xorstringsnet.yar#L3-L16"
= "https://github.com/dr4k0nia/yara-rules/blob/4b10f9b79a4cfb3ec9cb5675f32cc7ee6885fbd8/LICENSE.md"
= "c494b5b64bcb63d1edd611206fb41eb9a23a940a72c3e9fc3f626e91482b1352"
= 65
= 85
= "FILE"
= "1.0"
strings:
$pattern = { 06 1E 58 07 8E 69 FE17 }
condition:
uint16( 0 ) == 0x5a4d and filesize < 25MB and dotnet.is_dotnet and $pattern
}
Strings (1 patterns)
| Identifier | Type | Value | Modifiers |
|---|---|---|---|
| $pattern | hex | { 06 1E 58 07 8E 69 FE17 } |
Condition
uint16( 0 ) == 0x5a4d and filesize < 25MB and dotnet.is_dotnet and $patternIn plain words (Heuristic)
- The file must start with “MZ” — a Windows executable (PE).
- The file must be smaller than 25MB (a cheap guard that skips large files).
- Uses the dotnet module.
- Pattern $pattern must be present.
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: 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: 0bea654d-9244-5320-a815-691384decc74
Metadata
| version | 1.0 |
|---|
Tags:FILE
Related rules
- Suspicious / huntingdr4k0nia yara-rules· dr4k0nia· 2023-12-03
- Malwaredr4k0nia yara-rules· dr4k0nia· 2023-05-21
- Malwaredr4k0nia yara-rules· dr4k0nia· 2023-11-07