Aller au contenu

YARA · Cod3nym detection-rules

COD3NYM_SUSP_NET_Shellcode_Loader_Indicators_Jan24

Detects indicators of shellcode loaders in .NET binaries

Suspect / chasseCod3nym detection-rulesDetection Rule License 1.1Compile avec YARA-X
Auteur
Jonathan Peters
Date
2024-01-11
Modifiée
2024-01-12
Score / Qualité
65 / 80

Ce que détecte cette règle

Detects indicators of shellcode loaders in .NET binaries

Cibles : PE Windows.

Elle définit 7 motifs (7 texte, 0 hex, 0 regex).

Résumé généré à partir des métadonnées et de la condition de la règle.

Source de la règle

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
}

Chaînes (7 motifs)

IdentifiantTypeValeurModificateurs
$sa1texte"VirtualProtect"ascii
$sa2texte"VirtualAlloc"ascii
$sa3texte"WriteProcessMemory"ascii
$sa4texte"CreateRemoteThread"ascii
$sa5texte"CreateThread"ascii
$sa6texte"WaitForSingleObject"ascii
$xtexte"__StaticArrayInitTypeSize="ascii

Condition

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

En clair (Heuristique)

  • Le fichier doit commencer par « MZ » — un exécutable Windows (PE).
  • Au moins 3 motifs de ( $sa* ) doivent être trouvés.
  • Le motif $x doit apparaître == 1 fois.

Tester cette règle dans votre navigateur

Déposez un fichier pour le scanner avec cette règle grâce à YARA-X compilé en WebAssembly. Rien n’est envoyé.

Déposez un fichier ici ou cliquez pour choisirScanné localement avec YARA-X. Fichiers jusqu’à 200 Mo.

Ouvrir dans l’éditeur

Références

Hashes d’échantillons

Hashes des échantillons listés par l’auteur dans les métadonnées de la règle (à rechercher dans votre plateforme de threat intelligence).

  • c48752a5b07b58596564f13301276dd5b700bd648a04af2e27d3f78512a06408

Licence et attribution

Auteur : Jonathan Peters

Dépôt source : Cod3nym detection-rules @ 86a04c4594

Licence : Detection Rule License 1.1 (licence du dépôt)

Règle d’origine

Reprise via YARA Forge 20260927, qui préfixe les noms de règles par la source et ajoute des champs meta normalisés.

Identifiant de règle: 606a444a-b894-5076-8d5e-1716bbfa588e

Tags:FILE