YARA · SEKOIA.IO Community
SEKOIA_Rat_Win_Ninerat
Detect the NineRAT payload
- Autor
- Sekoia.io
- Fecha
- 2023-12-12
- Modificada
- 2024-12-19
- Puntuación / Calidad
- 75 / 80
Qué detecta esta regla
Detect the NineRAT payload
Familia de malware asociada: Ninerat.
Objetivos: PE de Windows.
Define 6 patrones (6 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.
import "pe"
import "hash"
rule SEKOIA_Rat_Win_Ninerat
{
meta:
= "Detect the NineRAT payload"
= "Sekoia.io"
= "a9f4f78b-5b86-4ac1-9b9b-ba2672b938bf"
= "2023-12-12"
= "2024-12-19"
= "https://github.com/SEKOIA-IO/Community"
= "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/yara_rules/rat_win_ninerat.yar#L4-L31"
= "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/LICENSE.md"
= "47e017b40d418374c0889e4d22aa48633b1d41b16b61b1f2897a39112a435d30"
= "82d4a0fef550af4f01a07041c16d851f262d859a3352475c62630e2c16a21def"
= "bbb695444a6ec0d6049d0ce233ca37de6f78393e5ceb5d454867c8b554269684"
= 75
= 80
= ""
= "1.0"
= "TLP:CLEAR"
strings:
$ = "https://api.telegram.org/bot"
$ = "/getMe"
$ = "/upgrade"
$ = "/getFile"
$ = "/sendMessage"
$ = ">> Request send time:"
condition:
all of them 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 ) == "3ce78c89e2c0e795ad3382aa12e99683" )
}
Cadenas (6 patrones)
| Identificador | Tipo | Valor | Modificadores |
|---|---|---|---|
| $ | texto | "https://api.telegram.org/bot" | |
| $ | texto | "/getMe" | |
| $ | texto | "/upgrade" | |
| $ | texto | "/getFile" | |
| $ | texto | "/sendMessage" | |
| $ | texto | ">> Request send time:" |
Condición
all of them 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 ) == "3ce78c89e2c0e795ad3382aa12e99683" )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 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.
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).
- 47e017b40d418374c0889e4d22aa48633b1d41b16b61b1f2897a39112a435d30
- 82d4a0fef550af4f01a07041c16d851f262d859a3352475c62630e2c16a21def
Licencia y atribución
Autor: Sekoia.io
Repositorio de origen: SEKOIA.IO Community @ a438a5901a
Licencia: Detection Rule License 1.1 (licencia del repositorio)
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: a9f4f78b-5b86-4ac1-9b9b-ba2672b938bf
Metadatos
| version | 1.0 |
|---|---|
| classification | TLP:CLEAR |
Reglas relacionadas
- MalwareSEKOIA.IO Community· Sekoia.io· 2023-12-12
- MalwareSEKOIA.IO Community· Sekoia.io· 2023-12-12
- MalwareMalpedia signator rules· Felix Bilstein - yara-signator at cocacoding dot com· 2026-05-04
- MalwareSEKOIA.IO Community· Sekoia.io· 2024-07-16
- MalwareSEKOIA.IO Community· Sekoia.io· 2024-08-23
- MalwareSEKOIA.IO Community· Sekoia.io· 2024-04-22
- MalwareSEKOIA.IO Community· Sekoia.io· 2024-07-23
- MalwareSEKOIA.IO Community· Sekoia.io· 2024-10-20