YARA · ditekSHen detection
DITEKSHEN_MALWARE_Win_Margulasrat
Detects MargulasRAT
- Autor
- ditekSHen
- Fecha
- 2020-11-06
- Modificada
- 2024-11-01
- Puntuación / Calidad
- 75 / 75
Qué detecta esta regla
Detects MargulasRAT
Familia de malware asociada: Margulasrat.
Objetivos: PE de Windows.
Define 17 patrones (16 de texto, 1 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_Margulasrat : FILE
{
meta:
= "Detects MargulasRAT"
= "ditekSHen"
= "6efabf80-9194-542d-afd2-9bf9c8e26e55"
= "2020-11-06"
= "2024-11-01"
= "https://github.com/ditekshen/detection"
= "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/yara/malware.yar#L6786-L6810"
= "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/LICENSE.txt"
= "dd5b94c947d97cdc34032f2cb84b4975a1e8f510638857fb6dbe553bcff7d16e"
= 75
= 75
= "FILE"
strings:
$pdb1 = "G:\\VP-S-Fin\\memory\\" ascii
$pdb2 = "G:\\VP-S-Fin\\Margulas\\" ascii
$pdb3 = "G:\\VP-S-Fin\\remote" ascii
$pdb4 = "G:\\VP-S-Fin\\" ascii
$s1 = "/C choice /C Y /N /D Y /T 1 & Del " fullword wide
$s2 = "strToHash" fullword ascii
$s3 = "\\socking" fullword wide
$s4 = "\\wininets" fullword wide
$s5 = "ClientSocket" fullword ascii
$s6 = "new Stream()" fullword wide
$s7 = "CipherText" fullword ascii
$s8 = "WriteAllBytes" fullword ascii
$s9 = { 00 50 72 6f 63 65 73 73 00 45 78 69 73 74 73 00}
$s10 = "pxR/THCwdLuruMmw8wB8xAUvbno1yPGBTOV9IoOkAp/n7+paQm74pkzlfSKDpAKfTOV9IoOkAp9M5X0ig6QCn0zlfSKDpAKfTOV9IoOkAp" wide
$c1 = "149.248.52.61" wide
$c2 = "://vpn.nic.in" wide
$c3 = "://www.mod.gov.in/dod/sites/default/files/" wide
condition:
uint16( 0 ) == 0x5a4d and ( ( 1 of ( $pdb* ) and ( 1 of ( $c* ) or 3 of ( $s* ) ) ) or ( 1 of ( $c* ) and 3 of ( $s* ) ) or ( 6 of ( $s* ) ) )
}
Cadenas (17 patrones)
| Identificador | Tipo | Valor | Modificadores |
|---|---|---|---|
| $pdb1 | texto | "G:\\VP-S-Fin\\memory\\" | ascii |
| $pdb2 | texto | "G:\\VP-S-Fin\\Margulas\\" | ascii |
| $pdb3 | texto | "G:\\VP-S-Fin\\remote" | ascii |
| $pdb4 | texto | "G:\\VP-S-Fin\\" | ascii |
| $s1 | texto | "/C choice /C Y /N /D Y /T 1 & Del " | fullword wide |
| $s2 | texto | "strToHash" | fullword ascii |
| $s3 | texto | "\\socking" | fullword wide |
| $s4 | texto | "\\wininets" | fullword wide |
| $s5 | texto | "ClientSocket" | fullword ascii |
| $s6 | texto | "new Stream()" | fullword wide |
| $s7 | texto | "CipherText" | fullword ascii |
| $s8 | texto | "WriteAllBytes" | fullword ascii |
| $s9 | hex | { 00 50 72 6f 63 65 73 73 00 45 78 69 73 74 73 00} | |
| $s10 | texto | "pxR/THCwdLuruMmw8wB8xAUvbno1yPGBTOV9IoOkAp/n7+paQm74pkzlfSKDpAKfTOV9IoOkAp9M5X0ig6QCn0zlfSKDpAKfTOV9IoOkAp" | wide |
| $c1 | texto | "149.248.52.61" | wide |
| $c2 | texto | "://vpn.nic.in" | wide |
| $c3 | texto | "://www.mod.gov.in/dod/sites/default/files/" | wide |
Condición
uint16( 0 ) == 0x5a4d and ( ( 1 of ( $pdb* ) and ( 1 of ( $c* ) or 3 of ( $s* ) ) ) or ( 1 of ( $c* ) and 3 of ( $s* ) ) or ( 6 of ( $s* ) ) )En palabras sencillas (Heurística)
- El archivo debe empezar por «MZ»: un ejecutable de Windows (PE).
- Deben coincidir al menos 1 patrones de ( $pdb* ).
- Deben coincidir al menos 1 patrones de ( $c* ).
- Deben coincidir al menos 3 patrones de ( $s* ).
- Deben coincidir al menos 6 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: 6efabf80-9194-542d-afd2-9bf9c8e26e55
Etiquetas:FILE
Reglas relacionadas
- 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
- MalwareditekSHen detection· ditekSHen· 2020-11-06