YARA · SEKOIA.IO Community
SEKOIA_Plugx_Final_Payload
Detects encrypted plugx config with a specific size
- Autor
- Sekoia.io
- Fecha
- 2023-07-04
- Modificada
- 2024-12-19
- Puntuación / Calidad
- 75 / 80
Qué detecta esta regla
Detects encrypted plugx config with a specific size
Familia de malware asociada: Plugx.
Objetivos: PE de Windows, ELF de Linux.
Define 1 patrones (0 de texto, 1 hex, 0 regex). Módulos YARA usados: pe.
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"
rule SEKOIA_Plugx_Final_Payload : FILE
{
meta:
= "Detects encrypted plugx config with a specific size"
= "Sekoia.io"
= "a4047324-81a7-4c17-be84-c0fa479d2f89"
= "2023-07-04"
= "2024-12-19"
= "https://github.com/SEKOIA-IO/Community"
= "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/yara_rules/plugx_final_payload.yar#L3-L23"
= "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/LICENSE.md"
= "bf5035eb7ed620edcf7a0e8e8be220451ce268fc49310f28059b60576d8c5182"
= 75
= 80
= "FILE"
= "1.0"
= "TLP:CLEAR"
strings:
$s1 = {30 31 32 33 34 35 36 37 38 39 41 42 43 44 45 46 88 13 00 00 60 ea 00 00 ?? ?? ?? ?? 00 00 00 00}
condition:
( uint32be( 0 ) == 0x7f454c46 or uint16be( 0 ) == 0x4d5a ) and filesize < 8MB and for any i in ( 0 .. pe.number_of_sections -1 ) : ( pe.sections [ i ] . name == ".data" and $s1 in ( pe.sections [ i ] . raw_data_offset..pe.sections [ i ] . raw_data_offset + pe.sections [ i ] . raw_data_size ) )
}
Cadenas (1 patrones)
| Identificador | Tipo | Valor | Modificadores |
|---|---|---|---|
| $s1 | hex | {30 31 32 33 34 35 36 37 38 39 41 42 43 44 45 46 88 13 00 00 60 ea 00 00 ?? ?? ?? ?? 00 00 00 00} |
Condición
( uint32be( 0 ) == 0x7f454c46 or uint16be( 0 ) == 0x4d5a ) and filesize < 8MB and for any i in ( 0 .. pe.number_of_sections -1 ) : ( pe.sections [ i ] . name == ".data" and $s1 in ( pe.sections [ i ] . raw_data_offset..pe.sections [ i ] . raw_data_offset + pe.sections [ i ] . raw_data_size ) )En palabras sencillas (Heurística)
- El archivo debe empezar por «MZ»: un ejecutable de Windows (PE).
- El archivo debe empezar por la cabecera ELF: un ejecutable de Linux/Unix.
- El archivo debe ocupar menos de 8MB (un límite barato que descarta archivos grandes).
- El patrón $s1 debe estar en el rango pe.sections [ i ] . raw_data_offset..pe.sections [ i ] . raw_data_offset + pe.sections [ i ] . raw_data_size.
- Un bucle for comprueba una propiedad sobre varias coincidencias o elementos.
- Usa el módulo pe.
- 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
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: a4047324-81a7-4c17-be84-c0fa479d2f89
Metadatos
| version | 1.0 |
|---|---|
| classification | TLP:CLEAR |
Etiquetas:FILE
Reglas relacionadas
- APT / actorSEKOIA.IO Community· Sekoia.io· 2023-12-18
- MalwareMalpedia signator rules· Felix Bilstein - yara-signator at cocacoding dot com· 2026-05-04
- ARKBIRD_SOLG_Mal_Plugx_Thor_July_2021_1Solo metadatosMalwareArkbird SOLG (DailyIOC)· Arkbird_SOLG· 2021-07-27
- SECUINFRA_MALWARE_Plugx_USB_Delivery_Ini_Icon_Jun23Solo metadatosMalwareSecuInfra Falcon Team· SECUINFRA Falcon Team (@SI_FalconTeam)· 2023-06-21
- SECUINFRA_MALWARE_Plugx_USB_Delivery_Ini_Recbin_Jun23Solo metadatosMalwareSecuInfra Falcon Team· SECUINFRA Falcon Team (@SI_FalconTeam)· 2023-06-21
- SECUINFRA_MALWARE_Plugx_USB_Delivery_LNK_Jun23Solo metadatosMalwareSecuInfra Falcon Team· SECUINFRA Falcon Team (@SI_FalconTeam)· 2023-06-21
- MalwareSEKOIA.IO Community· Sekoia.io· 2024-07-16
- MalwareSEKOIA.IO Community· Sekoia.io· 2024-08-23