Skip to content

YARA · Signature Base (Florian Roth / Nextron)

SIGNATURE_BASE_MSIL_SUSP_OBFUSC_Xorstringsnet

Detects XorStringsNET string encryption, and other obfuscators derived from it

Suspicious / huntingSignature Base (Florian Roth / Nextron)Detection Rule License 1.1Compiles with YARA-X
Author
dr4k0nia
Date
2023-03-26
Modified
2023-12-05
Score / Quality
75 / 85

What this rule detects

Detects XorStringsNET string encryption, and other obfuscators derived from it

Targets: Windows PE.

It defines 8 patterns (7 text, 1 hex, 0 regex).

Summary generated from the rule's metadata and condition.

Rule source

msil-susp-obfusc-xorstringsnet.yarDetection Rule License 1.1
rule SIGNATURE_BASE_MSIL_SUSP_OBFUSC_Xorstringsnet : FILE
{
	meta:
		description = "Detects XorStringsNET string encryption, and other obfuscators derived from it"
		author = "dr4k0nia"
		id = "f0724ca6-4bfe-5b88-9396-a58aa7461fd6"
		date = "2023-03-26"
		modified = "2023-12-05"
		reference = "https://github.com/dr4k0nia/yara-rules"
		source_url = "https://github.com/Neo23x0/signature-base/blob/94a1c48d7ab499879287ff611dfe7f9c56376030/yara/gen_net_xorstrings.yar#L2-L27"
		license_url = "https://github.com/Neo23x0/signature-base/blob/94a1c48d7ab499879287ff611dfe7f9c56376030/LICENSE"
		logic_hash = "6d023a80bd8f5709721c3ace8a7230b847ca4bd2a1aff502a25333ffc8bf75ca"
		score = 75
		quality = 85
		tags = "FILE"
		version = "1.0"

	strings:
		$pattern = { 06 1E 58 07 8E 69 FE 17 }
		$a1 = "_CorDllMain" ascii
		$a2 = "_CorExeMain" ascii
		$a3 = "mscorlib" ascii fullword
		$a4 = ".cctor" ascii fullword
		$a5 = "System.Private.Corlib" ascii
		$a6 = "<Module>" ascii fullword
		$a7 = "<PrivateImplementationsDetails{" ascii

	condition:
		uint16( 0 ) == 0x5a4d and filesize < 25MB and $pattern and 2 of ( $a* )
}

Strings (8 patterns)

IdentifierTypeValueModifiers
$patternhex{ 06 1E 58 07 8E 69 FE 17 }
$a1text"_CorDllMain"ascii
$a2text"_CorExeMain"ascii
$a3text"mscorlib"ascii fullword
$a4text".cctor"ascii fullword
$a5text"System.Private.Corlib"ascii
$a6text"<Module>"ascii fullword
$a7text"<PrivateImplementationsDetails{"ascii

Condition

uint16( 0 ) == 0x5a4d and filesize < 25MB and $pattern and 2 of ( $a* )

In 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).
  • At least 2 patterns in ( $a* ) must match.
  • 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.

Drop a file here or click to chooseScanned locally with YARA-X. Files up to 200 MB.

Open in editor

References

Licence & attribution

Author: dr4k0nia

Source repository: Signature Base (Florian Roth / Nextron) @ 94a1c48d7a

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: f0724ca6-4bfe-5b88-9396-a58aa7461fd6

Metadata

version1.0

Tags:FILE