Skip to content

YARA · ditekSHen detection

DITEKSHEN_MALWARE_Win_Vanillarat

Detects VanillaRAT

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

What this rule detects

Detects VanillaRAT

Associated malware family: Vanillarat.

Targets: Windows PE.

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

YARA-X says: warning[unintended_pattern_in_set]: pattern `$stub` may be unintendedly or redundantly included in pattern set `$s*`

Summary generated from the rule's metadata and condition.

Rule source

malware-win-vanillarat.yarBSD 2-Clause License
rule DITEKSHEN_MALWARE_Win_Vanillarat : FILE
{
	meta:
		description = "Detects VanillaRAT"
		author = "ditekSHen"
		id = "70c2cd1a-a6d4-562e-a6fc-c16a9e87c6b7"
		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#L7882-L7902"
		license_url = "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/LICENSE.txt"
		logic_hash = "d7b90ac88a50693ec4bb0676c04f5d161f04f67970ea60d80e79d774da75bfdc"
		score = 75
		quality = 75
		tags = "FILE"

	strings:
		$stub = "VanillaStub." ascii wide
		$s1 = "Client.Send: " wide
		$s2 = "Connected to chat" fullword wide
		$s3 = "GetStoredPasswords" fullword wide
		$s4 = "Started screen locker." fullword wide
		$s5 = "[<\\MOUSE>]" fullword wide
		$s6 = "YOUR SCREEN HAS BEEN LOCKED!" fullword wide
		$s7 = "record recsound" fullword wide
		$f1 = "<StartRemoteDestkop>d__" ascii
		$f2 = "<ConnectLoop>d__" ascii
		$f3 = "<Scan0>k__" ascii
		$f4 = "<RemoteShellActive>k__" ascii
		$f5 = "KillClient" fullword ascii

	condition:
		uint16( 0 ) == 0x5a4d and ( ( $stub and ( 2 of ( $s* ) or 2 of ( $f* ) ) ) or 6 of ( $s* ) or all of ( $f* ) )
}

Strings (13 patterns)

IdentifierTypeValueModifiers
$stubtext"VanillaStub."ascii wide
$s1text"Client.Send: "wide
$s2text"Connected to chat"fullword wide
$s3text"GetStoredPasswords"fullword wide
$s4text"Started screen locker."fullword wide
$s5text"[<\\MOUSE>]"fullword wide
$s6text"YOUR SCREEN HAS BEEN LOCKED!"fullword wide
$s7text"record recsound"fullword wide
$f1text"<StartRemoteDestkop>d__"ascii
$f2text"<ConnectLoop>d__"ascii
$f3text"<Scan0>k__"ascii
$f4text"<RemoteShellActive>k__"ascii
$f5text"KillClient"fullword ascii

Condition

uint16( 0 ) == 0x5a4d and ( ( $stub and ( 2 of ( $s* ) or 2 of ( $f* ) ) ) or 6 of ( $s* ) or all of ( $f* ) )

In plain words (Heuristic)

  • The file must start with “MZ” — a Windows executable (PE).
  • All patterns in ( $f* ) must match.
  • At least 2 patterns in ( $s* ) must match.
  • At least 2 patterns in ( $f* ) must match.
  • At least 6 patterns in ( $s* ) must match.
  • Pattern $stub must be present.

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: 70c2cd1a-a6d4-562e-a6fc-c16a9e87c6b7

Tags:FILE