Skip to content

YARA · ditekSHen detection

DITEKSHEN_MALWARE_Win_Fpspy

FPSpy

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

What this rule detects

FPSpy

Associated malware family: Fpspy.

Targets: Windows PE.

It defines 21 patterns (20 text, 0 hex, 1 regex). YARA modules used: pe.

Summary generated from the rule's metadata and condition.

Rule source

Includes the imports needed to compile it on its own.

malware-win-fpspy.yarBSD 2-Clause License
import "pe"

rule DITEKSHEN_MALWARE_Win_Fpspy : FILE
{
	meta:
		description = "FPSpy"
		author = "ditekshen"
		id = "39d3be12-1b06-57b1-b3c2-2cbd13a17b03"
		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#L11887-L11916"
		license_url = "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/LICENSE.txt"
		logic_hash = "c26736c7f056f3d13c58e724fda601e88468e2386852b072a37c6646fb5ef8f9"
		score = 75
		quality = 73
		tags = "FILE"
		clamav1 = "MALWARE.Win.Trojan.FPSpy"

	strings:
		$f1 = "[Analys_Spy]" wide
		$f2 = "[DeletePoorDll]" wide
		$f3 = "[DownloadProc]" wide
		$f4 = "[DragWarp]" wide
		$f5 = "[GetCoolDir]" wide
		$f6 = "[JackSleep]" wide
		$f7 = "[KillCmdExe]" wide
		$f8 = "[PsDownProc]" wide
		$f9 = "[PsUpProc]" wide
		$f10 = "[ReadFileFromPacket]" wide
		$f11 = "[RemoteDropExec]" wide
		$f12 = "[RemoteExec]" wide
		$f13 = "[RemoteInject]" wide
		$f14 = "[SendHttpForUpload]" wide
		$s1 = "MazeFunc" fullword ascii
		$s2 = /(Exit|Update|Drop)_EVT/ fullword ascii
		$s3 = "Key.dat" fullword ascii
		$s4 = "%sSysInfo_%02d_%02d_%02d.txt" fullword ascii
		$s5 = "cmd /c systeminfo >> %s" fullword ascii
		$s6 = "Content-Disposition: form-data; name=\"MAX_FILE_SIZE\"" fullword ascii
		$s7 = "FPSpy" fullword wide

	condition:
		uint16( 0 ) == 0x5a4d and ( ( pe.exports ( "MazeFunc" ) and 2 of ( $f* ) and 1 of ( $s* ) ) or ( 6 of ( $f* ) and 1 of ( $s* ) ) or ( 5 of ( $s* ) and 1 of ( $f* ) ) or ( 8 of ( $f* ) ) )
}

Strings (21 patterns)

IdentifierTypeValueModifiers
$f1text"[Analys_Spy]"wide
$f2text"[DeletePoorDll]"wide
$f3text"[DownloadProc]"wide
$f4text"[DragWarp]"wide
$f5text"[GetCoolDir]"wide
$f6text"[JackSleep]"wide
$f7text"[KillCmdExe]"wide
$f8text"[PsDownProc]"wide
$f9text"[PsUpProc]"wide
$f10text"[ReadFileFromPacket]"wide
$f11text"[RemoteDropExec]"wide
$f12text"[RemoteExec]"wide
$f13text"[RemoteInject]"wide
$f14text"[SendHttpForUpload]"wide
$s1text"MazeFunc"fullword ascii
$s2regex/(Exit|Update|Drop)_EVT/fullword ascii
$s3text"Key.dat"fullword ascii
$s4text"%sSysInfo_%02d_%02d_%02d.txt"fullword ascii
$s5text"cmd /c systeminfo >> %s"fullword ascii
$s6text"Content-Disposition: form-data; name=\"MAX_FILE_SIZE\""fullword ascii
$s7text"FPSpy"fullword wide

Condition

uint16( 0 ) == 0x5a4d and ( ( pe.exports ( "MazeFunc" ) and 2 of ( $f* ) and 1 of ( $s* ) ) or ( 6 of ( $f* ) and 1 of ( $s* ) ) or ( 5 of ( $s* ) and 1 of ( $f* ) ) or ( 8 of ( $f* ) ) )

In plain words (Heuristic)

  • The file must start with “MZ” — a Windows executable (PE).
  • At least 2 patterns in ( $f* ) must match.
  • At least 1 patterns in ( $s* ) must match.
  • At least 6 patterns in ( $f* ) must match.
  • At least 5 patterns in ( $s* ) must match.
  • At least 1 patterns in ( $f* ) must match.
  • At least 8 patterns in ( $f* ) must match.
  • Uses the pe module.
  • Checks exported functions or the DLL name.

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: 39d3be12-1b06-57b1-b3c2-2cbd13a17b03

Metadata

clamav1MALWARE.Win.Trojan.FPSpy

Tags:FILE