Aller au contenu

YARA · ditekSHen detection

DITEKSHEN_MALWARE_Win_Mercurial

Detects Mercurial infostealer

MalwareMercurialditekSHen 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 Mercurial infostealer

Famille de malware associée : Mercurial.

Cibles : PE Windows.

Elle définit 13 motifs (12 texte, 0 hex, 1 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-mercurial.yarBSD 2-Clause License
rule DITEKSHEN_MALWARE_Win_Mercurial : FILE
{
	meta:
		description = "Detects Mercurial infostealer"
		author = "ditekSHen"
		id = "c262ada2-01ca-5fc1-adef-987908514019"
		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#L6573-L6593"
		license_url = "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/LICENSE.txt"
		logic_hash = "400f8f717a4e07bf4de508c02bbcd9e82bf21f3df84c989fc622378f33e192f0"
		score = 75
		quality = 75
		tags = "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* ) ) )
}

Chaînes (13 motifs)

IdentifiantTypeValeurModificateurs
$x1texte"mercurial grabber"wide nocase
$x2texte"\"text\":\"Mercurial Grabber |"wide
$x3texte"/nightfallgt/mercurial-grabber"wide
$s1texte"/LimerBoy/Adamantium-Thief/"ascii
$s2texte"Mozilla/5.0 (Macintosh; Intel Mac OS X x.y; rv:42.0) Gecko/20100101 Firefox/42.0"fullword wide
$s3texte"StealCookies"fullword ascii
$s4texte"StealPasswords"fullword ascii
$s5texte"DetectDebug"fullword ascii
$s6texte"CaptureScreen"fullword ascii
$s7texte"WebhookContent"fullword ascii
$s8regex/Grab(Token|Product|IP|Hardware)/fullword ascii
$p1texte"[\\w-]{24}\\.[\\w-]{6}\\.[\\w-]{27}"fullword ascii wide
$p2texte"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* ) ) )

En clair (Heuristique)

  • Le fichier doit commencer par « MZ » — un exécutable Windows (PE).
  • Tous les motifs de ( $p* ) doivent être trouvés.
  • Au moins 1 motifs de ( $x* ) doivent être trouvés.
  • Au moins 5 motifs de ( $s* ) doivent être trouvés.
  • Au moins 3 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: c262ada2-01ca-5fc1-adef-987908514019

Tags:FILE