Skip to content

YARA · ditekSHen detection

DITEKSHEN_MALWARE_Win_Neptune

Detects Neptune keylogger / infostealer

MalwareNeptuneditekSHen detectionBSD 2-Clause LicenseCompiles with YARA-X
Author
ditekSHen
Date
2020-11-06
Modified
2024-11-01
Score / Quality
75 / 75

What this rule detects

Detects Neptune keylogger / infostealer

Associated malware family: Neptune.

Targets: Windows PE.

It defines 15 patterns (15 text, 0 hex, 0 regex).

Summary generated from the rule's metadata and condition.

Rule source

malware-win-neptune.yarBSD 2-Clause License
rule DITEKSHEN_MALWARE_Win_Neptune : FILE
{
	meta:
		description = "Detects Neptune keylogger / infostealer"
		author = "ditekSHen"
		id = "0f619bea-f00b-5078-95a4-83306e3e87b4"
		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#L7931-L7953"
		license_url = "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/LICENSE.txt"
		logic_hash = "e3298bf55f89180ed7e9f7ad35b59d39284a5143fd69fa2a4fbc27d91fb2fbd3"
		score = 75
		quality = 75
		tags = "FILE"

	strings:
		$x1 = "your keylogger has been freshly installed on" wide
		$x2 = "Attached is a screenshot of the victim" wide
		$x3 = "color: rgb(2, 84, 138);'>Project Neptune</span><br>" wide
		$x4 = ">{Monitor Everything}</span><br><br>" wide
		$x5 = "[First Run] Neptune" wide
		$x6 = "Neptune - " wide
		$s1 = "Melt" fullword wide
		$s2 = "Hide" fullword wide
		$s3 = "SDDate+" fullword wide
		$s4 = "DelOff+" fullword wide
		$s5 = "MsgFalse+" fullword wide
		$s6 = "Clipboard:" fullword wide
		$s7 = "information is valid and working!" wide
		$s8 = ".exe /k %windir%\\System32\\reg.exe ADD HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\System /v EnableLUA /t REG_DWORD /d 0 /f" wide
		$s9 = "http://www.exampleserver.com/directfile.exe" fullword wide

	condition:
		uint16( 0 ) == 0x5a4d and ( 2 of ( $x* ) or 7 of ( $s* ) or ( 1 of ( $x* ) and 5 of ( $s* ) ) )
}

Strings (15 patterns)

IdentifierTypeValueModifiers
$x1text"your keylogger has been freshly installed on"wide
$x2text"Attached is a screenshot of the victim"wide
$x3text"color: rgb(2, 84, 138);'>Project Neptune</span><br>"wide
$x4text">{Monitor Everything}</span><br><br>"wide
$x5text"[First Run] Neptune"wide
$x6text"Neptune - "wide
$s1text"Melt"fullword wide
$s2text"Hide"fullword wide
$s3text"SDDate+"fullword wide
$s4text"DelOff+"fullword wide
$s5text"MsgFalse+"fullword wide
$s6text"Clipboard:"fullword wide
$s7text"information is valid and working!"wide
$s8text".exe /k %windir%\\System32\\reg.exe ADD HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\System /v EnableLUA /t REG_DWORD /d 0 /f"wide
$s9text"http://www.exampleserver.com/directfile.exe"fullword wide

Condition

uint16( 0 ) == 0x5a4d and ( 2 of ( $x* ) or 7 of ( $s* ) or ( 1 of ( $x* ) and 5 of ( $s* ) ) )

In plain words (Heuristic)

  • The file must start with “MZ” — a Windows executable (PE).
  • At least 2 patterns in ( $x* ) must match.
  • At least 7 patterns in ( $s* ) must match.
  • At least 1 patterns in ( $x* ) must match.
  • At least 5 patterns in ( $s* ) must match.

Test this rule in your browser

Drop a file to scan it with this rule using YARA-X compiled to WebAssembly. Nothing is uploaded.

Drop a file here or click to chooseScanned locally with YARA-X. Files up to 200 MB.

Open in editor

References

Licence & attribution

Author: ditekSHen

Source repository: ditekSHen detection @ e76c93dcde

Licence: BSD 2-Clause License (repository licence)

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

Original rule

Mirrored via YARA Forge 20260927, which prefixes rule names with the source and adds normalised meta fields.

Rule id: 0f619bea-f00b-5078-95a4-83306e3e87b4

Tags:FILE