Saltar al contenido

YARA · Cod3nym detection-rules

COD3NYM_DOTNET_Singlefilehost_Bundled_App

Detects single file host .NET bundled apps.

GenéricaCod3nym detection-rulesDetection Rule License 1.1Compila con YARA-X
Autor
Jonathan Peters
Fecha
2024-01-02
Modificada
2024-01-05
Puntuación / Calidad
75 / 80

Qué detecta esta regla

Detects single file host .NET bundled apps.

Objetivos: PE de Windows.

Define 2 patrones (2 de texto, 0 hex, 0 regex). Módulos YARA usados: pe.

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

Código de la regla

Incluye los imports necesarios para compilarla por sí sola.

dotnet-singlefilehost-bundled-app.yarDetection Rule License 1.1
import "pe"

rule COD3NYM_DOTNET_Singlefilehost_Bundled_App : FILE
{
	meta:
		description = "Detects single file host .NET bundled apps."
		author = "Jonathan Peters"
		id = "061bd294-58d6-57be-b8b5-b8a8f31ce316"
		date = "2024-01-02"
		modified = "2024-01-05"
		reference = "https://learn.microsoft.com/en-us/dotnet/core/deploying/single-file"
		source_url = "https://github.com/cod3nym/detection-rules//blob/86a04c4594cb48895192aad4af164f21f568c136/yara/dotnet/framework_identiciation.yar#L3-L17"
		license_url = "https://github.com/cod3nym/detection-rules//blob/86a04c4594cb48895192aad4af164f21f568c136/LICENSE.md"
		logic_hash = "12075b07a9feb951898ac8eba303471d9253ed9535db927244e5562f4fad33d6"
		score = 75
		quality = 80
		tags = "FILE"

	strings:
		$ = "singlefilehost.exe" ascii
		$ = "singlefilehost.pdb" ascii

	condition:
		uint16( 0 ) == 0x5a4d and 1 of them and pe.exports ( "DotNetRuntimeInfo" ) and pe.exports ( "CLRJitAttachState" )
}

Cadenas (2 patrones)

IdentificadorTipoValorModificadores
$texto"singlefilehost.exe"ascii
$texto"singlefilehost.pdb"ascii

Condición

uint16( 0 ) == 0x5a4d and 1 of them and pe.exports ( "DotNetRuntimeInfo" ) and pe.exports ( "CLRJitAttachState" )

En palabras sencillas (Heurística)

  • El archivo debe empezar por «MZ»: un ejecutable de Windows (PE).
  • Deben coincidir al menos 1 patrones de la regla.
  • Usa el módulo pe.
  • Comprueba funciones exportadas o el nombre de la DLL.

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

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: 061bd294-58d6-57be-b8b5-b8a8f31ce316

Etiquetas:FILE