Saltar al contenido

YARA · ditekSHen detection

DITEKSHEN_MALWARE_Win_Xfiles

Detects X-Files infostealer (formerly BotSh1zoid)

MalwareXfilesditekSHen 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 X-Files infostealer (formerly BotSh1zoid)

Familia de malware asociada: Xfiles.

Objetivos: PE de Windows.

Define 24 patrones (22 de texto, 0 hex, 2 regex).

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

Código de la regla

malware-win-xfiles.yarBSD 2-Clause License
rule DITEKSHEN_MALWARE_Win_Xfiles : FILE
{
	meta:
		description = "Detects X-Files infostealer (formerly BotSh1zoid)"
		author = "ditekSHen"
		id = "3f8b2f9b-aa6a-5ffc-95b8-5e44de0d1a49"
		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#L6429-L6460"
		license_url = "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/LICENSE.txt"
		logic_hash = "0c04a8f019aea36f4bba3ce8289c2d608c69d76bbf321052560b4ca2214be057"
		score = 75
		quality = 73
		tags = "FILE"

	strings:
		$x1 = "\\BotSh1zoid\\" ascii
		$x2 = "\\BuildPacker.pdb" ascii
		$x3 = "\\Svc_host.pdb" ascii nocase
		$s1 = "WDefender" fullword ascii
		$s2 = "CheckDefender" fullword ascii
		$s3 = "RunPS" fullword ascii
		$s4 = "DownloadFile" fullword ascii
		$v1_1 = "<Pass encoding=\"base64\">(.*)</Pass>" wide
		$v1_2 = "Grabber\\" wide
		$v1_3 = "/log.php" wide
		$v1_4 = /Browsers\\(Logins|Cards|Cookies)/ wide
		$v1_5 = "<StealSteam>b__" ascii
		$v1_6 = "record_header_field" fullword ascii
		$v1_7 = "JavaScreenshotiptReader" fullword ascii
		$v1_8 = "HTTPDebuggerPro" wide
		$v1_9 = "IEInspector" wide
		$v1_10 = "Fiddler" wide
		$v2_1 = /get_(Cookie|Logins|Cards)Path/ fullword ascii
		$v2_2 = "get_AllScreens" fullword ascii
		$v2_3 = "{0}_{1}_{2}.zip" fullword wide
		$v2_4 = "\\Stealer" fullword wide
		$g1 = "$983a3552-4ec3-4936-bd4a-8e6fd67b4c67" fullword ascii
		$g2 = "$a5d9ca4d-400f-4e07-8c09-a916b548f2e3" fullword ascii
		$g3 = "$ebc25cf6-9120-4283-b972-0e5520d0000C" fullword ascii

	condition:
		uint16( 0 ) == 0x5a4d and ( ( 1 of ( $x* ) and ( 3 of ( $s* ) or 3 of ( $v1* ) or 3 of ( $v2* ) ) ) or 7 of ( $v1* ) or 3 of ( $v2* ) or ( 2 of ( $g* ) and 3 of them ) )
}

Cadenas (24 patrones)

IdentificadorTipoValorModificadores
$x1texto"\\BotSh1zoid\\"ascii
$x2texto"\\BuildPacker.pdb"ascii
$x3texto"\\Svc_host.pdb"ascii nocase
$s1texto"WDefender"fullword ascii
$s2texto"CheckDefender"fullword ascii
$s3texto"RunPS"fullword ascii
$s4texto"DownloadFile"fullword ascii
$v1_1texto"<Pass encoding=\"base64\">(.*)</Pass>"wide
$v1_2texto"Grabber\\"wide
$v1_3texto"/log.php"wide
$v1_4regex/Browsers\\(Logins|Cards|Cookies)/wide
$v1_5texto"<StealSteam>b__"ascii
$v1_6texto"record_header_field"fullword ascii
$v1_7texto"JavaScreenshotiptReader"fullword ascii
$v1_8texto"HTTPDebuggerPro"wide
$v1_9texto"IEInspector"wide
$v1_10texto"Fiddler"wide
$v2_1regex/get_(Cookie|Logins|Cards)Path/fullword ascii
$v2_2texto"get_AllScreens"fullword ascii
$v2_3texto"{0}_{1}_{2}.zip"fullword wide
$v2_4texto"\\Stealer"fullword wide
$g1texto"$983a3552-4ec3-4936-bd4a-8e6fd67b4c67"fullword ascii
$g2texto"$a5d9ca4d-400f-4e07-8c09-a916b548f2e3"fullword ascii
$g3texto"$ebc25cf6-9120-4283-b972-0e5520d0000C"fullword ascii

Condición

uint16( 0 ) == 0x5a4d and ( ( 1 of ( $x* ) and ( 3 of ( $s* ) or 3 of ( $v1* ) or 3 of ( $v2* ) ) ) or 7 of ( $v1* ) or 3 of ( $v2* ) or ( 2 of ( $g* ) and 3 of them ) )

En palabras sencillas (Heurística)

  • El archivo debe empezar por «MZ»: un ejecutable de Windows (PE).
  • Deben coincidir al menos 1 patrones de ( $x* ).
  • Deben coincidir al menos 3 patrones de ( $s* ).
  • Deben coincidir al menos 3 patrones de ( $v1* ).
  • Deben coincidir al menos 3 patrones de ( $v2* ).
  • Deben coincidir al menos 7 patrones de ( $v1* ).
  • Deben coincidir al menos 2 patrones de ( $g* ).
  • Deben coincidir al menos 3 patrones de la regla.

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: 3f8b2f9b-aa6a-5ffc-95b8-5e44de0d1a49

Etiquetas:FILE