YARA · SEKOIA.IO Community
SEKOIA_Apt_Sofacy_Graphitemalware_Generic
Detects APT28 graphite malware based on strings
- Autor
- Sekoia.io
- Fecha
- 2022-09-27
- Modificada
- 2024-12-19
- Puntuación / Calidad
- 75 / 80
Qué detecta esta regla
Detects APT28 graphite malware based on strings
Familia de malware asociada: Graphite.
Objetivos: PE de Windows.
Define 7 patrones (7 de texto, 0 hex, 0 regex). Módulos YARA usados: pe.
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_Apt_Sofacy_Graphitemalware_Generic : FILE
{
meta:
= "Detects APT28 graphite malware based on strings"
= "Sekoia.io"
= "6b51cfa3-4a7d-4c2a-9fd9-f129b8a18466"
= "2022-09-27"
= "2024-12-19"
= "https://github.com/SEKOIA-IO/Community"
= "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/yara_rules/apt_sofacy_graphitemalware_generic.yar#L3-L25"
= "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/LICENSE.md"
= "f4c994c36768bae6d6e3b5aeefb634e485ab7b483a693781f29d5ff44c71996f"
= 75
= 80
= "FILE"
= "1.0"
= "TLP:CLEAR"
strings:
$ = "Microsoft Enhanced RSA and AES Cryptographic Provider" wide
$ = "Microsoft Enhanced RSA and AES Cryptographic Provider (Prototype)" wide
$ = "%s %04d sp%1d.%1d %s"
$ = "%s%c%s%c%s"
$ = "InternetReadFile"
$ = "ObtainUserAgentString"
$ = "CryptImportKey"
condition:
uint16be( 0 ) == 0x4d5a and filesize < 100KB and ( all of them or pe.imphash ( ) == "c56c322548250651361aef7dacf93eaf" )
}
Cadenas (7 patrones)
| Identificador | Tipo | Valor | Modificadores |
|---|---|---|---|
| $ | texto | "Microsoft Enhanced RSA and AES Cryptographic Provider" | wide |
| $ | texto | "Microsoft Enhanced RSA and AES Cryptographic Provider (Prototype)" | wide |
| $ | texto | "%s %04d sp%1d.%1d %s" | |
| $ | texto | "%s%c%s%c%s" | |
| $ | texto | "InternetReadFile" | |
| $ | texto | "ObtainUserAgentString" | |
| $ | texto | "CryptImportKey" |
Condición
uint16be( 0 ) == 0x4d5a and filesize < 100KB and ( all of them or pe.imphash ( ) == "c56c322548250651361aef7dacf93eaf" )En palabras sencillas (Heurística)
- El archivo debe empezar por «MZ»: un ejecutable de Windows (PE).
- El archivo debe ocupar menos de 100KB (un límite barato que descarta archivos grandes).
- Deben coincidir todos los patrones de la regla.
- Usa el módulo pe.
- Comprueba el hash de importaciones PE (imphash).
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: 6b51cfa3-4a7d-4c2a-9fd9-f129b8a18466
Metadatos
| version | 1.0 |
|---|---|
| classification | TLP:CLEAR |
Etiquetas:FILE
Reglas relacionadas
- APT / actorSEKOIA.IO Community· Sekoia.io· 2022-01-26
- MalwareMalpedia signator rules· Felix Bilstein - yara-signator at cocacoding dot com· 2026-05-04
- APT / actorSEKOIA.IO Community· Sekoia.io· 2024-09-10
- APT / actorSEKOIA.IO Community· Sekoia.io· 2024-10-21
- APT / actorSEKOIA.IO Community· Sekoia.io· 2024-10-21
- APT / actorSEKOIA.IO Community· Sekoia.io· 2024-09-27
- APT / actorSEKOIA.IO Community· Sekoia.io· 2024-09-27
- APT / actorSEKOIA.IO Community· Sekoia.io· 2024-09-23