Skip to content

YARA · ditekSHen detection

DITEKSHEN_MALWARE_Win_Cyberstealer

Detects CyberStealer infostealer

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

What this rule detects

Detects CyberStealer infostealer

Associated malware family: Cyberstealer.

Targets: Windows PE.

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

Summary generated from the rule's metadata and condition.

Rule source

malware-win-cyberstealer.yarBSD 2-Clause License
rule DITEKSHEN_MALWARE_Win_Cyberstealer : FILE
{
	meta:
		description = "Detects CyberStealer infostealer"
		author = "ditekSHen"
		id = "cb02013f-ffb2-5a17-9d6e-1d19b0e98fb8"
		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#L9920-L9941"
		license_url = "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/LICENSE.txt"
		logic_hash = "72413b68fa1381656202165dcd878761727e7caf0f15ccd65f3f2f842243a1f6"
		score = 75
		quality = 71
		tags = "FILE"

	strings:
		$x1 = "\\Cyber Stealer\\" ascii
		$s1 = "[Virtualization]" fullword wide
		$s2 = "\"encryptedPassword\":\"([^\"]+)\"" fullword wide
		$s3 = "CreditCard" fullword ascii
		$s4 = "DecryptPassword" fullword ascii
		$s5 = "_modTime" fullword ascii
		$s6 = "_pathname" fullword ascii
		$s7 = "_pathnameInZip" fullword ascii
		$s8 = "GetBookmarksDBPath" fullword ascii
		$s9 = "GrabberImages" fullword ascii
		$r1 = "^1[a-km-zA-HJ-NP-Z1-9]{25,34}$" wide
		$r2 = "^3[a-km-zA-HJ-NP-Z1-9]{25,34}$" wide
		$r3 = "^([a-zA-Z0-9_\\-\\.]+)@([a-zA-Z0-9_\\-\\.]+)\\.([a-zA-Z]{2,5})$" wide
		$r4 = "^(?!:\\/\\/)([a-zA-Z0-9-_]+\\.)*[a-zA-Z0-9][a-zA-Z0-9-_]+\\.[a-zA-Z]{2,11}?$" wide

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

Strings (14 patterns)

IdentifierTypeValueModifiers
$x1text"\\Cyber Stealer\\"ascii
$s1text"[Virtualization]"fullword wide
$s2text"\"encryptedPassword\":\"([^\"]+)\""fullword wide
$s3text"CreditCard"fullword ascii
$s4text"DecryptPassword"fullword ascii
$s5text"_modTime"fullword ascii
$s6text"_pathname"fullword ascii
$s7text"_pathnameInZip"fullword ascii
$s8text"GetBookmarksDBPath"fullword ascii
$s9text"GrabberImages"fullword ascii
$r1text"^1[a-km-zA-HJ-NP-Z1-9]{25,34}$"wide
$r2text"^3[a-km-zA-HJ-NP-Z1-9]{25,34}$"wide
$r3text"^([a-zA-Z0-9_\\-\\.]+)@([a-zA-Z0-9_\\-\\.]+)\\.([a-zA-Z]{2,5})$"wide
$r4text"^(?!:\\/\\/)([a-zA-Z0-9-_]+\\.)*[a-zA-Z0-9][a-zA-Z0-9-_]+\\.[a-zA-Z]{2,11}?$"wide

Condition

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

In plain words (Heuristic)

  • The file must start with “MZ” — a Windows executable (PE).
  • All patterns in ( $r* ) must match.
  • At least 1 patterns in ( $x* ) must match.
  • At least 2 patterns in ( $s* ) must match.
  • At least 2 patterns in ( $r* ) must match.
  • At least 7 patterns in ( $s* ) must match.
  • At least 5 patterns in ( $s* ) must match.
  • At least 4 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: cb02013f-ffb2-5a17-9d6e-1d19b0e98fb8

Tags:FILE