Aller au contenu

YARA · ditekSHen detection

DITEKSHEN_MALWARE_Win_Nppspy

Detects NPPSpy / Ntospy

MalwareNppspyditekSHen detectionBSD 2-Clause LicenseCompile avec YARA-X
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.

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* ) ) )
}

Chaînes (11 motifs)

IdentifiantTypeValeurModificateurs
$s1texte"ntskrnl.dll"fullword ascii
$s2texte"PasswordStealing.dll"fullword ascii
$s3texte"ntoskrnl.dll"fullword ascii
$s4texte"\\programdata\\packag~"ascii
$s5texte"NPPSPY.dll"fullword ascii
$s6texte"MSControll.dll"fullword ascii
$s7texte"\\Windows\\Temp\\"ascii
$s8texte"\\NPPSpy\\"ascii
$s9texte"NPGetCaps"fullword ascii
$s10texte"NPLogonNotify"fullword ascii
$pathtexte"\\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é.

Déposez un fichier ici ou cliquez pour choisirScanné localement avec YARA-X. Fichiers jusqu’à 200 Mo.

Ouvrir dans l’éditeur

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).

Règle d’origine

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