Saltar al contenido

YARA · ditekSHen detection

DITEKSHEN_MALWARE_Win_Nppspy

Detects NPPSpy / Ntospy

MalwareNppspyditekSHen 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 NPPSpy / Ntospy

Familia de malware asociada: Nppspy.

Objetivos: PE de Windows.

Define 11 patrones (11 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-nppspy.yarBSD 2-Clause License
import "pe"

rule DITEKSHEN_MALWARE_Win_Nppspy : FILE
{
	meta:
		description = "Detects NPPSpy / Ntospy"
		author = "ditekShen"
		id = "3867ba96-1162-5693-b58e-fc6fa04d880a"
		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#L11305-L11325"
		license_url = "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/LICENSE.txt"
		logic_hash = "53e929b52dddd5e3d060d2dd9937411f1ff215be4d3c67f5935c2a3fbab006d6"
		score = 75
		quality = 75
		tags = "FILE"

	strings:
		$s1 = "ntskrnl.dll" fullword ascii
		$s2 = "PasswordStealing.dll" fullword ascii
		$s3 = "ntoskrnl.dll" fullword ascii
		$s4 = "\\programdata\\packag~" ascii
		$s5 = "NPPSPY.dll" fullword ascii
		$s6 = "MSControll.dll" fullword ascii
		$s7 = "\\Windows\\Temp\\" ascii
		$s8 = "\\NPPSpy\\" ascii
		$s9 = "NPGetCaps" fullword ascii
		$s10 = "NPLogonNotify" fullword ascii
		$path = "\\GrzegorzTworek\\" ascii

	condition:
		uint16( 0 ) == 0x5a4d and ( ( pe.is_dll ( ) and filesize < 110KB and pe.number_of_exports == 2 and ( ( pe.exports ( "NPGetCaps" ) and pe.exports ( "NPLogonNotify" ) ) or ( 1 of ( $s* ) and ( pe.exports ( "NPGetCaps" ) or pe.exports ( "NPLogonNotify" ) ) ) ) ) or ( ( $path ) and any of ( $s* ) ) )
}

Cadenas (11 patrones)

IdentificadorTipoValorModificadores
$s1texto"ntskrnl.dll"fullword ascii
$s2texto"PasswordStealing.dll"fullword ascii
$s3texto"ntoskrnl.dll"fullword ascii
$s4texto"\\programdata\\packag~"ascii
$s5texto"NPPSPY.dll"fullword ascii
$s6texto"MSControll.dll"fullword ascii
$s7texto"\\Windows\\Temp\\"ascii
$s8texto"\\NPPSpy\\"ascii
$s9texto"NPGetCaps"fullword ascii
$s10texto"NPLogonNotify"fullword ascii
$pathtexto"\\GrzegorzTworek\\"ascii

Condición

uint16( 0 ) == 0x5a4d and ( ( pe.is_dll ( ) and filesize < 110KB and pe.number_of_exports == 2 and ( ( pe.exports ( "NPGetCaps" ) and pe.exports ( "NPLogonNotify" ) ) or ( 1 of ( $s* ) and ( pe.exports ( "NPGetCaps" ) or pe.exports ( "NPLogonNotify" ) ) ) ) ) or ( ( $path ) and any of ( $s* ) ) )

En palabras sencillas (Heurística)

  • El archivo debe empezar por «MZ»: un ejecutable de Windows (PE).
  • El archivo debe ocupar menos de 110KB (un límite barato que descarta archivos grandes).
  • Debe coincidir al menos un patrón de ( $s* ).
  • Deben coincidir al menos 1 patrones de ( $s* ).
  • Usa el módulo pe.
  • Comprueba funciones exportadas o el nombre de la DLL.
  • Requiere una 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: 3867ba96-1162-5693-b58e-fc6fa04d880a

Etiquetas:FILE