Saltar al contenido

YARA · ditekSHen detection

DITEKSHEN_MALWARE_Win_Ranumbot

Detects RanumBot / Windigo / GoStealer

MalwareRanumbotditekSHen detectionBSD 2-Clause LicenseCompila con YARA-X
Autor
ditekSHen
Fecha
2020-11-06
Modificada
2024-11-01
Puntuación / Calidad
75 / 73

Qué detecta esta regla

Detects RanumBot / Windigo / GoStealer

Familia de malware asociada: Ranumbot.

Objetivos: PE de Windows.

Define 24 patrones (23 de texto, 0 hex, 1 regex).

Resumen generado a partir de los metadatos y la condición de la regla.

Código de la regla

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

Cadenas (24 patrones)

IdentificadorTipoValorModificadores
$f1texto"main.addSchedulerTaskSSH"fullword ascii
$f2texto"main.attackRouter"fullword ascii
$f3texto"main.decryptPassword"fullword ascii
$f4texto"main.handleScanRequest"fullword ascii
$f5texto"main.scanNetwork"fullword ascii
$f6texto"main.extractCredentials"fullword ascii
$s1texto"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
$s2texto"<== as at fp= is lr: of on pc= sp: sp=) = ) m=+Inf, n -Inf00%x112212343125: p=ABRTACDTACSTAEDTAESTAKDTAKSTALRMAWSTAhomAtoiCESTChamDashEESTGOGCJulyJuneKILL …ascii
$s3texto"W*struct { P *big.Int; Q *big.Int; G *big.Int; Y *big.Int; Rest []uint8 \"ssh:\\\"rest\\\"\" }"ascii
$s4texto"policy=api,ftp,local,password,policy,read,reboot,sensitive,sniff,ssh,telnet,test,web,winbox,write"ascii
$s5texto"/Users/alexander/go/src/mikrotik/winbox.go"ascii
$xf1texto"main.readConfig"fullword ascii
$xf2texto"main.ensureRunningAsUser"fullword ascii
$xf3texto"main.configRegPath"fullword ascii
$xf4texto"main.oldConfigRegPath"fullword ascii
$uf1texto"main.locateChrome"fullword ascii
$uf2texto"main.decryptAndUploadProfile"fullword ascii
$uf3texto"main.decryptCookies"fullword ascii
$uf4texto"main.extractPasswords"fullword ascii
$uf5texto"main.getFirefoxProfile"fullword ascii
$uf6texto"main.postBrowsersData"fullword ascii
$uf7texto"main.uploadFirefoxProfile"fullword ascii
$uf8texto"main.zipFirefoxProfile"fullword ascii
$uf9regex/main\.detect(Browsers|Chrome|Coccoc|Edge|Firefox|InternetExplorer|Opera|Yandex)/fullword ascii

Condición

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 palabras sencillas (Heurística)

  • El archivo debe empezar por «MZ»: un ejecutable de Windows (PE).
  • Deben coincidir todos los patrones de ( $xf* ).
  • Deben coincidir al menos 5 patrones de ( $f* ).
  • Deben coincidir al menos 4 patrones de ( $s* ).
  • Deben coincidir al menos 2 patrones de ( $f* ).
  • Deben coincidir al menos 2 patrones de ( $s* ).
  • Deben coincidir al menos 1 patrones de ( $uf* ).
  • Deben coincidir al menos 6 patrones de ( $uf* ).

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: 26a0832e-8a39-5a0e-bd39-710744212c16

Etiquetas:FILE