Saltar al contenido

YARA · SEKOIA.IO Community

SEKOIA_Apt_Konni

Rule based on structure offsets and file extension

APT / actorKonniSEKOIA.IO CommunityDetection Rule License 1.1Compila con YARA-X
Autor
Sekoia.io
Fecha
2022-09-12
Modificada
2024-12-19
Puntuación / Calidad
75 / 80

Qué detecta esta regla

Rule based on structure offsets and file extension

Familia de malware asociada: Konni.

Objetivos: PE de Windows.

Define 9 patrones (6 de texto, 3 hex, 0 regex).

Resumen generado a partir de los metadatos y la condición de la regla.

Código de la regla

apt-konni.yarDetection Rule License 1.1
rule SEKOIA_Apt_Konni : FILE
{
	meta:
		description = "Rule based on structure offsets and file extension"
		author = "Sekoia.io"
		id = "6a20c492-e932-41bd-ac4a-01d35bfb0c49"
		date = "2022-09-12"
		modified = "2024-12-19"
		reference = "https://github.com/SEKOIA-IO/Community"
		source_url = "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/yara_rules/apt_konni.yar#L1-L25"
		license_url = "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/LICENSE.md"
		logic_hash = "8f178421fd0968f4ce809054022579c7fc8dede5f6514e89966d13acb83d75d9"
		score = 75
		quality = 80
		tags = "FILE"
		version = "1.0"
		classification = "TLP:CLEAR"

	strings:
		$ext_1 = ".zip" wide ascii fullword
		$ext_2 = ".cab" wide ascii fullword
		$ext_3 = ".rar" wide ascii fullword
		$ext_4 = ".ini" wide ascii fullword
		$ext_5 = ".dat" wide ascii fullword
		$offset_structure_1 = { 8d ?? 08 02 00 00 }
		$offset_structure_2 = { 8d ?? 10 04 00 00 }
		$offset_structure_3 = { 8d ?? 18 06 00 00 }
		$url = "%s/dn.php?name=%s&prefix=%s" wide

	condition:
		uint16be( 0 ) == 0x4d5a and filesize < 3MB and 3 of ( $ext_* ) and all of ( $offset_structure_* ) and $url
}

Cadenas (9 patrones)

IdentificadorTipoValorModificadores
$ext_1texto".zip"wide ascii fullword
$ext_2texto".cab"wide ascii fullword
$ext_3texto".rar"wide ascii fullword
$ext_4texto".ini"wide ascii fullword
$ext_5texto".dat"wide ascii fullword
$offset_structure_1hex{ 8d ?? 08 02 00 00 }
$offset_structure_2hex{ 8d ?? 10 04 00 00 }
$offset_structure_3hex{ 8d ?? 18 06 00 00 }
$urltexto"%s/dn.php?name=%s&prefix=%s"wide

Condición

uint16be( 0 ) == 0x4d5a and filesize < 3MB and 3 of ( $ext_* ) and all of ( $offset_structure_* ) and $url

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).
  • Deben coincidir todos los patrones de ( $offset_structure_* ).
  • Deben coincidir al menos 3 patrones de ( $ext_* ).
  • El patrón $url debe estar presente.

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: 6a20c492-e932-41bd-ac4a-01d35bfb0c49

Metadatos

version1.0
classificationTLP:CLEAR

Etiquetas:FILE

Más reglas de Konni