Zum Inhalt springen

YARA · Cod3nym detection-rules

COD3NYM_SUSP_NET_Shellcode_Loader_Indicators_Jan24

Detects indicators of shellcode loaders in .NET binaries

Verdächtig / HuntingCod3nym detection-rulesDetection Rule License 1.1Kompiliert mit YARA-X
Autor
Jonathan Peters
Datum
2024-01-11
Geändert
2024-01-12
Score / Qualität
65 / 80

Was diese Regel erkennt

Detects indicators of shellcode loaders in .NET binaries

Ziele: Windows-PE.

Sie definiert 7 Muster (7 Text, 0 Hex, 0 Regex).

Zusammenfassung aus den Metadaten und der Bedingung der Regel erzeugt.

Regelquelltext

susp-net-shellcode-loader-indicators-jan24.yarDetection Rule License 1.1
rule COD3NYM_SUSP_NET_Shellcode_Loader_Indicators_Jan24 : FILE
{
	meta:
		description = "Detects indicators of shellcode loaders in .NET binaries"
		author = "Jonathan Peters"
		id = "606a444a-b894-5076-8d5e-1716bbfa588e"
		date = "2024-01-11"
		modified = "2024-01-12"
		reference = "https://github.com/Workingdaturah/Payload-Generator/tree/main"
		source_url = "https://github.com/cod3nym/detection-rules//blob/86a04c4594cb48895192aad4af164f21f568c136/yara/dotnet/suspicious_indicators.yar#L1-L22"
		license_url = "https://github.com/cod3nym/detection-rules//blob/86a04c4594cb48895192aad4af164f21f568c136/LICENSE.md"
		hash = "c48752a5b07b58596564f13301276dd5b700bd648a04af2e27d3f78512a06408"
		logic_hash = "28267eb54a4108924df57512bbae9f47f51fd4860b3cf93c014d73b0d4b2dec2"
		score = 65
		quality = 80
		tags = "FILE"

	strings:
		$sa1 = "VirtualProtect" ascii
		$sa2 = "VirtualAlloc" ascii
		$sa3 = "WriteProcessMemory" ascii
		$sa4 = "CreateRemoteThread" ascii
		$sa5 = "CreateThread" ascii
		$sa6 = "WaitForSingleObject" ascii
		$x = "__StaticArrayInitTypeSize=" ascii

	condition:
		uint16( 0 ) == 0x5a4d and 3 of ( $sa* ) and #x == 1
}

Strings (7 Muster)

BezeichnerTypWertModifikatoren
$sa1Text"VirtualProtect"ascii
$sa2Text"VirtualAlloc"ascii
$sa3Text"WriteProcessMemory"ascii
$sa4Text"CreateRemoteThread"ascii
$sa5Text"CreateThread"ascii
$sa6Text"WaitForSingleObject"ascii
$xText"__StaticArrayInitTypeSize="ascii

Bedingung

uint16( 0 ) == 0x5a4d and 3 of ( $sa* ) and #x == 1

In Worten (Heuristik)

  • Die Datei muss mit „MZ“ beginnen — eine Windows-Programmdatei (PE).
  • Mindestens 3 Muster aus ( $sa* ) müssen treffen.
  • Muster $x muss == 1-mal vorkommen.

Diese Regel im Browser testen

Legen Sie eine Datei ab, um sie mit dieser Regel und YARA-X als WebAssembly zu scannen. Nichts wird hochgeladen.

Datei hier ablegen oder klicken zum AuswählenLokal mit YARA-X gescannt. Dateien bis 200 MB.

Im Editor öffnen

Referenzen

Proben-Hashes

Hashes der Proben, die der Autor in den Metadaten der Regel nennt (in Ihrer Threat-Intelligence-Plattform nachschlagen).

  • c48752a5b07b58596564f13301276dd5b700bd648a04af2e27d3f78512a06408

Lizenz & Namensnennung

Autor: Jonathan Peters

Quell-Repository: Cod3nym detection-rules @ 86a04c4594

Lizenz: Detection Rule License 1.1 (Repository-Lizenz)

Originalregel

Gespiegelt über YARA Forge 20260927, das Regelnamen mit der Quelle präfixiert und normalisierte Meta-Felder ergänzt.

Regel-ID: 606a444a-b894-5076-8d5e-1716bbfa588e

Tags:FILE