Zum Inhalt springen

YARA · ditekSHen detection

DITEKSHEN_MALWARE_Win_Margulasrat

Detects MargulasRAT

MalwareMargulasratditekSHen detectionBSD 2-Clause LicenseKompiliert mit YARA-X
Autor
ditekSHen
Datum
2020-11-06
Geändert
2024-11-01
Score / Qualität
75 / 75

Was diese Regel erkennt

Detects MargulasRAT

Zugehörige Malware-Familie: Margulasrat.

Ziele: Windows-PE.

Sie definiert 17 Muster (16 Text, 1 Hex, 0 Regex).

Zusammenfassung aus den Metadaten und der Bedingung der Regel erzeugt.

Regelquelltext

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

Strings (17 Muster)

BezeichnerTypWertModifikatoren
$pdb1Text"G:\\VP-S-Fin\\memory\\"ascii
$pdb2Text"G:\\VP-S-Fin\\Margulas\\"ascii
$pdb3Text"G:\\VP-S-Fin\\remote"ascii
$pdb4Text"G:\\VP-S-Fin\\"ascii
$s1Text"/C choice /C Y /N /D Y /T 1 & Del "fullword wide
$s2Text"strToHash"fullword ascii
$s3Text"\\socking"fullword wide
$s4Text"\\wininets"fullword wide
$s5Text"ClientSocket"fullword ascii
$s6Text"new Stream()"fullword wide
$s7Text"CipherText"fullword ascii
$s8Text"WriteAllBytes"fullword ascii
$s9Hex{ 00 50 72 6f 63 65 73 73 00 45 78 69 73 74 73 00}
$s10Text"pxR/THCwdLuruMmw8wB8xAUvbno1yPGBTOV9IoOkAp/n7+paQm74pkzlfSKDpAKfTOV9IoOkAp9M5X0ig6QCn0zlfSKDpAKfTOV9IoOkAp"wide
$c1Text"149.248.52.61"wide
$c2Text"://vpn.nic.in"wide
$c3Text"://www.mod.gov.in/dod/sites/default/files/"wide

Bedingung

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

In Worten (Heuristik)

  • Die Datei muss mit „MZ“ beginnen — eine Windows-Programmdatei (PE).
  • Mindestens 1 Muster aus ( $pdb* ) müssen treffen.
  • Mindestens 1 Muster aus ( $c* ) müssen treffen.
  • Mindestens 3 Muster aus ( $s* ) müssen treffen.
  • Mindestens 6 Muster aus ( $s* ) müssen treffen.

Diese Regel im Browser testen

Legen Sie eine Datei ab, um sie mit dieser Regel und YARA-X als WebAssembly zu scannen. Nichts wird hochgeladen.

Datei hier ablegen oder klicken zum AuswählenLokal mit YARA-X gescannt. Dateien bis 200 MB.

Im Editor öffnen

Referenzen

Lizenz & Namensnennung

Autor: ditekSHen

Quell-Repository: ditekSHen detection @ e76c93dcde

Lizenz: BSD 2-Clause License (Repository-Lizenz)

Copyright-Hinweis: Copyright 2021 by ditekSHen (https://github.com/ditekshen/detection).

Originalregel

Gespiegelt über YARA Forge 20260927, das Regelnamen mit der Quelle präfixiert und normalisierte Meta-Felder ergänzt.

Regel-ID: 6efabf80-9194-542d-afd2-9bf9c8e26e55

Tags:FILE