YARA · ditekSHen detection
DITEKSHEN_MALWARE_Win_Nppspy
Detects NPPSpy / Ntospy
- 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.
import "pe"
rule DITEKSHEN_MALWARE_Win_Nppspy : FILE
{
meta:
= "Detects NPPSpy / Ntospy"
= "ditekShen"
= "3867ba96-1162-5693-b58e-fc6fa04d880a"
= "2020-11-06"
= "2024-11-01"
= "https://github.com/ditekshen/detection"
= "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/yara/malware.yar#L11305-L11325"
= "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/LICENSE.txt"
= "53e929b52dddd5e3d060d2dd9937411f1ff215be4d3c67f5935c2a3fbab006d6"
= 75
= 75
= "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)
| Identificador | Tipo | Valor | Modificadores |
|---|---|---|---|
| $s1 | texto | "ntskrnl.dll" | fullword ascii |
| $s2 | texto | "PasswordStealing.dll" | fullword ascii |
| $s3 | texto | "ntoskrnl.dll" | fullword ascii |
| $s4 | texto | "\\programdata\\packag~" | ascii |
| $s5 | texto | "NPPSPY.dll" | fullword ascii |
| $s6 | texto | "MSControll.dll" | fullword ascii |
| $s7 | texto | "\\Windows\\Temp\\" | ascii |
| $s8 | texto | "\\NPPSpy\\" | ascii |
| $s9 | texto | "NPGetCaps" | fullword ascii |
| $s10 | texto | "NPLogonNotify" | fullword ascii |
| $path | texto | "\\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.
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).
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
Reglas relacionadas
- MalwareditekSHen detection· ditekShen· 2020-11-06
- MalwareditekSHen detection· ditekShen· 2020-11-06
- MalwareditekSHen detection· ditekShen· 2020-11-06
- MalwareditekSHen detection· ditekShen· 2020-11-06
- MalwareditekSHen detection· ditekShen· 2020-11-06
- MalwareditekSHen detection· ditekShen· 2020-11-06
- MalwareditekSHen detection· ditekShen· 2020-11-06
- MalwareditekSHen detection· ditekShen· 2020-11-06