YARA · ditekSHen detection
DITEKSHEN_MALWARE_Win_Mercurial
Detects Mercurial infostealer
- Autor
- ditekSHen
- Fecha
- 2020-11-06
- Modificada
- 2024-11-01
- Puntuación / Calidad
- 75 / 75
Qué detecta esta regla
Detects Mercurial infostealer
Familia de malware asociada: Mercurial.
Objetivos: PE de Windows.
Define 13 patrones (12 de texto, 0 hex, 1 regex).
Resumen generado a partir de los metadatos y la condición de la regla.
Código de la regla
rule DITEKSHEN_MALWARE_Win_Mercurial : FILE
{
meta:
= "Detects Mercurial infostealer"
= "ditekSHen"
= "c262ada2-01ca-5fc1-adef-987908514019"
= "2020-11-06"
= "2024-11-01"
= "https://github.com/ditekshen/detection"
= "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/yara/malware.yar#L6573-L6593"
= "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/LICENSE.txt"
= "400f8f717a4e07bf4de508c02bbcd9e82bf21f3df84c989fc622378f33e192f0"
= 75
= 75
= "FILE"
strings:
$x1 = "mercurial grabber" wide nocase
$x2 = "\"text\":\"Mercurial Grabber |" wide
$x3 = "/nightfallgt/mercurial-grabber" wide
$s1 = "/LimerBoy/Adamantium-Thief/" ascii
$s2 = "Mozilla/5.0 (Macintosh; Intel Mac OS X x.y; rv:42.0) Gecko/20100101 Firefox/42.0" fullword wide
$s3 = "StealCookies" fullword ascii
$s4 = "StealPasswords" fullword ascii
$s5 = "DetectDebug" fullword ascii
$s6 = "CaptureScreen" fullword ascii
$s7 = "WebhookContent" fullword ascii
$s8 = /Grab(Token|Product|IP|Hardware)/ fullword ascii
$p1 = "[\\w-]{24}\\.[\\w-]{6}\\.[\\w-]{27}" fullword ascii wide
$p2 = "mfa\\.[\\w-]{84}" fullword ascii wide
condition:
uint16( 0 ) == 0x5a4d and ( 1 of ( $x* ) or 5 of ( $s* ) or ( all of ( $p* ) and 3 of ( $s* ) ) )
}
Cadenas (13 patrones)
| Identificador | Tipo | Valor | Modificadores |
|---|---|---|---|
| $x1 | texto | "mercurial grabber" | wide nocase |
| $x2 | texto | "\"text\":\"Mercurial Grabber |" | wide |
| $x3 | texto | "/nightfallgt/mercurial-grabber" | wide |
| $s1 | texto | "/LimerBoy/Adamantium-Thief/" | ascii |
| $s2 | texto | "Mozilla/5.0 (Macintosh; Intel Mac OS X x.y; rv:42.0) Gecko/20100101 Firefox/42.0" | fullword wide |
| $s3 | texto | "StealCookies" | fullword ascii |
| $s4 | texto | "StealPasswords" | fullword ascii |
| $s5 | texto | "DetectDebug" | fullword ascii |
| $s6 | texto | "CaptureScreen" | fullword ascii |
| $s7 | texto | "WebhookContent" | fullword ascii |
| $s8 | regex | /Grab(Token|Product|IP|Hardware)/ | fullword ascii |
| $p1 | texto | "[\\w-]{24}\\.[\\w-]{6}\\.[\\w-]{27}" | fullword ascii wide |
| $p2 | texto | "mfa\\.[\\w-]{84}" | fullword ascii wide |
Condición
uint16( 0 ) == 0x5a4d and ( 1 of ( $x* ) or 5 of ( $s* ) or ( all of ( $p* ) and 3 of ( $s* ) ) )En palabras sencillas (Heurística)
- El archivo debe empezar por «MZ»: un ejecutable de Windows (PE).
- Deben coincidir todos los patrones de ( $p* ).
- Deben coincidir al menos 1 patrones de ( $x* ).
- Deben coincidir al menos 5 patrones de ( $s* ).
- Deben coincidir al menos 3 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: c262ada2-01ca-5fc1-adef-987908514019
Etiquetas:FILE
Reglas relacionadas
- ARKBIRD_SOLG_MAL_Luna_Stealer_Apr_2021_1Solo metadatosMalwareArkbird SOLG (DailyIOC)· Arkbird_SOLG· 2021-08-29
- 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