YARA · ditekSHen detection
DITEKSHEN_MALWARE_Win_Nppspy
Detects NPPSpy / Ntospy
- Auteur
- ditekShen
- Date
- 2020-11-06
- Modifiée
- 2024-11-01
- Score / Qualité
- 75 / 75
Ce que détecte cette règle
Detects NPPSpy / Ntospy
Famille de malware associée : Nppspy.
Cibles : PE Windows.
Elle définit 11 motifs (11 texte, 0 hex, 0 regex). Modules YARA utilisés : pe.
Résumé généré à partir des métadonnées et de la condition de la règle.
Source de la règle
Inclut les imports nécessaires pour la compiler seule.
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* ) ) )
}
Chaînes (11 motifs)
| Identifiant | Type | Valeur | Modificateurs |
|---|---|---|---|
| $s1 | texte | "ntskrnl.dll" | fullword ascii |
| $s2 | texte | "PasswordStealing.dll" | fullword ascii |
| $s3 | texte | "ntoskrnl.dll" | fullword ascii |
| $s4 | texte | "\\programdata\\packag~" | ascii |
| $s5 | texte | "NPPSPY.dll" | fullword ascii |
| $s6 | texte | "MSControll.dll" | fullword ascii |
| $s7 | texte | "\\Windows\\Temp\\" | ascii |
| $s8 | texte | "\\NPPSpy\\" | ascii |
| $s9 | texte | "NPGetCaps" | fullword ascii |
| $s10 | texte | "NPLogonNotify" | fullword ascii |
| $path | texte | "\\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* ) ) )En clair (Heuristique)
- Le fichier doit commencer par « MZ » — un exécutable Windows (PE).
- Le fichier doit faire moins de 110KB (garde-fou peu coûteux qui écarte les gros fichiers).
- Au moins un motif de ( $s* ) doit être trouvé.
- Au moins 1 motifs de ( $s* ) doivent être trouvés.
- Utilise le module pe.
- Vérifie des fonctions exportées ou le nom de la DLL.
- Exige une DLL.
Tester cette règle dans votre navigateur
Déposez un fichier pour le scanner avec cette règle grâce à YARA-X compilé en WebAssembly. Rien n’est envoyé.
Références
Licence et attribution
Auteur : ditekShen
Dépôt source : ditekSHen detection @ e76c93dcde
Licence : BSD 2-Clause License (licence du dépôt)
Mention de copyright : Copyright 2021 by ditekSHen (https://github.com/ditekshen/detection).
Reprise via YARA Forge 20260927, qui préfixe les noms de règles par la source et ajoute des champs meta normalisés.
Identifiant de règle: 3867ba96-1162-5693-b58e-fc6fa04d880a
Tags:FILE
Règles liées
- 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