Saltar al contenido

YARA · SEKOIA.IO Community

SEKOIA_Rat_Win_Ratel_Strings

Detect RATel based on characteristic strings

MalwareRatelSEKOIA.IO CommunityDetection Rule License 1.1Compila con YARA-X
Autor
Sekoia.io
Fecha
2023-04-24
Modificada
2024-12-19
Puntuación / Calidad
75 / 80

Qué detecta esta regla

Detect RATel based on characteristic strings

Familia de malware asociada: Ratel.

Objetivos: PE de Windows.

Define 12 patrones (12 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

rat-win-ratel-strings.yarDetection Rule License 1.1
rule SEKOIA_Rat_Win_Ratel_Strings : FILE
{
	meta:
		description = "Detect RATel based on characteristic strings"
		author = "Sekoia.io"
		id = "d0c8b89b-c811-47aa-9e03-717998c40d91"
		date = "2023-04-24"
		modified = "2024-12-19"
		reference = "https://github.com/SEKOIA-IO/Community"
		source_url = "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/yara_rules/rat_win_ratel_strings.yar#L1-L28"
		license_url = "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/LICENSE.md"
		logic_hash = "ff5640b03ec3e535cdb86c2a0feb52d0c472928ff88a36ec9f66ac8aa07c9f69"
		score = 75
		quality = 80
		tags = "FILE"
		version = "1.0"
		classification = "TLP:CLEAR"

	strings:
		$s1 = "[-] Error when changing folder." ascii
		$s2 = "cmd.exe" wide
		$s3 = "back slash find: " ascii
		$s4 = "MOD_ALL:" wide
		$s5 = "MOD_PERSISTENCE" wide
		$s6 = "MOD_DESTRUCTION:" wide
		$s7 = "MOD_RECONNECT" wide
		$s8 = "Software\\Microsoft\\Windows\\CurrentVersion\\Run" wide
		$s9 = "powershell.exe -command \"([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] 'Administrator')\"" wide
		$s10 = "The command was executed successfully but no data was returned."
		$s11 = "[-] TIMEOUT IN CREATEPROCESS, but all the processes in the name of: " ascii
		$s12 = "we were well and truly killed." ascii

	condition:
		( uint16be( 0 ) == 0x4d5a ) and filesize > 500KB and filesize < 3MB and 8 of them
}

Cadenas (12 patrones)

IdentificadorTipoValorModificadores
$s1texto"[-] Error when changing folder."ascii
$s2texto"cmd.exe"wide
$s3texto"back slash find: "ascii
$s4texto"MOD_ALL:"wide
$s5texto"MOD_PERSISTENCE"wide
$s6texto"MOD_DESTRUCTION:"wide
$s7texto"MOD_RECONNECT"wide
$s8texto"Software\\Microsoft\\Windows\\CurrentVersion\\Run"wide
$s9texto"powershell.exe -command \"([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltI …wide
$s10texto"The command was executed successfully but no data was returned."
$s11texto"[-] TIMEOUT IN CREATEPROCESS, but all the processes in the name of: "ascii
$s12texto"we were well and truly killed."ascii

Condición

( uint16be( 0 ) == 0x4d5a ) and filesize > 500KB and filesize < 3MB and 8 of them

En palabras sencillas (Heurística)

  • El archivo debe empezar por «MZ»: un ejecutable de Windows (PE).
  • El archivo debe ocupar menos de 3MB (un límite barato que descarta archivos grandes).
  • El archivo debe ocupar más de 500KB.
  • Deben coincidir al menos 8 patrones de la regla.

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: d0c8b89b-c811-47aa-9e03-717998c40d91

Metadatos

version1.0
classificationTLP:CLEAR

Etiquetas:FILE

Más reglas de Ratel