Saltar al contenido

YARA · ditekSHen detection

DITEKSHEN_MALWARE_Win_Netwire

Detects NetWire RAT

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

Qué detecta esta regla

Detects NetWire RAT

Familia de malware asociada: Netwire.

Objetivos: PE de Windows.

Define 15 patrones (14 de texto, 1 hex, 0 regex).

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

Código de la regla

malware-win-netwire.yarBSD 2-Clause License
rule DITEKSHEN_MALWARE_Win_Netwire : FILE
{
	meta:
		description = "Detects NetWire RAT"
		author = "ditekSHen"
		id = "c215f449-c725-51da-8f5b-2619bc282b22"
		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#L4783-L4805"
		license_url = "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/LICENSE.txt"
		logic_hash = "bae4f0cd7a431336bd784ba95f6ba3396e6f0f12c081e62482ad37ff859c1f1c"
		score = 75
		quality = 75
		tags = "FILE"

	strings:
		$x1 = "SOFTWARE\\NetWire" fullword ascii
		$x2 = { 4e 65 74 57 69 72 65 00 53 4f 46 54 57 41 52 45 5c 00 }
		$s1 = "User-Agent: Mozilla/4.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko" fullword ascii
		$s2 = "filenames.txt" fullword ascii
		$s3 = "GET %s HTTP/1.1" fullword ascii
		$s4 = "[%.2d/%.2d/%d %.2d:%.2d:%.2d]" fullword ascii
		$s5 = "Host.exe" fullword ascii
		$s6 = "-m \"%s\"" fullword ascii
		$g1 = "HostId" fullword ascii
		$g2 = "History" fullword ascii
		$g3 = "encrypted_key" fullword ascii
		$g4 = "Install Date" fullword ascii
		$g5 = "hostname" fullword ascii
		$g6 = "encryptedUsername" fullword ascii
		$g7 = "encryptedPassword" fullword ascii

	condition:
		uint16( 0 ) == 0x5a4d and ( all of ( $s* ) or all of ( $x* ) or ( 1 of ( $x* ) and 2 of ( $s* ) ) or ( all of ( $g* ) and ( 2 of ( $s* ) or 1 of ( $x* ) ) ) )
}

Cadenas (15 patrones)

IdentificadorTipoValorModificadores
$x1texto"SOFTWARE\\NetWire"fullword ascii
$x2hex{ 4e 65 74 57 69 72 65 00 53 4f 46 54 57 41 52 45 5c 00 }
$s1texto"User-Agent: Mozilla/4.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko"fullword ascii
$s2texto"filenames.txt"fullword ascii
$s3texto"GET %s HTTP/1.1"fullword ascii
$s4texto"[%.2d/%.2d/%d %.2d:%.2d:%.2d]"fullword ascii
$s5texto"Host.exe"fullword ascii
$s6texto"-m \"%s\""fullword ascii
$g1texto"HostId"fullword ascii
$g2texto"History"fullword ascii
$g3texto"encrypted_key"fullword ascii
$g4texto"Install Date"fullword ascii
$g5texto"hostname"fullword ascii
$g6texto"encryptedUsername"fullword ascii
$g7texto"encryptedPassword"fullword ascii

Condición

uint16( 0 ) == 0x5a4d and ( all of ( $s* ) or all of ( $x* ) or ( 1 of ( $x* ) and 2 of ( $s* ) ) or ( all of ( $g* ) and ( 2 of ( $s* ) or 1 of ( $x* ) ) ) )

En palabras sencillas (Heurística)

  • El archivo debe empezar por «MZ»: un ejecutable de Windows (PE).
  • Deben coincidir todos los patrones de ( $s* ).
  • Deben coincidir todos los patrones de ( $x* ).
  • Deben coincidir todos los patrones de ( $g* ).
  • Deben coincidir al menos 1 patrones de ( $x* ).
  • Deben coincidir al menos 2 patrones de ( $s* ).

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: c215f449-c725-51da-8f5b-2619bc282b22

Etiquetas:FILE