Saltar al contenido

YARA · Cod3nym detection-rules

COD3NYM_SUSP_NET_Shellcode_Loader_Indicators_Jan24

Detects indicators of shellcode loaders in .NET binaries

Sospechoso / huntingCod3nym detection-rulesDetection Rule License 1.1Compila con YARA-X
Autor
Jonathan Peters
Fecha
2024-01-11
Modificada
2024-01-12
Puntuación / Calidad
65 / 80

Qué detecta esta regla

Detects indicators of shellcode loaders in .NET binaries

Objetivos: PE de Windows.

Define 7 patrones (7 de texto, 0 hex, 0 regex).

Resumen generado a partir de los metadatos y la condición de la regla.

Código de la regla

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
}

Cadenas (7 patrones)

IdentificadorTipoValorModificadores
$sa1texto"VirtualProtect"ascii
$sa2texto"VirtualAlloc"ascii
$sa3texto"WriteProcessMemory"ascii
$sa4texto"CreateRemoteThread"ascii
$sa5texto"CreateThread"ascii
$sa6texto"WaitForSingleObject"ascii
$xtexto"__StaticArrayInitTypeSize="ascii

Condición

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

En palabras sencillas (Heurística)

  • El archivo debe empezar por «MZ»: un ejecutable de Windows (PE).
  • Deben coincidir al menos 3 patrones de ( $sa* ).
  • El patrón $x debe aparecer == 1 veces.

Prueba esta regla en tu navegador

Arrastra un archivo para escanearlo con esta regla usando YARA-X compilado a WebAssembly. No se sube nada.

Arrastra un archivo aquí o haz clic para elegirSe escanea en local con YARA-X. Archivos de hasta 200 MB.

Abrir en el editor

Referencias

Hashes de muestras

Hashes de las muestras que el autor lista en los metadatos de la regla (búscalos en tu plataforma de threat intelligence).

  • c48752a5b07b58596564f13301276dd5b700bd648a04af2e27d3f78512a06408

Licencia y atribución

Autor: Jonathan Peters

Repositorio de origen: Cod3nym detection-rules @ 86a04c4594

Licencia: Detection Rule License 1.1 (licencia del repositorio)

Regla original

Obtenida a través de YARA Forge 20260927, que añade a los nombres el prefijo de la fuente y campos meta normalizados.

Id de la regla: 606a444a-b894-5076-8d5e-1716bbfa588e

Etiquetas:FILE