YARA · SEKOIA.IO Community
SEKOIA_Tool_Impersonate_Strings
Detects Impersonate
- 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:
= "Detects Impersonate"
= "Sekoia.io"
= "2ab345a2-9366-4673-b398-a59ba6954af5"
= "2024-07-24"
= "2024-12-19"
= "https://github.com/SEKOIA-IO/Community"
= "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/yara_rules/tool_impersonate_strings.yar#L3-L26"
= "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/LICENSE.md"
= "63c46a2d97d0a8360351b8906665186c5ad2dcaa6f2edba6da7bf4de2ce00241"
= 75
= 80
= "FILE"
= "1.0"
= "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)
| Identificador | Tipo | Valor | Modificadores |
|---|---|---|---|
| $ | 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.
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: 2ab345a2-9366-4673-b398-a59ba6954af5
Metadatos
| version | 1.0 |
|---|---|
| classification | TLP:CLEAR |
Etiquetas:FILE
Reglas relacionadas
- Herramienta ofensivaSEKOIA.IO Community· Sekoia.io· 2024-09-06
- Herramienta ofensivaSEKOIA.IO Community· Sekoia.io· 2024-02-29
- Herramienta ofensivaSEKOIA.IO Community· Sekoia.io· 2023-12-05
- Herramienta ofensivaSEKOIA.IO Community· Sekoia.io· 2023-11-15
- Herramienta ofensivaSEKOIA.IO Community· Sekoia.io· 2023-08-23
- Herramienta ofensivaSEKOIA.IO Community· Sekoia.io· 2022-02-08
- Herramienta ofensivaSEKOIA.IO Community· Sekoia.io· 2022-07-22
- Herramienta ofensivaSEKOIA.IO Community· Sekoia.io· 2022-09-09