Aller au contenu

YARA · ditekSHen detection

DITEKSHEN_MALWARE_Win_Margulasrat

Detects MargulasRAT

MalwareMargulasratditekSHen detectionBSD 2-Clause LicenseCompile avec YARA-X
Auteur
ditekSHen
Date
2020-11-06
Modifiée
2024-11-01
Score / Qualité
75 / 75

Ce que détecte cette règle

Detects MargulasRAT

Famille de malware associée : Margulasrat.

Cibles : PE Windows.

Elle définit 17 motifs (16 texte, 1 hex, 0 regex).

Résumé généré à partir des métadonnées et de la condition de la règle.

Source de la règle

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* ) ) )
}

Chaînes (17 motifs)

IdentifiantTypeValeurModificateurs
$pdb1texte"G:\\VP-S-Fin\\memory\\"ascii
$pdb2texte"G:\\VP-S-Fin\\Margulas\\"ascii
$pdb3texte"G:\\VP-S-Fin\\remote"ascii
$pdb4texte"G:\\VP-S-Fin\\"ascii
$s1texte"/C choice /C Y /N /D Y /T 1 & Del "fullword wide
$s2texte"strToHash"fullword ascii
$s3texte"\\socking"fullword wide
$s4texte"\\wininets"fullword wide
$s5texte"ClientSocket"fullword ascii
$s6texte"new Stream()"fullword wide
$s7texte"CipherText"fullword ascii
$s8texte"WriteAllBytes"fullword ascii
$s9hex{ 00 50 72 6f 63 65 73 73 00 45 78 69 73 74 73 00}
$s10texte"pxR/THCwdLuruMmw8wB8xAUvbno1yPGBTOV9IoOkAp/n7+paQm74pkzlfSKDpAKfTOV9IoOkAp9M5X0ig6QCn0zlfSKDpAKfTOV9IoOkAp"wide
$c1texte"149.248.52.61"wide
$c2texte"://vpn.nic.in"wide
$c3texte"://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* ) ) )

En clair (Heuristique)

  • Le fichier doit commencer par « MZ » — un exécutable Windows (PE).
  • Au moins 1 motifs de ( $pdb* ) doivent être trouvés.
  • Au moins 1 motifs de ( $c* ) doivent être trouvés.
  • Au moins 3 motifs de ( $s* ) doivent être trouvés.
  • Au moins 6 motifs de ( $s* ) doivent être trouvés.

Tester cette règle dans votre navigateur

Déposez un fichier pour le scanner avec cette règle grâce à YARA-X compilé en WebAssembly. Rien n’est envoyé.

Déposez un fichier ici ou cliquez pour choisirScanné localement avec YARA-X. Fichiers jusqu’à 200 Mo.

Ouvrir dans l’éditeur

Références

Licence et attribution

Auteur : ditekSHen

Dépôt source : ditekSHen detection @ e76c93dcde

Licence : BSD 2-Clause License (licence du dépôt)

Mention de copyright : Copyright 2021 by ditekSHen (https://github.com/ditekshen/detection).

Règle d’origine

Reprise via YARA Forge 20260927, qui préfixe les noms de règles par la source et ajoute des champs meta normalisés.

Identifiant de règle: 6efabf80-9194-542d-afd2-9bf9c8e26e55

Tags:FILE