Aller au contenu

YARA · ditekSHen detection

DITEKSHEN_MALWARE_Win_Ranumbot

Detects RanumBot / Windigo / GoStealer

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

Ce que détecte cette règle

Detects RanumBot / Windigo / GoStealer

Famille de malware associée : Ranumbot.

Cibles : PE Windows.

Elle définit 24 motifs (23 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-ranumbot.yarBSD 2-Clause License
rule DITEKSHEN_MALWARE_Win_Ranumbot : FILE
{
	meta:
		description = "Detects RanumBot / Windigo / GoStealer"
		author = "ditekSHen"
		id = "26a0832e-8a39-5a0e-bd39-710744212c16"
		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#L5397-L5430"
		license_url = "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/LICENSE.txt"
		logic_hash = "a9c32445e62d072e4184d25497696ef6225edb176dc7a9743a54194d4ddb4b0c"
		score = 75
		quality = 73
		tags = "FILE"

	strings:
		$f1 = "main.addSchedulerTaskSSH" fullword ascii
		$f2 = "main.attackRouter" fullword ascii
		$f3 = "main.decryptPassword" fullword ascii
		$f4 = "main.handleScanRequest" fullword ascii
		$f5 = "main.scanNetwork" fullword ascii
		$f6 = "main.extractCredentials" fullword ascii
		$s1 = "H_T= H_a= H_g= MB,  W_a= and  h_a= h_g= h_t= max= ptr  siz= tab= top= u_a= u_g=%s/16%s:%d%s:22+0330+0430+0530+0545+0630+0845+10" ascii
		$s2 = "<== as  at  fp= is  lr: of  on  pc= sp: sp=) = ) m=+Inf, n -Inf00%x112212343125: p=ABRTACDTACSTAEDTAESTAKDTAKSTALRMAWSTAhomAtoiCESTChamDashEESTGOGCJulyJuneKILLLEAFLisuMiaoModiNZDTNZSTNewaPIPEQUITSASTSEGVTERMThai" ascii
		$s3 = "W*struct { P *big.Int; Q *big.Int; G *big.Int; Y *big.Int; Rest []uint8 \"ssh:\\\"rest\\\"\" }" ascii
		$s4 = "policy=api,ftp,local,password,policy,read,reboot,sensitive,sniff,ssh,telnet,test,web,winbox,write" ascii
		$s5 = "/Users/alexander/go/src/mikrotik/winbox.go" ascii
		$xf1 = "main.readConfig" fullword ascii
		$xf2 = "main.ensureRunningAsUser" fullword ascii
		$xf3 = "main.configRegPath" fullword ascii
		$xf4 = "main.oldConfigRegPath" fullword ascii
		$uf1 = "main.locateChrome" fullword ascii
		$uf2 = "main.decryptAndUploadProfile" fullword ascii
		$uf3 = "main.decryptCookies" fullword ascii
		$uf4 = "main.extractPasswords" fullword ascii
		$uf5 = "main.getFirefoxProfile" fullword ascii
		$uf6 = "main.postBrowsersData" fullword ascii
		$uf7 = "main.uploadFirefoxProfile" fullword ascii
		$uf8 = "main.zipFirefoxProfile" fullword ascii
		$uf9 = /main\.detect(Browsers|Chrome|Coccoc|Edge|Firefox|InternetExplorer|Opera|Yandex)/ fullword ascii

	condition:
		uint16( 0 ) == 0x5a4d and ( 5 of ( $f* ) or 4 of ( $s* ) or ( 2 of ( $f* ) and 2 of ( $s* ) ) or ( all of ( $xf* ) and 1 of ( $uf* ) ) or 6 of ( $uf* ) )
}

Chaînes (24 motifs)

IdentifiantTypeValeurModificateurs
$f1texte"main.addSchedulerTaskSSH"fullword ascii
$f2texte"main.attackRouter"fullword ascii
$f3texte"main.decryptPassword"fullword ascii
$f4texte"main.handleScanRequest"fullword ascii
$f5texte"main.scanNetwork"fullword ascii
$f6texte"main.extractCredentials"fullword ascii
$s1texte"H_T= H_a= H_g= MB, W_a= and h_a= h_g= h_t= max= ptr siz= tab= top= u_a= u_g=%s/16%s:%d%s:22+0330+0430+0530+0545+0630+0845+10"ascii
$s2texte"<== as at fp= is lr: of on pc= sp: sp=) = ) m=+Inf, n -Inf00%x112212343125: p=ABRTACDTACSTAEDTAESTAKDTAKSTALRMAWSTAhomAtoiCESTChamDashEESTGOGCJulyJuneKILL …ascii
$s3texte"W*struct { P *big.Int; Q *big.Int; G *big.Int; Y *big.Int; Rest []uint8 \"ssh:\\\"rest\\\"\" }"ascii
$s4texte"policy=api,ftp,local,password,policy,read,reboot,sensitive,sniff,ssh,telnet,test,web,winbox,write"ascii
$s5texte"/Users/alexander/go/src/mikrotik/winbox.go"ascii
$xf1texte"main.readConfig"fullword ascii
$xf2texte"main.ensureRunningAsUser"fullword ascii
$xf3texte"main.configRegPath"fullword ascii
$xf4texte"main.oldConfigRegPath"fullword ascii
$uf1texte"main.locateChrome"fullword ascii
$uf2texte"main.decryptAndUploadProfile"fullword ascii
$uf3texte"main.decryptCookies"fullword ascii
$uf4texte"main.extractPasswords"fullword ascii
$uf5texte"main.getFirefoxProfile"fullword ascii
$uf6texte"main.postBrowsersData"fullword ascii
$uf7texte"main.uploadFirefoxProfile"fullword ascii
$uf8texte"main.zipFirefoxProfile"fullword ascii
$uf9regex/main\.detect(Browsers|Chrome|Coccoc|Edge|Firefox|InternetExplorer|Opera|Yandex)/fullword ascii

Condition

uint16( 0 ) == 0x5a4d and ( 5 of ( $f* ) or 4 of ( $s* ) or ( 2 of ( $f* ) and 2 of ( $s* ) ) or ( all of ( $xf* ) and 1 of ( $uf* ) ) or 6 of ( $uf* ) )

En clair (Heuristique)

  • Le fichier doit commencer par « MZ » — un exécutable Windows (PE).
  • Tous les motifs de ( $xf* ) doivent être trouvés.
  • Au moins 5 motifs de ( $f* ) doivent être trouvés.
  • Au moins 4 motifs de ( $s* ) doivent être trouvés.
  • Au moins 2 motifs de ( $f* ) doivent être trouvés.
  • Au moins 2 motifs de ( $s* ) doivent être trouvés.
  • Au moins 1 motifs de ( $uf* ) doivent être trouvés.
  • Au moins 6 motifs de ( $uf* ) 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: 26a0832e-8a39-5a0e-bd39-710744212c16

Tags:FILE