Skip to content

YARA · Signature Base (Florian Roth / Nextron)

SIGNATURE_BASE_SUSP_NET_Msil_Suspicious_Use_Strreverse

Detects mixed use of Microsoft.CSharp and VisualBasic to use StrReverse

Suspicious / huntingSignature Base (Florian Roth / Nextron)Detection Rule License 1.1Compiles with YARA-X
Author
dr4k0nia, modified by Florian Roth
Date
2023-01-31
Modified
2023-02-22
Score / Quality
70 / 85

What this rule detects

Detects mixed use of Microsoft.CSharp and VisualBasic to use StrReverse

Targets: Windows PE.

It defines 5 patterns (5 text, 0 hex, 0 regex).

Summary generated from the rule's metadata and condition.

Rule source

susp-net-msil-suspicious-use-strreverse.yarDetection Rule License 1.1
rule SIGNATURE_BASE_SUSP_NET_Msil_Suspicious_Use_Strreverse : FILE
{
	meta:
		description = "Detects mixed use of Microsoft.CSharp and VisualBasic to use StrReverse"
		author = "dr4k0nia, modified by Florian Roth"
		id = "830dec40-4412-59c1-8b4d-a237f14acd30"
		date = "2023-01-31"
		modified = "2023-02-22"
		reference = "https://github.com/dr4k0nia/yara-rules"
		source_url = "https://github.com/Neo23x0/signature-base/blob/94a1c48d7ab499879287ff611dfe7f9c56376030/yara/gen_susp_net_msil.yar#L2-L31"
		license_url = "https://github.com/Neo23x0/signature-base/blob/94a1c48d7ab499879287ff611dfe7f9c56376030/LICENSE"
		hash = "02ce0980427dea835fc9d9eed025dd26672bf2c15f0b10486ff8107ce3950701"
		logic_hash = "a7440600ee4826568d465d204e0a602f61752e4ffcfa3b4f29e5bc81c4d67b46"
		score = 70
		quality = 85
		tags = "FILE"
		version = "1.1"

	strings:
		$a1 = ", PublicKeyToken="
		$a2 = ".NETFramework,Version="
		$csharp = "Microsoft.CSharp"
		$vbnet = "Microsoft.VisualBasic"
		$strreverse = "StrReverse"

	condition:
		uint16( 0 ) == 0x5a4d and filesize < 50MB and all of ( $a* ) and $csharp and $vbnet and $strreverse
}

Strings (5 patterns)

IdentifierTypeValueModifiers
$a1text", PublicKeyToken="
$a2text".NETFramework,Version="
$csharptext"Microsoft.CSharp"
$vbnettext"Microsoft.VisualBasic"
$strreversetext"StrReverse"

Condition

uint16( 0 ) == 0x5a4d and filesize < 50MB and all of ( $a* ) and $csharp and $vbnet and $strreverse

In plain words (Heuristic)

  • The file must start with “MZ” — a Windows executable (PE).
  • The file must be smaller than 50MB (a cheap guard that skips large files).
  • All patterns in ( $a* ) must match.
  • Pattern $csharp must be present.
  • Pattern $vbnet must be present.
  • Pattern $strreverse 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

Sample hashes

Hashes of samples the author lists in the rule's meta (look them up in your threat-intelligence platform).

  • 02ce0980427dea835fc9d9eed025dd26672bf2c15f0b10486ff8107ce3950701

Licence & attribution

Author: dr4k0nia, modified by Florian Roth

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: 830dec40-4412-59c1-8b4d-a237f14acd30

Metadata

version1.1

Tags:FILE