Saltar al contenido

YARA · SEKOIA.IO Community

SEKOIA_Tool_Impersonate_Strings

Detects Impersonate

Herramienta ofensivaSEKOIA.IO CommunityDetection Rule License 1.1Compila con YARA-X
Autor
Sekoia.io
Fecha
2024-07-24
Modificada
2024-12-19
Puntuación / Calidad
75 / 80

Qué detecta esta regla

Detects Impersonate

Objetivos: PE de Windows.

Define 9 patrones (9 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.

tool-impersonate-strings.yarDetection Rule License 1.1
import "pe"

rule SEKOIA_Tool_Impersonate_Strings : FILE
{
	meta:
		description = "Detects Impersonate"
		author = "Sekoia.io"
		id = "2ab345a2-9366-4673-b398-a59ba6954af5"
		date = "2024-07-24"
		modified = "2024-12-19"
		reference = "https://github.com/SEKOIA-IO/Community"
		source_url = "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/yara_rules/tool_impersonate_strings.yar#L3-L26"
		license_url = "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/LICENSE.md"
		logic_hash = "63c46a2d97d0a8360351b8906665186c5ad2dcaa6f2edba6da7bf4de2ce00241"
		score = 75
		quality = 80
		tags = "FILE"
		version = "1.0"
		classification = "TLP:CLEAR"

	strings:
		$ = "[*] Listing available tokens"
		$ = "[ID: %2d][SESSION: %d][INTEGRITY: %-6ws][%-18ws][%-22ws] User: %ws"
		$ = "[*] Impersonating %ws"
		$ = "[!] Impersonation failed error: %d"
		$ = "[*] Adding user %ls on %ls"
		$ = "[!] Add user failed with error: %d"
		$ = "[*] Adding user %ws to domain group %ws"
		$ = "[!] Add user in domain %ws failed with error: %d"
		$ = "[!] Couldn't change token session id (error: %d)"

	condition:
		uint16be( 0 ) == 0x4d5a and 3 of them or pe.imphash ( ) == "e14ce763114276674e22b7b8b637bd4b"
}

Cadenas (9 patrones)

IdentificadorTipoValorModificadores
$texto"[*] Listing available tokens"
$texto"[ID: %2d][SESSION: %d][INTEGRITY: %-6ws][%-18ws][%-22ws] User: %ws"
$texto"[*] Impersonating %ws"
$texto"[!] Impersonation failed error: %d"
$texto"[*] Adding user %ls on %ls"
$texto"[!] Add user failed with error: %d"
$texto"[*] Adding user %ws to domain group %ws"
$texto"[!] Add user in domain %ws failed with error: %d"
$texto"[!] Couldn't change token session id (error: %d)"

Condición

uint16be( 0 ) == 0x4d5a and 3 of them or pe.imphash ( ) == "e14ce763114276674e22b7b8b637bd4b"

En palabras sencillas (Heurística)

  • El archivo debe empezar por «MZ»: un ejecutable de Windows (PE).
  • Deben coincidir al menos 3 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: 2ab345a2-9366-4673-b398-a59ba6954af5

Metadatos

version1.0
classificationTLP:CLEAR

Etiquetas:FILE