Saltar al contenido

YARA · ditekSHen detection

DITEKSHEN_MALWARE_Win_Hive

Detects Hive ransomware

MalwareHiveditekSHen 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 Hive ransomware

Familia de malware asociada: Hive.

Objetivos: PE de Windows.

Define 30 patrones (30 de texto, 0 hex, 0 regex).

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

Código de la regla

malware-win-hive.yarBSD 2-Clause License
rule DITEKSHEN_MALWARE_Win_Hive : FILE
{
	meta:
		description = "Detects Hive ransomware"
		author = "ditekSHen"
		id = "7b79dc54-01c7-5667-acf5-a32cd7a45b54"
		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#L6610-L6647"
		license_url = "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/LICENSE.txt"
		logic_hash = "14c20ff2fa62d80eed0f4f364e24d93d493d4f3b47f664983714940afa74046f"
		score = 75
		quality = 73
		tags = "FILE"

	strings:
		$url1 = "http://hivecust" ascii
		$url2 = "http://hiveleakdb" ascii
		$s1 = "encrypt_files.go" ascii
		$s2 = "erase_key.go" ascii
		$s3 = "kill_processes.go" ascii
		$s4 = "remove_shadow_copies.go" ascii
		$s5 = "stop_services_windows.go" ascii
		$s6 = "remove_itself_windows.go" ascii
		$x1 = "/encryptor/" ascii
		$x2 = "HOW_TO_DECRYPT.txt" ascii
		$x3 = "FilesEncrypted" fullword ascii
		$x4 = "EncryptionStarted" fullword ascii
		$x5 = "encryptFilesGroup" fullword ascii
		$x6 = "Your data will be undecryptable" ascii
		$x7 = "- Do not fool yourself. Encryption has perfect secrecy" ascii
		$v1_1 = ".EncryptFiles." ascii
		$v1_2 = ".EncryptFilename." ascii
		$v1_3 = ")*struct { F uintptr; .autotmp_14 string }" ascii
		$v1_4 = "D*struct { F uintptr; data *[]uint8; seed *uint8; fnc *main.decFunc }" ascii
		$v1_5 = "golang.org/x/sys/windows.getSystemWindowsDirectory" ascii
		$v1_6 = "path/filepath.WalkDir" ascii
		$v2_1 = "taskkill /f /im" ascii
		$v2_2 = "schtasks /delete /tn" ascii
		$v2_3 = "encfile.txt" ascii
		$v2_4 = "README.html" ascii
		$v2_5 = "total encrypt %v/%v" ascii
		$v2_6 = "<b>ITSSHOWKEY</b>" ascii
		$v2_7 = "Recovery your files." ascii
		$v2_8 = "yaml:\"send_host\"" ascii
		$v2_9 = "yaml:\"ignore_dir\"" ascii

	condition:
		uint16( 0 ) == 0x5a4d and ( all of ( $url* ) or all of ( $s* ) or 4 of ( $x* ) or 5 of ( $v1* ) or 5 of ( $v2* ) or ( 4 of ( $v2* ) and #v2_1 > 10 ) )
}

Cadenas (30 patrones)

IdentificadorTipoValorModificadores
$url1texto"http://hivecust"ascii
$url2texto"http://hiveleakdb"ascii
$s1texto"encrypt_files.go"ascii
$s2texto"erase_key.go"ascii
$s3texto"kill_processes.go"ascii
$s4texto"remove_shadow_copies.go"ascii
$s5texto"stop_services_windows.go"ascii
$s6texto"remove_itself_windows.go"ascii
$x1texto"/encryptor/"ascii
$x2texto"HOW_TO_DECRYPT.txt"ascii
$x3texto"FilesEncrypted"fullword ascii
$x4texto"EncryptionStarted"fullword ascii
$x5texto"encryptFilesGroup"fullword ascii
$x6texto"Your data will be undecryptable"ascii
$x7texto"- Do not fool yourself. Encryption has perfect secrecy"ascii
$v1_1texto".EncryptFiles."ascii
$v1_2texto".EncryptFilename."ascii
$v1_3texto")*struct { F uintptr; .autotmp_14 string }"ascii
$v1_4texto"D*struct { F uintptr; data *[]uint8; seed *uint8; fnc *main.decFunc }"ascii
$v1_5texto"golang.org/x/sys/windows.getSystemWindowsDirectory"ascii
$v1_6texto"path/filepath.WalkDir"ascii
$v2_1texto"taskkill /f /im"ascii
$v2_2texto"schtasks /delete /tn"ascii
$v2_3texto"encfile.txt"ascii
$v2_4texto"README.html"ascii
$v2_5texto"total encrypt %v/%v"ascii
$v2_6texto"<b>ITSSHOWKEY</b>"ascii
$v2_7texto"Recovery your files."ascii
$v2_8texto"yaml:\"send_host\""ascii
$v2_9texto"yaml:\"ignore_dir\""ascii

Condición

uint16( 0 ) == 0x5a4d and ( all of ( $url* ) or all of ( $s* ) or 4 of ( $x* ) or 5 of ( $v1* ) or 5 of ( $v2* ) or ( 4 of ( $v2* ) and #v2_1 > 10 ) )

En palabras sencillas (Heurística)

  • El archivo debe empezar por «MZ»: un ejecutable de Windows (PE).
  • Deben coincidir todos los patrones de ( $url* ).
  • Deben coincidir todos los patrones de ( $s* ).
  • Deben coincidir al menos 4 patrones de ( $x* ).
  • Deben coincidir al menos 5 patrones de ( $v1* ).
  • Deben coincidir al menos 5 patrones de ( $v2* ).
  • Deben coincidir al menos 4 patrones de ( $v2* ).
  • El patrón $v2_1 debe aparecer > 10 veces.

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: 7b79dc54-01c7-5667-acf5-a32cd7a45b54

Etiquetas:FILE

Más reglas de Hive