Saltar al contenido

YARA · ditekSHen detection

DITEKSHEN_MALWARE_Win_Margulasrat

Detects MargulasRAT

MalwareMargulasratditekSHen detectionBSD 2-Clause LicenseCompila con YARA-X
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

malware-win-margulasrat.yarBSD 2-Clause License
rule DITEKSHEN_MALWARE_Win_Margulasrat : FILE
{
	meta:
		description = "Detects MargulasRAT"
		author = "ditekSHen"
		id = "6efabf80-9194-542d-afd2-9bf9c8e26e55"
		date = "2020-11-06"
		modified = "2024-11-01"
		reference = "https://github.com/ditekshen/detection"
		source_url = "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/yara/malware.yar#L6786-L6810"
		license_url = "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/LICENSE.txt"
		logic_hash = "dd5b94c947d97cdc34032f2cb84b4975a1e8f510638857fb6dbe553bcff7d16e"
		score = 75
		quality = 75
		tags = "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)

IdentificadorTipoValorModificadores
$pdb1texto"G:\\VP-S-Fin\\memory\\"ascii
$pdb2texto"G:\\VP-S-Fin\\Margulas\\"ascii
$pdb3texto"G:\\VP-S-Fin\\remote"ascii
$pdb4texto"G:\\VP-S-Fin\\"ascii
$s1texto"/C choice /C Y /N /D Y /T 1 & Del "fullword wide
$s2texto"strToHash"fullword ascii
$s3texto"\\socking"fullword wide
$s4texto"\\wininets"fullword wide
$s5texto"ClientSocket"fullword ascii
$s6texto"new Stream()"fullword wide
$s7texto"CipherText"fullword ascii
$s8texto"WriteAllBytes"fullword ascii
$s9hex{ 00 50 72 6f 63 65 73 73 00 45 78 69 73 74 73 00}
$s10texto"pxR/THCwdLuruMmw8wB8xAUvbno1yPGBTOV9IoOkAp/n7+paQm74pkzlfSKDpAKfTOV9IoOkAp9M5X0ig6QCn0zlfSKDpAKfTOV9IoOkAp"wide
$c1texto"149.248.52.61"wide
$c2texto"://vpn.nic.in"wide
$c3texto"://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.

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: 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).

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: 6efabf80-9194-542d-afd2-9bf9c8e26e55

Etiquetas:FILE