Saltar al contenido

YARA · ditekSHen detection

DITEKSHEN_MALWARE_Win_Windealer

Detects WinDealer

MalwareWindealerditekSHen 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 WinDealer

Familia de malware asociada: Windealer.

Objetivos: PE de Windows.

Define 23 patrones (23 de texto, 0 hex, 0 regex). Módulos YARA usados: pe.

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

Código de la regla

Incluye los imports necesarios para compilarla por sí sola.

malware-win-windealer.yarBSD 2-Clause License
import "pe"

rule DITEKSHEN_MALWARE_Win_Windealer : FILE
{
	meta:
		description = "Detects WinDealer"
		author = "ditekSHen"
		id = "d4f3b0cc-121e-5032-9721-1e2a86842fa5"
		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#L8270-L8301"
		license_url = "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/LICENSE.txt"
		logic_hash = "eabc41ea69f142ee7c243cbc75ceda909a722be382ad91a01c805aef637be915"
		score = 75
		quality = 73
		tags = "FILE"
		snort_sid = "920264"

	strings:
		$d1 = "downfile" fullword ascii
		$d2 = "getmypath" fullword ascii
		$d3 = "content-type: monitor" fullword ascii
		$d4 = "content-type: UsedType" fullword ascii
		$d5 = "write command error" fullword ascii
		$d6 = "C:\\WINDOWS\\system32\\kernel32.dll" fullword ascii
		$l1 = "currentconfig" fullword ascii
		$l2 = "remotedomain" fullword ascii
		$l3 = "reserveip" fullword ascii
		$l4 = "otherinfo" fullword ascii
		$l5 = "filelen" fullword ascii
		$l6 = "%s%s.bak" fullword wide
		$l7 = "localmachine" fullword ascii
		$l8 = "remoteip" fullword ascii
		$l9 = "datastate" fullword ascii
		$l10 = "SYSTEM\\CurrentControlSet\\Control\\Network\\{4D36E972-E325-11CE-BFC1-08002BE10318}\\%s\\Connection" fullword ascii
		$s1 = "%s\\%s\\V5_History.dat" fullword wide
		$s2 = "%s\\%s\\history2.dat" fullword wide
		$s3 = "%s\\%s\\history.imw" fullword wide
		$s4 = "%s\\%s\\main.imw" fullword wide
		$s5 = "%s%d.%d.%d.%dWindows/%u" fullword ascii
		$s6 = "%s\\%c_%s_tmp" fullword wide
		$s7 = "%s\\%s\\main.db" fullword wide

	condition:
		uint16( 0 ) == 0x5a4d and ( ( 4 of ( $d* ) and 1 of ( $s* ) ) or ( 5 of ( $s* ) and 1 of ( $d* ) ) or 6 of ( $l* ) or ( pe.exports ( "DealC" ) and pe.exports ( "DealR" ) and pe.exports ( "DealS" ) and 1 of them ) )
}

Cadenas (23 patrones)

IdentificadorTipoValorModificadores
$d1texto"downfile"fullword ascii
$d2texto"getmypath"fullword ascii
$d3texto"content-type: monitor"fullword ascii
$d4texto"content-type: UsedType"fullword ascii
$d5texto"write command error"fullword ascii
$d6texto"C:\\WINDOWS\\system32\\kernel32.dll"fullword ascii
$l1texto"currentconfig"fullword ascii
$l2texto"remotedomain"fullword ascii
$l3texto"reserveip"fullword ascii
$l4texto"otherinfo"fullword ascii
$l5texto"filelen"fullword ascii
$l6texto"%s%s.bak"fullword wide
$l7texto"localmachine"fullword ascii
$l8texto"remoteip"fullword ascii
$l9texto"datastate"fullword ascii
$l10texto"SYSTEM\\CurrentControlSet\\Control\\Network\\{4D36E972-E325-11CE-BFC1-08002BE10318}\\%s\\Connection"fullword ascii
$s1texto"%s\\%s\\V5_History.dat"fullword wide
$s2texto"%s\\%s\\history2.dat"fullword wide
$s3texto"%s\\%s\\history.imw"fullword wide
$s4texto"%s\\%s\\main.imw"fullword wide
$s5texto"%s%d.%d.%d.%dWindows/%u"fullword ascii
$s6texto"%s\\%c_%s_tmp"fullword wide
$s7texto"%s\\%s\\main.db"fullword wide

Condición

uint16( 0 ) == 0x5a4d and ( ( 4 of ( $d* ) and 1 of ( $s* ) ) or ( 5 of ( $s* ) and 1 of ( $d* ) ) or 6 of ( $l* ) or ( pe.exports ( "DealC" ) and pe.exports ( "DealR" ) and pe.exports ( "DealS" ) and 1 of them ) )

En palabras sencillas (Heurística)

  • El archivo debe empezar por «MZ»: un ejecutable de Windows (PE).
  • Deben coincidir al menos 4 patrones de ( $d* ).
  • Deben coincidir al menos 1 patrones de ( $s* ).
  • Deben coincidir al menos 5 patrones de ( $s* ).
  • Deben coincidir al menos 1 patrones de ( $d* ).
  • Deben coincidir al menos 6 patrones de ( $l* ).
  • Deben coincidir al menos 1 patrones de la regla.
  • Usa el módulo pe.
  • Comprueba funciones exportadas o el nombre de la DLL.

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: d4f3b0cc-121e-5032-9721-1e2a86842fa5

Metadatos

snort_sid920264

Etiquetas:FILE

Más reglas de Windealer