Saltar al contenido

YARA · SEKOIA.IO Community

SEKOIA_Dropper_Win_Ninerat

NineRAT dropper

MalwareNineratSEKOIA.IO CommunityDetection Rule License 1.1Compila con YARA-X (con avisos)
Autor
Sekoia.io
Fecha
2023-12-12
Modificada
2024-12-19
Puntuación / Calidad
75 / 80

Qué detecta esta regla

NineRAT dropper

Familia de malware asociada: Ninerat.

Objetivos: PE de Windows.

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

YARA-X dice: warning[deprecated_field]: field `number_of_sections` is deprecated

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.

dropper-win-ninerat.yarDetection Rule License 1.1
import "pe"
import "hash"

rule SEKOIA_Dropper_Win_Ninerat
{
	meta:
		description = "NineRAT dropper"
		author = "Sekoia.io"
		id = "798e3bee-4cee-4647-abda-3c3dcc602f0a"
		date = "2023-12-12"
		modified = "2024-12-19"
		reference = "https://blog.talosintelligence.com/lazarus_new_rats_dlang_and_telegram/"
		source_url = "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/yara_rules/dropper_win_ninerat.yar#L4-L41"
		license_url = "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/LICENSE.md"
		hash = "534f5612954db99c86baa67ef51a3ad88bc21735bce7bb591afa8a4317c35433"
		hash = "f91188d23b14526676706a5c9ead05c1a91ea0b9d6ac902623bc565e1c200a59"
		logic_hash = "00f69545c7351fba8b45e2b4d21855ba8ae94f2d10df199732665e8f3f00c1b4"
		score = 75
		quality = 80
		tags = ""
		version = "1.0"
		classification = "TLP:CLEAR"

	strings:
		$ = "\\x64\\Release\\Dropper.pdb"
		$ = "TelegramRat\\lastest\\Dropper"

	condition:
		all of them or pe.imphash ( ) == "92b8e9dea06fd5719e29a510e95b92ac" or hash.md5 ( pe.rich_signature.clear_data ) == "ba1ea20fe779ef0b747e5073c0881a99" or for any i in ( 0 .. pe.number_of_sections -1 ) : ( hash.md5 ( pe.sections [ i ] . raw_data_offset , pe.sections [ i ] . raw_data_size ) == "c0471e0a78eef692b567cd89eeaddf08" or hash.md5 ( pe.sections [ i ] . raw_data_offset , pe.sections [ i ] . raw_data_size ) == "965dc8b7c98325ca3d3371ced8424823" ) or for any i in ( 0 .. pe.number_of_resources -1 ) : ( hash.sha256 ( pe.resources [ i ] . offset , pe.resources [ i ] . length ) == "bae1db350e313bf7bbd3b2178b20e6f6dd9b0331780099374edae5a99625bc5b" or hash.sha256 ( pe.resources [ i ] . offset , pe.resources [ i ] . length ) == "1abb447513b4435837029933e722b6ed92222291571a8ce0a306c9f6a335aa19" or hash.sha256 ( pe.resources [ i ] . offset , pe.resources [ i ] . length ) == "ffbcd5bbe6c02aa5c993886811d7597f020abd6665fc82af133c5756ab72fb0a" )
}

Cadenas (2 patrones)

IdentificadorTipoValorModificadores
$texto"\\x64\\Release\\Dropper.pdb"
$texto"TelegramRat\\lastest\\Dropper"

Condición

all of them or pe.imphash ( ) == "92b8e9dea06fd5719e29a510e95b92ac" or hash.md5 ( pe.rich_signature.clear_data ) == "ba1ea20fe779ef0b747e5073c0881a99" or for any i in ( 0 .. pe.number_of_sections -1 ) : ( hash.md5 ( pe.sections [ i ] . raw_data_offset , pe.sections [ i ] . raw_data_size ) == "c0471e0a78eef692b567cd89eeaddf08" or hash.md5 ( pe.sections [ i ] . raw_data_offset , pe.sections [ i ] . raw_data_size ) == "965dc8b7c98325ca3d3371ced8424823" ) or for any i in ( 0 .. pe.number_of_resources -1 ) : ( hash.sha256 ( pe.resources [ i ] . offset , pe.resources [ i ] . length ) == "bae1db350e313bf7bbd3b2178b20e6f6dd9b0331780099374edae5a99625bc5b" or hash.sha256 ( pe.resources [ i ] . offset , pe.resources [ i ] . length ) == "1abb447513b4435837029933e722b6ed92222291571a8ce0a306c9f6a335aa19" or hash.sha256 ( pe.resources [ i ] . offset , pe.resources [ i ] . length ) == "ffbcd5bbe6c02aa5c993886811d7597f020abd6665fc82af133c5756ab72fb0a" )

En palabras sencillas (Heurística)

  • Deben coincidir todos los patrones de la regla.
  • Un bucle for comprueba una propiedad sobre varias coincidencias o elementos.
  • Usa el módulo pe.
  • Usa el módulo hash.
  • Compara un hash del archivo o de una parte.
  • Comprueba el hash de importaciones PE (imphash).
  • Comprueba secciones PE (nombres, número o propiedades).

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).

  • 534f5612954db99c86baa67ef51a3ad88bc21735bce7bb591afa8a4317c35433
  • f91188d23b14526676706a5c9ead05c1a91ea0b9d6ac902623bc565e1c200a59

Licencia y atribución

Autor: Sekoia.io

Repositorio de origen: SEKOIA.IO Community @ a438a5901a

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: 798e3bee-4cee-4647-abda-3c3dcc602f0a

Metadatos

version1.0
classificationTLP:CLEAR

Más reglas de Ninerat