Saltar al contenido

YARA · SEKOIA.IO Community

SEKOIA_Apt_Sofacy_Graphitemalware_Generic

Detects APT28 graphite malware based on strings

APT / actorGraphiteSEKOIA.IO CommunityDetection Rule License 1.1Compila con YARA-X
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.

apt-sofacy-graphitemalware-generic.yarDetection Rule License 1.1
import "pe"

rule SEKOIA_Apt_Sofacy_Graphitemalware_Generic : FILE
{
	meta:
		description = "Detects APT28 graphite malware based on strings"
		author = "Sekoia.io"
		id = "6b51cfa3-4a7d-4c2a-9fd9-f129b8a18466"
		date = "2022-09-27"
		modified = "2024-12-19"
		reference = "https://github.com/SEKOIA-IO/Community"
		source_url = "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/yara_rules/apt_sofacy_graphitemalware_generic.yar#L3-L25"
		license_url = "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/LICENSE.md"
		logic_hash = "f4c994c36768bae6d6e3b5aeefb634e485ab7b483a693781f29d5ff44c71996f"
		score = 75
		quality = 80
		tags = "FILE"
		version = "1.0"
		classification = "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)

IdentificadorTipoValorModificadores
$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.

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: 6b51cfa3-4a7d-4c2a-9fd9-f129b8a18466

Metadatos

version1.0
classificationTLP:CLEAR

Etiquetas:FILE

Más reglas de Graphite