YARA · ditekSHen detection
DITEKSHEN_MALWARE_Win_Unicorn
Detects Unicorn infostealer
- Autor
- ditekSHen
- Fecha
- 2020-11-06
- Modificada
- 2024-11-01
- Puntuación / Calidad
- 75 / 75
Qué detecta esta regla
Detects Unicorn infostealer
Familia de malware asociada: Unicorn.
Objetivos: PE de Windows.
Define 16 patrones (14 de texto, 2 hex, 0 regex).
Resumen generado a partir de los metadatos y la condición de la regla.
Código de la regla
rule DITEKSHEN_MALWARE_Win_Unicorn : FILE
{
meta:
= "Detects Unicorn infostealer"
= "ditekSHen"
= "7cc8298d-abbd-5dda-bbd4-8b061095c367"
= "2020-11-06"
= "2024-11-01"
= "https://github.com/ditekshen/detection"
= "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/yara/malware.yar#L8077-L8107"
= "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/LICENSE.txt"
= "c4150b213c0dd88c87eb81e3ad455d8f658a57b0998bc6e394c5afac9423d9f2"
= 75
= 75
= "FILE"
strings:
$x1 = "WinHTTP Downloader/1.0" fullword wide
$x2 = "[CTRL + %c]" fullword wide
$x3 = "\\UnicornLog.txt" fullword wide
$x4 = "/*INITIALIZED*/" fullword wide
$s1 = { 2f 00 63 00 20 00 22 00 43 00 4f 00 50 00 59 00
20 00 2f 00 59 00 20 00 2f 00 42 00 20 00 22 00
25 00 73 00 22 00 20 00 22 00 25 00 73 00 22 00
22 00 00 00 63 00 6d 00 64 00 2e 00 65 00 78 00
65 }
$s2 = { 72 00 75 00 6e 00 64 00 6c 00 6c 00 33 00 32 00
2e 00 65 00 78 00 65 00 00 00 00 00 25 00 73 00
20 00 22 00 25 00 73 00 22 00 2c 00 25 00 68 00
73 }
$s3 = "%*[^]]%c%n" fullword ascii
$s4 = "file://%s%s%s" fullword ascii
$s5 = "%s://%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s" fullword ascii
$s6 = "regex_start_injects" fullword ascii
$s7 = "DLEXEC" fullword ascii
$s8 = "^((((3|1)[A-Za-z0-9]{33}))(\\s|$)|(bc1q)[A-Za-z0-9]{38}(\\s|$))" fullword ascii
$s9 = "^(0x)?[A-Za-z0-9]{40}(\\s|$)" fullword ascii
$s10 = "clipRegex" fullword ascii
$s11 = "%s?k=%s&src=clip&id=%s" fullword ascii
$s12 = "http://izuw6rclbgl2lwsh.onion/o.php" fullword ascii
condition:
uint16( 0 ) == 0x5a4d and ( all of ( $x* ) or 8 of ( $s* ) or ( 3 of ( $x* ) and 5 of ( $s* ) ) )
}
Cadenas (16 patrones)
| Identificador | Tipo | Valor | Modificadores |
|---|---|---|---|
| $x1 | texto | "WinHTTP Downloader/1.0" | fullword wide |
| $x2 | texto | "[CTRL + %c]" | fullword wide |
| $x3 | texto | "\\UnicornLog.txt" | fullword wide |
| $x4 | texto | "/*INITIALIZED*/" | fullword wide |
| $s1 | hex | { 2f 00 63 00 20 00 22 00 43 00 4f 00 50 00 59 00 20 00 2f 00 59 00 20 00 2f 00 42 00 20 00 22 00 25 00 73 00 22 00 20 00 22 00 25 … | |
| $s2 | hex | { 72 00 75 00 6e 00 64 00 6c 00 6c 00 33 00 32 00 2e 00 65 00 78 00 65 00 00 00 00 00 25 00 73 00 20 00 22 00 25 00 73 00 22 00 2c … | |
| $s3 | texto | "%*[^]]%c%n" | fullword ascii |
| $s4 | texto | "file://%s%s%s" | fullword ascii |
| $s5 | texto | "%s://%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s" | fullword ascii |
| $s6 | texto | "regex_start_injects" | fullword ascii |
| $s7 | texto | "DLEXEC" | fullword ascii |
| $s8 | texto | "^((((3|1)[A-Za-z0-9]{33}))(\\s|$)|(bc1q)[A-Za-z0-9]{38}(\\s|$))" | fullword ascii |
| $s9 | texto | "^(0x)?[A-Za-z0-9]{40}(\\s|$)" | fullword ascii |
| $s10 | texto | "clipRegex" | fullword ascii |
| $s11 | texto | "%s?k=%s&src=clip&id=%s" | fullword ascii |
| $s12 | texto | "http://izuw6rclbgl2lwsh.onion/o.php" | fullword ascii |
Condición
uint16( 0 ) == 0x5a4d and ( all of ( $x* ) or 8 of ( $s* ) or ( 3 of ( $x* ) and 5 of ( $s* ) ) )En palabras sencillas (Heurística)
- El archivo debe empezar por «MZ»: un ejecutable de Windows (PE).
- Deben coincidir todos los patrones de ( $x* ).
- Deben coincidir al menos 8 patrones de ( $s* ).
- Deben coincidir al menos 3 patrones de ( $x* ).
- Deben coincidir al menos 5 patrones de ( $s* ).
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: ditekSHen
Repositorio de origen: ditekSHen detection @ e76c93dcde
Licencia: BSD 2-Clause License (licencia del repositorio)
Aviso de copyright: Copyright 2021 by ditekSHen (https://github.com/ditekshen/detection).
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: 7cc8298d-abbd-5dda-bbd4-8b061095c367
Etiquetas:FILE
Reglas relacionadas
- Herramienta ofensivaSEKOIA.IO Community· Sekoia.io· 2022-08-23
- MalwareditekSHen detection· ditekSHen· 2034-02-17
- MalwareditekSHen detection· ditekSHen· 2020-11-06
- MalwareditekSHen detection· ditekSHen· 2020-11-06
- MalwareditekSHen detection· ditekSHen· 2020-11-06
- MalwareditekSHen detection· ditekSHen· 2020-11-06
- MalwareditekSHen detection· ditekSHen· 2020-11-06
- MalwareditekSHen detection· ditekSHen· 2020-11-06