Saltar al contenido

YARA · SEKOIA.IO Community

SEKOIA_Rootkit_Win_Purplefox_Kernel_Driver

Detect the Purple Fox trojan

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

Qué detecta esta regla

Detect the Purple Fox trojan

Familia de malware asociada: Purplefox.

Objetivos: PE de Windows.

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

YARA-X dice: warning[deprecated_field]: field `number_of_signatures` 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.

rootkit-win-purplefox-kernel-driver.yarDetection Rule License 1.1
import "pe"

rule SEKOIA_Rootkit_Win_Purplefox_Kernel_Driver : FILE
{
	meta:
		description = "Detect the Purple Fox trojan"
		author = "Sekoia.io"
		id = "798dc20b-76cd-4e31-b9ee-f363fb39cd58"
		date = "2022-03-28"
		modified = "2024-12-19"
		reference = "https://www.trendmicro.com/content/dam/trendmicro/global/en/research/22/c/purple-fox-uses-new-arrival-vector-and-improves-malware-arsenal/IOCs-Purple-Fox.txt"
		source_url = "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/yara_rules/rootkit_win_purplefox_kernel_driver.yar#L3-L35"
		license_url = "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/LICENSE.md"
		logic_hash = "91d7caca7c0c41e70813d52b5662bf0238d078fca519bfc2c03f3f87fe3805b8"
		score = 75
		quality = 80
		tags = "FILE"
		version = "1.0"
		classification = "TLP:CLEAR"

	strings:
		$ = "\\DosDevices\\Global\\MyDriver" wide
		$ = "IOCTL_IO_KILL_PROCESS" ascii
		$ = "IOCTL_IO_DELET_FILE" ascii
		$ = "IOCTL_IO_COPY_FILE" ascii
		$ = "IOCTL_IO_KILL_MINIFITER" ascii

	condition:
		uint16( 0 ) == 0x5A4D and all of them or ( pe.rich_signature.toolid ( 171 , 30319 ) and pe.rich_signature.toolid ( 158 , 30319 ) and pe.rich_signature.toolid ( 170 , 30319 ) and pe.rich_signature.toolid ( 147 , 30729 ) and pe.rich_signature.toolid ( 1 , 0 ) ) and for any i in ( 0 .. pe.number_of_signatures -1 ) : ( pe.signatures [ i ] . thumbprint == "c7939f8303ca22effb28246e970b13bee6cb8043" )
}

Cadenas (5 patrones)

IdentificadorTipoValorModificadores
$texto"\\DosDevices\\Global\\MyDriver"wide
$texto"IOCTL_IO_KILL_PROCESS"ascii
$texto"IOCTL_IO_DELET_FILE"ascii
$texto"IOCTL_IO_COPY_FILE"ascii
$texto"IOCTL_IO_KILL_MINIFITER"ascii

Condición

uint16( 0 ) == 0x5A4D and all of them or ( pe.rich_signature.toolid ( 171 , 30319 ) and pe.rich_signature.toolid ( 158 , 30319 ) and pe.rich_signature.toolid ( 170 , 30319 ) and pe.rich_signature.toolid ( 147 , 30729 ) and pe.rich_signature.toolid ( 1 , 0 ) ) and for any i in ( 0 .. pe.number_of_signatures -1 ) : ( pe.signatures [ i ] . thumbprint == "c7939f8303ca22effb28246e970b13bee6cb8043" )

En palabras sencillas (Heurística)

  • El archivo debe empezar por «MZ»: un ejecutable de Windows (PE).
  • Deben coincidir todos los patrones de la regla.
  • Un bucle for comprueba una propiedad sobre varias coincidencias o elementos.
  • Usa el módulo pe.
  • Comprueba la firma Authenticode.

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: 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: 798dc20b-76cd-4e31-b9ee-f363fb39cd58

Metadatos

version1.0
classificationTLP:CLEAR

Etiquetas:FILE

Más reglas de Purplefox