Skip to content

YARA · ditekSHen detection

DITEKSHEN_MALWARE_Win_Mystic

Hunt for Mystic Infostealer

MalwareMysticditekSHen 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

Hunt for Mystic Infostealer

Associated malware family: Mystic.

Targets: Windows PE.

It defines 7 patterns (6 text, 0 hex, 1 regex).

Summary generated from the rule's metadata and condition.

Rule source

malware-win-mystic.yarBSD 2-Clause License
rule DITEKSHEN_MALWARE_Win_Mystic : FILE
{
	meta:
		description = "Hunt for Mystic Infostealer"
		author = "ditekSHen"
		id = "959eceab-0a2c-5361-b8f4-6739033ffae5"
		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#L9614-L9628"
		license_url = "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/LICENSE.txt"
		logic_hash = "26e0b85141df818d70124c0b19b5b6a05ac24ae679724d7a8ad94415a6462d17"
		score = 75
		quality = 75
		tags = "FILE"

	strings:
		$s1 = "LaStFiLe:)" ascii wide
		$s2 = "LaStPrOcEsS:)" ascii wide
		$s3 = "credit_cards" ascii wide
		$s4 = "number_of_processors" ascii wide
		$s5 = "computername" ascii wide
		$p1 = "G:\\Projects\\Python\\morpher\\" ascii wide
		$p2 = /G:\\Projects\\stealer\\.{15}\\Release\\.{5,25}\.pdb/ ascii wide

	condition:
		( uint16( 0 ) == 0x5a4d and ( 4 of ( $s* ) or ( 1 of ( $p* ) and 3 of ( $s* ) ) ) ) or ( all of ( $s* ) )
}

Strings (7 patterns)

IdentifierTypeValueModifiers
$s1text"LaStFiLe:)"ascii wide
$s2text"LaStPrOcEsS:)"ascii wide
$s3text"credit_cards"ascii wide
$s4text"number_of_processors"ascii wide
$s5text"computername"ascii wide
$p1text"G:\\Projects\\Python\\morpher\\"ascii wide
$p2regex/G:\\Projects\\stealer\\.{15}\\Release\\.{5,25}\.pdb/ascii wide

Condition

( uint16( 0 ) == 0x5a4d and ( 4 of ( $s* ) or ( 1 of ( $p* ) and 3 of ( $s* ) ) ) ) or ( all of ( $s* ) )

In plain words (Heuristic)

  • The file must start with “MZ” — a Windows executable (PE).
  • All patterns in ( $s* ) must match.
  • At least 4 patterns in ( $s* ) must match.
  • At least 1 patterns in ( $p* ) must match.
  • At least 3 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: 959eceab-0a2c-5361-b8f4-6739033ffae5

Tags:FILE