Zum Inhalt springen

YARA · ditekSHen detection

DITEKSHEN_MALWARE_Win_Nppspy

Detects NPPSpy / Ntospy

MalwareNppspyditekSHen detectionBSD 2-Clause LicenseKompiliert mit YARA-X
Autor
ditekShen
Datum
2020-11-06
Geändert
2024-11-01
Score / Qualität
75 / 75

Was diese Regel erkennt

Detects NPPSpy / Ntospy

Zugehörige Malware-Familie: Nppspy.

Ziele: Windows-PE.

Sie definiert 11 Muster (11 Text, 0 Hex, 0 Regex). Verwendete YARA-Module: pe.

Zusammenfassung aus den Metadaten und der Bedingung der Regel erzeugt.

Regelquelltext

Enthält die Imports, die zum eigenständigen Kompilieren nötig sind.

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

Strings (11 Muster)

BezeichnerTypWertModifikatoren
$s1Text"ntskrnl.dll"fullword ascii
$s2Text"PasswordStealing.dll"fullword ascii
$s3Text"ntoskrnl.dll"fullword ascii
$s4Text"\\programdata\\packag~"ascii
$s5Text"NPPSPY.dll"fullword ascii
$s6Text"MSControll.dll"fullword ascii
$s7Text"\\Windows\\Temp\\"ascii
$s8Text"\\NPPSpy\\"ascii
$s9Text"NPGetCaps"fullword ascii
$s10Text"NPLogonNotify"fullword ascii
$pathText"\\GrzegorzTworek\\"ascii

Bedingung

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

In Worten (Heuristik)

  • Die Datei muss mit „MZ“ beginnen — eine Windows-Programmdatei (PE).
  • Die Datei muss kleiner als 110KB sein (eine günstige Grenze, die große Dateien ausschließt).
  • Mindestens ein Muster aus ( $s* ) muss treffen.
  • Mindestens 1 Muster aus ( $s* ) müssen treffen.
  • Nutzt das Modul pe.
  • Prüft exportierte Funktionen oder den DLL-Namen.
  • Erfordert eine DLL.

Diese Regel im Browser testen

Legen Sie eine Datei ab, um sie mit dieser Regel und YARA-X als WebAssembly zu scannen. Nichts wird hochgeladen.

Datei hier ablegen oder klicken zum AuswählenLokal mit YARA-X gescannt. Dateien bis 200 MB.

Im Editor öffnen

Referenzen

Lizenz & Namensnennung

Autor: ditekShen

Quell-Repository: ditekSHen detection @ e76c93dcde

Lizenz: BSD 2-Clause License (Repository-Lizenz)

Copyright-Hinweis: Copyright 2021 by ditekSHen (https://github.com/ditekshen/detection).

Originalregel

Gespiegelt über YARA Forge 20260927, das Regelnamen mit der Quelle präfixiert und normalisierte Meta-Felder ergänzt.

Regel-ID: 3867ba96-1162-5693-b58e-fc6fa04d880a

Tags:FILE